Update the @actions/cache package to the latest version (#390)
* Update the @actions/cache package to the latest version Signed-off-by: Sora Morimoto <sora@morimoto.io>
This commit is contained in:
		
							parent
							
								
									d29c1df198
								
							
						
					
					
						commit
						ab48bf6f67
					
				
							
								
								
									
										5251
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5251
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @ -987,173 +987,173 @@ class ExecState extends events.EventEmitter { | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __asyncValues = (this && this.__asyncValues) || function (o) { | var __asyncValues = (this && this.__asyncValues) || function (o) { | ||||||
|     if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |     if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|     var m = o[Symbol.asyncIterator], i; |     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); |     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 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); } |     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) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const exec = __importStar(__webpack_require__(986)); | const exec = __importStar(__webpack_require__(986)); | ||||||
| const glob = __importStar(__webpack_require__(281)); | const glob = __importStar(__webpack_require__(281)); | ||||||
| const io = __importStar(__webpack_require__(1)); | const io = __importStar(__webpack_require__(1)); | ||||||
| const fs = __importStar(__webpack_require__(747)); | const fs = __importStar(__webpack_require__(747)); | ||||||
| const path = __importStar(__webpack_require__(622)); | const path = __importStar(__webpack_require__(622)); | ||||||
| const semver = __importStar(__webpack_require__(280)); | const semver = __importStar(__webpack_require__(280)); | ||||||
| const util = __importStar(__webpack_require__(669)); | const util = __importStar(__webpack_require__(669)); | ||||||
| const uuid_1 = __webpack_require__(898); | const uuid_1 = __webpack_require__(898); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| // From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
 | // From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
 | ||||||
| function createTempDirectory() { | function createTempDirectory() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const IS_WINDOWS = process.platform === 'win32'; |         const IS_WINDOWS = process.platform === 'win32'; | ||||||
|         let tempDirectory = process.env['RUNNER_TEMP'] || ''; |         let tempDirectory = process.env['RUNNER_TEMP'] || ''; | ||||||
|         if (!tempDirectory) { |         if (!tempDirectory) { | ||||||
|             let baseLocation; |             let baseLocation; | ||||||
|             if (IS_WINDOWS) { |             if (IS_WINDOWS) { | ||||||
|                 // On Windows use the USERPROFILE env variable
 |                 // On Windows use the USERPROFILE env variable
 | ||||||
|                 baseLocation = process.env['USERPROFILE'] || 'C:\\'; |                 baseLocation = process.env['USERPROFILE'] || 'C:\\'; | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 if (process.platform === 'darwin') { |                 if (process.platform === 'darwin') { | ||||||
|                     baseLocation = '/Users'; |                     baseLocation = '/Users'; | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|                     baseLocation = '/home'; |                     baseLocation = '/home'; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             tempDirectory = path.join(baseLocation, 'actions', 'temp'); |             tempDirectory = path.join(baseLocation, 'actions', 'temp'); | ||||||
|         } |         } | ||||||
|         const dest = path.join(tempDirectory, uuid_1.v4()); |         const dest = path.join(tempDirectory, uuid_1.v4()); | ||||||
|         yield io.mkdirP(dest); |         yield io.mkdirP(dest); | ||||||
|         return dest; |         return dest; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.createTempDirectory = createTempDirectory; | exports.createTempDirectory = createTempDirectory; | ||||||
| function getArchiveFileSizeIsBytes(filePath) { | function getArchiveFileSizeIsBytes(filePath) { | ||||||
|     return fs.statSync(filePath).size; |     return fs.statSync(filePath).size; | ||||||
| } | } | ||||||
| exports.getArchiveFileSizeIsBytes = getArchiveFileSizeIsBytes; | exports.getArchiveFileSizeIsBytes = getArchiveFileSizeIsBytes; | ||||||
| function resolvePaths(patterns) { | function resolvePaths(patterns) { | ||||||
|     var e_1, _a; |     var e_1, _a; | ||||||
|     var _b; |     var _b; | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const paths = []; |         const paths = []; | ||||||
|         const workspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); |         const workspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); | ||||||
|         const globber = yield glob.create(patterns.join('\n'), { |         const globber = yield glob.create(patterns.join('\n'), { | ||||||
|             implicitDescendants: false |             implicitDescendants: false | ||||||
|         }); |         }); | ||||||
|         try { |         try { | ||||||
|             for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { |             for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { | ||||||
|                 const file = _d.value; |                 const file = _d.value; | ||||||
|                 const relativeFile = path.relative(workspace, file); |                 const relativeFile = path.relative(workspace, file); | ||||||
|                 core.debug(`Matched: ${relativeFile}`); |                 core.debug(`Matched: ${relativeFile}`); | ||||||
|                 // Paths are made relative so the tar entries are all relative to the root of the workspace.
 |                 // Paths are made relative so the tar entries are all relative to the root of the workspace.
 | ||||||
|                 paths.push(`${relativeFile}`); |                 paths.push(`${relativeFile}`); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         catch (e_1_1) { e_1 = { error: e_1_1 }; } |         catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); |                 if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); | ||||||
|             } |             } | ||||||
|             finally { if (e_1) throw e_1.error; } |             finally { if (e_1) throw e_1.error; } | ||||||
|         } |         } | ||||||
|         return paths; |         return paths; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.resolvePaths = resolvePaths; | exports.resolvePaths = resolvePaths; | ||||||
| function unlinkFile(filePath) { | function unlinkFile(filePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         return util.promisify(fs.unlink)(filePath); |         return util.promisify(fs.unlink)(filePath); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.unlinkFile = unlinkFile; | exports.unlinkFile = unlinkFile; | ||||||
| function getVersion(app) { | function getVersion(app) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Checking ${app} --version`); |         core.debug(`Checking ${app} --version`); | ||||||
|         let versionOutput = ''; |         let versionOutput = ''; | ||||||
|         try { |         try { | ||||||
|             yield exec.exec(`${app} --version`, [], { |             yield exec.exec(`${app} --version`, [], { | ||||||
|                 ignoreReturnCode: true, |                 ignoreReturnCode: true, | ||||||
|                 silent: true, |                 silent: true, | ||||||
|                 listeners: { |                 listeners: { | ||||||
|                     stdout: (data) => (versionOutput += data.toString()), |                     stdout: (data) => (versionOutput += data.toString()), | ||||||
|                     stderr: (data) => (versionOutput += data.toString()) |                     stderr: (data) => (versionOutput += data.toString()) | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|         catch (err) { |         catch (err) { | ||||||
|             core.debug(err.message); |             core.debug(err.message); | ||||||
|         } |         } | ||||||
|         versionOutput = versionOutput.trim(); |         versionOutput = versionOutput.trim(); | ||||||
|         core.debug(versionOutput); |         core.debug(versionOutput); | ||||||
|         return versionOutput; |         return versionOutput; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| // Use zstandard if possible to maximize cache performance
 | // Use zstandard if possible to maximize cache performance
 | ||||||
| function getCompressionMethod() { | function getCompressionMethod() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         if (process.platform === 'win32' && !(yield isGnuTarInstalled())) { |         if (process.platform === 'win32' && !(yield isGnuTarInstalled())) { | ||||||
|             // Disable zstd due to bug https://github.com/actions/cache/issues/301
 |             // Disable zstd due to bug https://github.com/actions/cache/issues/301
 | ||||||
|             return constants_1.CompressionMethod.Gzip; |             return constants_1.CompressionMethod.Gzip; | ||||||
|         } |         } | ||||||
|         const versionOutput = yield getVersion('zstd'); |         const versionOutput = yield getVersion('zstd'); | ||||||
|         const version = semver.clean(versionOutput); |         const version = semver.clean(versionOutput); | ||||||
|         if (!versionOutput.toLowerCase().includes('zstd command line interface')) { |         if (!versionOutput.toLowerCase().includes('zstd command line interface')) { | ||||||
|             // zstd is not installed
 |             // zstd is not installed
 | ||||||
|             return constants_1.CompressionMethod.Gzip; |             return constants_1.CompressionMethod.Gzip; | ||||||
|         } |         } | ||||||
|         else if (!version || semver.lt(version, 'v1.3.2')) { |         else if (!version || semver.lt(version, 'v1.3.2')) { | ||||||
|             // zstd is installed but using a version earlier than 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
 |             // v1.3.2 is required to use the `--long` options in zstd
 | ||||||
|             return constants_1.CompressionMethod.ZstdWithoutLong; |             return constants_1.CompressionMethod.ZstdWithoutLong; | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             return constants_1.CompressionMethod.Zstd; |             return constants_1.CompressionMethod.Zstd; | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.getCompressionMethod = getCompressionMethod; | exports.getCompressionMethod = getCompressionMethod; | ||||||
| function getCacheFileName(compressionMethod) { | function getCacheFileName(compressionMethod) { | ||||||
|     return compressionMethod === constants_1.CompressionMethod.Gzip |     return compressionMethod === constants_1.CompressionMethod.Gzip | ||||||
|         ? constants_1.CacheFilename.Gzip |         ? constants_1.CacheFilename.Gzip | ||||||
|         : constants_1.CacheFilename.Zstd; |         : constants_1.CacheFilename.Zstd; | ||||||
| } | } | ||||||
| exports.getCacheFileName = getCacheFileName; | exports.getCacheFileName = getCacheFileName; | ||||||
| function isGnuTarInstalled() { | function isGnuTarInstalled() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const versionOutput = yield getVersion('tar'); |         const versionOutput = yield getVersion('tar'); | ||||||
|         return versionOutput.toLowerCase().includes('gnu tar'); |         return versionOutput.toLowerCase().includes('gnu tar'); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.isGnuTarInstalled = isGnuTarInstalled; | exports.isGnuTarInstalled = isGnuTarInstalled; | ||||||
| function assertDefined(name, value) { | function assertDefined(name, value) { | ||||||
|     if (value === undefined) { |     if (value === undefined) { | ||||||
|         throw Error(`Expected ${name} but value was undefiend`); |         throw Error(`Expected ${name} but value was undefiend`); | ||||||
|     } |     } | ||||||
|     return value; |     return value; | ||||||
| } | } | ||||||
| exports.assertDefined = assertDefined; | exports.assertDefined = assertDefined; | ||||||
| //# sourceMappingURL=cacheUtils.js.map
 | //# sourceMappingURL=cacheUtils.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -1182,7 +1182,7 @@ eval("require")("encoding"); | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -1306,6 +1306,21 @@ exports.PropagationAPI = PropagationAPI; | |||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
|  | /***/ 24: | ||||||
|  | /***/ (function(__unusedmodule, exports) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | var _default = '00000000-0000-0000-0000-000000000000'; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
| /***/ 40: | /***/ 40: | ||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| @ -2635,6 +2650,34 @@ function regExpEscape (s) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 104: | ||||||
|  | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | 
 | ||||||
|  | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
|  | 
 | ||||||
|  | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
|  | 
 | ||||||
|  | function version(uuid) { | ||||||
|  |   if (!(0, _validate.default)(uuid)) { | ||||||
|  |     throw TypeError('Invalid UUID'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   return parseInt(uuid.substr(14, 1), 16); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _default = version; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 106: | /***/ 106: | ||||||
| @ -2914,217 +2957,217 @@ exports.AbortSignal = AbortSignal; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const http_client_1 = __webpack_require__(539); | const http_client_1 = __webpack_require__(539); | ||||||
| const auth_1 = __webpack_require__(226); | const auth_1 = __webpack_require__(226); | ||||||
| const crypto = __importStar(__webpack_require__(417)); | const crypto = __importStar(__webpack_require__(417)); | ||||||
| const fs = __importStar(__webpack_require__(747)); | const fs = __importStar(__webpack_require__(747)); | ||||||
| const url_1 = __webpack_require__(835); | const url_1 = __webpack_require__(835); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| const downloadUtils_1 = __webpack_require__(251); | const downloadUtils_1 = __webpack_require__(251); | ||||||
| const options_1 = __webpack_require__(538); | const options_1 = __webpack_require__(538); | ||||||
| const requestUtils_1 = __webpack_require__(899); | const requestUtils_1 = __webpack_require__(899); | ||||||
| const versionSalt = '1.0'; | const versionSalt = '1.0'; | ||||||
| function getCacheApiUrl(resource) { | function getCacheApiUrl(resource) { | ||||||
|     // Ideally we just use ACTIONS_CACHE_URL
 |     // Ideally we just use ACTIONS_CACHE_URL
 | ||||||
|     const baseUrl = (process.env['ACTIONS_CACHE_URL'] || |     const baseUrl = (process.env['ACTIONS_CACHE_URL'] || | ||||||
|         process.env['ACTIONS_RUNTIME_URL'] || |         process.env['ACTIONS_RUNTIME_URL'] || | ||||||
|         '').replace('pipelines', 'artifactcache'); |         '').replace('pipelines', 'artifactcache'); | ||||||
|     if (!baseUrl) { |     if (!baseUrl) { | ||||||
|         throw new Error('Cache Service Url not found, unable to restore cache.'); |         throw new Error('Cache Service Url not found, unable to restore cache.'); | ||||||
|     } |     } | ||||||
|     const url = `${baseUrl}_apis/artifactcache/${resource}`; |     const url = `${baseUrl}_apis/artifactcache/${resource}`; | ||||||
|     core.debug(`Resource Url: ${url}`); |     core.debug(`Resource Url: ${url}`); | ||||||
|     return url; |     return url; | ||||||
| } | } | ||||||
| function createAcceptHeader(type, apiVersion) { | function createAcceptHeader(type, apiVersion) { | ||||||
|     return `${type};api-version=${apiVersion}`; |     return `${type};api-version=${apiVersion}`; | ||||||
| } | } | ||||||
| function getRequestOptions() { | function getRequestOptions() { | ||||||
|     const requestOptions = { |     const requestOptions = { | ||||||
|         headers: { |         headers: { | ||||||
|             Accept: createAcceptHeader('application/json', '6.0-preview.1') |             Accept: createAcceptHeader('application/json', '6.0-preview.1') | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
|     return requestOptions; |     return requestOptions; | ||||||
| } | } | ||||||
| function createHttpClient() { | function createHttpClient() { | ||||||
|     const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; |     const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; | ||||||
|     const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); |     const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); | ||||||
|     return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); |     return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); | ||||||
| } | } | ||||||
| function getCacheVersion(paths, compressionMethod) { | function getCacheVersion(paths, compressionMethod) { | ||||||
|     const components = paths.concat(!compressionMethod || compressionMethod === constants_1.CompressionMethod.Gzip |     const components = paths.concat(!compressionMethod || compressionMethod === constants_1.CompressionMethod.Gzip | ||||||
|         ? [] |         ? [] | ||||||
|         : [compressionMethod]); |         : [compressionMethod]); | ||||||
|     // Add salt to cache version to support breaking changes in cache entry
 |     // Add salt to cache version to support breaking changes in cache entry
 | ||||||
|     components.push(versionSalt); |     components.push(versionSalt); | ||||||
|     return crypto |     return crypto | ||||||
|         .createHash('sha256') |         .createHash('sha256') | ||||||
|         .update(components.join('|')) |         .update(components.join('|')) | ||||||
|         .digest('hex'); |         .digest('hex'); | ||||||
| } | } | ||||||
| exports.getCacheVersion = getCacheVersion; | exports.getCacheVersion = getCacheVersion; | ||||||
| function getCacheEntry(keys, paths, options) { | function getCacheEntry(keys, paths, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const httpClient = createHttpClient(); |         const httpClient = createHttpClient(); | ||||||
|         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); |         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); | ||||||
|         const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; |         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)); })); |         const response = yield requestUtils_1.retryTypedResponse('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); | ||||||
|         if (response.statusCode === 204) { |         if (response.statusCode === 204) { | ||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
|         if (!requestUtils_1.isSuccessStatusCode(response.statusCode)) { |         if (!requestUtils_1.isSuccessStatusCode(response.statusCode)) { | ||||||
|             throw new Error(`Cache service responded with ${response.statusCode}`); |             throw new Error(`Cache service responded with ${response.statusCode}`); | ||||||
|         } |         } | ||||||
|         const cacheResult = response.result; |         const cacheResult = response.result; | ||||||
|         const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; |         const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; | ||||||
|         if (!cacheDownloadUrl) { |         if (!cacheDownloadUrl) { | ||||||
|             throw new Error('Cache not found.'); |             throw new Error('Cache not found.'); | ||||||
|         } |         } | ||||||
|         core.setSecret(cacheDownloadUrl); |         core.setSecret(cacheDownloadUrl); | ||||||
|         core.debug(`Cache Result:`); |         core.debug(`Cache Result:`); | ||||||
|         core.debug(JSON.stringify(cacheResult)); |         core.debug(JSON.stringify(cacheResult)); | ||||||
|         return cacheResult; |         return cacheResult; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.getCacheEntry = getCacheEntry; | exports.getCacheEntry = getCacheEntry; | ||||||
| function downloadCache(archiveLocation, archivePath, options) { | function downloadCache(archiveLocation, archivePath, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const archiveUrl = new url_1.URL(archiveLocation); |         const archiveUrl = new url_1.URL(archiveLocation); | ||||||
|         const downloadOptions = options_1.getDownloadOptions(options); |         const downloadOptions = options_1.getDownloadOptions(options); | ||||||
|         if (downloadOptions.useAzureSdk && |         if (downloadOptions.useAzureSdk && | ||||||
|             archiveUrl.hostname.endsWith('.blob.core.windows.net')) { |             archiveUrl.hostname.endsWith('.blob.core.windows.net')) { | ||||||
|             // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability.
 |             // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability.
 | ||||||
|             yield downloadUtils_1.downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions); |             yield downloadUtils_1.downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions); | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             // Otherwise, download using the Actions http-client.
 |             // Otherwise, download using the Actions http-client.
 | ||||||
|             yield downloadUtils_1.downloadCacheHttpClient(archiveLocation, archivePath); |             yield downloadUtils_1.downloadCacheHttpClient(archiveLocation, archivePath); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadCache = downloadCache; | exports.downloadCache = downloadCache; | ||||||
| // Reserve Cache
 | // Reserve Cache
 | ||||||
| function reserveCache(key, paths, options) { | function reserveCache(key, paths, options) { | ||||||
|     var _a, _b; |     var _a, _b; | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const httpClient = createHttpClient(); |         const httpClient = createHttpClient(); | ||||||
|         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); |         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); | ||||||
|         const reserveCacheRequest = { |         const reserveCacheRequest = { | ||||||
|             key, |             key, | ||||||
|             version |             version | ||||||
|         }; |         }; | ||||||
|         const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { |         const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { | ||||||
|             return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); |             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; |         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; | exports.reserveCache = reserveCache; | ||||||
| function getContentRange(start, end) { | function getContentRange(start, end) { | ||||||
|     // Format: `bytes start-end/filesize
 |     // Format: `bytes start-end/filesize
 | ||||||
|     // start and end are inclusive
 |     // start and end are inclusive
 | ||||||
|     // filesize can be *
 |     // filesize can be *
 | ||||||
|     // For a 200 byte chunk starting at byte 0:
 |     // For a 200 byte chunk starting at byte 0:
 | ||||||
|     // Content-Range: bytes 0-199/*
 |     // Content-Range: bytes 0-199/*
 | ||||||
|     return `bytes ${start}-${end}/*`; |     return `bytes ${start}-${end}/*`; | ||||||
| } | } | ||||||
| function uploadChunk(httpClient, resourceUrl, openStream, start, end) { | function uploadChunk(httpClient, resourceUrl, openStream, start, end) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Uploading chunk of size ${end - |         core.debug(`Uploading chunk of size ${end - | ||||||
|             start + |             start + | ||||||
|             1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`);
 |             1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`);
 | ||||||
|         const additionalHeaders = { |         const additionalHeaders = { | ||||||
|             'Content-Type': 'application/octet-stream', |             'Content-Type': 'application/octet-stream', | ||||||
|             'Content-Range': getContentRange(start, end) |             'Content-Range': getContentRange(start, end) | ||||||
|         }; |         }; | ||||||
|         yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { |         yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { | ||||||
|             return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); |             return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); | ||||||
|         })); |         })); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function uploadFile(httpClient, cacheId, archivePath, options) { | function uploadFile(httpClient, cacheId, archivePath, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Upload Chunks
 |         // Upload Chunks
 | ||||||
|         const fileSize = fs.statSync(archivePath).size; |         const fileSize = fs.statSync(archivePath).size; | ||||||
|         const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); |         const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); | ||||||
|         const fd = fs.openSync(archivePath, 'r'); |         const fd = fs.openSync(archivePath, 'r'); | ||||||
|         const uploadOptions = options_1.getUploadOptions(options); |         const uploadOptions = options_1.getUploadOptions(options); | ||||||
|         const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); |         const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); | ||||||
|         const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); |         const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); | ||||||
|         const parallelUploads = [...new Array(concurrency).keys()]; |         const parallelUploads = [...new Array(concurrency).keys()]; | ||||||
|         core.debug('Awaiting all uploads'); |         core.debug('Awaiting all uploads'); | ||||||
|         let offset = 0; |         let offset = 0; | ||||||
|         try { |         try { | ||||||
|             yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { |             yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { | ||||||
|                 while (offset < fileSize) { |                 while (offset < fileSize) { | ||||||
|                     const chunkSize = Math.min(fileSize - offset, maxChunkSize); |                     const chunkSize = Math.min(fileSize - offset, maxChunkSize); | ||||||
|                     const start = offset; |                     const start = offset; | ||||||
|                     const end = offset + chunkSize - 1; |                     const end = offset + chunkSize - 1; | ||||||
|                     offset += maxChunkSize; |                     offset += maxChunkSize; | ||||||
|                     yield uploadChunk(httpClient, resourceUrl, () => fs |                     yield uploadChunk(httpClient, resourceUrl, () => fs | ||||||
|                         .createReadStream(archivePath, { |                         .createReadStream(archivePath, { | ||||||
|                         fd, |                         fd, | ||||||
|                         start, |                         start, | ||||||
|                         end, |                         end, | ||||||
|                         autoClose: false |                         autoClose: false | ||||||
|                     }) |                     }) | ||||||
|                         .on('error', error => { |                         .on('error', error => { | ||||||
|                         throw new Error(`Cache upload failed because file read failed with ${error.message}`); |                         throw new Error(`Cache upload failed because file read failed with ${error.message}`); | ||||||
|                     }), start, end); |                     }), start, end); | ||||||
|                 } |                 } | ||||||
|             }))); |             }))); | ||||||
|         } |         } | ||||||
|         finally { |         finally { | ||||||
|             fs.closeSync(fd); |             fs.closeSync(fd); | ||||||
|         } |         } | ||||||
|         return; |         return; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function commitCache(httpClient, cacheId, filesize) { | function commitCache(httpClient, cacheId, filesize) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const commitCacheRequest = { size: filesize }; |         const commitCacheRequest = { size: filesize }; | ||||||
|         return yield requestUtils_1.retryTypedResponse('commitCache', () => __awaiter(this, void 0, void 0, function* () { |         return yield requestUtils_1.retryTypedResponse('commitCache', () => __awaiter(this, void 0, void 0, function* () { | ||||||
|             return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); |             return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); | ||||||
|         })); |         })); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function saveCache(cacheId, archivePath, options) { | function saveCache(cacheId, archivePath, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const httpClient = createHttpClient(); |         const httpClient = createHttpClient(); | ||||||
|         core.debug('Upload cache'); |         core.debug('Upload cache'); | ||||||
|         yield uploadFile(httpClient, cacheId, archivePath, options); |         yield uploadFile(httpClient, cacheId, archivePath, options); | ||||||
|         // Commit Cache
 |         // Commit Cache
 | ||||||
|         core.debug('Commiting cache'); |         core.debug('Commiting cache'); | ||||||
|         const cacheSize = utils.getArchiveFileSizeIsBytes(archivePath); |         const cacheSize = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|         const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); |         const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); | ||||||
|         if (!requestUtils_1.isSuccessStatusCode(commitCacheResponse.statusCode)) { |         if (!requestUtils_1.isSuccessStatusCode(commitCacheResponse.statusCode)) { | ||||||
|             throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); |             throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); | ||||||
|         } |         } | ||||||
|         core.info('Cache saved successfully'); |         core.info('Cache saved successfully'); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.saveCache = saveCache; | exports.saveCache = saveCache; | ||||||
| //# sourceMappingURL=cacheHttpClient.js.map
 | //# sourceMappingURL=cacheHttpClient.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -3486,44 +3529,33 @@ exports.debug = debug; // for test | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 147: | /***/ 147: | ||||||
| /***/ (function(module) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| // API
 | "use strict"; | ||||||
| module.exports = state; |  | ||||||
| 
 | 
 | ||||||
| /** | 
 | ||||||
|  * Creates initial state object | exports.fromCallback = function (fn) { | ||||||
|  * for iteration over list |   return Object.defineProperty(function () { | ||||||
|  * |     if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) | ||||||
|  * @param   {array|object} list - list to iterate over |     else { | ||||||
|  * @param   {function|null} sortMethod - function to use for keys sort, |       return new Promise((resolve, reject) => { | ||||||
|  *                                     or `null` to keep them as is |         arguments[arguments.length] = (err, res) => { | ||||||
|  * @returns {object} - initial state object |           if (err) return reject(err) | ||||||
|  */ |           resolve(res) | ||||||
| function state(list, sortMethod) |         } | ||||||
| { |         arguments.length++ | ||||||
|   var isNamedList = !Array.isArray(list) |         fn.apply(this, arguments) | ||||||
|     , initState = |       }) | ||||||
|     { |  | ||||||
|       index    : 0, |  | ||||||
|       keyedList: isNamedList || sortMethod ? Object.keys(list) : null, |  | ||||||
|       jobs     : {}, |  | ||||||
|       results  : isNamedList ? {} : [], |  | ||||||
|       size     : isNamedList ? Object.keys(list).length : list.length |  | ||||||
|     } |     } | ||||||
|     ; |   }, 'name', { value: fn.name }) | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
|   if (sortMethod) | exports.fromPromise = function (fn) { | ||||||
|   { |   return Object.defineProperty(function () { | ||||||
|     // sort array keys based on it's values
 |     const cb = arguments[arguments.length - 1] | ||||||
|     // sort object's keys just on own merit
 |     if (typeof cb !== 'function') return fn.apply(this, arguments) | ||||||
|     initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) |     else fn.apply(this, arguments).then(r => cb(null, r), cb) | ||||||
|     { |   }, 'name', { value: fn.name }) | ||||||
|       return sortMethod(list[a], list[b]); |  | ||||||
|     }); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   return initState; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -3821,7 +3853,7 @@ exports.default = void 0; | |||||||
| 
 | 
 | ||||||
| var _rng = _interopRequireDefault(__webpack_require__(733)); | var _rng = _interopRequireDefault(__webpack_require__(733)); | ||||||
| 
 | 
 | ||||||
| var _bytesToUuid = _interopRequireDefault(__webpack_require__(940)); | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
| 
 | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| @ -3914,7 +3946,7 @@ function v1(options, buf, offset) { | |||||||
|     b[i + n] = node[n]; |     b[i + n] = node[n]; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return buf || (0, _bytesToUuid.default)(b); |   return buf || (0, _stringify.default)(b); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var _default = v1; | var _default = v1; | ||||||
| @ -3922,6 +3954,58 @@ exports.default = _default; | |||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
|  | /***/ 197: | ||||||
|  | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | 
 | ||||||
|  | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
|  | 
 | ||||||
|  | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
|  | 
 | ||||||
|  | function parse(uuid) { | ||||||
|  |   if (!(0, _validate.default)(uuid)) { | ||||||
|  |     throw TypeError('Invalid UUID'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   let v; | ||||||
|  |   const arr = new Uint8Array(16); // Parse ########-....-....-....-............
 | ||||||
|  | 
 | ||||||
|  |   arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; | ||||||
|  |   arr[1] = v >>> 16 & 0xff; | ||||||
|  |   arr[2] = v >>> 8 & 0xff; | ||||||
|  |   arr[3] = v & 0xff; // Parse ........-####-....-....-............
 | ||||||
|  | 
 | ||||||
|  |   arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; | ||||||
|  |   arr[5] = v & 0xff; // Parse ........-....-####-....-............
 | ||||||
|  | 
 | ||||||
|  |   arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; | ||||||
|  |   arr[7] = v & 0xff; // Parse ........-....-....-####-............
 | ||||||
|  | 
 | ||||||
|  |   arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; | ||||||
|  |   arr[9] = v & 0xff; // Parse ........-....-....-....-############
 | ||||||
|  |   // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
 | ||||||
|  | 
 | ||||||
|  |   arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; | ||||||
|  |   arr[11] = v / 0x100000000 & 0xff; | ||||||
|  |   arr[12] = v >>> 24 & 0xff; | ||||||
|  |   arr[13] = v >>> 16 & 0xff; | ||||||
|  |   arr[14] = v >>> 8 & 0xff; | ||||||
|  |   arr[15] = v & 0xff; | ||||||
|  |   return arr; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _default = parse; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
| /***/ 210: | /***/ 210: | ||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| @ -4095,6 +4179,21 @@ exports.isTokenCredential = isTokenCredential; | |||||||
| //# sourceMappingURL=index.js.map
 | //# sourceMappingURL=index.js.map
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 238: | ||||||
|  | /***/ (function(__unusedmodule, exports) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 241: | /***/ 241: | ||||||
| @ -4109,19 +4208,12 @@ Object.defineProperty(exports, "__esModule", { | |||||||
| exports.default = _default; | exports.default = _default; | ||||||
| exports.URL = exports.DNS = void 0; | exports.URL = exports.DNS = void 0; | ||||||
| 
 | 
 | ||||||
| var _bytesToUuid = _interopRequireDefault(__webpack_require__(940)); | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
|  | 
 | ||||||
|  | var _parse = _interopRequireDefault(__webpack_require__(197)); | ||||||
| 
 | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| function uuidToBytes(uuid) { |  | ||||||
|   // Note: We assume we're being passed a valid uuid string
 |  | ||||||
|   const bytes = []; |  | ||||||
|   uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) { |  | ||||||
|     bytes.push(parseInt(hex, 16)); |  | ||||||
|   }); |  | ||||||
|   return bytes; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function stringToBytes(str) { | function stringToBytes(str) { | ||||||
|   str = unescape(encodeURIComponent(str)); // UTF8 escape
 |   str = unescape(encodeURIComponent(str)); // UTF8 escape
 | ||||||
| 
 | 
 | ||||||
| @ -4146,19 +4238,20 @@ function _default(name, version, hashfunc) { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (typeof namespace === 'string') { |     if (typeof namespace === 'string') { | ||||||
|       namespace = uuidToBytes(namespace); |       namespace = (0, _parse.default)(namespace); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (!Array.isArray(value)) { |     if (namespace.length !== 16) { | ||||||
|       throw TypeError('value must be an array of bytes'); |       throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); | ||||||
|     } |     } // Compute hash of namespace and value, Per 4.3
 | ||||||
| 
 |     // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
 | ||||||
|     if (!Array.isArray(namespace) || namespace.length !== 16) { |     // hashfunc([...namespace, ... value])`
 | ||||||
|       throw TypeError('namespace must be uuid string or an Array of 16 byte values'); |  | ||||||
|     } // Per 4.3
 |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     const bytes = hashfunc(namespace.concat(value)); |     let bytes = new Uint8Array(16 + value.length); | ||||||
|  |     bytes.set(namespace); | ||||||
|  |     bytes.set(value, namespace.length); | ||||||
|  |     bytes = hashfunc(bytes); | ||||||
|     bytes[6] = bytes[6] & 0x0f | version; |     bytes[6] = bytes[6] & 0x0f | version; | ||||||
|     bytes[8] = bytes[8] & 0x3f | 0x80; |     bytes[8] = bytes[8] & 0x3f | 0x80; | ||||||
| 
 | 
 | ||||||
| @ -4172,7 +4265,7 @@ function _default(name, version, hashfunc) { | |||||||
|       return buf; |       return buf; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return (0, _bytesToUuid.default)(bytes); |     return (0, _stringify.default)(bytes); | ||||||
|   } // Function#name is not settable on some platforms (#270)
 |   } // Function#name is not settable on some platforms (#270)
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -4233,237 +4326,1029 @@ exports.default = _default; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const http_client_1 = __webpack_require__(539); | const http_client_1 = __webpack_require__(539); | ||||||
| const storage_blob_1 = __webpack_require__(373); | const storage_blob_1 = __webpack_require__(373); | ||||||
| const buffer = __importStar(__webpack_require__(293)); | const buffer = __importStar(__webpack_require__(293)); | ||||||
| const fs = __importStar(__webpack_require__(747)); | const fs = __importStar(__webpack_require__(747)); | ||||||
| const stream = __importStar(__webpack_require__(794)); | const stream = __importStar(__webpack_require__(794)); | ||||||
| const util = __importStar(__webpack_require__(669)); | const util = __importStar(__webpack_require__(669)); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| const requestUtils_1 = __webpack_require__(899); | const requestUtils_1 = __webpack_require__(899); | ||||||
| /** | /** | ||||||
|  * Pipes the body of a HTTP response to a stream |  * Pipes the body of a HTTP response to a stream | ||||||
|  * |  * | ||||||
|  * @param response the HTTP response |  * @param response the HTTP response | ||||||
|  * @param output the writable stream |  * @param output the writable stream | ||||||
|  */ |  */ | ||||||
| function pipeResponseToStream(response, output) { | function pipeResponseToStream(response, output) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const pipeline = util.promisify(stream.pipeline); |         const pipeline = util.promisify(stream.pipeline); | ||||||
|         yield pipeline(response.message, output); |         yield pipeline(response.message, output); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| /** | /** | ||||||
|  * Class for tracking the download state and displaying stats. |  * Class for tracking the download state and displaying stats. | ||||||
|  */ |  */ | ||||||
| class DownloadProgress { | class DownloadProgress { | ||||||
|     constructor(contentLength) { |     constructor(contentLength) { | ||||||
|         this.contentLength = contentLength; |         this.contentLength = contentLength; | ||||||
|         this.segmentIndex = 0; |         this.segmentIndex = 0; | ||||||
|         this.segmentSize = 0; |         this.segmentSize = 0; | ||||||
|         this.segmentOffset = 0; |         this.segmentOffset = 0; | ||||||
|         this.receivedBytes = 0; |         this.receivedBytes = 0; | ||||||
|         this.displayedComplete = false; |         this.displayedComplete = false; | ||||||
|         this.startTime = Date.now(); |         this.startTime = Date.now(); | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Progress to the next segment. Only call this method when the previous segment |      * Progress to the next segment. Only call this method when the previous segment | ||||||
|      * is complete. |      * is complete. | ||||||
|      * |      * | ||||||
|      * @param segmentSize the length of the next segment |      * @param segmentSize the length of the next segment | ||||||
|      */ |      */ | ||||||
|     nextSegment(segmentSize) { |     nextSegment(segmentSize) { | ||||||
|         this.segmentOffset = this.segmentOffset + this.segmentSize; |         this.segmentOffset = this.segmentOffset + this.segmentSize; | ||||||
|         this.segmentIndex = this.segmentIndex + 1; |         this.segmentIndex = this.segmentIndex + 1; | ||||||
|         this.segmentSize = segmentSize; |         this.segmentSize = segmentSize; | ||||||
|         this.receivedBytes = 0; |         this.receivedBytes = 0; | ||||||
|         core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); |         core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Sets the number of bytes received for the current segment. |      * Sets the number of bytes received for the current segment. | ||||||
|      * |      * | ||||||
|      * @param receivedBytes the number of bytes received |      * @param receivedBytes the number of bytes received | ||||||
|      */ |      */ | ||||||
|     setReceivedBytes(receivedBytes) { |     setReceivedBytes(receivedBytes) { | ||||||
|         this.receivedBytes = receivedBytes; |         this.receivedBytes = receivedBytes; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Returns the total number of bytes transferred. |      * Returns the total number of bytes transferred. | ||||||
|      */ |      */ | ||||||
|     getTransferredBytes() { |     getTransferredBytes() { | ||||||
|         return this.segmentOffset + this.receivedBytes; |         return this.segmentOffset + this.receivedBytes; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Returns true if the download is complete. |      * Returns true if the download is complete. | ||||||
|      */ |      */ | ||||||
|     isDone() { |     isDone() { | ||||||
|         return this.getTransferredBytes() === this.contentLength; |         return this.getTransferredBytes() === this.contentLength; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Prints the current download stats. Once the download completes, this will print one |      * Prints the current download stats. Once the download completes, this will print one | ||||||
|      * last line and then stop. |      * last line and then stop. | ||||||
|      */ |      */ | ||||||
|     display() { |     display() { | ||||||
|         if (this.displayedComplete) { |         if (this.displayedComplete) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         const transferredBytes = this.segmentOffset + this.receivedBytes; |         const transferredBytes = this.segmentOffset + this.receivedBytes; | ||||||
|         const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); |         const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); | ||||||
|         const elapsedTime = Date.now() - this.startTime; |         const elapsedTime = Date.now() - this.startTime; | ||||||
|         const downloadSpeed = (transferredBytes / |         const downloadSpeed = (transferredBytes / | ||||||
|             (1024 * 1024) / |             (1024 * 1024) / | ||||||
|             (elapsedTime / 1000)).toFixed(1); |             (elapsedTime / 1000)).toFixed(1); | ||||||
|         core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); |         core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); | ||||||
|         if (this.isDone()) { |         if (this.isDone()) { | ||||||
|             this.displayedComplete = true; |             this.displayedComplete = true; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Returns a function used to handle TransferProgressEvents. |      * Returns a function used to handle TransferProgressEvents. | ||||||
|      */ |      */ | ||||||
|     onProgress() { |     onProgress() { | ||||||
|         return (progress) => { |         return (progress) => { | ||||||
|             this.setReceivedBytes(progress.loadedBytes); |             this.setReceivedBytes(progress.loadedBytes); | ||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Starts the timer that displays the stats. |      * Starts the timer that displays the stats. | ||||||
|      * |      * | ||||||
|      * @param delayInMs the delay between each write |      * @param delayInMs the delay between each write | ||||||
|      */ |      */ | ||||||
|     startDisplayTimer(delayInMs = 1000) { |     startDisplayTimer(delayInMs = 1000) { | ||||||
|         const displayCallback = () => { |         const displayCallback = () => { | ||||||
|             this.display(); |             this.display(); | ||||||
|             if (!this.isDone()) { |             if (!this.isDone()) { | ||||||
|                 this.timeoutHandle = setTimeout(displayCallback, delayInMs); |                 this.timeoutHandle = setTimeout(displayCallback, delayInMs); | ||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|         this.timeoutHandle = setTimeout(displayCallback, delayInMs); |         this.timeoutHandle = setTimeout(displayCallback, delayInMs); | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Stops the timer that displays the stats. As this typically indicates the download |      * 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 |      * is complete, this will display one last line, unless the last line has already | ||||||
|      * been written. |      * been written. | ||||||
|      */ |      */ | ||||||
|     stopDisplayTimer() { |     stopDisplayTimer() { | ||||||
|         if (this.timeoutHandle) { |         if (this.timeoutHandle) { | ||||||
|             clearTimeout(this.timeoutHandle); |             clearTimeout(this.timeoutHandle); | ||||||
|             this.timeoutHandle = undefined; |             this.timeoutHandle = undefined; | ||||||
|         } |         } | ||||||
|         this.display(); |         this.display(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| exports.DownloadProgress = DownloadProgress; | exports.DownloadProgress = DownloadProgress; | ||||||
| /** | /** | ||||||
|  * Download the cache using the Actions toolkit http-client |  * Download the cache using the Actions toolkit http-client | ||||||
|  * |  * | ||||||
|  * @param archiveLocation the URL for the cache |  * @param archiveLocation the URL for the cache | ||||||
|  * @param archivePath the local path where the cache is saved |  * @param archivePath the local path where the cache is saved | ||||||
|  */ |  */ | ||||||
| function downloadCacheHttpClient(archiveLocation, archivePath) { | function downloadCacheHttpClient(archiveLocation, archivePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const writeStream = fs.createWriteStream(archivePath); |         const writeStream = fs.createWriteStream(archivePath); | ||||||
|         const httpClient = new http_client_1.HttpClient('actions/cache'); |         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); })); |         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.
 |         // Abort download if no traffic received over the socket.
 | ||||||
|         downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { |         downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { | ||||||
|             downloadResponse.message.destroy(); |             downloadResponse.message.destroy(); | ||||||
|             core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); |             core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); | ||||||
|         }); |         }); | ||||||
|         yield pipeResponseToStream(downloadResponse, writeStream); |         yield pipeResponseToStream(downloadResponse, writeStream); | ||||||
|         // Validate download size.
 |         // Validate download size.
 | ||||||
|         const contentLengthHeader = downloadResponse.message.headers['content-length']; |         const contentLengthHeader = downloadResponse.message.headers['content-length']; | ||||||
|         if (contentLengthHeader) { |         if (contentLengthHeader) { | ||||||
|             const expectedLength = parseInt(contentLengthHeader); |             const expectedLength = parseInt(contentLengthHeader); | ||||||
|             const actualLength = utils.getArchiveFileSizeIsBytes(archivePath); |             const actualLength = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|             if (actualLength !== expectedLength) { |             if (actualLength !== expectedLength) { | ||||||
|                 throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); |                 throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             core.debug('Unable to validate download, no Content-Length header'); |             core.debug('Unable to validate download, no Content-Length header'); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadCacheHttpClient = downloadCacheHttpClient; | exports.downloadCacheHttpClient = downloadCacheHttpClient; | ||||||
| /** | /** | ||||||
|  * Download the cache using the Azure Storage SDK.  Only call this method if the |  * Download the cache using the Azure Storage SDK.  Only call this method if the | ||||||
|  * URL points to an Azure Storage endpoint. |  * URL points to an Azure Storage endpoint. | ||||||
|  * |  * | ||||||
|  * @param archiveLocation the URL for the cache |  * @param archiveLocation the URL for the cache | ||||||
|  * @param archivePath the local path where the cache is saved |  * @param archivePath the local path where the cache is saved | ||||||
|  * @param options the download options with the defaults set |  * @param options the download options with the defaults set | ||||||
|  */ |  */ | ||||||
| function downloadCacheStorageSDK(archiveLocation, archivePath, options) { | function downloadCacheStorageSDK(archiveLocation, archivePath, options) { | ||||||
|     var _a; |     var _a; | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { |         const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { | ||||||
|             retryOptions: { |             retryOptions: { | ||||||
|                 // Override the timeout used when downloading each 4 MB chunk
 |                 // Override the timeout used when downloading each 4 MB chunk
 | ||||||
|                 // The default is 2 min / MB, which is way too slow
 |                 // The default is 2 min / MB, which is way too slow
 | ||||||
|                 tryTimeoutInMs: options.timeoutInMs |                 tryTimeoutInMs: options.timeoutInMs | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|         const properties = yield client.getProperties(); |         const properties = yield client.getProperties(); | ||||||
|         const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; |         const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; | ||||||
|         if (contentLength < 0) { |         if (contentLength < 0) { | ||||||
|             // We should never hit this condition, but just in case fall back to downloading the
 |             // We should never hit this condition, but just in case fall back to downloading the
 | ||||||
|             // file as one large stream
 |             // file as one large stream
 | ||||||
|             core.debug('Unable to determine content length, downloading file with http-client...'); |             core.debug('Unable to determine content length, downloading file with http-client...'); | ||||||
|             yield downloadCacheHttpClient(archiveLocation, archivePath); |             yield downloadCacheHttpClient(archiveLocation, archivePath); | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             // Use downloadToBuffer for faster downloads, since internally it splits the
 |             // Use downloadToBuffer for faster downloads, since internally it splits the
 | ||||||
|             // file into 4 MB chunks which can then be parallelized and retried independently
 |             // 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
 |             // 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
 |             // on 64-bit systems), split the download into multiple segments
 | ||||||
|             const maxSegmentSize = buffer.constants.MAX_LENGTH; |             const maxSegmentSize = buffer.constants.MAX_LENGTH; | ||||||
|             const downloadProgress = new DownloadProgress(contentLength); |             const downloadProgress = new DownloadProgress(contentLength); | ||||||
|             const fd = fs.openSync(archivePath, 'w'); |             const fd = fs.openSync(archivePath, 'w'); | ||||||
|             try { |             try { | ||||||
|                 downloadProgress.startDisplayTimer(); |                 downloadProgress.startDisplayTimer(); | ||||||
|                 while (!downloadProgress.isDone()) { |                 while (!downloadProgress.isDone()) { | ||||||
|                     const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; |                     const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; | ||||||
|                     const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); |                     const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); | ||||||
|                     downloadProgress.nextSegment(segmentSize); |                     downloadProgress.nextSegment(segmentSize); | ||||||
|                     const result = yield client.downloadToBuffer(segmentStart, segmentSize, { |                     const result = yield client.downloadToBuffer(segmentStart, segmentSize, { | ||||||
|                         concurrency: options.downloadConcurrency, |                         concurrency: options.downloadConcurrency, | ||||||
|                         onProgress: downloadProgress.onProgress() |                         onProgress: downloadProgress.onProgress() | ||||||
|                     }); |                     }); | ||||||
|                     fs.writeFileSync(fd, result); |                     fs.writeFileSync(fd, result); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             finally { |             finally { | ||||||
|                 downloadProgress.stopDisplayTimer(); |                 downloadProgress.stopDisplayTimer(); | ||||||
|                 fs.closeSync(fd); |                 fs.closeSync(fd); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadCacheStorageSDK = downloadCacheStorageSDK; | exports.downloadCacheStorageSDK = downloadCacheStorageSDK; | ||||||
| //# sourceMappingURL=downloadUtils.js.map
 | //# sourceMappingURL=downloadUtils.js.map
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 257: | ||||||
|  | /***/ (function(module, __unusedexports, __webpack_require__) { | ||||||
|  | 
 | ||||||
|  | // Generated by CoffeeScript 1.12.7
 | ||||||
|  | (function() { | ||||||
|  |   var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, | ||||||
|  |     hasProp = {}.hasOwnProperty; | ||||||
|  | 
 | ||||||
|  |   ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; | ||||||
|  | 
 | ||||||
|  |   XMLElement = null; | ||||||
|  | 
 | ||||||
|  |   XMLCData = null; | ||||||
|  | 
 | ||||||
|  |   XMLComment = null; | ||||||
|  | 
 | ||||||
|  |   XMLDeclaration = null; | ||||||
|  | 
 | ||||||
|  |   XMLDocType = null; | ||||||
|  | 
 | ||||||
|  |   XMLRaw = null; | ||||||
|  | 
 | ||||||
|  |   XMLText = null; | ||||||
|  | 
 | ||||||
|  |   XMLProcessingInstruction = null; | ||||||
|  | 
 | ||||||
|  |   XMLDummy = null; | ||||||
|  | 
 | ||||||
|  |   NodeType = null; | ||||||
|  | 
 | ||||||
|  |   XMLNodeList = null; | ||||||
|  | 
 | ||||||
|  |   XMLNamedNodeMap = null; | ||||||
|  | 
 | ||||||
|  |   DocumentPosition = null; | ||||||
|  | 
 | ||||||
|  |   module.exports = XMLNode = (function() { | ||||||
|  |     function XMLNode(parent1) { | ||||||
|  |       this.parent = parent1; | ||||||
|  |       if (this.parent) { | ||||||
|  |         this.options = this.parent.options; | ||||||
|  |         this.stringify = this.parent.stringify; | ||||||
|  |       } | ||||||
|  |       this.value = null; | ||||||
|  |       this.children = []; | ||||||
|  |       this.baseURI = null; | ||||||
|  |       if (!XMLElement) { | ||||||
|  |         XMLElement = __webpack_require__(796); | ||||||
|  |         XMLCData = __webpack_require__(657); | ||||||
|  |         XMLComment = __webpack_require__(919); | ||||||
|  |         XMLDeclaration = __webpack_require__(738); | ||||||
|  |         XMLDocType = __webpack_require__(735); | ||||||
|  |         XMLRaw = __webpack_require__(660); | ||||||
|  |         XMLText = __webpack_require__(708); | ||||||
|  |         XMLProcessingInstruction = __webpack_require__(491); | ||||||
|  |         XMLDummy = __webpack_require__(956); | ||||||
|  |         NodeType = __webpack_require__(683); | ||||||
|  |         XMLNodeList = __webpack_require__(265); | ||||||
|  |         XMLNamedNodeMap = __webpack_require__(451); | ||||||
|  |         DocumentPosition = __webpack_require__(65); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nodeName', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.name; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nodeType', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.type; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nodeValue', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.value; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'parentNode', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.parent; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'childNodes', { | ||||||
|  |       get: function() { | ||||||
|  |         if (!this.childNodeList || !this.childNodeList.nodes) { | ||||||
|  |           this.childNodeList = new XMLNodeList(this.children); | ||||||
|  |         } | ||||||
|  |         return this.childNodeList; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'firstChild', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.children[0] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'lastChild', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.children[this.children.length - 1] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'previousSibling', { | ||||||
|  |       get: function() { | ||||||
|  |         var i; | ||||||
|  |         i = this.parent.children.indexOf(this); | ||||||
|  |         return this.parent.children[i - 1] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nextSibling', { | ||||||
|  |       get: function() { | ||||||
|  |         var i; | ||||||
|  |         i = this.parent.children.indexOf(this); | ||||||
|  |         return this.parent.children[i + 1] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'ownerDocument', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.document() || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'textContent', { | ||||||
|  |       get: function() { | ||||||
|  |         var child, j, len, ref2, str; | ||||||
|  |         if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { | ||||||
|  |           str = ''; | ||||||
|  |           ref2 = this.children; | ||||||
|  |           for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |             child = ref2[j]; | ||||||
|  |             if (child.textContent) { | ||||||
|  |               str += child.textContent; | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |           return str; | ||||||
|  |         } else { | ||||||
|  |           return null; | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       set: function(value) { | ||||||
|  |         throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.setParent = function(parent) { | ||||||
|  |       var child, j, len, ref2, results; | ||||||
|  |       this.parent = parent; | ||||||
|  |       if (parent) { | ||||||
|  |         this.options = parent.options; | ||||||
|  |         this.stringify = parent.stringify; | ||||||
|  |       } | ||||||
|  |       ref2 = this.children; | ||||||
|  |       results = []; | ||||||
|  |       for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |         child = ref2[j]; | ||||||
|  |         results.push(child.setParent(this)); | ||||||
|  |       } | ||||||
|  |       return results; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.element = function(name, attributes, text) { | ||||||
|  |       var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; | ||||||
|  |       lastChild = null; | ||||||
|  |       if (attributes === null && (text == null)) { | ||||||
|  |         ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; | ||||||
|  |       } | ||||||
|  |       if (attributes == null) { | ||||||
|  |         attributes = {}; | ||||||
|  |       } | ||||||
|  |       attributes = getValue(attributes); | ||||||
|  |       if (!isObject(attributes)) { | ||||||
|  |         ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; | ||||||
|  |       } | ||||||
|  |       if (name != null) { | ||||||
|  |         name = getValue(name); | ||||||
|  |       } | ||||||
|  |       if (Array.isArray(name)) { | ||||||
|  |         for (j = 0, len = name.length; j < len; j++) { | ||||||
|  |           item = name[j]; | ||||||
|  |           lastChild = this.element(item); | ||||||
|  |         } | ||||||
|  |       } else if (isFunction(name)) { | ||||||
|  |         lastChild = this.element(name.apply()); | ||||||
|  |       } else if (isObject(name)) { | ||||||
|  |         for (key in name) { | ||||||
|  |           if (!hasProp.call(name, key)) continue; | ||||||
|  |           val = name[key]; | ||||||
|  |           if (isFunction(val)) { | ||||||
|  |             val = val.apply(); | ||||||
|  |           } | ||||||
|  |           if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { | ||||||
|  |             lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); | ||||||
|  |           } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { | ||||||
|  |             lastChild = this.dummy(); | ||||||
|  |           } else if (isObject(val) && isEmpty(val)) { | ||||||
|  |             lastChild = this.element(key); | ||||||
|  |           } else if (!this.options.keepNullNodes && (val == null)) { | ||||||
|  |             lastChild = this.dummy(); | ||||||
|  |           } else if (!this.options.separateArrayItems && Array.isArray(val)) { | ||||||
|  |             for (k = 0, len1 = val.length; k < len1; k++) { | ||||||
|  |               item = val[k]; | ||||||
|  |               childNode = {}; | ||||||
|  |               childNode[key] = item; | ||||||
|  |               lastChild = this.element(childNode); | ||||||
|  |             } | ||||||
|  |           } else if (isObject(val)) { | ||||||
|  |             if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { | ||||||
|  |               lastChild = this.element(val); | ||||||
|  |             } else { | ||||||
|  |               lastChild = this.element(key); | ||||||
|  |               lastChild.element(val); | ||||||
|  |             } | ||||||
|  |           } else { | ||||||
|  |             lastChild = this.element(key, val); | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } else if (!this.options.keepNullNodes && text === null) { | ||||||
|  |         lastChild = this.dummy(); | ||||||
|  |       } else { | ||||||
|  |         if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { | ||||||
|  |           lastChild = this.text(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { | ||||||
|  |           lastChild = this.cdata(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { | ||||||
|  |           lastChild = this.comment(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { | ||||||
|  |           lastChild = this.raw(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { | ||||||
|  |           lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); | ||||||
|  |         } else { | ||||||
|  |           lastChild = this.node(name, attributes, text); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       if (lastChild == null) { | ||||||
|  |         throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       return lastChild; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.insertBefore = function(name, attributes, text) { | ||||||
|  |       var child, i, newChild, refChild, removed; | ||||||
|  |       if (name != null ? name.type : void 0) { | ||||||
|  |         newChild = name; | ||||||
|  |         refChild = attributes; | ||||||
|  |         newChild.setParent(this); | ||||||
|  |         if (refChild) { | ||||||
|  |           i = children.indexOf(refChild); | ||||||
|  |           removed = children.splice(i); | ||||||
|  |           children.push(newChild); | ||||||
|  |           Array.prototype.push.apply(children, removed); | ||||||
|  |         } else { | ||||||
|  |           children.push(newChild); | ||||||
|  |         } | ||||||
|  |         return newChild; | ||||||
|  |       } else { | ||||||
|  |         if (this.isRoot) { | ||||||
|  |           throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); | ||||||
|  |         } | ||||||
|  |         i = this.parent.children.indexOf(this); | ||||||
|  |         removed = this.parent.children.splice(i); | ||||||
|  |         child = this.parent.element(name, attributes, text); | ||||||
|  |         Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |         return child; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.insertAfter = function(name, attributes, text) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       if (this.isRoot) { | ||||||
|  |         throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); | ||||||
|  |       } | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i + 1); | ||||||
|  |       child = this.parent.element(name, attributes, text); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return child; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.remove = function() { | ||||||
|  |       var i, ref2; | ||||||
|  |       if (this.isRoot) { | ||||||
|  |         throw new Error("Cannot remove the root element. " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; | ||||||
|  |       return this.parent; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.node = function(name, attributes, text) { | ||||||
|  |       var child, ref2; | ||||||
|  |       if (name != null) { | ||||||
|  |         name = getValue(name); | ||||||
|  |       } | ||||||
|  |       attributes || (attributes = {}); | ||||||
|  |       attributes = getValue(attributes); | ||||||
|  |       if (!isObject(attributes)) { | ||||||
|  |         ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; | ||||||
|  |       } | ||||||
|  |       child = new XMLElement(this, name, attributes); | ||||||
|  |       if (text != null) { | ||||||
|  |         child.text(text); | ||||||
|  |       } | ||||||
|  |       this.children.push(child); | ||||||
|  |       return child; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.text = function(value) { | ||||||
|  |       var child; | ||||||
|  |       if (isObject(value)) { | ||||||
|  |         this.element(value); | ||||||
|  |       } | ||||||
|  |       child = new XMLText(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.cdata = function(value) { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLCData(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.comment = function(value) { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLComment(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.commentBefore = function(value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i); | ||||||
|  |       child = this.parent.comment(value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.commentAfter = function(value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i + 1); | ||||||
|  |       child = this.parent.comment(value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.raw = function(value) { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLRaw(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dummy = function() { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLDummy(this); | ||||||
|  |       return child; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.instruction = function(target, value) { | ||||||
|  |       var insTarget, insValue, instruction, j, len; | ||||||
|  |       if (target != null) { | ||||||
|  |         target = getValue(target); | ||||||
|  |       } | ||||||
|  |       if (value != null) { | ||||||
|  |         value = getValue(value); | ||||||
|  |       } | ||||||
|  |       if (Array.isArray(target)) { | ||||||
|  |         for (j = 0, len = target.length; j < len; j++) { | ||||||
|  |           insTarget = target[j]; | ||||||
|  |           this.instruction(insTarget); | ||||||
|  |         } | ||||||
|  |       } else if (isObject(target)) { | ||||||
|  |         for (insTarget in target) { | ||||||
|  |           if (!hasProp.call(target, insTarget)) continue; | ||||||
|  |           insValue = target[insTarget]; | ||||||
|  |           this.instruction(insTarget, insValue); | ||||||
|  |         } | ||||||
|  |       } else { | ||||||
|  |         if (isFunction(value)) { | ||||||
|  |           value = value.apply(); | ||||||
|  |         } | ||||||
|  |         instruction = new XMLProcessingInstruction(this, target, value); | ||||||
|  |         this.children.push(instruction); | ||||||
|  |       } | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.instructionBefore = function(target, value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i); | ||||||
|  |       child = this.parent.instruction(target, value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.instructionAfter = function(target, value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i + 1); | ||||||
|  |       child = this.parent.instruction(target, value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.declaration = function(version, encoding, standalone) { | ||||||
|  |       var doc, xmldec; | ||||||
|  |       doc = this.document(); | ||||||
|  |       xmldec = new XMLDeclaration(doc, version, encoding, standalone); | ||||||
|  |       if (doc.children.length === 0) { | ||||||
|  |         doc.children.unshift(xmldec); | ||||||
|  |       } else if (doc.children[0].type === NodeType.Declaration) { | ||||||
|  |         doc.children[0] = xmldec; | ||||||
|  |       } else { | ||||||
|  |         doc.children.unshift(xmldec); | ||||||
|  |       } | ||||||
|  |       return doc.root() || doc; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dtd = function(pubID, sysID) { | ||||||
|  |       var child, doc, doctype, i, j, k, len, len1, ref2, ref3; | ||||||
|  |       doc = this.document(); | ||||||
|  |       doctype = new XMLDocType(doc, pubID, sysID); | ||||||
|  |       ref2 = doc.children; | ||||||
|  |       for (i = j = 0, len = ref2.length; j < len; i = ++j) { | ||||||
|  |         child = ref2[i]; | ||||||
|  |         if (child.type === NodeType.DocType) { | ||||||
|  |           doc.children[i] = doctype; | ||||||
|  |           return doctype; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       ref3 = doc.children; | ||||||
|  |       for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { | ||||||
|  |         child = ref3[i]; | ||||||
|  |         if (child.isRoot) { | ||||||
|  |           doc.children.splice(i, 0, doctype); | ||||||
|  |           return doctype; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       doc.children.push(doctype); | ||||||
|  |       return doctype; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.up = function() { | ||||||
|  |       if (this.isRoot) { | ||||||
|  |         throw new Error("The root node has no parent. Use doc() if you need to get the document object."); | ||||||
|  |       } | ||||||
|  |       return this.parent; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.root = function() { | ||||||
|  |       var node; | ||||||
|  |       node = this; | ||||||
|  |       while (node) { | ||||||
|  |         if (node.type === NodeType.Document) { | ||||||
|  |           return node.rootObject; | ||||||
|  |         } else if (node.isRoot) { | ||||||
|  |           return node; | ||||||
|  |         } else { | ||||||
|  |           node = node.parent; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.document = function() { | ||||||
|  |       var node; | ||||||
|  |       node = this; | ||||||
|  |       while (node) { | ||||||
|  |         if (node.type === NodeType.Document) { | ||||||
|  |           return node; | ||||||
|  |         } else { | ||||||
|  |           node = node.parent; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.end = function(options) { | ||||||
|  |       return this.document().end(options); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.prev = function() { | ||||||
|  |       var i; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       if (i < 1) { | ||||||
|  |         throw new Error("Already at the first node. " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       return this.parent.children[i - 1]; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.next = function() { | ||||||
|  |       var i; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       if (i === -1 || i === this.parent.children.length - 1) { | ||||||
|  |         throw new Error("Already at the last node. " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       return this.parent.children[i + 1]; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.importDocument = function(doc) { | ||||||
|  |       var clonedRoot; | ||||||
|  |       clonedRoot = doc.root().clone(); | ||||||
|  |       clonedRoot.parent = this; | ||||||
|  |       clonedRoot.isRoot = false; | ||||||
|  |       this.children.push(clonedRoot); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.debugInfo = function(name) { | ||||||
|  |       var ref2, ref3; | ||||||
|  |       name = name || this.name; | ||||||
|  |       if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { | ||||||
|  |         return ""; | ||||||
|  |       } else if (name == null) { | ||||||
|  |         return "parent: <" + this.parent.name + ">"; | ||||||
|  |       } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { | ||||||
|  |         return "node: <" + name + ">"; | ||||||
|  |       } else { | ||||||
|  |         return "node: <" + name + ">, parent: <" + this.parent.name + ">"; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.ele = function(name, attributes, text) { | ||||||
|  |       return this.element(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.nod = function(name, attributes, text) { | ||||||
|  |       return this.node(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.txt = function(value) { | ||||||
|  |       return this.text(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dat = function(value) { | ||||||
|  |       return this.cdata(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.com = function(value) { | ||||||
|  |       return this.comment(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.ins = function(target, value) { | ||||||
|  |       return this.instruction(target, value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.doc = function() { | ||||||
|  |       return this.document(); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dec = function(version, encoding, standalone) { | ||||||
|  |       return this.declaration(version, encoding, standalone); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.e = function(name, attributes, text) { | ||||||
|  |       return this.element(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.n = function(name, attributes, text) { | ||||||
|  |       return this.node(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.t = function(value) { | ||||||
|  |       return this.text(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.d = function(value) { | ||||||
|  |       return this.cdata(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.c = function(value) { | ||||||
|  |       return this.comment(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.r = function(value) { | ||||||
|  |       return this.raw(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.i = function(target, value) { | ||||||
|  |       return this.instruction(target, value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.u = function() { | ||||||
|  |       return this.up(); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.importXMLBuilder = function(doc) { | ||||||
|  |       return this.importDocument(doc); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.replaceChild = function(newChild, oldChild) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.removeChild = function(oldChild) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.appendChild = function(newChild) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.hasChildNodes = function() { | ||||||
|  |       return this.children.length !== 0; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.cloneNode = function(deep) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.normalize = function() { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isSupported = function(feature, version) { | ||||||
|  |       return true; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.hasAttributes = function() { | ||||||
|  |       return this.attribs.length !== 0; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.compareDocumentPosition = function(other) { | ||||||
|  |       var ref, res; | ||||||
|  |       ref = this; | ||||||
|  |       if (ref === other) { | ||||||
|  |         return 0; | ||||||
|  |       } else if (this.document() !== other.document()) { | ||||||
|  |         res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; | ||||||
|  |         if (Math.random() < 0.5) { | ||||||
|  |           res |= DocumentPosition.Preceding; | ||||||
|  |         } else { | ||||||
|  |           res |= DocumentPosition.Following; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |       } else if (ref.isAncestor(other)) { | ||||||
|  |         return DocumentPosition.Contains | DocumentPosition.Preceding; | ||||||
|  |       } else if (ref.isDescendant(other)) { | ||||||
|  |         return DocumentPosition.Contains | DocumentPosition.Following; | ||||||
|  |       } else if (ref.isPreceding(other)) { | ||||||
|  |         return DocumentPosition.Preceding; | ||||||
|  |       } else { | ||||||
|  |         return DocumentPosition.Following; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isSameNode = function(other) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.lookupPrefix = function(namespaceURI) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.lookupNamespaceURI = function(prefix) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isEqualNode = function(node) { | ||||||
|  |       var i, j, ref2; | ||||||
|  |       if (node.nodeType !== this.nodeType) { | ||||||
|  |         return false; | ||||||
|  |       } | ||||||
|  |       if (node.children.length !== this.children.length) { | ||||||
|  |         return false; | ||||||
|  |       } | ||||||
|  |       for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { | ||||||
|  |         if (!this.children[i].isEqualNode(node.children[i])) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       return true; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.getFeature = function(feature, version) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.setUserData = function(key, data, handler) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.getUserData = function(key) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.contains = function(other) { | ||||||
|  |       if (!other) { | ||||||
|  |         return false; | ||||||
|  |       } | ||||||
|  |       return other === this || this.isDescendant(other); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isDescendant = function(node) { | ||||||
|  |       var child, isDescendantChild, j, len, ref2; | ||||||
|  |       ref2 = this.children; | ||||||
|  |       for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |         child = ref2[j]; | ||||||
|  |         if (node === child) { | ||||||
|  |           return true; | ||||||
|  |         } | ||||||
|  |         isDescendantChild = child.isDescendant(node); | ||||||
|  |         if (isDescendantChild) { | ||||||
|  |           return true; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       return false; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isAncestor = function(node) { | ||||||
|  |       return node.isDescendant(this); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isPreceding = function(node) { | ||||||
|  |       var nodePos, thisPos; | ||||||
|  |       nodePos = this.treePosition(node); | ||||||
|  |       thisPos = this.treePosition(this); | ||||||
|  |       if (nodePos === -1 || thisPos === -1) { | ||||||
|  |         return false; | ||||||
|  |       } else { | ||||||
|  |         return nodePos < thisPos; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isFollowing = function(node) { | ||||||
|  |       var nodePos, thisPos; | ||||||
|  |       nodePos = this.treePosition(node); | ||||||
|  |       thisPos = this.treePosition(this); | ||||||
|  |       if (nodePos === -1 || thisPos === -1) { | ||||||
|  |         return false; | ||||||
|  |       } else { | ||||||
|  |         return nodePos > thisPos; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.treePosition = function(node) { | ||||||
|  |       var found, pos; | ||||||
|  |       pos = 0; | ||||||
|  |       found = false; | ||||||
|  |       this.foreachTreeNode(this.document(), function(childNode) { | ||||||
|  |         pos++; | ||||||
|  |         if (!found && childNode === node) { | ||||||
|  |           return found = true; | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |       if (found) { | ||||||
|  |         return pos; | ||||||
|  |       } else { | ||||||
|  |         return -1; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.foreachTreeNode = function(node, func) { | ||||||
|  |       var child, j, len, ref2, res; | ||||||
|  |       node || (node = this.document()); | ||||||
|  |       ref2 = node.children; | ||||||
|  |       for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |         child = ref2[j]; | ||||||
|  |         if (res = func(child)) { | ||||||
|  |           return res; | ||||||
|  |         } else { | ||||||
|  |           res = this.foreachTreeNode(child, func); | ||||||
|  |           if (res) { | ||||||
|  |             return res; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     return XMLNode; | ||||||
|  | 
 | ||||||
|  |   })(); | ||||||
|  | 
 | ||||||
|  | }).call(this); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 263: | /***/ 263: | ||||||
| @ -7386,7 +8271,7 @@ var MatchKind; | |||||||
|  * POSSIBILITY OF SUCH DAMAGE. |  * POSSIBILITY OF SUCH DAMAGE. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| const { fromCallback } = __webpack_require__(676); | const { fromCallback } = __webpack_require__(147); | ||||||
| const Store = __webpack_require__(338).Store; | const Store = __webpack_require__(338).Store; | ||||||
| const permuteDomain = __webpack_require__(89).permuteDomain; | const permuteDomain = __webpack_require__(89).permuteDomain; | ||||||
| const pathMatch = __webpack_require__(348).pathMatch; | const pathMatch = __webpack_require__(348).pathMatch; | ||||||
| @ -27667,7 +28552,7 @@ const Store = __webpack_require__(338).Store; | |||||||
| const MemoryCookieStore = __webpack_require__(332).MemoryCookieStore; | const MemoryCookieStore = __webpack_require__(332).MemoryCookieStore; | ||||||
| const pathMatch = __webpack_require__(348).pathMatch; | const pathMatch = __webpack_require__(348).pathMatch; | ||||||
| const VERSION = __webpack_require__(460); | const VERSION = __webpack_require__(460); | ||||||
| const { fromCallback } = __webpack_require__(676); | const { fromCallback } = __webpack_require__(147); | ||||||
| 
 | 
 | ||||||
| // From RFC6265 S4.1.1
 | // From RFC6265 S4.1.1
 | ||||||
| // note that it excludes \x3B ";"
 | // note that it excludes \x3B ";"
 | ||||||
| @ -29321,290 +30206,290 @@ module.exports = require("crypto"); | |||||||
| /***/ 422: | /***/ 422: | ||||||
| /***/ (function(module) { | /***/ (function(module) { | ||||||
| 
 | 
 | ||||||
| /*! ***************************************************************************** | /*! ***************************************************************************** | ||||||
| Copyright (c) Microsoft Corporation. | Copyright (c) Microsoft Corporation. | ||||||
| 
 | 
 | ||||||
| Permission to use, copy, modify, and/or distribute this software for any | Permission to use, copy, modify, and/or distribute this software for any | ||||||
| purpose with or without fee is hereby granted. | purpose with or without fee is hereby granted. | ||||||
| 
 | 
 | ||||||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||||||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||||||
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||||||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||||||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | 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 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||||||
| PERFORMANCE OF THIS SOFTWARE. | PERFORMANCE OF THIS SOFTWARE. | ||||||
| ***************************************************************************** */ | ***************************************************************************** */ | ||||||
| 
 | 
 | ||||||
| /* global global, define, System, Reflect, Promise */ | /* global global, define, System, Reflect, Promise */ | ||||||
| var __extends; | var __extends; | ||||||
| var __assign; | var __assign; | ||||||
| var __rest; | var __rest; | ||||||
| var __decorate; | var __decorate; | ||||||
| var __param; | var __param; | ||||||
| var __metadata; | var __metadata; | ||||||
| var __awaiter; | var __awaiter; | ||||||
| var __generator; | var __generator; | ||||||
| var __exportStar; | var __exportStar; | ||||||
| var __values; | var __values; | ||||||
| var __read; | var __read; | ||||||
| var __spread; | var __spread; | ||||||
| var __spreadArrays; | var __spreadArrays; | ||||||
| var __await; | var __await; | ||||||
| var __asyncGenerator; | var __asyncGenerator; | ||||||
| var __asyncDelegator; | var __asyncDelegator; | ||||||
| var __asyncValues; | var __asyncValues; | ||||||
| var __makeTemplateObject; | var __makeTemplateObject; | ||||||
| var __importStar; | var __importStar; | ||||||
| var __importDefault; | var __importDefault; | ||||||
| var __classPrivateFieldGet; | var __classPrivateFieldGet; | ||||||
| var __classPrivateFieldSet; | var __classPrivateFieldSet; | ||||||
| var __createBinding; | var __createBinding; | ||||||
| (function (factory) { | (function (factory) { | ||||||
|     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; |     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; | ||||||
|     if (typeof define === "function" && define.amd) { |     if (typeof define === "function" && define.amd) { | ||||||
|         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); |         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); | ||||||
|     } |     } | ||||||
|     else if ( true && typeof module.exports === "object") { |     else if ( true && typeof module.exports === "object") { | ||||||
|         factory(createExporter(root, createExporter(module.exports))); |         factory(createExporter(root, createExporter(module.exports))); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         factory(createExporter(root)); |         factory(createExporter(root)); | ||||||
|     } |     } | ||||||
|     function createExporter(exports, previous) { |     function createExporter(exports, previous) { | ||||||
|         if (exports !== root) { |         if (exports !== root) { | ||||||
|             if (typeof Object.create === "function") { |             if (typeof Object.create === "function") { | ||||||
|                 Object.defineProperty(exports, "__esModule", { value: true }); |                 Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 exports.__esModule = true; |                 exports.__esModule = true; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; |         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
| (function (exporter) { | (function (exporter) { | ||||||
|     var extendStatics = Object.setPrototypeOf || |     var extendStatics = Object.setPrototypeOf || | ||||||
|         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |         ({ __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]; }; |         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||||||
| 
 | 
 | ||||||
|     __extends = function (d, b) { |     __extends = function (d, b) { | ||||||
|         extendStatics(d, b); |         extendStatics(d, b); | ||||||
|         function __() { this.constructor = d; } |         function __() { this.constructor = d; } | ||||||
|         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __assign = Object.assign || function (t) { |     __assign = Object.assign || function (t) { | ||||||
|         for (var s, i = 1, n = arguments.length; i < n; i++) { |         for (var s, i = 1, n = arguments.length; i < n; i++) { | ||||||
|             s = arguments[i]; |             s = arguments[i]; | ||||||
|             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||||||
|         } |         } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __rest = function (s, e) { |     __rest = function (s, e) { | ||||||
|         var t = {}; |         var t = {}; | ||||||
|         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||||||
|             t[p] = s[p]; |             t[p] = s[p]; | ||||||
|         if (s != null && typeof Object.getOwnPropertySymbols === "function") |         if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||||||
|             for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |             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])) |                 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||||||
|                     t[p[i]] = s[p[i]]; |                     t[p[i]] = s[p[i]]; | ||||||
|             } |             } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __decorate = function (decorators, target, key, desc) { |     __decorate = function (decorators, target, key, desc) { | ||||||
|         var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |         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); |         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; |         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; |         return c > 3 && r && Object.defineProperty(target, key, r), r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __param = function (paramIndex, decorator) { |     __param = function (paramIndex, decorator) { | ||||||
|         return function (target, key) { decorator(target, key, paramIndex); } |         return function (target, key) { decorator(target, key, paramIndex); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __metadata = function (metadataKey, metadataValue) { |     __metadata = function (metadataKey, metadataValue) { | ||||||
|         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __awaiter = function (thisArg, _arguments, P, generator) { |     __awaiter = function (thisArg, _arguments, P, generator) { | ||||||
|         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|         return new (P || (P = Promise))(function (resolve, reject) { |         return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|             function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |             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 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); } |             function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|             step((generator = generator.apply(thisArg, _arguments || [])).next()); |             step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __generator = function (thisArg, body) { |     __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; |         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; |         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 verb(n) { return function (v) { return step([n, v]); }; } | ||||||
|         function step(op) { |         function step(op) { | ||||||
|             if (f) throw new TypeError("Generator is already executing."); |             if (f) throw new TypeError("Generator is already executing."); | ||||||
|             while (_) try { |             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 (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]; |                 if (y = 0, t) op = [op[0] & 2, t.value]; | ||||||
|                 switch (op[0]) { |                 switch (op[0]) { | ||||||
|                     case 0: case 1: t = op; break; |                     case 0: case 1: t = op; break; | ||||||
|                     case 4: _.label++; return { value: op[1], done: false }; |                     case 4: _.label++; return { value: op[1], done: false }; | ||||||
|                     case 5: _.label++; y = op[1]; op = [0]; continue; |                     case 5: _.label++; y = op[1]; op = [0]; continue; | ||||||
|                     case 7: op = _.ops.pop(); _.trys.pop(); continue; |                     case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||||||
|                     default: |                     default: | ||||||
|                         if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |                         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] === 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 (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 && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||||||
|                         if (t[2]) _.ops.pop(); |                         if (t[2]) _.ops.pop(); | ||||||
|                         _.trys.pop(); continue; |                         _.trys.pop(); continue; | ||||||
|                 } |                 } | ||||||
|                 op = body.call(thisArg, _); |                 op = body.call(thisArg, _); | ||||||
|             } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |             } 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 }; |             if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __createBinding = function(o, m, k, k2) { |     __createBinding = function(o, m, k, k2) { | ||||||
|         if (k2 === undefined) k2 = k; |         if (k2 === undefined) k2 = k; | ||||||
|         o[k2] = m[k]; |         o[k2] = m[k]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __exportStar = function (m, exports) { |     __exportStar = function (m, exports) { | ||||||
|         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; |         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __values = function (o) { |     __values = function (o) { | ||||||
|         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||||||
|         if (m) return m.call(o); |         if (m) return m.call(o); | ||||||
|         if (o && typeof o.length === "number") return { |         if (o && typeof o.length === "number") return { | ||||||
|             next: function () { |             next: function () { | ||||||
|                 if (o && i >= o.length) o = void 0; |                 if (o && i >= o.length) o = void 0; | ||||||
|                 return { value: o && o[i++], done: !o }; |                 return { value: o && o[i++], done: !o }; | ||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __read = function (o, n) { |     __read = function (o, n) { | ||||||
|         var m = typeof Symbol === "function" && o[Symbol.iterator]; |         var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||||||
|         if (!m) return o; |         if (!m) return o; | ||||||
|         var i = m.call(o), r, ar = [], e; |         var i = m.call(o), r, ar = [], e; | ||||||
|         try { |         try { | ||||||
|             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||||||
|         } |         } | ||||||
|         catch (error) { e = { error: error }; } |         catch (error) { e = { error: error }; } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (r && !r.done && (m = i["return"])) m.call(i); |                 if (r && !r.done && (m = i["return"])) m.call(i); | ||||||
|             } |             } | ||||||
|             finally { if (e) throw e.error; } |             finally { if (e) throw e.error; } | ||||||
|         } |         } | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spread = function () { |     __spread = function () { | ||||||
|         for (var ar = [], i = 0; i < arguments.length; i++) |         for (var ar = [], i = 0; i < arguments.length; i++) | ||||||
|             ar = ar.concat(__read(arguments[i])); |             ar = ar.concat(__read(arguments[i])); | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spreadArrays = function () { |     __spreadArrays = function () { | ||||||
|         for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |         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 r = Array(s), k = 0, i = 0; i < il; i++) | ||||||
|             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||||||
|                 r[k] = a[j]; |                 r[k] = a[j]; | ||||||
|         return r; |         return r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __await = function (v) { |     __await = function (v) { | ||||||
|         return this instanceof __await ? (this.v = v, this) : new __await(v); |         return this instanceof __await ? (this.v = v, this) : new __await(v); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncGenerator = function (thisArg, _arguments, generator) { |     __asyncGenerator = function (thisArg, _arguments, generator) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var g = generator.apply(thisArg, _arguments || []), i, q = []; |         var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||||||
|         return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |         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 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 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 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 fulfill(value) { resume("next", value); } | ||||||
|         function reject(value) { resume("throw", 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]); } |         function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncDelegator = function (o) { |     __asyncDelegator = function (o) { | ||||||
|         var i, p; |         var i, p; | ||||||
|         return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |         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; } |         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) { |     __asyncValues = function (o) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var m = o[Symbol.asyncIterator], i; |         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); |         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 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); } |         function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __makeTemplateObject = function (cooked, raw) { |     __makeTemplateObject = function (cooked, raw) { | ||||||
|         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||||||
|         return cooked; |         return cooked; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importStar = function (mod) { |     __importStar = function (mod) { | ||||||
|         if (mod && mod.__esModule) return mod; |         if (mod && mod.__esModule) return mod; | ||||||
|         var result = {}; |         var result = {}; | ||||||
|         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|         result["default"] = mod; |         result["default"] = mod; | ||||||
|         return result; |         return result; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importDefault = function (mod) { |     __importDefault = function (mod) { | ||||||
|         return (mod && mod.__esModule) ? mod : { "default": mod }; |         return (mod && mod.__esModule) ? mod : { "default": mod }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldGet = function (receiver, privateMap) { |     __classPrivateFieldGet = function (receiver, privateMap) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to get private field on non-instance"); |             throw new TypeError("attempted to get private field on non-instance"); | ||||||
|         } |         } | ||||||
|         return privateMap.get(receiver); |         return privateMap.get(receiver); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldSet = function (receiver, privateMap, value) { |     __classPrivateFieldSet = function (receiver, privateMap, value) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to set private field on non-instance"); |             throw new TypeError("attempted to set private field on non-instance"); | ||||||
|         } |         } | ||||||
|         privateMap.set(receiver, value); |         privateMap.set(receiver, value); | ||||||
|         return value; |         return value; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     exporter("__extends", __extends); |     exporter("__extends", __extends); | ||||||
|     exporter("__assign", __assign); |     exporter("__assign", __assign); | ||||||
|     exporter("__rest", __rest); |     exporter("__rest", __rest); | ||||||
|     exporter("__decorate", __decorate); |     exporter("__decorate", __decorate); | ||||||
|     exporter("__param", __param); |     exporter("__param", __param); | ||||||
|     exporter("__metadata", __metadata); |     exporter("__metadata", __metadata); | ||||||
|     exporter("__awaiter", __awaiter); |     exporter("__awaiter", __awaiter); | ||||||
|     exporter("__generator", __generator); |     exporter("__generator", __generator); | ||||||
|     exporter("__exportStar", __exportStar); |     exporter("__exportStar", __exportStar); | ||||||
|     exporter("__createBinding", __createBinding); |     exporter("__createBinding", __createBinding); | ||||||
|     exporter("__values", __values); |     exporter("__values", __values); | ||||||
|     exporter("__read", __read); |     exporter("__read", __read); | ||||||
|     exporter("__spread", __spread); |     exporter("__spread", __spread); | ||||||
|     exporter("__spreadArrays", __spreadArrays); |     exporter("__spreadArrays", __spreadArrays); | ||||||
|     exporter("__await", __await); |     exporter("__await", __await); | ||||||
|     exporter("__asyncGenerator", __asyncGenerator); |     exporter("__asyncGenerator", __asyncGenerator); | ||||||
|     exporter("__asyncDelegator", __asyncDelegator); |     exporter("__asyncDelegator", __asyncDelegator); | ||||||
|     exporter("__asyncValues", __asyncValues); |     exporter("__asyncValues", __asyncValues); | ||||||
|     exporter("__makeTemplateObject", __makeTemplateObject); |     exporter("__makeTemplateObject", __makeTemplateObject); | ||||||
|     exporter("__importStar", __importStar); |     exporter("__importStar", __importStar); | ||||||
|     exporter("__importDefault", __importDefault); |     exporter("__importDefault", __importDefault); | ||||||
|     exporter("__classPrivateFieldGet", __classPrivateFieldGet); |     exporter("__classPrivateFieldGet", __classPrivateFieldGet); | ||||||
|     exporter("__classPrivateFieldSet", __classPrivateFieldSet); |     exporter("__classPrivateFieldSet", __classPrivateFieldSet); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -30048,7 +30933,7 @@ var __createBinding; | |||||||
| /***/ (function(module, __unusedexports, __webpack_require__) { | /***/ (function(module, __unusedexports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| var iterate    = __webpack_require__(157) | var iterate    = __webpack_require__(157) | ||||||
|   , initState  = __webpack_require__(147) |   , initState  = __webpack_require__(903) | ||||||
|   , terminator = __webpack_require__(939) |   , terminator = __webpack_require__(939) | ||||||
|   ; |   ; | ||||||
| 
 | 
 | ||||||
| @ -30197,129 +31082,130 @@ function escapeProperty(s) { | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const exec_1 = __webpack_require__(986); | const exec_1 = __webpack_require__(986); | ||||||
| const io = __importStar(__webpack_require__(1)); | const io = __importStar(__webpack_require__(1)); | ||||||
| const fs_1 = __webpack_require__(747); | const fs_1 = __webpack_require__(747); | ||||||
| const path = __importStar(__webpack_require__(622)); | const path = __importStar(__webpack_require__(622)); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| function getTarPath(args, compressionMethod) { | function getTarPath(args, compressionMethod) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const IS_WINDOWS = process.platform === 'win32'; |         const IS_WINDOWS = process.platform === 'win32'; | ||||||
|         if (IS_WINDOWS) { |         if (IS_WINDOWS) { | ||||||
|             const systemTar = `${process.env['windir']}\\System32\\tar.exe`; |             const systemTar = `${process.env['windir']}\\System32\\tar.exe`; | ||||||
|             if (compressionMethod !== constants_1.CompressionMethod.Gzip) { |             if (compressionMethod !== constants_1.CompressionMethod.Gzip) { | ||||||
|                 // We only use zstandard compression on windows when gnu tar is installed due to
 |                 // We only use zstandard compression on windows when gnu tar is installed due to
 | ||||||
|                 // a bug with compressing large files with bsdtar + zstd
 |                 // a bug with compressing large files with bsdtar + zstd
 | ||||||
|                 args.push('--force-local'); |                 args.push('--force-local'); | ||||||
|             } |             } | ||||||
|             else if (fs_1.existsSync(systemTar)) { |             else if (fs_1.existsSync(systemTar)) { | ||||||
|                 return systemTar; |                 return systemTar; | ||||||
|             } |             } | ||||||
|             else if (yield utils.isGnuTarInstalled()) { |             else if (yield utils.isGnuTarInstalled()) { | ||||||
|                 args.push('--force-local'); |                 args.push('--force-local'); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return yield io.which('tar', true); |         return yield io.which('tar', true); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function execTar(args, compressionMethod, cwd) { | function execTar(args, compressionMethod, cwd) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         try { |         try { | ||||||
|             yield exec_1.exec(`"${yield getTarPath(args, compressionMethod)}"`, args, { cwd }); |             yield exec_1.exec(`"${yield getTarPath(args, compressionMethod)}"`, args, { cwd }); | ||||||
|         } |         } | ||||||
|         catch (error) { |         catch (error) { | ||||||
|             throw new Error(`Tar failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); |             throw new Error(`Tar failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function getWorkingDirectory() { | function getWorkingDirectory() { | ||||||
|     var _a; |     var _a; | ||||||
|     return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); |     return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); | ||||||
| } | } | ||||||
| function extractTar(archivePath, compressionMethod) { | function extractTar(archivePath, compressionMethod) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Create directory to extract tar into
 |         // Create directory to extract tar into
 | ||||||
|         const workingDirectory = getWorkingDirectory(); |         const workingDirectory = getWorkingDirectory(); | ||||||
|         yield io.mkdirP(workingDirectory); |         yield io.mkdirP(workingDirectory); | ||||||
|         // --d: Decompress.
 |         // --d: Decompress.
 | ||||||
|         // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit.
 |         // --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.
 |         // Using 30 here because we also support 32-bit self-hosted runners.
 | ||||||
|         function getCompressionProgram() { |         function getCompressionProgram() { | ||||||
|             switch (compressionMethod) { |             switch (compressionMethod) { | ||||||
|                 case constants_1.CompressionMethod.Zstd: |                 case constants_1.CompressionMethod.Zstd: | ||||||
|                     return ['--use-compress-program', 'zstd -d --long=30']; |                     return ['--use-compress-program', 'zstd -d --long=30']; | ||||||
|                 case constants_1.CompressionMethod.ZstdWithoutLong: |                 case constants_1.CompressionMethod.ZstdWithoutLong: | ||||||
|                     return ['--use-compress-program', 'zstd -d']; |                     return ['--use-compress-program', 'zstd -d']; | ||||||
|                 default: |                 default: | ||||||
|                     return ['-z']; |                     return ['-z']; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         const args = [ |         const args = [ | ||||||
|             ...getCompressionProgram(), |             ...getCompressionProgram(), | ||||||
|             '-xf', |             '-xf', | ||||||
|             archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), |             archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), | ||||||
|             '-P', |             '-P', | ||||||
|             '-C', |             '-C', | ||||||
|             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/') |             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/') | ||||||
|         ]; |         ]; | ||||||
|         yield execTar(args, compressionMethod); |         yield execTar(args, compressionMethod); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.extractTar = extractTar; | exports.extractTar = extractTar; | ||||||
| function createTar(archiveFolder, sourceDirectories, compressionMethod) { | function createTar(archiveFolder, sourceDirectories, compressionMethod) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Write source directories to manifest.txt to avoid command length limits
 |         // Write source directories to manifest.txt to avoid command length limits
 | ||||||
|         const manifestFilename = 'manifest.txt'; |         const manifestFilename = 'manifest.txt'; | ||||||
|         const cacheFileName = utils.getCacheFileName(compressionMethod); |         const cacheFileName = utils.getCacheFileName(compressionMethod); | ||||||
|         fs_1.writeFileSync(path.join(archiveFolder, manifestFilename), sourceDirectories.join('\n')); |         fs_1.writeFileSync(path.join(archiveFolder, manifestFilename), sourceDirectories.join('\n')); | ||||||
|         const workingDirectory = getWorkingDirectory(); |         const workingDirectory = getWorkingDirectory(); | ||||||
|         // -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores.
 |         // -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.
 |         // --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.
 |         // 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.
 |         // 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() { |         function getCompressionProgram() { | ||||||
|             switch (compressionMethod) { |             switch (compressionMethod) { | ||||||
|                 case constants_1.CompressionMethod.Zstd: |                 case constants_1.CompressionMethod.Zstd: | ||||||
|                     return ['--use-compress-program', 'zstd -T0 --long=30']; |                     return ['--use-compress-program', 'zstd -T0 --long=30']; | ||||||
|                 case constants_1.CompressionMethod.ZstdWithoutLong: |                 case constants_1.CompressionMethod.ZstdWithoutLong: | ||||||
|                     return ['--use-compress-program', 'zstd -T0']; |                     return ['--use-compress-program', 'zstd -T0']; | ||||||
|                 default: |                 default: | ||||||
|                     return ['-z']; |                     return ['-z']; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         const args = [ |         const args = [ | ||||||
|             ...getCompressionProgram(), |             '--posix', | ||||||
|             '-cf', |             ...getCompressionProgram(), | ||||||
|             cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), |             '-cf', | ||||||
|             '-P', |             cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), | ||||||
|             '-C', |             '-P', | ||||||
|             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), |             '-C', | ||||||
|             '--files-from', |             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), | ||||||
|             manifestFilename |             '--files-from', | ||||||
|         ]; |             manifestFilename | ||||||
|         yield execTar(args, compressionMethod, archiveFolder); |         ]; | ||||||
|     }); |         yield execTar(args, compressionMethod, archiveFolder); | ||||||
| } |     }); | ||||||
| exports.createTar = createTar; | } | ||||||
|  | exports.createTar = createTar; | ||||||
| //# sourceMappingURL=tar.js.map
 | //# sourceMappingURL=tar.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -32449,7 +33335,7 @@ module.exports = '4.0.0' | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -33132,67 +34018,67 @@ module.exports = {"application/1d-interleaved-parityfec":{"source":"iana"},"appl | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| /** | /** | ||||||
|  * Returns a copy of the upload options with defaults filled in. |  * Returns a copy of the upload options with defaults filled in. | ||||||
|  * |  * | ||||||
|  * @param copy the original upload options |  * @param copy the original upload options | ||||||
|  */ |  */ | ||||||
| function getUploadOptions(copy) { | function getUploadOptions(copy) { | ||||||
|     const result = { |     const result = { | ||||||
|         uploadConcurrency: 4, |         uploadConcurrency: 4, | ||||||
|         uploadChunkSize: 32 * 1024 * 1024 |         uploadChunkSize: 32 * 1024 * 1024 | ||||||
|     }; |     }; | ||||||
|     if (copy) { |     if (copy) { | ||||||
|         if (typeof copy.uploadConcurrency === 'number') { |         if (typeof copy.uploadConcurrency === 'number') { | ||||||
|             result.uploadConcurrency = copy.uploadConcurrency; |             result.uploadConcurrency = copy.uploadConcurrency; | ||||||
|         } |         } | ||||||
|         if (typeof copy.uploadChunkSize === 'number') { |         if (typeof copy.uploadChunkSize === 'number') { | ||||||
|             result.uploadChunkSize = copy.uploadChunkSize; |             result.uploadChunkSize = copy.uploadChunkSize; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     core.debug(`Upload concurrency: ${result.uploadConcurrency}`); |     core.debug(`Upload concurrency: ${result.uploadConcurrency}`); | ||||||
|     core.debug(`Upload chunk size: ${result.uploadChunkSize}`); |     core.debug(`Upload chunk size: ${result.uploadChunkSize}`); | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| exports.getUploadOptions = getUploadOptions; | exports.getUploadOptions = getUploadOptions; | ||||||
| /** | /** | ||||||
|  * Returns a copy of the download options with defaults filled in. |  * Returns a copy of the download options with defaults filled in. | ||||||
|  * |  * | ||||||
|  * @param copy the original download options |  * @param copy the original download options | ||||||
|  */ |  */ | ||||||
| function getDownloadOptions(copy) { | function getDownloadOptions(copy) { | ||||||
|     const result = { |     const result = { | ||||||
|         useAzureSdk: true, |         useAzureSdk: true, | ||||||
|         downloadConcurrency: 8, |         downloadConcurrency: 8, | ||||||
|         timeoutInMs: 30000 |         timeoutInMs: 30000 | ||||||
|     }; |     }; | ||||||
|     if (copy) { |     if (copy) { | ||||||
|         if (typeof copy.useAzureSdk === 'boolean') { |         if (typeof copy.useAzureSdk === 'boolean') { | ||||||
|             result.useAzureSdk = copy.useAzureSdk; |             result.useAzureSdk = copy.useAzureSdk; | ||||||
|         } |         } | ||||||
|         if (typeof copy.downloadConcurrency === 'number') { |         if (typeof copy.downloadConcurrency === 'number') { | ||||||
|             result.downloadConcurrency = copy.downloadConcurrency; |             result.downloadConcurrency = copy.downloadConcurrency; | ||||||
|         } |         } | ||||||
|         if (typeof copy.timeoutInMs === 'number') { |         if (typeof copy.timeoutInMs === 'number') { | ||||||
|             result.timeoutInMs = copy.timeoutInMs; |             result.timeoutInMs = copy.timeoutInMs; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     core.debug(`Use Azure SDK: ${result.useAzureSdk}`); |     core.debug(`Use Azure SDK: ${result.useAzureSdk}`); | ||||||
|     core.debug(`Download concurrency: ${result.downloadConcurrency}`); |     core.debug(`Download concurrency: ${result.downloadConcurrency}`); | ||||||
|     core.debug(`Request timeout (ms): ${result.timeoutInMs}`); |     core.debug(`Request timeout (ms): ${result.timeoutInMs}`); | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| exports.getDownloadOptions = getDownloadOptions; | exports.getDownloadOptions = getDownloadOptions; | ||||||
| //# sourceMappingURL=options.js.map
 | //# sourceMappingURL=options.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -34018,7 +34904,7 @@ CombinedStream.prototype._emitError = function(err) { | |||||||
| 
 | 
 | ||||||
|   XMLDOMConfiguration = __webpack_require__(524); |   XMLDOMConfiguration = __webpack_require__(524); | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -34542,6 +35428,36 @@ Object.defineProperty(exports, "v5", { | |||||||
|     return _v4.default; |     return _v4.default; | ||||||
|   } |   } | ||||||
| }); | }); | ||||||
|  | Object.defineProperty(exports, "NIL", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _nil.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "version", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _version.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "validate", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _validate.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "stringify", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _stringify.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "parse", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _parse.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
| 
 | 
 | ||||||
| var _v = _interopRequireDefault(__webpack_require__(173)); | var _v = _interopRequireDefault(__webpack_require__(173)); | ||||||
| 
 | 
 | ||||||
| @ -34551,6 +35467,16 @@ var _v3 = _interopRequireDefault(__webpack_require__(606)); | |||||||
| 
 | 
 | ||||||
| var _v4 = _interopRequireDefault(__webpack_require__(90)); | var _v4 = _interopRequireDefault(__webpack_require__(90)); | ||||||
| 
 | 
 | ||||||
|  | var _nil = _interopRequireDefault(__webpack_require__(24)); | ||||||
|  | 
 | ||||||
|  | var _version = _interopRequireDefault(__webpack_require__(104)); | ||||||
|  | 
 | ||||||
|  | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
|  | 
 | ||||||
|  | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
|  | 
 | ||||||
|  | var _parse = _interopRequireDefault(__webpack_require__(197)); | ||||||
|  | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -34940,7 +35866,7 @@ exports.default = void 0; | |||||||
| 
 | 
 | ||||||
| var _rng = _interopRequireDefault(__webpack_require__(733)); | var _rng = _interopRequireDefault(__webpack_require__(733)); | ||||||
| 
 | 
 | ||||||
| var _bytesToUuid = _interopRequireDefault(__webpack_require__(940)); | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
| 
 | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| @ -34963,7 +35889,7 @@ function v4(options, buf, offset) { | |||||||
|     return buf; |     return buf; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return (0, _bytesToUuid.default)(rnds); |   return (0, _stringify.default)(rnds); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var _default = v4; | var _default = v4; | ||||||
| @ -35231,7 +36157,7 @@ module.exports = require("net"); | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   module.exports = XMLCharacterData = (function(superClass) { |   module.exports = XMLCharacterData = (function(superClass) { | ||||||
|     extend(XMLCharacterData, superClass); |     extend(XMLCharacterData, superClass); | ||||||
| @ -36934,7 +37860,7 @@ module.exports = require("net"); | |||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   module.exports = XMLRaw = (function(superClass) { |   module.exports = XMLRaw = (function(superClass) { | ||||||
|     extend(XMLRaw, superClass); |     extend(XMLRaw, superClass); | ||||||
| @ -36976,7 +37902,7 @@ module.exports = require("net"); | |||||||
| 
 | 
 | ||||||
|   isObject = __webpack_require__(582).isObject; |   isObject = __webpack_require__(582).isObject; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -37335,35 +38261,26 @@ function isUnixExecutable(stats) { | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 676: | /***/ 676: | ||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| exports.fromCallback = function (fn) { | Object.defineProperty(exports, "__esModule", { | ||||||
|   return Object.defineProperty(function () { |   value: true | ||||||
|     if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) | }); | ||||||
|     else { | exports.default = void 0; | ||||||
|       return new Promise((resolve, reject) => { | 
 | ||||||
|         arguments[arguments.length] = (err, res) => { | var _regex = _interopRequireDefault(__webpack_require__(238)); | ||||||
|           if (err) return reject(err) | 
 | ||||||
|           resolve(res) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
|         } | 
 | ||||||
|         arguments.length++ | function validate(uuid) { | ||||||
|         fn.apply(this, arguments) |   return typeof uuid === 'string' && _regex.default.test(uuid); | ||||||
|       }) |  | ||||||
|     } |  | ||||||
|   }, 'name', { value: fn.name }) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| exports.fromPromise = function (fn) { |  | ||||||
|   return Object.defineProperty(function () { |  | ||||||
|     const cb = arguments[arguments.length - 1] |  | ||||||
|     if (typeof cb !== 'function') return fn.apply(this, arguments) |  | ||||||
|     else fn.apply(this, arguments).then(r => cb(null, r), cb) |  | ||||||
|   }, 'name', { value: fn.name }) |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | var _default = validate; | ||||||
|  | exports.default = _default; | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| @ -37401,152 +38318,152 @@ exports.fromPromise = function (fn) { | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const path = __importStar(__webpack_require__(622)); | const path = __importStar(__webpack_require__(622)); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const cacheHttpClient = __importStar(__webpack_require__(114)); | const cacheHttpClient = __importStar(__webpack_require__(114)); | ||||||
| const tar_1 = __webpack_require__(434); | const tar_1 = __webpack_require__(434); | ||||||
| class ValidationError extends Error { | class ValidationError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|         this.name = 'ValidationError'; |         this.name = 'ValidationError'; | ||||||
|         Object.setPrototypeOf(this, ValidationError.prototype); |         Object.setPrototypeOf(this, ValidationError.prototype); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| exports.ValidationError = ValidationError; | exports.ValidationError = ValidationError; | ||||||
| class ReserveCacheError extends Error { | class ReserveCacheError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|         this.name = 'ReserveCacheError'; |         this.name = 'ReserveCacheError'; | ||||||
|         Object.setPrototypeOf(this, ReserveCacheError.prototype); |         Object.setPrototypeOf(this, ReserveCacheError.prototype); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| exports.ReserveCacheError = ReserveCacheError; | exports.ReserveCacheError = ReserveCacheError; | ||||||
| function checkPaths(paths) { | function checkPaths(paths) { | ||||||
|     if (!paths || paths.length === 0) { |     if (!paths || paths.length === 0) { | ||||||
|         throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); |         throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| function checkKey(key) { | function checkKey(key) { | ||||||
|     if (key.length > 512) { |     if (key.length > 512) { | ||||||
|         throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); |         throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); | ||||||
|     } |     } | ||||||
|     const regex = /^[^,]*$/; |     const regex = /^[^,]*$/; | ||||||
|     if (!regex.test(key)) { |     if (!regex.test(key)) { | ||||||
|         throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); |         throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| /** | /** | ||||||
|  * Restores cache from keys |  * Restores cache from keys | ||||||
|  * |  * | ||||||
|  * @param paths a list of file paths to restore from the cache |  * @param paths a list of file paths to restore from the cache | ||||||
|  * @param primaryKey an explicit key for restoring 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 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 |  * @param downloadOptions cache download options | ||||||
|  * @returns string returns the key for the cache hit, otherwise returns undefined |  * @returns string returns the key for the cache hit, otherwise returns undefined | ||||||
|  */ |  */ | ||||||
| function restoreCache(paths, primaryKey, restoreKeys, options) { | function restoreCache(paths, primaryKey, restoreKeys, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         checkPaths(paths); |         checkPaths(paths); | ||||||
|         restoreKeys = restoreKeys || []; |         restoreKeys = restoreKeys || []; | ||||||
|         const keys = [primaryKey, ...restoreKeys]; |         const keys = [primaryKey, ...restoreKeys]; | ||||||
|         core.debug('Resolved Keys:'); |         core.debug('Resolved Keys:'); | ||||||
|         core.debug(JSON.stringify(keys)); |         core.debug(JSON.stringify(keys)); | ||||||
|         if (keys.length > 10) { |         if (keys.length > 10) { | ||||||
|             throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); |             throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); | ||||||
|         } |         } | ||||||
|         for (const key of keys) { |         for (const key of keys) { | ||||||
|             checkKey(key); |             checkKey(key); | ||||||
|         } |         } | ||||||
|         const compressionMethod = yield utils.getCompressionMethod(); |         const compressionMethod = yield utils.getCompressionMethod(); | ||||||
|         // path are needed to compute version
 |         // path are needed to compute version
 | ||||||
|         const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { |         const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { | ||||||
|             compressionMethod |             compressionMethod | ||||||
|         }); |         }); | ||||||
|         if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { |         if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { | ||||||
|             // Cache not found
 |             // Cache not found
 | ||||||
|             return undefined; |             return undefined; | ||||||
|         } |         } | ||||||
|         const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); |         const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); | ||||||
|         core.debug(`Archive Path: ${archivePath}`); |         core.debug(`Archive Path: ${archivePath}`); | ||||||
|         try { |         try { | ||||||
|             // Download the cache from the cache entry
 |             // Download the cache from the cache entry
 | ||||||
|             yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); |             yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); | ||||||
|             const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); |             const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|             core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); |             core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); | ||||||
|             yield tar_1.extractTar(archivePath, compressionMethod); |             yield tar_1.extractTar(archivePath, compressionMethod); | ||||||
|         } |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|                 yield utils.unlinkFile(archivePath); |                 yield utils.unlinkFile(archivePath); | ||||||
|             } |             } | ||||||
|             catch (error) { |             catch (error) { | ||||||
|                 core.debug(`Failed to delete archive: ${error}`); |                 core.debug(`Failed to delete archive: ${error}`); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return cacheEntry.cacheKey; |         return cacheEntry.cacheKey; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.restoreCache = restoreCache; | exports.restoreCache = restoreCache; | ||||||
| /** | /** | ||||||
|  * Saves a list of files with the specified key |  * Saves a list of files with the specified key | ||||||
|  * |  * | ||||||
|  * @param paths a list of file paths to be cached |  * @param paths a list of file paths to be cached | ||||||
|  * @param key an explicit key for restoring the cache |  * @param key an explicit key for restoring the cache | ||||||
|  * @param options cache upload options |  * @param options cache upload options | ||||||
|  * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails |  * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails | ||||||
|  */ |  */ | ||||||
| function saveCache(paths, key, options) { | function saveCache(paths, key, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         checkPaths(paths); |         checkPaths(paths); | ||||||
|         checkKey(key); |         checkKey(key); | ||||||
|         const compressionMethod = yield utils.getCompressionMethod(); |         const compressionMethod = yield utils.getCompressionMethod(); | ||||||
|         core.debug('Reserving Cache'); |         core.debug('Reserving Cache'); | ||||||
|         const cacheId = yield cacheHttpClient.reserveCache(key, paths, { |         const cacheId = yield cacheHttpClient.reserveCache(key, paths, { | ||||||
|             compressionMethod |             compressionMethod | ||||||
|         }); |         }); | ||||||
|         if (cacheId === -1) { |         if (cacheId === -1) { | ||||||
|             throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); |             throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); | ||||||
|         } |         } | ||||||
|         core.debug(`Cache ID: ${cacheId}`); |         core.debug(`Cache ID: ${cacheId}`); | ||||||
|         const cachePaths = yield utils.resolvePaths(paths); |         const cachePaths = yield utils.resolvePaths(paths); | ||||||
|         core.debug('Cache Paths:'); |         core.debug('Cache Paths:'); | ||||||
|         core.debug(`${JSON.stringify(cachePaths)}`); |         core.debug(`${JSON.stringify(cachePaths)}`); | ||||||
|         const archiveFolder = yield utils.createTempDirectory(); |         const archiveFolder = yield utils.createTempDirectory(); | ||||||
|         const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); |         const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); | ||||||
|         core.debug(`Archive Path: ${archivePath}`); |         core.debug(`Archive Path: ${archivePath}`); | ||||||
|         yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod); |         yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod); | ||||||
|         const fileSizeLimit = 5 * 1024 * 1024 * 1024; // 5GB per repo limit
 |         const fileSizeLimit = 5 * 1024 * 1024 * 1024; // 5GB per repo limit
 | ||||||
|         const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); |         const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|         core.debug(`File Size: ${archiveFileSize}`); |         core.debug(`File Size: ${archiveFileSize}`); | ||||||
|         if (archiveFileSize > fileSizeLimit) { |         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.`); |             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})`); |         core.debug(`Saving Cache (ID: ${cacheId})`); | ||||||
|         yield cacheHttpClient.saveCache(cacheId, archivePath, options); |         yield cacheHttpClient.saveCache(cacheId, archivePath, options); | ||||||
|         return cacheId; |         return cacheId; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.saveCache = saveCache; | exports.saveCache = saveCache; | ||||||
| //# sourceMappingURL=cache.js.map
 | //# sourceMappingURL=cache.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -37767,7 +38684,7 @@ function rng() { | |||||||
| 
 | 
 | ||||||
|   isObject = __webpack_require__(582).isObject; |   isObject = __webpack_require__(582).isObject; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -37960,7 +38877,7 @@ function rng() { | |||||||
| 
 | 
 | ||||||
|   isObject = __webpack_require__(582).isObject; |   isObject = __webpack_require__(582).isObject; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -39913,7 +40830,7 @@ module.exports = require("stream"); | |||||||
| 
 | 
 | ||||||
|   ref = __webpack_require__(582), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; |   ref = __webpack_require__(582), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -40216,7 +41133,7 @@ module.exports = require("stream"); | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -40331,1092 +41248,346 @@ module.exports = __webpack_require__(512) | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 855: | /***/ 855: | ||||||
| /***/ (function(module, __unusedexports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| // Generated by CoffeeScript 1.12.7
 | "use strict"; | ||||||
| (function() { |  | ||||||
|   var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, |  | ||||||
|     hasProp = {}.hasOwnProperty; |  | ||||||
| 
 | 
 | ||||||
|   ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; |  | ||||||
| 
 | 
 | ||||||
|   XMLElement = null; | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
| 
 | 
 | ||||||
|   XMLCData = null; | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
| 
 | 
 | ||||||
|   XMLComment = null; | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
|   XMLDeclaration = null; | /** | ||||||
|  |  * Convert array of 16 byte values to UUID string format of the form: | ||||||
|  |  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | ||||||
|  |  */ | ||||||
|  | const byteToHex = []; | ||||||
| 
 | 
 | ||||||
|   XMLDocType = null; | for (let i = 0; i < 256; ++i) { | ||||||
|  |   byteToHex.push((i + 0x100).toString(16).substr(1)); | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
|   XMLRaw = null; | function stringify(arr, offset = 0) { | ||||||
|  |   // Note: Be careful editing this code!  It's been tuned for performance
 | ||||||
|  |   // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
 | ||||||
|  |   const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID.  If this throws, it's likely due to one
 | ||||||
|  |   // of the following:
 | ||||||
|  |   // - One or more input array values don't map to a hex octet (leading to
 | ||||||
|  |   // "undefined" in the uuid)
 | ||||||
|  |   // - Invalid input values for the RFC `version` or `variant` fields
 | ||||||
| 
 | 
 | ||||||
|   XMLText = null; |   if (!(0, _validate.default)(uuid)) { | ||||||
|  |     throw TypeError('Stringified UUID is invalid'); | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   XMLProcessingInstruction = null; |   return uuid; | ||||||
| 
 | } | ||||||
|   XMLDummy = null; |  | ||||||
| 
 |  | ||||||
|   NodeType = null; |  | ||||||
| 
 |  | ||||||
|   XMLNodeList = null; |  | ||||||
| 
 |  | ||||||
|   XMLNamedNodeMap = null; |  | ||||||
| 
 |  | ||||||
|   DocumentPosition = null; |  | ||||||
| 
 |  | ||||||
|   module.exports = XMLNode = (function() { |  | ||||||
|     function XMLNode(parent1) { |  | ||||||
|       this.parent = parent1; |  | ||||||
|       if (this.parent) { |  | ||||||
|         this.options = this.parent.options; |  | ||||||
|         this.stringify = this.parent.stringify; |  | ||||||
|       } |  | ||||||
|       this.value = null; |  | ||||||
|       this.children = []; |  | ||||||
|       this.baseURI = null; |  | ||||||
|       if (!XMLElement) { |  | ||||||
|         XMLElement = __webpack_require__(796); |  | ||||||
|         XMLCData = __webpack_require__(657); |  | ||||||
|         XMLComment = __webpack_require__(919); |  | ||||||
|         XMLDeclaration = __webpack_require__(738); |  | ||||||
|         XMLDocType = __webpack_require__(735); |  | ||||||
|         XMLRaw = __webpack_require__(660); |  | ||||||
|         XMLText = __webpack_require__(708); |  | ||||||
|         XMLProcessingInstruction = __webpack_require__(491); |  | ||||||
|         XMLDummy = __webpack_require__(956); |  | ||||||
|         NodeType = __webpack_require__(683); |  | ||||||
|         XMLNodeList = __webpack_require__(265); |  | ||||||
|         XMLNamedNodeMap = __webpack_require__(451); |  | ||||||
|         DocumentPosition = __webpack_require__(65); |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nodeName', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.name; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nodeType', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.type; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nodeValue', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.value; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'parentNode', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.parent; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'childNodes', { |  | ||||||
|       get: function() { |  | ||||||
|         if (!this.childNodeList || !this.childNodeList.nodes) { |  | ||||||
|           this.childNodeList = new XMLNodeList(this.children); |  | ||||||
|         } |  | ||||||
|         return this.childNodeList; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'firstChild', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.children[0] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'lastChild', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.children[this.children.length - 1] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'previousSibling', { |  | ||||||
|       get: function() { |  | ||||||
|         var i; |  | ||||||
|         i = this.parent.children.indexOf(this); |  | ||||||
|         return this.parent.children[i - 1] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nextSibling', { |  | ||||||
|       get: function() { |  | ||||||
|         var i; |  | ||||||
|         i = this.parent.children.indexOf(this); |  | ||||||
|         return this.parent.children[i + 1] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'ownerDocument', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.document() || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'textContent', { |  | ||||||
|       get: function() { |  | ||||||
|         var child, j, len, ref2, str; |  | ||||||
|         if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { |  | ||||||
|           str = ''; |  | ||||||
|           ref2 = this.children; |  | ||||||
|           for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|             child = ref2[j]; |  | ||||||
|             if (child.textContent) { |  | ||||||
|               str += child.textContent; |  | ||||||
|             } |  | ||||||
|           } |  | ||||||
|           return str; |  | ||||||
|         } else { |  | ||||||
|           return null; |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       set: function(value) { |  | ||||||
|         throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.setParent = function(parent) { |  | ||||||
|       var child, j, len, ref2, results; |  | ||||||
|       this.parent = parent; |  | ||||||
|       if (parent) { |  | ||||||
|         this.options = parent.options; |  | ||||||
|         this.stringify = parent.stringify; |  | ||||||
|       } |  | ||||||
|       ref2 = this.children; |  | ||||||
|       results = []; |  | ||||||
|       for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|         child = ref2[j]; |  | ||||||
|         results.push(child.setParent(this)); |  | ||||||
|       } |  | ||||||
|       return results; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.element = function(name, attributes, text) { |  | ||||||
|       var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; |  | ||||||
|       lastChild = null; |  | ||||||
|       if (attributes === null && (text == null)) { |  | ||||||
|         ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; |  | ||||||
|       } |  | ||||||
|       if (attributes == null) { |  | ||||||
|         attributes = {}; |  | ||||||
|       } |  | ||||||
|       attributes = getValue(attributes); |  | ||||||
|       if (!isObject(attributes)) { |  | ||||||
|         ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; |  | ||||||
|       } |  | ||||||
|       if (name != null) { |  | ||||||
|         name = getValue(name); |  | ||||||
|       } |  | ||||||
|       if (Array.isArray(name)) { |  | ||||||
|         for (j = 0, len = name.length; j < len; j++) { |  | ||||||
|           item = name[j]; |  | ||||||
|           lastChild = this.element(item); |  | ||||||
|         } |  | ||||||
|       } else if (isFunction(name)) { |  | ||||||
|         lastChild = this.element(name.apply()); |  | ||||||
|       } else if (isObject(name)) { |  | ||||||
|         for (key in name) { |  | ||||||
|           if (!hasProp.call(name, key)) continue; |  | ||||||
|           val = name[key]; |  | ||||||
|           if (isFunction(val)) { |  | ||||||
|             val = val.apply(); |  | ||||||
|           } |  | ||||||
|           if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { |  | ||||||
|             lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); |  | ||||||
|           } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { |  | ||||||
|             lastChild = this.dummy(); |  | ||||||
|           } else if (isObject(val) && isEmpty(val)) { |  | ||||||
|             lastChild = this.element(key); |  | ||||||
|           } else if (!this.options.keepNullNodes && (val == null)) { |  | ||||||
|             lastChild = this.dummy(); |  | ||||||
|           } else if (!this.options.separateArrayItems && Array.isArray(val)) { |  | ||||||
|             for (k = 0, len1 = val.length; k < len1; k++) { |  | ||||||
|               item = val[k]; |  | ||||||
|               childNode = {}; |  | ||||||
|               childNode[key] = item; |  | ||||||
|               lastChild = this.element(childNode); |  | ||||||
|             } |  | ||||||
|           } else if (isObject(val)) { |  | ||||||
|             if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { |  | ||||||
|               lastChild = this.element(val); |  | ||||||
|             } else { |  | ||||||
|               lastChild = this.element(key); |  | ||||||
|               lastChild.element(val); |  | ||||||
|             } |  | ||||||
|           } else { |  | ||||||
|             lastChild = this.element(key, val); |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } else if (!this.options.keepNullNodes && text === null) { |  | ||||||
|         lastChild = this.dummy(); |  | ||||||
|       } else { |  | ||||||
|         if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { |  | ||||||
|           lastChild = this.text(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { |  | ||||||
|           lastChild = this.cdata(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { |  | ||||||
|           lastChild = this.comment(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { |  | ||||||
|           lastChild = this.raw(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { |  | ||||||
|           lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); |  | ||||||
|         } else { |  | ||||||
|           lastChild = this.node(name, attributes, text); |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       if (lastChild == null) { |  | ||||||
|         throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       return lastChild; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.insertBefore = function(name, attributes, text) { |  | ||||||
|       var child, i, newChild, refChild, removed; |  | ||||||
|       if (name != null ? name.type : void 0) { |  | ||||||
|         newChild = name; |  | ||||||
|         refChild = attributes; |  | ||||||
|         newChild.setParent(this); |  | ||||||
|         if (refChild) { |  | ||||||
|           i = children.indexOf(refChild); |  | ||||||
|           removed = children.splice(i); |  | ||||||
|           children.push(newChild); |  | ||||||
|           Array.prototype.push.apply(children, removed); |  | ||||||
|         } else { |  | ||||||
|           children.push(newChild); |  | ||||||
|         } |  | ||||||
|         return newChild; |  | ||||||
|       } else { |  | ||||||
|         if (this.isRoot) { |  | ||||||
|           throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); |  | ||||||
|         } |  | ||||||
|         i = this.parent.children.indexOf(this); |  | ||||||
|         removed = this.parent.children.splice(i); |  | ||||||
|         child = this.parent.element(name, attributes, text); |  | ||||||
|         Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|         return child; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.insertAfter = function(name, attributes, text) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       if (this.isRoot) { |  | ||||||
|         throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); |  | ||||||
|       } |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i + 1); |  | ||||||
|       child = this.parent.element(name, attributes, text); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return child; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.remove = function() { |  | ||||||
|       var i, ref2; |  | ||||||
|       if (this.isRoot) { |  | ||||||
|         throw new Error("Cannot remove the root element. " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; |  | ||||||
|       return this.parent; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.node = function(name, attributes, text) { |  | ||||||
|       var child, ref2; |  | ||||||
|       if (name != null) { |  | ||||||
|         name = getValue(name); |  | ||||||
|       } |  | ||||||
|       attributes || (attributes = {}); |  | ||||||
|       attributes = getValue(attributes); |  | ||||||
|       if (!isObject(attributes)) { |  | ||||||
|         ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; |  | ||||||
|       } |  | ||||||
|       child = new XMLElement(this, name, attributes); |  | ||||||
|       if (text != null) { |  | ||||||
|         child.text(text); |  | ||||||
|       } |  | ||||||
|       this.children.push(child); |  | ||||||
|       return child; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.text = function(value) { |  | ||||||
|       var child; |  | ||||||
|       if (isObject(value)) { |  | ||||||
|         this.element(value); |  | ||||||
|       } |  | ||||||
|       child = new XMLText(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.cdata = function(value) { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLCData(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.comment = function(value) { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLComment(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.commentBefore = function(value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i); |  | ||||||
|       child = this.parent.comment(value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.commentAfter = function(value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i + 1); |  | ||||||
|       child = this.parent.comment(value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.raw = function(value) { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLRaw(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dummy = function() { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLDummy(this); |  | ||||||
|       return child; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.instruction = function(target, value) { |  | ||||||
|       var insTarget, insValue, instruction, j, len; |  | ||||||
|       if (target != null) { |  | ||||||
|         target = getValue(target); |  | ||||||
|       } |  | ||||||
|       if (value != null) { |  | ||||||
|         value = getValue(value); |  | ||||||
|       } |  | ||||||
|       if (Array.isArray(target)) { |  | ||||||
|         for (j = 0, len = target.length; j < len; j++) { |  | ||||||
|           insTarget = target[j]; |  | ||||||
|           this.instruction(insTarget); |  | ||||||
|         } |  | ||||||
|       } else if (isObject(target)) { |  | ||||||
|         for (insTarget in target) { |  | ||||||
|           if (!hasProp.call(target, insTarget)) continue; |  | ||||||
|           insValue = target[insTarget]; |  | ||||||
|           this.instruction(insTarget, insValue); |  | ||||||
|         } |  | ||||||
|       } else { |  | ||||||
|         if (isFunction(value)) { |  | ||||||
|           value = value.apply(); |  | ||||||
|         } |  | ||||||
|         instruction = new XMLProcessingInstruction(this, target, value); |  | ||||||
|         this.children.push(instruction); |  | ||||||
|       } |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.instructionBefore = function(target, value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i); |  | ||||||
|       child = this.parent.instruction(target, value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.instructionAfter = function(target, value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i + 1); |  | ||||||
|       child = this.parent.instruction(target, value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.declaration = function(version, encoding, standalone) { |  | ||||||
|       var doc, xmldec; |  | ||||||
|       doc = this.document(); |  | ||||||
|       xmldec = new XMLDeclaration(doc, version, encoding, standalone); |  | ||||||
|       if (doc.children.length === 0) { |  | ||||||
|         doc.children.unshift(xmldec); |  | ||||||
|       } else if (doc.children[0].type === NodeType.Declaration) { |  | ||||||
|         doc.children[0] = xmldec; |  | ||||||
|       } else { |  | ||||||
|         doc.children.unshift(xmldec); |  | ||||||
|       } |  | ||||||
|       return doc.root() || doc; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dtd = function(pubID, sysID) { |  | ||||||
|       var child, doc, doctype, i, j, k, len, len1, ref2, ref3; |  | ||||||
|       doc = this.document(); |  | ||||||
|       doctype = new XMLDocType(doc, pubID, sysID); |  | ||||||
|       ref2 = doc.children; |  | ||||||
|       for (i = j = 0, len = ref2.length; j < len; i = ++j) { |  | ||||||
|         child = ref2[i]; |  | ||||||
|         if (child.type === NodeType.DocType) { |  | ||||||
|           doc.children[i] = doctype; |  | ||||||
|           return doctype; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       ref3 = doc.children; |  | ||||||
|       for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { |  | ||||||
|         child = ref3[i]; |  | ||||||
|         if (child.isRoot) { |  | ||||||
|           doc.children.splice(i, 0, doctype); |  | ||||||
|           return doctype; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       doc.children.push(doctype); |  | ||||||
|       return doctype; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.up = function() { |  | ||||||
|       if (this.isRoot) { |  | ||||||
|         throw new Error("The root node has no parent. Use doc() if you need to get the document object."); |  | ||||||
|       } |  | ||||||
|       return this.parent; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.root = function() { |  | ||||||
|       var node; |  | ||||||
|       node = this; |  | ||||||
|       while (node) { |  | ||||||
|         if (node.type === NodeType.Document) { |  | ||||||
|           return node.rootObject; |  | ||||||
|         } else if (node.isRoot) { |  | ||||||
|           return node; |  | ||||||
|         } else { |  | ||||||
|           node = node.parent; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.document = function() { |  | ||||||
|       var node; |  | ||||||
|       node = this; |  | ||||||
|       while (node) { |  | ||||||
|         if (node.type === NodeType.Document) { |  | ||||||
|           return node; |  | ||||||
|         } else { |  | ||||||
|           node = node.parent; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.end = function(options) { |  | ||||||
|       return this.document().end(options); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.prev = function() { |  | ||||||
|       var i; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       if (i < 1) { |  | ||||||
|         throw new Error("Already at the first node. " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       return this.parent.children[i - 1]; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.next = function() { |  | ||||||
|       var i; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       if (i === -1 || i === this.parent.children.length - 1) { |  | ||||||
|         throw new Error("Already at the last node. " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       return this.parent.children[i + 1]; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.importDocument = function(doc) { |  | ||||||
|       var clonedRoot; |  | ||||||
|       clonedRoot = doc.root().clone(); |  | ||||||
|       clonedRoot.parent = this; |  | ||||||
|       clonedRoot.isRoot = false; |  | ||||||
|       this.children.push(clonedRoot); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.debugInfo = function(name) { |  | ||||||
|       var ref2, ref3; |  | ||||||
|       name = name || this.name; |  | ||||||
|       if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { |  | ||||||
|         return ""; |  | ||||||
|       } else if (name == null) { |  | ||||||
|         return "parent: <" + this.parent.name + ">"; |  | ||||||
|       } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { |  | ||||||
|         return "node: <" + name + ">"; |  | ||||||
|       } else { |  | ||||||
|         return "node: <" + name + ">, parent: <" + this.parent.name + ">"; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.ele = function(name, attributes, text) { |  | ||||||
|       return this.element(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.nod = function(name, attributes, text) { |  | ||||||
|       return this.node(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.txt = function(value) { |  | ||||||
|       return this.text(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dat = function(value) { |  | ||||||
|       return this.cdata(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.com = function(value) { |  | ||||||
|       return this.comment(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.ins = function(target, value) { |  | ||||||
|       return this.instruction(target, value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.doc = function() { |  | ||||||
|       return this.document(); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dec = function(version, encoding, standalone) { |  | ||||||
|       return this.declaration(version, encoding, standalone); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.e = function(name, attributes, text) { |  | ||||||
|       return this.element(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.n = function(name, attributes, text) { |  | ||||||
|       return this.node(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.t = function(value) { |  | ||||||
|       return this.text(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.d = function(value) { |  | ||||||
|       return this.cdata(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.c = function(value) { |  | ||||||
|       return this.comment(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.r = function(value) { |  | ||||||
|       return this.raw(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.i = function(target, value) { |  | ||||||
|       return this.instruction(target, value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.u = function() { |  | ||||||
|       return this.up(); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.importXMLBuilder = function(doc) { |  | ||||||
|       return this.importDocument(doc); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.replaceChild = function(newChild, oldChild) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.removeChild = function(oldChild) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.appendChild = function(newChild) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.hasChildNodes = function() { |  | ||||||
|       return this.children.length !== 0; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.cloneNode = function(deep) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.normalize = function() { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isSupported = function(feature, version) { |  | ||||||
|       return true; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.hasAttributes = function() { |  | ||||||
|       return this.attribs.length !== 0; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.compareDocumentPosition = function(other) { |  | ||||||
|       var ref, res; |  | ||||||
|       ref = this; |  | ||||||
|       if (ref === other) { |  | ||||||
|         return 0; |  | ||||||
|       } else if (this.document() !== other.document()) { |  | ||||||
|         res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; |  | ||||||
|         if (Math.random() < 0.5) { |  | ||||||
|           res |= DocumentPosition.Preceding; |  | ||||||
|         } else { |  | ||||||
|           res |= DocumentPosition.Following; |  | ||||||
|         } |  | ||||||
|         return res; |  | ||||||
|       } else if (ref.isAncestor(other)) { |  | ||||||
|         return DocumentPosition.Contains | DocumentPosition.Preceding; |  | ||||||
|       } else if (ref.isDescendant(other)) { |  | ||||||
|         return DocumentPosition.Contains | DocumentPosition.Following; |  | ||||||
|       } else if (ref.isPreceding(other)) { |  | ||||||
|         return DocumentPosition.Preceding; |  | ||||||
|       } else { |  | ||||||
|         return DocumentPosition.Following; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isSameNode = function(other) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.lookupPrefix = function(namespaceURI) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.lookupNamespaceURI = function(prefix) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isEqualNode = function(node) { |  | ||||||
|       var i, j, ref2; |  | ||||||
|       if (node.nodeType !== this.nodeType) { |  | ||||||
|         return false; |  | ||||||
|       } |  | ||||||
|       if (node.children.length !== this.children.length) { |  | ||||||
|         return false; |  | ||||||
|       } |  | ||||||
|       for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { |  | ||||||
|         if (!this.children[i].isEqualNode(node.children[i])) { |  | ||||||
|           return false; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       return true; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.getFeature = function(feature, version) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.setUserData = function(key, data, handler) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.getUserData = function(key) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.contains = function(other) { |  | ||||||
|       if (!other) { |  | ||||||
|         return false; |  | ||||||
|       } |  | ||||||
|       return other === this || this.isDescendant(other); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isDescendant = function(node) { |  | ||||||
|       var child, isDescendantChild, j, len, ref2; |  | ||||||
|       ref2 = this.children; |  | ||||||
|       for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|         child = ref2[j]; |  | ||||||
|         if (node === child) { |  | ||||||
|           return true; |  | ||||||
|         } |  | ||||||
|         isDescendantChild = child.isDescendant(node); |  | ||||||
|         if (isDescendantChild) { |  | ||||||
|           return true; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       return false; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isAncestor = function(node) { |  | ||||||
|       return node.isDescendant(this); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isPreceding = function(node) { |  | ||||||
|       var nodePos, thisPos; |  | ||||||
|       nodePos = this.treePosition(node); |  | ||||||
|       thisPos = this.treePosition(this); |  | ||||||
|       if (nodePos === -1 || thisPos === -1) { |  | ||||||
|         return false; |  | ||||||
|       } else { |  | ||||||
|         return nodePos < thisPos; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isFollowing = function(node) { |  | ||||||
|       var nodePos, thisPos; |  | ||||||
|       nodePos = this.treePosition(node); |  | ||||||
|       thisPos = this.treePosition(this); |  | ||||||
|       if (nodePos === -1 || thisPos === -1) { |  | ||||||
|         return false; |  | ||||||
|       } else { |  | ||||||
|         return nodePos > thisPos; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.treePosition = function(node) { |  | ||||||
|       var found, pos; |  | ||||||
|       pos = 0; |  | ||||||
|       found = false; |  | ||||||
|       this.foreachTreeNode(this.document(), function(childNode) { |  | ||||||
|         pos++; |  | ||||||
|         if (!found && childNode === node) { |  | ||||||
|           return found = true; |  | ||||||
|         } |  | ||||||
|       }); |  | ||||||
|       if (found) { |  | ||||||
|         return pos; |  | ||||||
|       } else { |  | ||||||
|         return -1; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.foreachTreeNode = function(node, func) { |  | ||||||
|       var child, j, len, ref2, res; |  | ||||||
|       node || (node = this.document()); |  | ||||||
|       ref2 = node.children; |  | ||||||
|       for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|         child = ref2[j]; |  | ||||||
|         if (res = func(child)) { |  | ||||||
|           return res; |  | ||||||
|         } else { |  | ||||||
|           res = this.foreachTreeNode(child, func); |  | ||||||
|           if (res) { |  | ||||||
|             return res; |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     return XMLNode; |  | ||||||
| 
 |  | ||||||
|   })(); |  | ||||||
| 
 |  | ||||||
| }).call(this); |  | ||||||
| 
 | 
 | ||||||
|  | var _default = stringify; | ||||||
|  | exports.default = _default; | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 865: | /***/ 865: | ||||||
| /***/ (function(module) { | /***/ (function(module) { | ||||||
| 
 | 
 | ||||||
| /*! ***************************************************************************** | /*! ***************************************************************************** | ||||||
| Copyright (c) Microsoft Corporation. | Copyright (c) Microsoft Corporation. | ||||||
| 
 | 
 | ||||||
| Permission to use, copy, modify, and/or distribute this software for any | Permission to use, copy, modify, and/or distribute this software for any | ||||||
| purpose with or without fee is hereby granted. | purpose with or without fee is hereby granted. | ||||||
| 
 | 
 | ||||||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||||||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||||||
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||||||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||||||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | 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 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||||||
| PERFORMANCE OF THIS SOFTWARE. | PERFORMANCE OF THIS SOFTWARE. | ||||||
| ***************************************************************************** */ | ***************************************************************************** */ | ||||||
| /* global global, define, System, Reflect, Promise */ | /* global global, define, System, Reflect, Promise */ | ||||||
| var __extends; | var __extends; | ||||||
| var __assign; | var __assign; | ||||||
| var __rest; | var __rest; | ||||||
| var __decorate; | var __decorate; | ||||||
| var __param; | var __param; | ||||||
| var __metadata; | var __metadata; | ||||||
| var __awaiter; | var __awaiter; | ||||||
| var __generator; | var __generator; | ||||||
| var __exportStar; | var __exportStar; | ||||||
| var __values; | var __values; | ||||||
| var __read; | var __read; | ||||||
| var __spread; | var __spread; | ||||||
| var __spreadArrays; | var __spreadArrays; | ||||||
| var __await; | var __await; | ||||||
| var __asyncGenerator; | var __asyncGenerator; | ||||||
| var __asyncDelegator; | var __asyncDelegator; | ||||||
| var __asyncValues; | var __asyncValues; | ||||||
| var __makeTemplateObject; | var __makeTemplateObject; | ||||||
| var __importStar; | var __importStar; | ||||||
| var __importDefault; | var __importDefault; | ||||||
| var __classPrivateFieldGet; | var __classPrivateFieldGet; | ||||||
| var __classPrivateFieldSet; | var __classPrivateFieldSet; | ||||||
| var __createBinding; | var __createBinding; | ||||||
| (function (factory) { | (function (factory) { | ||||||
|     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; |     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; | ||||||
|     if (typeof define === "function" && define.amd) { |     if (typeof define === "function" && define.amd) { | ||||||
|         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); |         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); | ||||||
|     } |     } | ||||||
|     else if ( true && typeof module.exports === "object") { |     else if ( true && typeof module.exports === "object") { | ||||||
|         factory(createExporter(root, createExporter(module.exports))); |         factory(createExporter(root, createExporter(module.exports))); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         factory(createExporter(root)); |         factory(createExporter(root)); | ||||||
|     } |     } | ||||||
|     function createExporter(exports, previous) { |     function createExporter(exports, previous) { | ||||||
|         if (exports !== root) { |         if (exports !== root) { | ||||||
|             if (typeof Object.create === "function") { |             if (typeof Object.create === "function") { | ||||||
|                 Object.defineProperty(exports, "__esModule", { value: true }); |                 Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 exports.__esModule = true; |                 exports.__esModule = true; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; |         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
| (function (exporter) { | (function (exporter) { | ||||||
|     var extendStatics = Object.setPrototypeOf || |     var extendStatics = Object.setPrototypeOf || | ||||||
|         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |         ({ __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]; }; |         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||||||
| 
 | 
 | ||||||
|     __extends = function (d, b) { |     __extends = function (d, b) { | ||||||
|         extendStatics(d, b); |         extendStatics(d, b); | ||||||
|         function __() { this.constructor = d; } |         function __() { this.constructor = d; } | ||||||
|         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __assign = Object.assign || function (t) { |     __assign = Object.assign || function (t) { | ||||||
|         for (var s, i = 1, n = arguments.length; i < n; i++) { |         for (var s, i = 1, n = arguments.length; i < n; i++) { | ||||||
|             s = arguments[i]; |             s = arguments[i]; | ||||||
|             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||||||
|         } |         } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __rest = function (s, e) { |     __rest = function (s, e) { | ||||||
|         var t = {}; |         var t = {}; | ||||||
|         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||||||
|             t[p] = s[p]; |             t[p] = s[p]; | ||||||
|         if (s != null && typeof Object.getOwnPropertySymbols === "function") |         if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||||||
|             for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |             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])) |                 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||||||
|                     t[p[i]] = s[p[i]]; |                     t[p[i]] = s[p[i]]; | ||||||
|             } |             } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __decorate = function (decorators, target, key, desc) { |     __decorate = function (decorators, target, key, desc) { | ||||||
|         var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |         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); |         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; |         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; |         return c > 3 && r && Object.defineProperty(target, key, r), r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __param = function (paramIndex, decorator) { |     __param = function (paramIndex, decorator) { | ||||||
|         return function (target, key) { decorator(target, key, paramIndex); } |         return function (target, key) { decorator(target, key, paramIndex); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __metadata = function (metadataKey, metadataValue) { |     __metadata = function (metadataKey, metadataValue) { | ||||||
|         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __awaiter = function (thisArg, _arguments, P, generator) { |     __awaiter = function (thisArg, _arguments, P, generator) { | ||||||
|         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|         return new (P || (P = Promise))(function (resolve, reject) { |         return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|             function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |             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 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); } |             function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|             step((generator = generator.apply(thisArg, _arguments || [])).next()); |             step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __generator = function (thisArg, body) { |     __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; |         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; |         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 verb(n) { return function (v) { return step([n, v]); }; } | ||||||
|         function step(op) { |         function step(op) { | ||||||
|             if (f) throw new TypeError("Generator is already executing."); |             if (f) throw new TypeError("Generator is already executing."); | ||||||
|             while (_) try { |             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 (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]; |                 if (y = 0, t) op = [op[0] & 2, t.value]; | ||||||
|                 switch (op[0]) { |                 switch (op[0]) { | ||||||
|                     case 0: case 1: t = op; break; |                     case 0: case 1: t = op; break; | ||||||
|                     case 4: _.label++; return { value: op[1], done: false }; |                     case 4: _.label++; return { value: op[1], done: false }; | ||||||
|                     case 5: _.label++; y = op[1]; op = [0]; continue; |                     case 5: _.label++; y = op[1]; op = [0]; continue; | ||||||
|                     case 7: op = _.ops.pop(); _.trys.pop(); continue; |                     case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||||||
|                     default: |                     default: | ||||||
|                         if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |                         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] === 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 (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 && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||||||
|                         if (t[2]) _.ops.pop(); |                         if (t[2]) _.ops.pop(); | ||||||
|                         _.trys.pop(); continue; |                         _.trys.pop(); continue; | ||||||
|                 } |                 } | ||||||
|                 op = body.call(thisArg, _); |                 op = body.call(thisArg, _); | ||||||
|             } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |             } 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 }; |             if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __exportStar = function(m, exports) { |     __exportStar = function(m, exports) { | ||||||
|         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); |         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __createBinding = Object.create ? (function(o, m, k, k2) { |     __createBinding = Object.create ? (function(o, m, k, k2) { | ||||||
|         if (k2 === undefined) k2 = k; |         if (k2 === undefined) k2 = k; | ||||||
|         Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); |         Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||||||
|     }) : (function(o, m, k, k2) { |     }) : (function(o, m, k, k2) { | ||||||
|         if (k2 === undefined) k2 = k; |         if (k2 === undefined) k2 = k; | ||||||
|         o[k2] = m[k]; |         o[k2] = m[k]; | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     __values = function (o) { |     __values = function (o) { | ||||||
|         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||||||
|         if (m) return m.call(o); |         if (m) return m.call(o); | ||||||
|         if (o && typeof o.length === "number") return { |         if (o && typeof o.length === "number") return { | ||||||
|             next: function () { |             next: function () { | ||||||
|                 if (o && i >= o.length) o = void 0; |                 if (o && i >= o.length) o = void 0; | ||||||
|                 return { value: o && o[i++], done: !o }; |                 return { value: o && o[i++], done: !o }; | ||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __read = function (o, n) { |     __read = function (o, n) { | ||||||
|         var m = typeof Symbol === "function" && o[Symbol.iterator]; |         var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||||||
|         if (!m) return o; |         if (!m) return o; | ||||||
|         var i = m.call(o), r, ar = [], e; |         var i = m.call(o), r, ar = [], e; | ||||||
|         try { |         try { | ||||||
|             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||||||
|         } |         } | ||||||
|         catch (error) { e = { error: error }; } |         catch (error) { e = { error: error }; } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (r && !r.done && (m = i["return"])) m.call(i); |                 if (r && !r.done && (m = i["return"])) m.call(i); | ||||||
|             } |             } | ||||||
|             finally { if (e) throw e.error; } |             finally { if (e) throw e.error; } | ||||||
|         } |         } | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spread = function () { |     __spread = function () { | ||||||
|         for (var ar = [], i = 0; i < arguments.length; i++) |         for (var ar = [], i = 0; i < arguments.length; i++) | ||||||
|             ar = ar.concat(__read(arguments[i])); |             ar = ar.concat(__read(arguments[i])); | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spreadArrays = function () { |     __spreadArrays = function () { | ||||||
|         for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |         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 r = Array(s), k = 0, i = 0; i < il; i++) | ||||||
|             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||||||
|                 r[k] = a[j]; |                 r[k] = a[j]; | ||||||
|         return r; |         return r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __await = function (v) { |     __await = function (v) { | ||||||
|         return this instanceof __await ? (this.v = v, this) : new __await(v); |         return this instanceof __await ? (this.v = v, this) : new __await(v); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncGenerator = function (thisArg, _arguments, generator) { |     __asyncGenerator = function (thisArg, _arguments, generator) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var g = generator.apply(thisArg, _arguments || []), i, q = []; |         var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||||||
|         return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |         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 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 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 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 fulfill(value) { resume("next", value); } | ||||||
|         function reject(value) { resume("throw", 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]); } |         function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncDelegator = function (o) { |     __asyncDelegator = function (o) { | ||||||
|         var i, p; |         var i, p; | ||||||
|         return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |         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; } |         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) { |     __asyncValues = function (o) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var m = o[Symbol.asyncIterator], i; |         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); |         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 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); } |         function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __makeTemplateObject = function (cooked, raw) { |     __makeTemplateObject = function (cooked, raw) { | ||||||
|         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||||||
|         return cooked; |         return cooked; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     var __setModuleDefault = Object.create ? (function(o, v) { |     var __setModuleDefault = Object.create ? (function(o, v) { | ||||||
|         Object.defineProperty(o, "default", { enumerable: true, value: v }); |         Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||||||
|     }) : function(o, v) { |     }) : function(o, v) { | ||||||
|         o["default"] = v; |         o["default"] = v; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importStar = function (mod) { |     __importStar = function (mod) { | ||||||
|         if (mod && mod.__esModule) return mod; |         if (mod && mod.__esModule) return mod; | ||||||
|         var result = {}; |         var result = {}; | ||||||
|         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); |         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||||||
|         __setModuleDefault(result, mod); |         __setModuleDefault(result, mod); | ||||||
|         return result; |         return result; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importDefault = function (mod) { |     __importDefault = function (mod) { | ||||||
|         return (mod && mod.__esModule) ? mod : { "default": mod }; |         return (mod && mod.__esModule) ? mod : { "default": mod }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldGet = function (receiver, privateMap) { |     __classPrivateFieldGet = function (receiver, privateMap) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to get private field on non-instance"); |             throw new TypeError("attempted to get private field on non-instance"); | ||||||
|         } |         } | ||||||
|         return privateMap.get(receiver); |         return privateMap.get(receiver); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldSet = function (receiver, privateMap, value) { |     __classPrivateFieldSet = function (receiver, privateMap, value) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to set private field on non-instance"); |             throw new TypeError("attempted to set private field on non-instance"); | ||||||
|         } |         } | ||||||
|         privateMap.set(receiver, value); |         privateMap.set(receiver, value); | ||||||
|         return value; |         return value; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     exporter("__extends", __extends); |     exporter("__extends", __extends); | ||||||
|     exporter("__assign", __assign); |     exporter("__assign", __assign); | ||||||
|     exporter("__rest", __rest); |     exporter("__rest", __rest); | ||||||
|     exporter("__decorate", __decorate); |     exporter("__decorate", __decorate); | ||||||
|     exporter("__param", __param); |     exporter("__param", __param); | ||||||
|     exporter("__metadata", __metadata); |     exporter("__metadata", __metadata); | ||||||
|     exporter("__awaiter", __awaiter); |     exporter("__awaiter", __awaiter); | ||||||
|     exporter("__generator", __generator); |     exporter("__generator", __generator); | ||||||
|     exporter("__exportStar", __exportStar); |     exporter("__exportStar", __exportStar); | ||||||
|     exporter("__createBinding", __createBinding); |     exporter("__createBinding", __createBinding); | ||||||
|     exporter("__values", __values); |     exporter("__values", __values); | ||||||
|     exporter("__read", __read); |     exporter("__read", __read); | ||||||
|     exporter("__spread", __spread); |     exporter("__spread", __spread); | ||||||
|     exporter("__spreadArrays", __spreadArrays); |     exporter("__spreadArrays", __spreadArrays); | ||||||
|     exporter("__await", __await); |     exporter("__await", __await); | ||||||
|     exporter("__asyncGenerator", __asyncGenerator); |     exporter("__asyncGenerator", __asyncGenerator); | ||||||
|     exporter("__asyncDelegator", __asyncDelegator); |     exporter("__asyncDelegator", __asyncDelegator); | ||||||
|     exporter("__asyncValues", __asyncValues); |     exporter("__asyncValues", __asyncValues); | ||||||
|     exporter("__makeTemplateObject", __makeTemplateObject); |     exporter("__makeTemplateObject", __makeTemplateObject); | ||||||
|     exporter("__importStar", __importStar); |     exporter("__importStar", __importStar); | ||||||
|     exporter("__importDefault", __importDefault); |     exporter("__importDefault", __importDefault); | ||||||
|     exporter("__classPrivateFieldGet", __classPrivateFieldGet); |     exporter("__classPrivateFieldGet", __classPrivateFieldGet); | ||||||
|     exporter("__classPrivateFieldSet", __classPrivateFieldSet); |     exporter("__classPrivateFieldSet", __classPrivateFieldSet); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -41492,7 +41663,7 @@ exports.TraceAPI = TraceAPI; | |||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   module.exports = XMLAttribute = (function() { |   module.exports = XMLAttribute = (function() { | ||||||
|     function XMLAttribute(parent, name, value) { |     function XMLAttribute(parent, name, value) { | ||||||
| @ -42464,7 +42635,7 @@ exports.PollerStoppedError = PollerStoppedError; | |||||||
| /***/ (function(module, __unusedexports, __webpack_require__) { | /***/ (function(module, __unusedexports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| var iterate    = __webpack_require__(157) | var iterate    = __webpack_require__(157) | ||||||
|   , initState  = __webpack_require__(147) |   , initState  = __webpack_require__(903) | ||||||
|   , terminator = __webpack_require__(939) |   , terminator = __webpack_require__(939) | ||||||
|   ; |   ; | ||||||
| 
 | 
 | ||||||
| @ -42581,98 +42752,142 @@ module.exports = uuid; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const http_client_1 = __webpack_require__(539); | const http_client_1 = __webpack_require__(539); | ||||||
| function isSuccessStatusCode(statusCode) { | function isSuccessStatusCode(statusCode) { | ||||||
|     if (!statusCode) { |     if (!statusCode) { | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     return statusCode >= 200 && statusCode < 300; |     return statusCode >= 200 && statusCode < 300; | ||||||
| } | } | ||||||
| exports.isSuccessStatusCode = isSuccessStatusCode; | exports.isSuccessStatusCode = isSuccessStatusCode; | ||||||
| function isServerErrorStatusCode(statusCode) { | function isServerErrorStatusCode(statusCode) { | ||||||
|     if (!statusCode) { |     if (!statusCode) { | ||||||
|         return true; |         return true; | ||||||
|     } |     } | ||||||
|     return statusCode >= 500; |     return statusCode >= 500; | ||||||
| } | } | ||||||
| exports.isServerErrorStatusCode = isServerErrorStatusCode; | exports.isServerErrorStatusCode = isServerErrorStatusCode; | ||||||
| function isRetryableStatusCode(statusCode) { | function isRetryableStatusCode(statusCode) { | ||||||
|     if (!statusCode) { |     if (!statusCode) { | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     const retryableStatusCodes = [ |     const retryableStatusCodes = [ | ||||||
|         http_client_1.HttpCodes.BadGateway, |         http_client_1.HttpCodes.BadGateway, | ||||||
|         http_client_1.HttpCodes.ServiceUnavailable, |         http_client_1.HttpCodes.ServiceUnavailable, | ||||||
|         http_client_1.HttpCodes.GatewayTimeout |         http_client_1.HttpCodes.GatewayTimeout | ||||||
|     ]; |     ]; | ||||||
|     return retryableStatusCodes.includes(statusCode); |     return retryableStatusCodes.includes(statusCode); | ||||||
| } | } | ||||||
| exports.isRetryableStatusCode = isRetryableStatusCode; | exports.isRetryableStatusCode = isRetryableStatusCode; | ||||||
| function retry(name, method, getStatusCode, maxAttempts = 2) { | function retry(name, method, getStatusCode, maxAttempts = 2) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         let response = undefined; |         let response = undefined; | ||||||
|         let statusCode = undefined; |         let statusCode = undefined; | ||||||
|         let isRetryable = false; |         let isRetryable = false; | ||||||
|         let errorMessage = ''; |         let errorMessage = ''; | ||||||
|         let attempt = 1; |         let attempt = 1; | ||||||
|         while (attempt <= maxAttempts) { |         while (attempt <= maxAttempts) { | ||||||
|             try { |             try { | ||||||
|                 response = yield method(); |                 response = yield method(); | ||||||
|                 statusCode = getStatusCode(response); |                 statusCode = getStatusCode(response); | ||||||
|                 if (!isServerErrorStatusCode(statusCode)) { |                 if (!isServerErrorStatusCode(statusCode)) { | ||||||
|                     return response; |                     return response; | ||||||
|                 } |                 } | ||||||
|                 isRetryable = isRetryableStatusCode(statusCode); |                 isRetryable = isRetryableStatusCode(statusCode); | ||||||
|                 errorMessage = `Cache service responded with ${statusCode}`; |                 errorMessage = `Cache service responded with ${statusCode}`; | ||||||
|             } |             } | ||||||
|             catch (error) { |             catch (error) { | ||||||
|                 isRetryable = true; |                 isRetryable = true; | ||||||
|                 errorMessage = error.message; |                 errorMessage = error.message; | ||||||
|             } |             } | ||||||
|             core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); |             core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); | ||||||
|             if (!isRetryable) { |             if (!isRetryable) { | ||||||
|                 core.debug(`${name} - Error is not retryable`); |                 core.debug(`${name} - Error is not retryable`); | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|             attempt++; |             attempt++; | ||||||
|         } |         } | ||||||
|         throw Error(`${name} failed: ${errorMessage}`); |         throw Error(`${name} failed: ${errorMessage}`); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.retry = retry; | exports.retry = retry; | ||||||
| function retryTypedResponse(name, method, maxAttempts = 2) { | function retryTypedResponse(name, method, maxAttempts = 2) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         return yield retry(name, method, (response) => response.statusCode, maxAttempts); |         return yield retry(name, method, (response) => response.statusCode, maxAttempts); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.retryTypedResponse = retryTypedResponse; | exports.retryTypedResponse = retryTypedResponse; | ||||||
| function retryHttpClientResponse(name, method, maxAttempts = 2) { | function retryHttpClientResponse(name, method, maxAttempts = 2) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         return yield retry(name, method, (response) => response.message.statusCode, maxAttempts); |         return yield retry(name, method, (response) => response.message.statusCode, maxAttempts); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.retryHttpClientResponse = retryHttpClientResponse; | exports.retryHttpClientResponse = retryHttpClientResponse; | ||||||
| //# sourceMappingURL=requestUtils.js.map
 | //# sourceMappingURL=requestUtils.js.map
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 903: | ||||||
|  | /***/ (function(module) { | ||||||
|  | 
 | ||||||
|  | // 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; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 919: | /***/ 919: | ||||||
| @ -43248,25 +43463,25 @@ exports.setLogLevel = setLogLevel; | |||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| var CacheFilename; | var CacheFilename; | ||||||
| (function (CacheFilename) { | (function (CacheFilename) { | ||||||
|     CacheFilename["Gzip"] = "cache.tgz"; |     CacheFilename["Gzip"] = "cache.tgz"; | ||||||
|     CacheFilename["Zstd"] = "cache.tzst"; |     CacheFilename["Zstd"] = "cache.tzst"; | ||||||
| })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); | })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); | ||||||
| var CompressionMethod; | var CompressionMethod; | ||||||
| (function (CompressionMethod) { | (function (CompressionMethod) { | ||||||
|     CompressionMethod["Gzip"] = "gzip"; |     CompressionMethod["Gzip"] = "gzip"; | ||||||
|     // Long range mode was added to zstd in v1.3.2.
 |     // 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
 |     // This enum is for earlier version of zstd that does not have --long support
 | ||||||
|     CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; |     CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; | ||||||
|     CompressionMethod["Zstd"] = "zstd"; |     CompressionMethod["Zstd"] = "zstd"; | ||||||
| })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); | })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); | ||||||
| // Socket timeout in milliseconds during download.  If no traffic is received
 | // Socket timeout in milliseconds during download.  If no traffic is received
 | ||||||
| // over the socket during this period, the socket is destroyed and the download
 | // over the socket during this period, the socket is destroyed and the download
 | ||||||
| // is aborted.
 | // is aborted.
 | ||||||
| exports.SocketTimeout = 5000; | exports.SocketTimeout = 5000; | ||||||
| //# sourceMappingURL=constants.js.map
 | //# sourceMappingURL=constants.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -43467,39 +43682,6 @@ function terminator(callback) | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), |  | ||||||
| 
 |  | ||||||
| /***/ 940: |  | ||||||
| /***/ (function(__unusedmodule, exports) { |  | ||||||
| 
 |  | ||||||
| "use strict"; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| Object.defineProperty(exports, "__esModule", { |  | ||||||
|   value: true |  | ||||||
| }); |  | ||||||
| exports.default = void 0; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Convert array of 16 byte values to UUID string format of the form: |  | ||||||
|  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |  | ||||||
|  */ |  | ||||||
| const byteToHex = []; |  | ||||||
| 
 |  | ||||||
| for (let i = 0; i < 256; ++i) { |  | ||||||
|   byteToHex.push((i + 0x100).toString(16).substr(1)); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function bytesToUuid(buf, offset_) { |  | ||||||
|   const offset = offset_ || 0; // Note: Be careful editing this code!  It's been tuned for performance
 |  | ||||||
|   // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
 |  | ||||||
| 
 |  | ||||||
|   return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase(); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| var _default = bytesToUuid; |  | ||||||
| exports.default = _default; |  | ||||||
| 
 |  | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 950: | /***/ 950: | ||||||
| @ -43577,7 +43759,7 @@ exports.checkBypass = checkBypass; | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -43937,7 +44119,7 @@ var tslib = __webpack_require__(865); | |||||||
| var tough = __webpack_require__(393); | var tough = __webpack_require__(393); | ||||||
| var http = __webpack_require__(605); | var http = __webpack_require__(605); | ||||||
| var https = __webpack_require__(211); | var https = __webpack_require__(211); | ||||||
| __webpack_require__(454); | var node_fetch = _interopDefault(__webpack_require__(454)); | ||||||
| var abortController = __webpack_require__(106); | var abortController = __webpack_require__(106); | ||||||
| var FormData = _interopDefault(__webpack_require__(790)); | var FormData = _interopDefault(__webpack_require__(790)); | ||||||
| var util = __webpack_require__(669); | var util = __webpack_require__(669); | ||||||
| @ -44124,7 +44306,7 @@ var Constants = { | |||||||
|      * @const |      * @const | ||||||
|      * @type {string} |      * @type {string} | ||||||
|      */ |      */ | ||||||
|     coreHttpVersion: "1.1.4", |     coreHttpVersion: "1.1.5", | ||||||
|     /** |     /** | ||||||
|      * Specifies HTTP. |      * Specifies HTTP. | ||||||
|      * |      * | ||||||
| @ -46431,11 +46613,6 @@ function isValidPort(port) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Copyright (c) Microsoft Corporation.
 | // Copyright (c) Microsoft Corporation.
 | ||||||
| var globalWithFetch = global; |  | ||||||
| if (typeof globalWithFetch.fetch !== "function") { |  | ||||||
|     var fetch_1 = __webpack_require__(454).default; |  | ||||||
|     globalWithFetch.fetch = fetch_1; |  | ||||||
| } |  | ||||||
| function getCachedAgent(isHttps, agentCache) { | function getCachedAgent(isHttps, agentCache) { | ||||||
|     return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; |     return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; | ||||||
| } | } | ||||||
| @ -46492,7 +46669,7 @@ var NodeFetchHttpClient = /** @class */ (function (_super) { | |||||||
|     NodeFetchHttpClient.prototype.fetch = function (input, init) { |     NodeFetchHttpClient.prototype.fetch = function (input, init) { | ||||||
|         return tslib.__awaiter(this, void 0, void 0, function () { |         return tslib.__awaiter(this, void 0, void 0, function () { | ||||||
|             return tslib.__generator(this, function (_a) { |             return tslib.__generator(this, function (_a) { | ||||||
|                 return [2 /*return*/, fetch(input, init)]; |                 return [2 /*return*/, node_fetch(input, init)]; | ||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
|  | |||||||
							
								
								
									
										5251
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5251
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @ -987,173 +987,173 @@ class ExecState extends events.EventEmitter { | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __asyncValues = (this && this.__asyncValues) || function (o) { | var __asyncValues = (this && this.__asyncValues) || function (o) { | ||||||
|     if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |     if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|     var m = o[Symbol.asyncIterator], i; |     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); |     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 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); } |     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) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const exec = __importStar(__webpack_require__(986)); | const exec = __importStar(__webpack_require__(986)); | ||||||
| const glob = __importStar(__webpack_require__(281)); | const glob = __importStar(__webpack_require__(281)); | ||||||
| const io = __importStar(__webpack_require__(1)); | const io = __importStar(__webpack_require__(1)); | ||||||
| const fs = __importStar(__webpack_require__(747)); | const fs = __importStar(__webpack_require__(747)); | ||||||
| const path = __importStar(__webpack_require__(622)); | const path = __importStar(__webpack_require__(622)); | ||||||
| const semver = __importStar(__webpack_require__(280)); | const semver = __importStar(__webpack_require__(280)); | ||||||
| const util = __importStar(__webpack_require__(669)); | const util = __importStar(__webpack_require__(669)); | ||||||
| const uuid_1 = __webpack_require__(898); | const uuid_1 = __webpack_require__(898); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| // From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
 | // From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
 | ||||||
| function createTempDirectory() { | function createTempDirectory() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const IS_WINDOWS = process.platform === 'win32'; |         const IS_WINDOWS = process.platform === 'win32'; | ||||||
|         let tempDirectory = process.env['RUNNER_TEMP'] || ''; |         let tempDirectory = process.env['RUNNER_TEMP'] || ''; | ||||||
|         if (!tempDirectory) { |         if (!tempDirectory) { | ||||||
|             let baseLocation; |             let baseLocation; | ||||||
|             if (IS_WINDOWS) { |             if (IS_WINDOWS) { | ||||||
|                 // On Windows use the USERPROFILE env variable
 |                 // On Windows use the USERPROFILE env variable
 | ||||||
|                 baseLocation = process.env['USERPROFILE'] || 'C:\\'; |                 baseLocation = process.env['USERPROFILE'] || 'C:\\'; | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 if (process.platform === 'darwin') { |                 if (process.platform === 'darwin') { | ||||||
|                     baseLocation = '/Users'; |                     baseLocation = '/Users'; | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|                     baseLocation = '/home'; |                     baseLocation = '/home'; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             tempDirectory = path.join(baseLocation, 'actions', 'temp'); |             tempDirectory = path.join(baseLocation, 'actions', 'temp'); | ||||||
|         } |         } | ||||||
|         const dest = path.join(tempDirectory, uuid_1.v4()); |         const dest = path.join(tempDirectory, uuid_1.v4()); | ||||||
|         yield io.mkdirP(dest); |         yield io.mkdirP(dest); | ||||||
|         return dest; |         return dest; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.createTempDirectory = createTempDirectory; | exports.createTempDirectory = createTempDirectory; | ||||||
| function getArchiveFileSizeIsBytes(filePath) { | function getArchiveFileSizeIsBytes(filePath) { | ||||||
|     return fs.statSync(filePath).size; |     return fs.statSync(filePath).size; | ||||||
| } | } | ||||||
| exports.getArchiveFileSizeIsBytes = getArchiveFileSizeIsBytes; | exports.getArchiveFileSizeIsBytes = getArchiveFileSizeIsBytes; | ||||||
| function resolvePaths(patterns) { | function resolvePaths(patterns) { | ||||||
|     var e_1, _a; |     var e_1, _a; | ||||||
|     var _b; |     var _b; | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const paths = []; |         const paths = []; | ||||||
|         const workspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); |         const workspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); | ||||||
|         const globber = yield glob.create(patterns.join('\n'), { |         const globber = yield glob.create(patterns.join('\n'), { | ||||||
|             implicitDescendants: false |             implicitDescendants: false | ||||||
|         }); |         }); | ||||||
|         try { |         try { | ||||||
|             for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { |             for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { | ||||||
|                 const file = _d.value; |                 const file = _d.value; | ||||||
|                 const relativeFile = path.relative(workspace, file); |                 const relativeFile = path.relative(workspace, file); | ||||||
|                 core.debug(`Matched: ${relativeFile}`); |                 core.debug(`Matched: ${relativeFile}`); | ||||||
|                 // Paths are made relative so the tar entries are all relative to the root of the workspace.
 |                 // Paths are made relative so the tar entries are all relative to the root of the workspace.
 | ||||||
|                 paths.push(`${relativeFile}`); |                 paths.push(`${relativeFile}`); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         catch (e_1_1) { e_1 = { error: e_1_1 }; } |         catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); |                 if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); | ||||||
|             } |             } | ||||||
|             finally { if (e_1) throw e_1.error; } |             finally { if (e_1) throw e_1.error; } | ||||||
|         } |         } | ||||||
|         return paths; |         return paths; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.resolvePaths = resolvePaths; | exports.resolvePaths = resolvePaths; | ||||||
| function unlinkFile(filePath) { | function unlinkFile(filePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         return util.promisify(fs.unlink)(filePath); |         return util.promisify(fs.unlink)(filePath); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.unlinkFile = unlinkFile; | exports.unlinkFile = unlinkFile; | ||||||
| function getVersion(app) { | function getVersion(app) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Checking ${app} --version`); |         core.debug(`Checking ${app} --version`); | ||||||
|         let versionOutput = ''; |         let versionOutput = ''; | ||||||
|         try { |         try { | ||||||
|             yield exec.exec(`${app} --version`, [], { |             yield exec.exec(`${app} --version`, [], { | ||||||
|                 ignoreReturnCode: true, |                 ignoreReturnCode: true, | ||||||
|                 silent: true, |                 silent: true, | ||||||
|                 listeners: { |                 listeners: { | ||||||
|                     stdout: (data) => (versionOutput += data.toString()), |                     stdout: (data) => (versionOutput += data.toString()), | ||||||
|                     stderr: (data) => (versionOutput += data.toString()) |                     stderr: (data) => (versionOutput += data.toString()) | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|         catch (err) { |         catch (err) { | ||||||
|             core.debug(err.message); |             core.debug(err.message); | ||||||
|         } |         } | ||||||
|         versionOutput = versionOutput.trim(); |         versionOutput = versionOutput.trim(); | ||||||
|         core.debug(versionOutput); |         core.debug(versionOutput); | ||||||
|         return versionOutput; |         return versionOutput; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| // Use zstandard if possible to maximize cache performance
 | // Use zstandard if possible to maximize cache performance
 | ||||||
| function getCompressionMethod() { | function getCompressionMethod() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         if (process.platform === 'win32' && !(yield isGnuTarInstalled())) { |         if (process.platform === 'win32' && !(yield isGnuTarInstalled())) { | ||||||
|             // Disable zstd due to bug https://github.com/actions/cache/issues/301
 |             // Disable zstd due to bug https://github.com/actions/cache/issues/301
 | ||||||
|             return constants_1.CompressionMethod.Gzip; |             return constants_1.CompressionMethod.Gzip; | ||||||
|         } |         } | ||||||
|         const versionOutput = yield getVersion('zstd'); |         const versionOutput = yield getVersion('zstd'); | ||||||
|         const version = semver.clean(versionOutput); |         const version = semver.clean(versionOutput); | ||||||
|         if (!versionOutput.toLowerCase().includes('zstd command line interface')) { |         if (!versionOutput.toLowerCase().includes('zstd command line interface')) { | ||||||
|             // zstd is not installed
 |             // zstd is not installed
 | ||||||
|             return constants_1.CompressionMethod.Gzip; |             return constants_1.CompressionMethod.Gzip; | ||||||
|         } |         } | ||||||
|         else if (!version || semver.lt(version, 'v1.3.2')) { |         else if (!version || semver.lt(version, 'v1.3.2')) { | ||||||
|             // zstd is installed but using a version earlier than 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
 |             // v1.3.2 is required to use the `--long` options in zstd
 | ||||||
|             return constants_1.CompressionMethod.ZstdWithoutLong; |             return constants_1.CompressionMethod.ZstdWithoutLong; | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             return constants_1.CompressionMethod.Zstd; |             return constants_1.CompressionMethod.Zstd; | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.getCompressionMethod = getCompressionMethod; | exports.getCompressionMethod = getCompressionMethod; | ||||||
| function getCacheFileName(compressionMethod) { | function getCacheFileName(compressionMethod) { | ||||||
|     return compressionMethod === constants_1.CompressionMethod.Gzip |     return compressionMethod === constants_1.CompressionMethod.Gzip | ||||||
|         ? constants_1.CacheFilename.Gzip |         ? constants_1.CacheFilename.Gzip | ||||||
|         : constants_1.CacheFilename.Zstd; |         : constants_1.CacheFilename.Zstd; | ||||||
| } | } | ||||||
| exports.getCacheFileName = getCacheFileName; | exports.getCacheFileName = getCacheFileName; | ||||||
| function isGnuTarInstalled() { | function isGnuTarInstalled() { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const versionOutput = yield getVersion('tar'); |         const versionOutput = yield getVersion('tar'); | ||||||
|         return versionOutput.toLowerCase().includes('gnu tar'); |         return versionOutput.toLowerCase().includes('gnu tar'); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.isGnuTarInstalled = isGnuTarInstalled; | exports.isGnuTarInstalled = isGnuTarInstalled; | ||||||
| function assertDefined(name, value) { | function assertDefined(name, value) { | ||||||
|     if (value === undefined) { |     if (value === undefined) { | ||||||
|         throw Error(`Expected ${name} but value was undefiend`); |         throw Error(`Expected ${name} but value was undefiend`); | ||||||
|     } |     } | ||||||
|     return value; |     return value; | ||||||
| } | } | ||||||
| exports.assertDefined = assertDefined; | exports.assertDefined = assertDefined; | ||||||
| //# sourceMappingURL=cacheUtils.js.map
 | //# sourceMappingURL=cacheUtils.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -1182,7 +1182,7 @@ eval("require")("encoding"); | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -1306,6 +1306,21 @@ exports.PropagationAPI = PropagationAPI; | |||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
|  | /***/ 24: | ||||||
|  | /***/ (function(__unusedmodule, exports) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | var _default = '00000000-0000-0000-0000-000000000000'; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
| /***/ 40: | /***/ 40: | ||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| @ -2635,6 +2650,34 @@ function regExpEscape (s) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 104: | ||||||
|  | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | 
 | ||||||
|  | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
|  | 
 | ||||||
|  | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
|  | 
 | ||||||
|  | function version(uuid) { | ||||||
|  |   if (!(0, _validate.default)(uuid)) { | ||||||
|  |     throw TypeError('Invalid UUID'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   return parseInt(uuid.substr(14, 1), 16); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _default = version; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 106: | /***/ 106: | ||||||
| @ -2914,217 +2957,217 @@ exports.AbortSignal = AbortSignal; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const http_client_1 = __webpack_require__(539); | const http_client_1 = __webpack_require__(539); | ||||||
| const auth_1 = __webpack_require__(226); | const auth_1 = __webpack_require__(226); | ||||||
| const crypto = __importStar(__webpack_require__(417)); | const crypto = __importStar(__webpack_require__(417)); | ||||||
| const fs = __importStar(__webpack_require__(747)); | const fs = __importStar(__webpack_require__(747)); | ||||||
| const url_1 = __webpack_require__(835); | const url_1 = __webpack_require__(835); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| const downloadUtils_1 = __webpack_require__(251); | const downloadUtils_1 = __webpack_require__(251); | ||||||
| const options_1 = __webpack_require__(538); | const options_1 = __webpack_require__(538); | ||||||
| const requestUtils_1 = __webpack_require__(899); | const requestUtils_1 = __webpack_require__(899); | ||||||
| const versionSalt = '1.0'; | const versionSalt = '1.0'; | ||||||
| function getCacheApiUrl(resource) { | function getCacheApiUrl(resource) { | ||||||
|     // Ideally we just use ACTIONS_CACHE_URL
 |     // Ideally we just use ACTIONS_CACHE_URL
 | ||||||
|     const baseUrl = (process.env['ACTIONS_CACHE_URL'] || |     const baseUrl = (process.env['ACTIONS_CACHE_URL'] || | ||||||
|         process.env['ACTIONS_RUNTIME_URL'] || |         process.env['ACTIONS_RUNTIME_URL'] || | ||||||
|         '').replace('pipelines', 'artifactcache'); |         '').replace('pipelines', 'artifactcache'); | ||||||
|     if (!baseUrl) { |     if (!baseUrl) { | ||||||
|         throw new Error('Cache Service Url not found, unable to restore cache.'); |         throw new Error('Cache Service Url not found, unable to restore cache.'); | ||||||
|     } |     } | ||||||
|     const url = `${baseUrl}_apis/artifactcache/${resource}`; |     const url = `${baseUrl}_apis/artifactcache/${resource}`; | ||||||
|     core.debug(`Resource Url: ${url}`); |     core.debug(`Resource Url: ${url}`); | ||||||
|     return url; |     return url; | ||||||
| } | } | ||||||
| function createAcceptHeader(type, apiVersion) { | function createAcceptHeader(type, apiVersion) { | ||||||
|     return `${type};api-version=${apiVersion}`; |     return `${type};api-version=${apiVersion}`; | ||||||
| } | } | ||||||
| function getRequestOptions() { | function getRequestOptions() { | ||||||
|     const requestOptions = { |     const requestOptions = { | ||||||
|         headers: { |         headers: { | ||||||
|             Accept: createAcceptHeader('application/json', '6.0-preview.1') |             Accept: createAcceptHeader('application/json', '6.0-preview.1') | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
|     return requestOptions; |     return requestOptions; | ||||||
| } | } | ||||||
| function createHttpClient() { | function createHttpClient() { | ||||||
|     const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; |     const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; | ||||||
|     const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); |     const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); | ||||||
|     return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); |     return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); | ||||||
| } | } | ||||||
| function getCacheVersion(paths, compressionMethod) { | function getCacheVersion(paths, compressionMethod) { | ||||||
|     const components = paths.concat(!compressionMethod || compressionMethod === constants_1.CompressionMethod.Gzip |     const components = paths.concat(!compressionMethod || compressionMethod === constants_1.CompressionMethod.Gzip | ||||||
|         ? [] |         ? [] | ||||||
|         : [compressionMethod]); |         : [compressionMethod]); | ||||||
|     // Add salt to cache version to support breaking changes in cache entry
 |     // Add salt to cache version to support breaking changes in cache entry
 | ||||||
|     components.push(versionSalt); |     components.push(versionSalt); | ||||||
|     return crypto |     return crypto | ||||||
|         .createHash('sha256') |         .createHash('sha256') | ||||||
|         .update(components.join('|')) |         .update(components.join('|')) | ||||||
|         .digest('hex'); |         .digest('hex'); | ||||||
| } | } | ||||||
| exports.getCacheVersion = getCacheVersion; | exports.getCacheVersion = getCacheVersion; | ||||||
| function getCacheEntry(keys, paths, options) { | function getCacheEntry(keys, paths, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const httpClient = createHttpClient(); |         const httpClient = createHttpClient(); | ||||||
|         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); |         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); | ||||||
|         const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; |         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)); })); |         const response = yield requestUtils_1.retryTypedResponse('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); | ||||||
|         if (response.statusCode === 204) { |         if (response.statusCode === 204) { | ||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
|         if (!requestUtils_1.isSuccessStatusCode(response.statusCode)) { |         if (!requestUtils_1.isSuccessStatusCode(response.statusCode)) { | ||||||
|             throw new Error(`Cache service responded with ${response.statusCode}`); |             throw new Error(`Cache service responded with ${response.statusCode}`); | ||||||
|         } |         } | ||||||
|         const cacheResult = response.result; |         const cacheResult = response.result; | ||||||
|         const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; |         const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; | ||||||
|         if (!cacheDownloadUrl) { |         if (!cacheDownloadUrl) { | ||||||
|             throw new Error('Cache not found.'); |             throw new Error('Cache not found.'); | ||||||
|         } |         } | ||||||
|         core.setSecret(cacheDownloadUrl); |         core.setSecret(cacheDownloadUrl); | ||||||
|         core.debug(`Cache Result:`); |         core.debug(`Cache Result:`); | ||||||
|         core.debug(JSON.stringify(cacheResult)); |         core.debug(JSON.stringify(cacheResult)); | ||||||
|         return cacheResult; |         return cacheResult; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.getCacheEntry = getCacheEntry; | exports.getCacheEntry = getCacheEntry; | ||||||
| function downloadCache(archiveLocation, archivePath, options) { | function downloadCache(archiveLocation, archivePath, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const archiveUrl = new url_1.URL(archiveLocation); |         const archiveUrl = new url_1.URL(archiveLocation); | ||||||
|         const downloadOptions = options_1.getDownloadOptions(options); |         const downloadOptions = options_1.getDownloadOptions(options); | ||||||
|         if (downloadOptions.useAzureSdk && |         if (downloadOptions.useAzureSdk && | ||||||
|             archiveUrl.hostname.endsWith('.blob.core.windows.net')) { |             archiveUrl.hostname.endsWith('.blob.core.windows.net')) { | ||||||
|             // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability.
 |             // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability.
 | ||||||
|             yield downloadUtils_1.downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions); |             yield downloadUtils_1.downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions); | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             // Otherwise, download using the Actions http-client.
 |             // Otherwise, download using the Actions http-client.
 | ||||||
|             yield downloadUtils_1.downloadCacheHttpClient(archiveLocation, archivePath); |             yield downloadUtils_1.downloadCacheHttpClient(archiveLocation, archivePath); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadCache = downloadCache; | exports.downloadCache = downloadCache; | ||||||
| // Reserve Cache
 | // Reserve Cache
 | ||||||
| function reserveCache(key, paths, options) { | function reserveCache(key, paths, options) { | ||||||
|     var _a, _b; |     var _a, _b; | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const httpClient = createHttpClient(); |         const httpClient = createHttpClient(); | ||||||
|         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); |         const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); | ||||||
|         const reserveCacheRequest = { |         const reserveCacheRequest = { | ||||||
|             key, |             key, | ||||||
|             version |             version | ||||||
|         }; |         }; | ||||||
|         const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { |         const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { | ||||||
|             return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); |             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; |         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; | exports.reserveCache = reserveCache; | ||||||
| function getContentRange(start, end) { | function getContentRange(start, end) { | ||||||
|     // Format: `bytes start-end/filesize
 |     // Format: `bytes start-end/filesize
 | ||||||
|     // start and end are inclusive
 |     // start and end are inclusive
 | ||||||
|     // filesize can be *
 |     // filesize can be *
 | ||||||
|     // For a 200 byte chunk starting at byte 0:
 |     // For a 200 byte chunk starting at byte 0:
 | ||||||
|     // Content-Range: bytes 0-199/*
 |     // Content-Range: bytes 0-199/*
 | ||||||
|     return `bytes ${start}-${end}/*`; |     return `bytes ${start}-${end}/*`; | ||||||
| } | } | ||||||
| function uploadChunk(httpClient, resourceUrl, openStream, start, end) { | function uploadChunk(httpClient, resourceUrl, openStream, start, end) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Uploading chunk of size ${end - |         core.debug(`Uploading chunk of size ${end - | ||||||
|             start + |             start + | ||||||
|             1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`);
 |             1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`);
 | ||||||
|         const additionalHeaders = { |         const additionalHeaders = { | ||||||
|             'Content-Type': 'application/octet-stream', |             'Content-Type': 'application/octet-stream', | ||||||
|             'Content-Range': getContentRange(start, end) |             'Content-Range': getContentRange(start, end) | ||||||
|         }; |         }; | ||||||
|         yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { |         yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { | ||||||
|             return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); |             return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); | ||||||
|         })); |         })); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function uploadFile(httpClient, cacheId, archivePath, options) { | function uploadFile(httpClient, cacheId, archivePath, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Upload Chunks
 |         // Upload Chunks
 | ||||||
|         const fileSize = fs.statSync(archivePath).size; |         const fileSize = fs.statSync(archivePath).size; | ||||||
|         const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); |         const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); | ||||||
|         const fd = fs.openSync(archivePath, 'r'); |         const fd = fs.openSync(archivePath, 'r'); | ||||||
|         const uploadOptions = options_1.getUploadOptions(options); |         const uploadOptions = options_1.getUploadOptions(options); | ||||||
|         const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); |         const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); | ||||||
|         const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); |         const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); | ||||||
|         const parallelUploads = [...new Array(concurrency).keys()]; |         const parallelUploads = [...new Array(concurrency).keys()]; | ||||||
|         core.debug('Awaiting all uploads'); |         core.debug('Awaiting all uploads'); | ||||||
|         let offset = 0; |         let offset = 0; | ||||||
|         try { |         try { | ||||||
|             yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { |             yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { | ||||||
|                 while (offset < fileSize) { |                 while (offset < fileSize) { | ||||||
|                     const chunkSize = Math.min(fileSize - offset, maxChunkSize); |                     const chunkSize = Math.min(fileSize - offset, maxChunkSize); | ||||||
|                     const start = offset; |                     const start = offset; | ||||||
|                     const end = offset + chunkSize - 1; |                     const end = offset + chunkSize - 1; | ||||||
|                     offset += maxChunkSize; |                     offset += maxChunkSize; | ||||||
|                     yield uploadChunk(httpClient, resourceUrl, () => fs |                     yield uploadChunk(httpClient, resourceUrl, () => fs | ||||||
|                         .createReadStream(archivePath, { |                         .createReadStream(archivePath, { | ||||||
|                         fd, |                         fd, | ||||||
|                         start, |                         start, | ||||||
|                         end, |                         end, | ||||||
|                         autoClose: false |                         autoClose: false | ||||||
|                     }) |                     }) | ||||||
|                         .on('error', error => { |                         .on('error', error => { | ||||||
|                         throw new Error(`Cache upload failed because file read failed with ${error.message}`); |                         throw new Error(`Cache upload failed because file read failed with ${error.message}`); | ||||||
|                     }), start, end); |                     }), start, end); | ||||||
|                 } |                 } | ||||||
|             }))); |             }))); | ||||||
|         } |         } | ||||||
|         finally { |         finally { | ||||||
|             fs.closeSync(fd); |             fs.closeSync(fd); | ||||||
|         } |         } | ||||||
|         return; |         return; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function commitCache(httpClient, cacheId, filesize) { | function commitCache(httpClient, cacheId, filesize) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const commitCacheRequest = { size: filesize }; |         const commitCacheRequest = { size: filesize }; | ||||||
|         return yield requestUtils_1.retryTypedResponse('commitCache', () => __awaiter(this, void 0, void 0, function* () { |         return yield requestUtils_1.retryTypedResponse('commitCache', () => __awaiter(this, void 0, void 0, function* () { | ||||||
|             return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); |             return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); | ||||||
|         })); |         })); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function saveCache(cacheId, archivePath, options) { | function saveCache(cacheId, archivePath, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const httpClient = createHttpClient(); |         const httpClient = createHttpClient(); | ||||||
|         core.debug('Upload cache'); |         core.debug('Upload cache'); | ||||||
|         yield uploadFile(httpClient, cacheId, archivePath, options); |         yield uploadFile(httpClient, cacheId, archivePath, options); | ||||||
|         // Commit Cache
 |         // Commit Cache
 | ||||||
|         core.debug('Commiting cache'); |         core.debug('Commiting cache'); | ||||||
|         const cacheSize = utils.getArchiveFileSizeIsBytes(archivePath); |         const cacheSize = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|         const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); |         const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); | ||||||
|         if (!requestUtils_1.isSuccessStatusCode(commitCacheResponse.statusCode)) { |         if (!requestUtils_1.isSuccessStatusCode(commitCacheResponse.statusCode)) { | ||||||
|             throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); |             throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); | ||||||
|         } |         } | ||||||
|         core.info('Cache saved successfully'); |         core.info('Cache saved successfully'); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.saveCache = saveCache; | exports.saveCache = saveCache; | ||||||
| //# sourceMappingURL=cacheHttpClient.js.map
 | //# sourceMappingURL=cacheHttpClient.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -3486,44 +3529,33 @@ exports.debug = debug; // for test | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 147: | /***/ 147: | ||||||
| /***/ (function(module) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| // API
 | "use strict"; | ||||||
| module.exports = state; |  | ||||||
| 
 | 
 | ||||||
| /** | 
 | ||||||
|  * Creates initial state object | exports.fromCallback = function (fn) { | ||||||
|  * for iteration over list |   return Object.defineProperty(function () { | ||||||
|  * |     if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) | ||||||
|  * @param   {array|object} list - list to iterate over |     else { | ||||||
|  * @param   {function|null} sortMethod - function to use for keys sort, |       return new Promise((resolve, reject) => { | ||||||
|  *                                     or `null` to keep them as is |         arguments[arguments.length] = (err, res) => { | ||||||
|  * @returns {object} - initial state object |           if (err) return reject(err) | ||||||
|  */ |           resolve(res) | ||||||
| function state(list, sortMethod) |         } | ||||||
| { |         arguments.length++ | ||||||
|   var isNamedList = !Array.isArray(list) |         fn.apply(this, arguments) | ||||||
|     , initState = |       }) | ||||||
|     { |  | ||||||
|       index    : 0, |  | ||||||
|       keyedList: isNamedList || sortMethod ? Object.keys(list) : null, |  | ||||||
|       jobs     : {}, |  | ||||||
|       results  : isNamedList ? {} : [], |  | ||||||
|       size     : isNamedList ? Object.keys(list).length : list.length |  | ||||||
|     } |     } | ||||||
|     ; |   }, 'name', { value: fn.name }) | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
|   if (sortMethod) | exports.fromPromise = function (fn) { | ||||||
|   { |   return Object.defineProperty(function () { | ||||||
|     // sort array keys based on it's values
 |     const cb = arguments[arguments.length - 1] | ||||||
|     // sort object's keys just on own merit
 |     if (typeof cb !== 'function') return fn.apply(this, arguments) | ||||||
|     initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) |     else fn.apply(this, arguments).then(r => cb(null, r), cb) | ||||||
|     { |   }, 'name', { value: fn.name }) | ||||||
|       return sortMethod(list[a], list[b]); |  | ||||||
|     }); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   return initState; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -3821,7 +3853,7 @@ exports.default = void 0; | |||||||
| 
 | 
 | ||||||
| var _rng = _interopRequireDefault(__webpack_require__(733)); | var _rng = _interopRequireDefault(__webpack_require__(733)); | ||||||
| 
 | 
 | ||||||
| var _bytesToUuid = _interopRequireDefault(__webpack_require__(940)); | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
| 
 | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| @ -3914,7 +3946,7 @@ function v1(options, buf, offset) { | |||||||
|     b[i + n] = node[n]; |     b[i + n] = node[n]; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return buf || (0, _bytesToUuid.default)(b); |   return buf || (0, _stringify.default)(b); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var _default = v1; | var _default = v1; | ||||||
| @ -3922,6 +3954,58 @@ exports.default = _default; | |||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
|  | /***/ 197: | ||||||
|  | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | 
 | ||||||
|  | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
|  | 
 | ||||||
|  | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
|  | 
 | ||||||
|  | function parse(uuid) { | ||||||
|  |   if (!(0, _validate.default)(uuid)) { | ||||||
|  |     throw TypeError('Invalid UUID'); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   let v; | ||||||
|  |   const arr = new Uint8Array(16); // Parse ########-....-....-....-............
 | ||||||
|  | 
 | ||||||
|  |   arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; | ||||||
|  |   arr[1] = v >>> 16 & 0xff; | ||||||
|  |   arr[2] = v >>> 8 & 0xff; | ||||||
|  |   arr[3] = v & 0xff; // Parse ........-####-....-....-............
 | ||||||
|  | 
 | ||||||
|  |   arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; | ||||||
|  |   arr[5] = v & 0xff; // Parse ........-....-####-....-............
 | ||||||
|  | 
 | ||||||
|  |   arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; | ||||||
|  |   arr[7] = v & 0xff; // Parse ........-....-....-####-............
 | ||||||
|  | 
 | ||||||
|  |   arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; | ||||||
|  |   arr[9] = v & 0xff; // Parse ........-....-....-....-############
 | ||||||
|  |   // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
 | ||||||
|  | 
 | ||||||
|  |   arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; | ||||||
|  |   arr[11] = v / 0x100000000 & 0xff; | ||||||
|  |   arr[12] = v >>> 24 & 0xff; | ||||||
|  |   arr[13] = v >>> 16 & 0xff; | ||||||
|  |   arr[14] = v >>> 8 & 0xff; | ||||||
|  |   arr[15] = v & 0xff; | ||||||
|  |   return arr; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var _default = parse; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
| /***/ 210: | /***/ 210: | ||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| @ -4095,6 +4179,21 @@ exports.isTokenCredential = isTokenCredential; | |||||||
| //# sourceMappingURL=index.js.map
 | //# sourceMappingURL=index.js.map
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 238: | ||||||
|  | /***/ (function(__unusedmodule, exports) { | ||||||
|  | 
 | ||||||
|  | "use strict"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
|  | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; | ||||||
|  | exports.default = _default; | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 241: | /***/ 241: | ||||||
| @ -4109,19 +4208,12 @@ Object.defineProperty(exports, "__esModule", { | |||||||
| exports.default = _default; | exports.default = _default; | ||||||
| exports.URL = exports.DNS = void 0; | exports.URL = exports.DNS = void 0; | ||||||
| 
 | 
 | ||||||
| var _bytesToUuid = _interopRequireDefault(__webpack_require__(940)); | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
|  | 
 | ||||||
|  | var _parse = _interopRequireDefault(__webpack_require__(197)); | ||||||
| 
 | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| function uuidToBytes(uuid) { |  | ||||||
|   // Note: We assume we're being passed a valid uuid string
 |  | ||||||
|   const bytes = []; |  | ||||||
|   uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) { |  | ||||||
|     bytes.push(parseInt(hex, 16)); |  | ||||||
|   }); |  | ||||||
|   return bytes; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function stringToBytes(str) { | function stringToBytes(str) { | ||||||
|   str = unescape(encodeURIComponent(str)); // UTF8 escape
 |   str = unescape(encodeURIComponent(str)); // UTF8 escape
 | ||||||
| 
 | 
 | ||||||
| @ -4146,19 +4238,20 @@ function _default(name, version, hashfunc) { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (typeof namespace === 'string') { |     if (typeof namespace === 'string') { | ||||||
|       namespace = uuidToBytes(namespace); |       namespace = (0, _parse.default)(namespace); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (!Array.isArray(value)) { |     if (namespace.length !== 16) { | ||||||
|       throw TypeError('value must be an array of bytes'); |       throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); | ||||||
|     } |     } // Compute hash of namespace and value, Per 4.3
 | ||||||
| 
 |     // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
 | ||||||
|     if (!Array.isArray(namespace) || namespace.length !== 16) { |     // hashfunc([...namespace, ... value])`
 | ||||||
|       throw TypeError('namespace must be uuid string or an Array of 16 byte values'); |  | ||||||
|     } // Per 4.3
 |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     const bytes = hashfunc(namespace.concat(value)); |     let bytes = new Uint8Array(16 + value.length); | ||||||
|  |     bytes.set(namespace); | ||||||
|  |     bytes.set(value, namespace.length); | ||||||
|  |     bytes = hashfunc(bytes); | ||||||
|     bytes[6] = bytes[6] & 0x0f | version; |     bytes[6] = bytes[6] & 0x0f | version; | ||||||
|     bytes[8] = bytes[8] & 0x3f | 0x80; |     bytes[8] = bytes[8] & 0x3f | 0x80; | ||||||
| 
 | 
 | ||||||
| @ -4172,7 +4265,7 @@ function _default(name, version, hashfunc) { | |||||||
|       return buf; |       return buf; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return (0, _bytesToUuid.default)(bytes); |     return (0, _stringify.default)(bytes); | ||||||
|   } // Function#name is not settable on some platforms (#270)
 |   } // Function#name is not settable on some platforms (#270)
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -4233,237 +4326,1029 @@ exports.default = _default; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const http_client_1 = __webpack_require__(539); | const http_client_1 = __webpack_require__(539); | ||||||
| const storage_blob_1 = __webpack_require__(373); | const storage_blob_1 = __webpack_require__(373); | ||||||
| const buffer = __importStar(__webpack_require__(293)); | const buffer = __importStar(__webpack_require__(293)); | ||||||
| const fs = __importStar(__webpack_require__(747)); | const fs = __importStar(__webpack_require__(747)); | ||||||
| const stream = __importStar(__webpack_require__(794)); | const stream = __importStar(__webpack_require__(794)); | ||||||
| const util = __importStar(__webpack_require__(669)); | const util = __importStar(__webpack_require__(669)); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| const requestUtils_1 = __webpack_require__(899); | const requestUtils_1 = __webpack_require__(899); | ||||||
| /** | /** | ||||||
|  * Pipes the body of a HTTP response to a stream |  * Pipes the body of a HTTP response to a stream | ||||||
|  * |  * | ||||||
|  * @param response the HTTP response |  * @param response the HTTP response | ||||||
|  * @param output the writable stream |  * @param output the writable stream | ||||||
|  */ |  */ | ||||||
| function pipeResponseToStream(response, output) { | function pipeResponseToStream(response, output) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const pipeline = util.promisify(stream.pipeline); |         const pipeline = util.promisify(stream.pipeline); | ||||||
|         yield pipeline(response.message, output); |         yield pipeline(response.message, output); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| /** | /** | ||||||
|  * Class for tracking the download state and displaying stats. |  * Class for tracking the download state and displaying stats. | ||||||
|  */ |  */ | ||||||
| class DownloadProgress { | class DownloadProgress { | ||||||
|     constructor(contentLength) { |     constructor(contentLength) { | ||||||
|         this.contentLength = contentLength; |         this.contentLength = contentLength; | ||||||
|         this.segmentIndex = 0; |         this.segmentIndex = 0; | ||||||
|         this.segmentSize = 0; |         this.segmentSize = 0; | ||||||
|         this.segmentOffset = 0; |         this.segmentOffset = 0; | ||||||
|         this.receivedBytes = 0; |         this.receivedBytes = 0; | ||||||
|         this.displayedComplete = false; |         this.displayedComplete = false; | ||||||
|         this.startTime = Date.now(); |         this.startTime = Date.now(); | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Progress to the next segment. Only call this method when the previous segment |      * Progress to the next segment. Only call this method when the previous segment | ||||||
|      * is complete. |      * is complete. | ||||||
|      * |      * | ||||||
|      * @param segmentSize the length of the next segment |      * @param segmentSize the length of the next segment | ||||||
|      */ |      */ | ||||||
|     nextSegment(segmentSize) { |     nextSegment(segmentSize) { | ||||||
|         this.segmentOffset = this.segmentOffset + this.segmentSize; |         this.segmentOffset = this.segmentOffset + this.segmentSize; | ||||||
|         this.segmentIndex = this.segmentIndex + 1; |         this.segmentIndex = this.segmentIndex + 1; | ||||||
|         this.segmentSize = segmentSize; |         this.segmentSize = segmentSize; | ||||||
|         this.receivedBytes = 0; |         this.receivedBytes = 0; | ||||||
|         core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); |         core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Sets the number of bytes received for the current segment. |      * Sets the number of bytes received for the current segment. | ||||||
|      * |      * | ||||||
|      * @param receivedBytes the number of bytes received |      * @param receivedBytes the number of bytes received | ||||||
|      */ |      */ | ||||||
|     setReceivedBytes(receivedBytes) { |     setReceivedBytes(receivedBytes) { | ||||||
|         this.receivedBytes = receivedBytes; |         this.receivedBytes = receivedBytes; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Returns the total number of bytes transferred. |      * Returns the total number of bytes transferred. | ||||||
|      */ |      */ | ||||||
|     getTransferredBytes() { |     getTransferredBytes() { | ||||||
|         return this.segmentOffset + this.receivedBytes; |         return this.segmentOffset + this.receivedBytes; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Returns true if the download is complete. |      * Returns true if the download is complete. | ||||||
|      */ |      */ | ||||||
|     isDone() { |     isDone() { | ||||||
|         return this.getTransferredBytes() === this.contentLength; |         return this.getTransferredBytes() === this.contentLength; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Prints the current download stats. Once the download completes, this will print one |      * Prints the current download stats. Once the download completes, this will print one | ||||||
|      * last line and then stop. |      * last line and then stop. | ||||||
|      */ |      */ | ||||||
|     display() { |     display() { | ||||||
|         if (this.displayedComplete) { |         if (this.displayedComplete) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         const transferredBytes = this.segmentOffset + this.receivedBytes; |         const transferredBytes = this.segmentOffset + this.receivedBytes; | ||||||
|         const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); |         const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); | ||||||
|         const elapsedTime = Date.now() - this.startTime; |         const elapsedTime = Date.now() - this.startTime; | ||||||
|         const downloadSpeed = (transferredBytes / |         const downloadSpeed = (transferredBytes / | ||||||
|             (1024 * 1024) / |             (1024 * 1024) / | ||||||
|             (elapsedTime / 1000)).toFixed(1); |             (elapsedTime / 1000)).toFixed(1); | ||||||
|         core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); |         core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); | ||||||
|         if (this.isDone()) { |         if (this.isDone()) { | ||||||
|             this.displayedComplete = true; |             this.displayedComplete = true; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Returns a function used to handle TransferProgressEvents. |      * Returns a function used to handle TransferProgressEvents. | ||||||
|      */ |      */ | ||||||
|     onProgress() { |     onProgress() { | ||||||
|         return (progress) => { |         return (progress) => { | ||||||
|             this.setReceivedBytes(progress.loadedBytes); |             this.setReceivedBytes(progress.loadedBytes); | ||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Starts the timer that displays the stats. |      * Starts the timer that displays the stats. | ||||||
|      * |      * | ||||||
|      * @param delayInMs the delay between each write |      * @param delayInMs the delay between each write | ||||||
|      */ |      */ | ||||||
|     startDisplayTimer(delayInMs = 1000) { |     startDisplayTimer(delayInMs = 1000) { | ||||||
|         const displayCallback = () => { |         const displayCallback = () => { | ||||||
|             this.display(); |             this.display(); | ||||||
|             if (!this.isDone()) { |             if (!this.isDone()) { | ||||||
|                 this.timeoutHandle = setTimeout(displayCallback, delayInMs); |                 this.timeoutHandle = setTimeout(displayCallback, delayInMs); | ||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|         this.timeoutHandle = setTimeout(displayCallback, delayInMs); |         this.timeoutHandle = setTimeout(displayCallback, delayInMs); | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|      * Stops the timer that displays the stats. As this typically indicates the download |      * 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 |      * is complete, this will display one last line, unless the last line has already | ||||||
|      * been written. |      * been written. | ||||||
|      */ |      */ | ||||||
|     stopDisplayTimer() { |     stopDisplayTimer() { | ||||||
|         if (this.timeoutHandle) { |         if (this.timeoutHandle) { | ||||||
|             clearTimeout(this.timeoutHandle); |             clearTimeout(this.timeoutHandle); | ||||||
|             this.timeoutHandle = undefined; |             this.timeoutHandle = undefined; | ||||||
|         } |         } | ||||||
|         this.display(); |         this.display(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| exports.DownloadProgress = DownloadProgress; | exports.DownloadProgress = DownloadProgress; | ||||||
| /** | /** | ||||||
|  * Download the cache using the Actions toolkit http-client |  * Download the cache using the Actions toolkit http-client | ||||||
|  * |  * | ||||||
|  * @param archiveLocation the URL for the cache |  * @param archiveLocation the URL for the cache | ||||||
|  * @param archivePath the local path where the cache is saved |  * @param archivePath the local path where the cache is saved | ||||||
|  */ |  */ | ||||||
| function downloadCacheHttpClient(archiveLocation, archivePath) { | function downloadCacheHttpClient(archiveLocation, archivePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const writeStream = fs.createWriteStream(archivePath); |         const writeStream = fs.createWriteStream(archivePath); | ||||||
|         const httpClient = new http_client_1.HttpClient('actions/cache'); |         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); })); |         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.
 |         // Abort download if no traffic received over the socket.
 | ||||||
|         downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { |         downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { | ||||||
|             downloadResponse.message.destroy(); |             downloadResponse.message.destroy(); | ||||||
|             core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); |             core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); | ||||||
|         }); |         }); | ||||||
|         yield pipeResponseToStream(downloadResponse, writeStream); |         yield pipeResponseToStream(downloadResponse, writeStream); | ||||||
|         // Validate download size.
 |         // Validate download size.
 | ||||||
|         const contentLengthHeader = downloadResponse.message.headers['content-length']; |         const contentLengthHeader = downloadResponse.message.headers['content-length']; | ||||||
|         if (contentLengthHeader) { |         if (contentLengthHeader) { | ||||||
|             const expectedLength = parseInt(contentLengthHeader); |             const expectedLength = parseInt(contentLengthHeader); | ||||||
|             const actualLength = utils.getArchiveFileSizeIsBytes(archivePath); |             const actualLength = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|             if (actualLength !== expectedLength) { |             if (actualLength !== expectedLength) { | ||||||
|                 throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); |                 throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             core.debug('Unable to validate download, no Content-Length header'); |             core.debug('Unable to validate download, no Content-Length header'); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadCacheHttpClient = downloadCacheHttpClient; | exports.downloadCacheHttpClient = downloadCacheHttpClient; | ||||||
| /** | /** | ||||||
|  * Download the cache using the Azure Storage SDK.  Only call this method if the |  * Download the cache using the Azure Storage SDK.  Only call this method if the | ||||||
|  * URL points to an Azure Storage endpoint. |  * URL points to an Azure Storage endpoint. | ||||||
|  * |  * | ||||||
|  * @param archiveLocation the URL for the cache |  * @param archiveLocation the URL for the cache | ||||||
|  * @param archivePath the local path where the cache is saved |  * @param archivePath the local path where the cache is saved | ||||||
|  * @param options the download options with the defaults set |  * @param options the download options with the defaults set | ||||||
|  */ |  */ | ||||||
| function downloadCacheStorageSDK(archiveLocation, archivePath, options) { | function downloadCacheStorageSDK(archiveLocation, archivePath, options) { | ||||||
|     var _a; |     var _a; | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { |         const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { | ||||||
|             retryOptions: { |             retryOptions: { | ||||||
|                 // Override the timeout used when downloading each 4 MB chunk
 |                 // Override the timeout used when downloading each 4 MB chunk
 | ||||||
|                 // The default is 2 min / MB, which is way too slow
 |                 // The default is 2 min / MB, which is way too slow
 | ||||||
|                 tryTimeoutInMs: options.timeoutInMs |                 tryTimeoutInMs: options.timeoutInMs | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|         const properties = yield client.getProperties(); |         const properties = yield client.getProperties(); | ||||||
|         const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; |         const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; | ||||||
|         if (contentLength < 0) { |         if (contentLength < 0) { | ||||||
|             // We should never hit this condition, but just in case fall back to downloading the
 |             // We should never hit this condition, but just in case fall back to downloading the
 | ||||||
|             // file as one large stream
 |             // file as one large stream
 | ||||||
|             core.debug('Unable to determine content length, downloading file with http-client...'); |             core.debug('Unable to determine content length, downloading file with http-client...'); | ||||||
|             yield downloadCacheHttpClient(archiveLocation, archivePath); |             yield downloadCacheHttpClient(archiveLocation, archivePath); | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             // Use downloadToBuffer for faster downloads, since internally it splits the
 |             // Use downloadToBuffer for faster downloads, since internally it splits the
 | ||||||
|             // file into 4 MB chunks which can then be parallelized and retried independently
 |             // 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
 |             // 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
 |             // on 64-bit systems), split the download into multiple segments
 | ||||||
|             const maxSegmentSize = buffer.constants.MAX_LENGTH; |             const maxSegmentSize = buffer.constants.MAX_LENGTH; | ||||||
|             const downloadProgress = new DownloadProgress(contentLength); |             const downloadProgress = new DownloadProgress(contentLength); | ||||||
|             const fd = fs.openSync(archivePath, 'w'); |             const fd = fs.openSync(archivePath, 'w'); | ||||||
|             try { |             try { | ||||||
|                 downloadProgress.startDisplayTimer(); |                 downloadProgress.startDisplayTimer(); | ||||||
|                 while (!downloadProgress.isDone()) { |                 while (!downloadProgress.isDone()) { | ||||||
|                     const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; |                     const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; | ||||||
|                     const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); |                     const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); | ||||||
|                     downloadProgress.nextSegment(segmentSize); |                     downloadProgress.nextSegment(segmentSize); | ||||||
|                     const result = yield client.downloadToBuffer(segmentStart, segmentSize, { |                     const result = yield client.downloadToBuffer(segmentStart, segmentSize, { | ||||||
|                         concurrency: options.downloadConcurrency, |                         concurrency: options.downloadConcurrency, | ||||||
|                         onProgress: downloadProgress.onProgress() |                         onProgress: downloadProgress.onProgress() | ||||||
|                     }); |                     }); | ||||||
|                     fs.writeFileSync(fd, result); |                     fs.writeFileSync(fd, result); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             finally { |             finally { | ||||||
|                 downloadProgress.stopDisplayTimer(); |                 downloadProgress.stopDisplayTimer(); | ||||||
|                 fs.closeSync(fd); |                 fs.closeSync(fd); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadCacheStorageSDK = downloadCacheStorageSDK; | exports.downloadCacheStorageSDK = downloadCacheStorageSDK; | ||||||
| //# sourceMappingURL=downloadUtils.js.map
 | //# sourceMappingURL=downloadUtils.js.map
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 257: | ||||||
|  | /***/ (function(module, __unusedexports, __webpack_require__) { | ||||||
|  | 
 | ||||||
|  | // Generated by CoffeeScript 1.12.7
 | ||||||
|  | (function() { | ||||||
|  |   var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, | ||||||
|  |     hasProp = {}.hasOwnProperty; | ||||||
|  | 
 | ||||||
|  |   ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; | ||||||
|  | 
 | ||||||
|  |   XMLElement = null; | ||||||
|  | 
 | ||||||
|  |   XMLCData = null; | ||||||
|  | 
 | ||||||
|  |   XMLComment = null; | ||||||
|  | 
 | ||||||
|  |   XMLDeclaration = null; | ||||||
|  | 
 | ||||||
|  |   XMLDocType = null; | ||||||
|  | 
 | ||||||
|  |   XMLRaw = null; | ||||||
|  | 
 | ||||||
|  |   XMLText = null; | ||||||
|  | 
 | ||||||
|  |   XMLProcessingInstruction = null; | ||||||
|  | 
 | ||||||
|  |   XMLDummy = null; | ||||||
|  | 
 | ||||||
|  |   NodeType = null; | ||||||
|  | 
 | ||||||
|  |   XMLNodeList = null; | ||||||
|  | 
 | ||||||
|  |   XMLNamedNodeMap = null; | ||||||
|  | 
 | ||||||
|  |   DocumentPosition = null; | ||||||
|  | 
 | ||||||
|  |   module.exports = XMLNode = (function() { | ||||||
|  |     function XMLNode(parent1) { | ||||||
|  |       this.parent = parent1; | ||||||
|  |       if (this.parent) { | ||||||
|  |         this.options = this.parent.options; | ||||||
|  |         this.stringify = this.parent.stringify; | ||||||
|  |       } | ||||||
|  |       this.value = null; | ||||||
|  |       this.children = []; | ||||||
|  |       this.baseURI = null; | ||||||
|  |       if (!XMLElement) { | ||||||
|  |         XMLElement = __webpack_require__(796); | ||||||
|  |         XMLCData = __webpack_require__(657); | ||||||
|  |         XMLComment = __webpack_require__(919); | ||||||
|  |         XMLDeclaration = __webpack_require__(738); | ||||||
|  |         XMLDocType = __webpack_require__(735); | ||||||
|  |         XMLRaw = __webpack_require__(660); | ||||||
|  |         XMLText = __webpack_require__(708); | ||||||
|  |         XMLProcessingInstruction = __webpack_require__(491); | ||||||
|  |         XMLDummy = __webpack_require__(956); | ||||||
|  |         NodeType = __webpack_require__(683); | ||||||
|  |         XMLNodeList = __webpack_require__(265); | ||||||
|  |         XMLNamedNodeMap = __webpack_require__(451); | ||||||
|  |         DocumentPosition = __webpack_require__(65); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nodeName', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.name; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nodeType', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.type; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nodeValue', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.value; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'parentNode', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.parent; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'childNodes', { | ||||||
|  |       get: function() { | ||||||
|  |         if (!this.childNodeList || !this.childNodeList.nodes) { | ||||||
|  |           this.childNodeList = new XMLNodeList(this.children); | ||||||
|  |         } | ||||||
|  |         return this.childNodeList; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'firstChild', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.children[0] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'lastChild', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.children[this.children.length - 1] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'previousSibling', { | ||||||
|  |       get: function() { | ||||||
|  |         var i; | ||||||
|  |         i = this.parent.children.indexOf(this); | ||||||
|  |         return this.parent.children[i - 1] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'nextSibling', { | ||||||
|  |       get: function() { | ||||||
|  |         var i; | ||||||
|  |         i = this.parent.children.indexOf(this); | ||||||
|  |         return this.parent.children[i + 1] || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'ownerDocument', { | ||||||
|  |       get: function() { | ||||||
|  |         return this.document() || null; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(XMLNode.prototype, 'textContent', { | ||||||
|  |       get: function() { | ||||||
|  |         var child, j, len, ref2, str; | ||||||
|  |         if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { | ||||||
|  |           str = ''; | ||||||
|  |           ref2 = this.children; | ||||||
|  |           for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |             child = ref2[j]; | ||||||
|  |             if (child.textContent) { | ||||||
|  |               str += child.textContent; | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |           return str; | ||||||
|  |         } else { | ||||||
|  |           return null; | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       set: function(value) { | ||||||
|  |         throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.setParent = function(parent) { | ||||||
|  |       var child, j, len, ref2, results; | ||||||
|  |       this.parent = parent; | ||||||
|  |       if (parent) { | ||||||
|  |         this.options = parent.options; | ||||||
|  |         this.stringify = parent.stringify; | ||||||
|  |       } | ||||||
|  |       ref2 = this.children; | ||||||
|  |       results = []; | ||||||
|  |       for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |         child = ref2[j]; | ||||||
|  |         results.push(child.setParent(this)); | ||||||
|  |       } | ||||||
|  |       return results; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.element = function(name, attributes, text) { | ||||||
|  |       var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; | ||||||
|  |       lastChild = null; | ||||||
|  |       if (attributes === null && (text == null)) { | ||||||
|  |         ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; | ||||||
|  |       } | ||||||
|  |       if (attributes == null) { | ||||||
|  |         attributes = {}; | ||||||
|  |       } | ||||||
|  |       attributes = getValue(attributes); | ||||||
|  |       if (!isObject(attributes)) { | ||||||
|  |         ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; | ||||||
|  |       } | ||||||
|  |       if (name != null) { | ||||||
|  |         name = getValue(name); | ||||||
|  |       } | ||||||
|  |       if (Array.isArray(name)) { | ||||||
|  |         for (j = 0, len = name.length; j < len; j++) { | ||||||
|  |           item = name[j]; | ||||||
|  |           lastChild = this.element(item); | ||||||
|  |         } | ||||||
|  |       } else if (isFunction(name)) { | ||||||
|  |         lastChild = this.element(name.apply()); | ||||||
|  |       } else if (isObject(name)) { | ||||||
|  |         for (key in name) { | ||||||
|  |           if (!hasProp.call(name, key)) continue; | ||||||
|  |           val = name[key]; | ||||||
|  |           if (isFunction(val)) { | ||||||
|  |             val = val.apply(); | ||||||
|  |           } | ||||||
|  |           if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { | ||||||
|  |             lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); | ||||||
|  |           } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { | ||||||
|  |             lastChild = this.dummy(); | ||||||
|  |           } else if (isObject(val) && isEmpty(val)) { | ||||||
|  |             lastChild = this.element(key); | ||||||
|  |           } else if (!this.options.keepNullNodes && (val == null)) { | ||||||
|  |             lastChild = this.dummy(); | ||||||
|  |           } else if (!this.options.separateArrayItems && Array.isArray(val)) { | ||||||
|  |             for (k = 0, len1 = val.length; k < len1; k++) { | ||||||
|  |               item = val[k]; | ||||||
|  |               childNode = {}; | ||||||
|  |               childNode[key] = item; | ||||||
|  |               lastChild = this.element(childNode); | ||||||
|  |             } | ||||||
|  |           } else if (isObject(val)) { | ||||||
|  |             if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { | ||||||
|  |               lastChild = this.element(val); | ||||||
|  |             } else { | ||||||
|  |               lastChild = this.element(key); | ||||||
|  |               lastChild.element(val); | ||||||
|  |             } | ||||||
|  |           } else { | ||||||
|  |             lastChild = this.element(key, val); | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } else if (!this.options.keepNullNodes && text === null) { | ||||||
|  |         lastChild = this.dummy(); | ||||||
|  |       } else { | ||||||
|  |         if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { | ||||||
|  |           lastChild = this.text(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { | ||||||
|  |           lastChild = this.cdata(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { | ||||||
|  |           lastChild = this.comment(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { | ||||||
|  |           lastChild = this.raw(text); | ||||||
|  |         } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { | ||||||
|  |           lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); | ||||||
|  |         } else { | ||||||
|  |           lastChild = this.node(name, attributes, text); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       if (lastChild == null) { | ||||||
|  |         throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       return lastChild; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.insertBefore = function(name, attributes, text) { | ||||||
|  |       var child, i, newChild, refChild, removed; | ||||||
|  |       if (name != null ? name.type : void 0) { | ||||||
|  |         newChild = name; | ||||||
|  |         refChild = attributes; | ||||||
|  |         newChild.setParent(this); | ||||||
|  |         if (refChild) { | ||||||
|  |           i = children.indexOf(refChild); | ||||||
|  |           removed = children.splice(i); | ||||||
|  |           children.push(newChild); | ||||||
|  |           Array.prototype.push.apply(children, removed); | ||||||
|  |         } else { | ||||||
|  |           children.push(newChild); | ||||||
|  |         } | ||||||
|  |         return newChild; | ||||||
|  |       } else { | ||||||
|  |         if (this.isRoot) { | ||||||
|  |           throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); | ||||||
|  |         } | ||||||
|  |         i = this.parent.children.indexOf(this); | ||||||
|  |         removed = this.parent.children.splice(i); | ||||||
|  |         child = this.parent.element(name, attributes, text); | ||||||
|  |         Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |         return child; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.insertAfter = function(name, attributes, text) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       if (this.isRoot) { | ||||||
|  |         throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); | ||||||
|  |       } | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i + 1); | ||||||
|  |       child = this.parent.element(name, attributes, text); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return child; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.remove = function() { | ||||||
|  |       var i, ref2; | ||||||
|  |       if (this.isRoot) { | ||||||
|  |         throw new Error("Cannot remove the root element. " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; | ||||||
|  |       return this.parent; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.node = function(name, attributes, text) { | ||||||
|  |       var child, ref2; | ||||||
|  |       if (name != null) { | ||||||
|  |         name = getValue(name); | ||||||
|  |       } | ||||||
|  |       attributes || (attributes = {}); | ||||||
|  |       attributes = getValue(attributes); | ||||||
|  |       if (!isObject(attributes)) { | ||||||
|  |         ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; | ||||||
|  |       } | ||||||
|  |       child = new XMLElement(this, name, attributes); | ||||||
|  |       if (text != null) { | ||||||
|  |         child.text(text); | ||||||
|  |       } | ||||||
|  |       this.children.push(child); | ||||||
|  |       return child; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.text = function(value) { | ||||||
|  |       var child; | ||||||
|  |       if (isObject(value)) { | ||||||
|  |         this.element(value); | ||||||
|  |       } | ||||||
|  |       child = new XMLText(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.cdata = function(value) { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLCData(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.comment = function(value) { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLComment(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.commentBefore = function(value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i); | ||||||
|  |       child = this.parent.comment(value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.commentAfter = function(value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i + 1); | ||||||
|  |       child = this.parent.comment(value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.raw = function(value) { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLRaw(this, value); | ||||||
|  |       this.children.push(child); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dummy = function() { | ||||||
|  |       var child; | ||||||
|  |       child = new XMLDummy(this); | ||||||
|  |       return child; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.instruction = function(target, value) { | ||||||
|  |       var insTarget, insValue, instruction, j, len; | ||||||
|  |       if (target != null) { | ||||||
|  |         target = getValue(target); | ||||||
|  |       } | ||||||
|  |       if (value != null) { | ||||||
|  |         value = getValue(value); | ||||||
|  |       } | ||||||
|  |       if (Array.isArray(target)) { | ||||||
|  |         for (j = 0, len = target.length; j < len; j++) { | ||||||
|  |           insTarget = target[j]; | ||||||
|  |           this.instruction(insTarget); | ||||||
|  |         } | ||||||
|  |       } else if (isObject(target)) { | ||||||
|  |         for (insTarget in target) { | ||||||
|  |           if (!hasProp.call(target, insTarget)) continue; | ||||||
|  |           insValue = target[insTarget]; | ||||||
|  |           this.instruction(insTarget, insValue); | ||||||
|  |         } | ||||||
|  |       } else { | ||||||
|  |         if (isFunction(value)) { | ||||||
|  |           value = value.apply(); | ||||||
|  |         } | ||||||
|  |         instruction = new XMLProcessingInstruction(this, target, value); | ||||||
|  |         this.children.push(instruction); | ||||||
|  |       } | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.instructionBefore = function(target, value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i); | ||||||
|  |       child = this.parent.instruction(target, value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.instructionAfter = function(target, value) { | ||||||
|  |       var child, i, removed; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       removed = this.parent.children.splice(i + 1); | ||||||
|  |       child = this.parent.instruction(target, value); | ||||||
|  |       Array.prototype.push.apply(this.parent.children, removed); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.declaration = function(version, encoding, standalone) { | ||||||
|  |       var doc, xmldec; | ||||||
|  |       doc = this.document(); | ||||||
|  |       xmldec = new XMLDeclaration(doc, version, encoding, standalone); | ||||||
|  |       if (doc.children.length === 0) { | ||||||
|  |         doc.children.unshift(xmldec); | ||||||
|  |       } else if (doc.children[0].type === NodeType.Declaration) { | ||||||
|  |         doc.children[0] = xmldec; | ||||||
|  |       } else { | ||||||
|  |         doc.children.unshift(xmldec); | ||||||
|  |       } | ||||||
|  |       return doc.root() || doc; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dtd = function(pubID, sysID) { | ||||||
|  |       var child, doc, doctype, i, j, k, len, len1, ref2, ref3; | ||||||
|  |       doc = this.document(); | ||||||
|  |       doctype = new XMLDocType(doc, pubID, sysID); | ||||||
|  |       ref2 = doc.children; | ||||||
|  |       for (i = j = 0, len = ref2.length; j < len; i = ++j) { | ||||||
|  |         child = ref2[i]; | ||||||
|  |         if (child.type === NodeType.DocType) { | ||||||
|  |           doc.children[i] = doctype; | ||||||
|  |           return doctype; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       ref3 = doc.children; | ||||||
|  |       for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { | ||||||
|  |         child = ref3[i]; | ||||||
|  |         if (child.isRoot) { | ||||||
|  |           doc.children.splice(i, 0, doctype); | ||||||
|  |           return doctype; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       doc.children.push(doctype); | ||||||
|  |       return doctype; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.up = function() { | ||||||
|  |       if (this.isRoot) { | ||||||
|  |         throw new Error("The root node has no parent. Use doc() if you need to get the document object."); | ||||||
|  |       } | ||||||
|  |       return this.parent; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.root = function() { | ||||||
|  |       var node; | ||||||
|  |       node = this; | ||||||
|  |       while (node) { | ||||||
|  |         if (node.type === NodeType.Document) { | ||||||
|  |           return node.rootObject; | ||||||
|  |         } else if (node.isRoot) { | ||||||
|  |           return node; | ||||||
|  |         } else { | ||||||
|  |           node = node.parent; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.document = function() { | ||||||
|  |       var node; | ||||||
|  |       node = this; | ||||||
|  |       while (node) { | ||||||
|  |         if (node.type === NodeType.Document) { | ||||||
|  |           return node; | ||||||
|  |         } else { | ||||||
|  |           node = node.parent; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.end = function(options) { | ||||||
|  |       return this.document().end(options); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.prev = function() { | ||||||
|  |       var i; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       if (i < 1) { | ||||||
|  |         throw new Error("Already at the first node. " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       return this.parent.children[i - 1]; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.next = function() { | ||||||
|  |       var i; | ||||||
|  |       i = this.parent.children.indexOf(this); | ||||||
|  |       if (i === -1 || i === this.parent.children.length - 1) { | ||||||
|  |         throw new Error("Already at the last node. " + this.debugInfo()); | ||||||
|  |       } | ||||||
|  |       return this.parent.children[i + 1]; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.importDocument = function(doc) { | ||||||
|  |       var clonedRoot; | ||||||
|  |       clonedRoot = doc.root().clone(); | ||||||
|  |       clonedRoot.parent = this; | ||||||
|  |       clonedRoot.isRoot = false; | ||||||
|  |       this.children.push(clonedRoot); | ||||||
|  |       return this; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.debugInfo = function(name) { | ||||||
|  |       var ref2, ref3; | ||||||
|  |       name = name || this.name; | ||||||
|  |       if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { | ||||||
|  |         return ""; | ||||||
|  |       } else if (name == null) { | ||||||
|  |         return "parent: <" + this.parent.name + ">"; | ||||||
|  |       } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { | ||||||
|  |         return "node: <" + name + ">"; | ||||||
|  |       } else { | ||||||
|  |         return "node: <" + name + ">, parent: <" + this.parent.name + ">"; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.ele = function(name, attributes, text) { | ||||||
|  |       return this.element(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.nod = function(name, attributes, text) { | ||||||
|  |       return this.node(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.txt = function(value) { | ||||||
|  |       return this.text(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dat = function(value) { | ||||||
|  |       return this.cdata(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.com = function(value) { | ||||||
|  |       return this.comment(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.ins = function(target, value) { | ||||||
|  |       return this.instruction(target, value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.doc = function() { | ||||||
|  |       return this.document(); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.dec = function(version, encoding, standalone) { | ||||||
|  |       return this.declaration(version, encoding, standalone); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.e = function(name, attributes, text) { | ||||||
|  |       return this.element(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.n = function(name, attributes, text) { | ||||||
|  |       return this.node(name, attributes, text); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.t = function(value) { | ||||||
|  |       return this.text(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.d = function(value) { | ||||||
|  |       return this.cdata(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.c = function(value) { | ||||||
|  |       return this.comment(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.r = function(value) { | ||||||
|  |       return this.raw(value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.i = function(target, value) { | ||||||
|  |       return this.instruction(target, value); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.u = function() { | ||||||
|  |       return this.up(); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.importXMLBuilder = function(doc) { | ||||||
|  |       return this.importDocument(doc); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.replaceChild = function(newChild, oldChild) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.removeChild = function(oldChild) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.appendChild = function(newChild) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.hasChildNodes = function() { | ||||||
|  |       return this.children.length !== 0; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.cloneNode = function(deep) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.normalize = function() { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isSupported = function(feature, version) { | ||||||
|  |       return true; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.hasAttributes = function() { | ||||||
|  |       return this.attribs.length !== 0; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.compareDocumentPosition = function(other) { | ||||||
|  |       var ref, res; | ||||||
|  |       ref = this; | ||||||
|  |       if (ref === other) { | ||||||
|  |         return 0; | ||||||
|  |       } else if (this.document() !== other.document()) { | ||||||
|  |         res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; | ||||||
|  |         if (Math.random() < 0.5) { | ||||||
|  |           res |= DocumentPosition.Preceding; | ||||||
|  |         } else { | ||||||
|  |           res |= DocumentPosition.Following; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |       } else if (ref.isAncestor(other)) { | ||||||
|  |         return DocumentPosition.Contains | DocumentPosition.Preceding; | ||||||
|  |       } else if (ref.isDescendant(other)) { | ||||||
|  |         return DocumentPosition.Contains | DocumentPosition.Following; | ||||||
|  |       } else if (ref.isPreceding(other)) { | ||||||
|  |         return DocumentPosition.Preceding; | ||||||
|  |       } else { | ||||||
|  |         return DocumentPosition.Following; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isSameNode = function(other) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.lookupPrefix = function(namespaceURI) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.lookupNamespaceURI = function(prefix) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isEqualNode = function(node) { | ||||||
|  |       var i, j, ref2; | ||||||
|  |       if (node.nodeType !== this.nodeType) { | ||||||
|  |         return false; | ||||||
|  |       } | ||||||
|  |       if (node.children.length !== this.children.length) { | ||||||
|  |         return false; | ||||||
|  |       } | ||||||
|  |       for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { | ||||||
|  |         if (!this.children[i].isEqualNode(node.children[i])) { | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       return true; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.getFeature = function(feature, version) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.setUserData = function(key, data, handler) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.getUserData = function(key) { | ||||||
|  |       throw new Error("This DOM method is not implemented." + this.debugInfo()); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.contains = function(other) { | ||||||
|  |       if (!other) { | ||||||
|  |         return false; | ||||||
|  |       } | ||||||
|  |       return other === this || this.isDescendant(other); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isDescendant = function(node) { | ||||||
|  |       var child, isDescendantChild, j, len, ref2; | ||||||
|  |       ref2 = this.children; | ||||||
|  |       for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |         child = ref2[j]; | ||||||
|  |         if (node === child) { | ||||||
|  |           return true; | ||||||
|  |         } | ||||||
|  |         isDescendantChild = child.isDescendant(node); | ||||||
|  |         if (isDescendantChild) { | ||||||
|  |           return true; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       return false; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isAncestor = function(node) { | ||||||
|  |       return node.isDescendant(this); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isPreceding = function(node) { | ||||||
|  |       var nodePos, thisPos; | ||||||
|  |       nodePos = this.treePosition(node); | ||||||
|  |       thisPos = this.treePosition(this); | ||||||
|  |       if (nodePos === -1 || thisPos === -1) { | ||||||
|  |         return false; | ||||||
|  |       } else { | ||||||
|  |         return nodePos < thisPos; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.isFollowing = function(node) { | ||||||
|  |       var nodePos, thisPos; | ||||||
|  |       nodePos = this.treePosition(node); | ||||||
|  |       thisPos = this.treePosition(this); | ||||||
|  |       if (nodePos === -1 || thisPos === -1) { | ||||||
|  |         return false; | ||||||
|  |       } else { | ||||||
|  |         return nodePos > thisPos; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.treePosition = function(node) { | ||||||
|  |       var found, pos; | ||||||
|  |       pos = 0; | ||||||
|  |       found = false; | ||||||
|  |       this.foreachTreeNode(this.document(), function(childNode) { | ||||||
|  |         pos++; | ||||||
|  |         if (!found && childNode === node) { | ||||||
|  |           return found = true; | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |       if (found) { | ||||||
|  |         return pos; | ||||||
|  |       } else { | ||||||
|  |         return -1; | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     XMLNode.prototype.foreachTreeNode = function(node, func) { | ||||||
|  |       var child, j, len, ref2, res; | ||||||
|  |       node || (node = this.document()); | ||||||
|  |       ref2 = node.children; | ||||||
|  |       for (j = 0, len = ref2.length; j < len; j++) { | ||||||
|  |         child = ref2[j]; | ||||||
|  |         if (res = func(child)) { | ||||||
|  |           return res; | ||||||
|  |         } else { | ||||||
|  |           res = this.foreachTreeNode(child, func); | ||||||
|  |           if (res) { | ||||||
|  |             return res; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     return XMLNode; | ||||||
|  | 
 | ||||||
|  |   })(); | ||||||
|  | 
 | ||||||
|  | }).call(this); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 263: | /***/ 263: | ||||||
| @ -7386,7 +8271,7 @@ var MatchKind; | |||||||
|  * POSSIBILITY OF SUCH DAMAGE. |  * POSSIBILITY OF SUCH DAMAGE. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| const { fromCallback } = __webpack_require__(676); | const { fromCallback } = __webpack_require__(147); | ||||||
| const Store = __webpack_require__(338).Store; | const Store = __webpack_require__(338).Store; | ||||||
| const permuteDomain = __webpack_require__(89).permuteDomain; | const permuteDomain = __webpack_require__(89).permuteDomain; | ||||||
| const pathMatch = __webpack_require__(348).pathMatch; | const pathMatch = __webpack_require__(348).pathMatch; | ||||||
| @ -27667,7 +28552,7 @@ const Store = __webpack_require__(338).Store; | |||||||
| const MemoryCookieStore = __webpack_require__(332).MemoryCookieStore; | const MemoryCookieStore = __webpack_require__(332).MemoryCookieStore; | ||||||
| const pathMatch = __webpack_require__(348).pathMatch; | const pathMatch = __webpack_require__(348).pathMatch; | ||||||
| const VERSION = __webpack_require__(460); | const VERSION = __webpack_require__(460); | ||||||
| const { fromCallback } = __webpack_require__(676); | const { fromCallback } = __webpack_require__(147); | ||||||
| 
 | 
 | ||||||
| // From RFC6265 S4.1.1
 | // From RFC6265 S4.1.1
 | ||||||
| // note that it excludes \x3B ";"
 | // note that it excludes \x3B ";"
 | ||||||
| @ -29321,290 +30206,290 @@ module.exports = require("crypto"); | |||||||
| /***/ 422: | /***/ 422: | ||||||
| /***/ (function(module) { | /***/ (function(module) { | ||||||
| 
 | 
 | ||||||
| /*! ***************************************************************************** | /*! ***************************************************************************** | ||||||
| Copyright (c) Microsoft Corporation. | Copyright (c) Microsoft Corporation. | ||||||
| 
 | 
 | ||||||
| Permission to use, copy, modify, and/or distribute this software for any | Permission to use, copy, modify, and/or distribute this software for any | ||||||
| purpose with or without fee is hereby granted. | purpose with or without fee is hereby granted. | ||||||
| 
 | 
 | ||||||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||||||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||||||
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||||||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||||||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | 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 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||||||
| PERFORMANCE OF THIS SOFTWARE. | PERFORMANCE OF THIS SOFTWARE. | ||||||
| ***************************************************************************** */ | ***************************************************************************** */ | ||||||
| 
 | 
 | ||||||
| /* global global, define, System, Reflect, Promise */ | /* global global, define, System, Reflect, Promise */ | ||||||
| var __extends; | var __extends; | ||||||
| var __assign; | var __assign; | ||||||
| var __rest; | var __rest; | ||||||
| var __decorate; | var __decorate; | ||||||
| var __param; | var __param; | ||||||
| var __metadata; | var __metadata; | ||||||
| var __awaiter; | var __awaiter; | ||||||
| var __generator; | var __generator; | ||||||
| var __exportStar; | var __exportStar; | ||||||
| var __values; | var __values; | ||||||
| var __read; | var __read; | ||||||
| var __spread; | var __spread; | ||||||
| var __spreadArrays; | var __spreadArrays; | ||||||
| var __await; | var __await; | ||||||
| var __asyncGenerator; | var __asyncGenerator; | ||||||
| var __asyncDelegator; | var __asyncDelegator; | ||||||
| var __asyncValues; | var __asyncValues; | ||||||
| var __makeTemplateObject; | var __makeTemplateObject; | ||||||
| var __importStar; | var __importStar; | ||||||
| var __importDefault; | var __importDefault; | ||||||
| var __classPrivateFieldGet; | var __classPrivateFieldGet; | ||||||
| var __classPrivateFieldSet; | var __classPrivateFieldSet; | ||||||
| var __createBinding; | var __createBinding; | ||||||
| (function (factory) { | (function (factory) { | ||||||
|     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; |     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; | ||||||
|     if (typeof define === "function" && define.amd) { |     if (typeof define === "function" && define.amd) { | ||||||
|         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); |         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); | ||||||
|     } |     } | ||||||
|     else if ( true && typeof module.exports === "object") { |     else if ( true && typeof module.exports === "object") { | ||||||
|         factory(createExporter(root, createExporter(module.exports))); |         factory(createExporter(root, createExporter(module.exports))); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         factory(createExporter(root)); |         factory(createExporter(root)); | ||||||
|     } |     } | ||||||
|     function createExporter(exports, previous) { |     function createExporter(exports, previous) { | ||||||
|         if (exports !== root) { |         if (exports !== root) { | ||||||
|             if (typeof Object.create === "function") { |             if (typeof Object.create === "function") { | ||||||
|                 Object.defineProperty(exports, "__esModule", { value: true }); |                 Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 exports.__esModule = true; |                 exports.__esModule = true; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; |         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
| (function (exporter) { | (function (exporter) { | ||||||
|     var extendStatics = Object.setPrototypeOf || |     var extendStatics = Object.setPrototypeOf || | ||||||
|         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |         ({ __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]; }; |         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||||||
| 
 | 
 | ||||||
|     __extends = function (d, b) { |     __extends = function (d, b) { | ||||||
|         extendStatics(d, b); |         extendStatics(d, b); | ||||||
|         function __() { this.constructor = d; } |         function __() { this.constructor = d; } | ||||||
|         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __assign = Object.assign || function (t) { |     __assign = Object.assign || function (t) { | ||||||
|         for (var s, i = 1, n = arguments.length; i < n; i++) { |         for (var s, i = 1, n = arguments.length; i < n; i++) { | ||||||
|             s = arguments[i]; |             s = arguments[i]; | ||||||
|             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||||||
|         } |         } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __rest = function (s, e) { |     __rest = function (s, e) { | ||||||
|         var t = {}; |         var t = {}; | ||||||
|         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||||||
|             t[p] = s[p]; |             t[p] = s[p]; | ||||||
|         if (s != null && typeof Object.getOwnPropertySymbols === "function") |         if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||||||
|             for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |             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])) |                 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||||||
|                     t[p[i]] = s[p[i]]; |                     t[p[i]] = s[p[i]]; | ||||||
|             } |             } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __decorate = function (decorators, target, key, desc) { |     __decorate = function (decorators, target, key, desc) { | ||||||
|         var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |         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); |         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; |         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; |         return c > 3 && r && Object.defineProperty(target, key, r), r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __param = function (paramIndex, decorator) { |     __param = function (paramIndex, decorator) { | ||||||
|         return function (target, key) { decorator(target, key, paramIndex); } |         return function (target, key) { decorator(target, key, paramIndex); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __metadata = function (metadataKey, metadataValue) { |     __metadata = function (metadataKey, metadataValue) { | ||||||
|         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __awaiter = function (thisArg, _arguments, P, generator) { |     __awaiter = function (thisArg, _arguments, P, generator) { | ||||||
|         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|         return new (P || (P = Promise))(function (resolve, reject) { |         return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|             function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |             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 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); } |             function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|             step((generator = generator.apply(thisArg, _arguments || [])).next()); |             step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __generator = function (thisArg, body) { |     __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; |         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; |         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 verb(n) { return function (v) { return step([n, v]); }; } | ||||||
|         function step(op) { |         function step(op) { | ||||||
|             if (f) throw new TypeError("Generator is already executing."); |             if (f) throw new TypeError("Generator is already executing."); | ||||||
|             while (_) try { |             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 (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]; |                 if (y = 0, t) op = [op[0] & 2, t.value]; | ||||||
|                 switch (op[0]) { |                 switch (op[0]) { | ||||||
|                     case 0: case 1: t = op; break; |                     case 0: case 1: t = op; break; | ||||||
|                     case 4: _.label++; return { value: op[1], done: false }; |                     case 4: _.label++; return { value: op[1], done: false }; | ||||||
|                     case 5: _.label++; y = op[1]; op = [0]; continue; |                     case 5: _.label++; y = op[1]; op = [0]; continue; | ||||||
|                     case 7: op = _.ops.pop(); _.trys.pop(); continue; |                     case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||||||
|                     default: |                     default: | ||||||
|                         if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |                         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] === 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 (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 && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||||||
|                         if (t[2]) _.ops.pop(); |                         if (t[2]) _.ops.pop(); | ||||||
|                         _.trys.pop(); continue; |                         _.trys.pop(); continue; | ||||||
|                 } |                 } | ||||||
|                 op = body.call(thisArg, _); |                 op = body.call(thisArg, _); | ||||||
|             } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |             } 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 }; |             if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __createBinding = function(o, m, k, k2) { |     __createBinding = function(o, m, k, k2) { | ||||||
|         if (k2 === undefined) k2 = k; |         if (k2 === undefined) k2 = k; | ||||||
|         o[k2] = m[k]; |         o[k2] = m[k]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __exportStar = function (m, exports) { |     __exportStar = function (m, exports) { | ||||||
|         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; |         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __values = function (o) { |     __values = function (o) { | ||||||
|         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||||||
|         if (m) return m.call(o); |         if (m) return m.call(o); | ||||||
|         if (o && typeof o.length === "number") return { |         if (o && typeof o.length === "number") return { | ||||||
|             next: function () { |             next: function () { | ||||||
|                 if (o && i >= o.length) o = void 0; |                 if (o && i >= o.length) o = void 0; | ||||||
|                 return { value: o && o[i++], done: !o }; |                 return { value: o && o[i++], done: !o }; | ||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __read = function (o, n) { |     __read = function (o, n) { | ||||||
|         var m = typeof Symbol === "function" && o[Symbol.iterator]; |         var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||||||
|         if (!m) return o; |         if (!m) return o; | ||||||
|         var i = m.call(o), r, ar = [], e; |         var i = m.call(o), r, ar = [], e; | ||||||
|         try { |         try { | ||||||
|             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||||||
|         } |         } | ||||||
|         catch (error) { e = { error: error }; } |         catch (error) { e = { error: error }; } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (r && !r.done && (m = i["return"])) m.call(i); |                 if (r && !r.done && (m = i["return"])) m.call(i); | ||||||
|             } |             } | ||||||
|             finally { if (e) throw e.error; } |             finally { if (e) throw e.error; } | ||||||
|         } |         } | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spread = function () { |     __spread = function () { | ||||||
|         for (var ar = [], i = 0; i < arguments.length; i++) |         for (var ar = [], i = 0; i < arguments.length; i++) | ||||||
|             ar = ar.concat(__read(arguments[i])); |             ar = ar.concat(__read(arguments[i])); | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spreadArrays = function () { |     __spreadArrays = function () { | ||||||
|         for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |         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 r = Array(s), k = 0, i = 0; i < il; i++) | ||||||
|             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||||||
|                 r[k] = a[j]; |                 r[k] = a[j]; | ||||||
|         return r; |         return r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __await = function (v) { |     __await = function (v) { | ||||||
|         return this instanceof __await ? (this.v = v, this) : new __await(v); |         return this instanceof __await ? (this.v = v, this) : new __await(v); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncGenerator = function (thisArg, _arguments, generator) { |     __asyncGenerator = function (thisArg, _arguments, generator) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var g = generator.apply(thisArg, _arguments || []), i, q = []; |         var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||||||
|         return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |         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 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 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 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 fulfill(value) { resume("next", value); } | ||||||
|         function reject(value) { resume("throw", 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]); } |         function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncDelegator = function (o) { |     __asyncDelegator = function (o) { | ||||||
|         var i, p; |         var i, p; | ||||||
|         return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |         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; } |         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) { |     __asyncValues = function (o) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var m = o[Symbol.asyncIterator], i; |         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); |         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 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); } |         function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __makeTemplateObject = function (cooked, raw) { |     __makeTemplateObject = function (cooked, raw) { | ||||||
|         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||||||
|         return cooked; |         return cooked; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importStar = function (mod) { |     __importStar = function (mod) { | ||||||
|         if (mod && mod.__esModule) return mod; |         if (mod && mod.__esModule) return mod; | ||||||
|         var result = {}; |         var result = {}; | ||||||
|         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|         result["default"] = mod; |         result["default"] = mod; | ||||||
|         return result; |         return result; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importDefault = function (mod) { |     __importDefault = function (mod) { | ||||||
|         return (mod && mod.__esModule) ? mod : { "default": mod }; |         return (mod && mod.__esModule) ? mod : { "default": mod }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldGet = function (receiver, privateMap) { |     __classPrivateFieldGet = function (receiver, privateMap) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to get private field on non-instance"); |             throw new TypeError("attempted to get private field on non-instance"); | ||||||
|         } |         } | ||||||
|         return privateMap.get(receiver); |         return privateMap.get(receiver); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldSet = function (receiver, privateMap, value) { |     __classPrivateFieldSet = function (receiver, privateMap, value) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to set private field on non-instance"); |             throw new TypeError("attempted to set private field on non-instance"); | ||||||
|         } |         } | ||||||
|         privateMap.set(receiver, value); |         privateMap.set(receiver, value); | ||||||
|         return value; |         return value; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     exporter("__extends", __extends); |     exporter("__extends", __extends); | ||||||
|     exporter("__assign", __assign); |     exporter("__assign", __assign); | ||||||
|     exporter("__rest", __rest); |     exporter("__rest", __rest); | ||||||
|     exporter("__decorate", __decorate); |     exporter("__decorate", __decorate); | ||||||
|     exporter("__param", __param); |     exporter("__param", __param); | ||||||
|     exporter("__metadata", __metadata); |     exporter("__metadata", __metadata); | ||||||
|     exporter("__awaiter", __awaiter); |     exporter("__awaiter", __awaiter); | ||||||
|     exporter("__generator", __generator); |     exporter("__generator", __generator); | ||||||
|     exporter("__exportStar", __exportStar); |     exporter("__exportStar", __exportStar); | ||||||
|     exporter("__createBinding", __createBinding); |     exporter("__createBinding", __createBinding); | ||||||
|     exporter("__values", __values); |     exporter("__values", __values); | ||||||
|     exporter("__read", __read); |     exporter("__read", __read); | ||||||
|     exporter("__spread", __spread); |     exporter("__spread", __spread); | ||||||
|     exporter("__spreadArrays", __spreadArrays); |     exporter("__spreadArrays", __spreadArrays); | ||||||
|     exporter("__await", __await); |     exporter("__await", __await); | ||||||
|     exporter("__asyncGenerator", __asyncGenerator); |     exporter("__asyncGenerator", __asyncGenerator); | ||||||
|     exporter("__asyncDelegator", __asyncDelegator); |     exporter("__asyncDelegator", __asyncDelegator); | ||||||
|     exporter("__asyncValues", __asyncValues); |     exporter("__asyncValues", __asyncValues); | ||||||
|     exporter("__makeTemplateObject", __makeTemplateObject); |     exporter("__makeTemplateObject", __makeTemplateObject); | ||||||
|     exporter("__importStar", __importStar); |     exporter("__importStar", __importStar); | ||||||
|     exporter("__importDefault", __importDefault); |     exporter("__importDefault", __importDefault); | ||||||
|     exporter("__classPrivateFieldGet", __classPrivateFieldGet); |     exporter("__classPrivateFieldGet", __classPrivateFieldGet); | ||||||
|     exporter("__classPrivateFieldSet", __classPrivateFieldSet); |     exporter("__classPrivateFieldSet", __classPrivateFieldSet); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -30048,7 +30933,7 @@ var __createBinding; | |||||||
| /***/ (function(module, __unusedexports, __webpack_require__) { | /***/ (function(module, __unusedexports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| var iterate    = __webpack_require__(157) | var iterate    = __webpack_require__(157) | ||||||
|   , initState  = __webpack_require__(147) |   , initState  = __webpack_require__(903) | ||||||
|   , terminator = __webpack_require__(939) |   , terminator = __webpack_require__(939) | ||||||
|   ; |   ; | ||||||
| 
 | 
 | ||||||
| @ -30197,129 +31082,130 @@ function escapeProperty(s) { | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const exec_1 = __webpack_require__(986); | const exec_1 = __webpack_require__(986); | ||||||
| const io = __importStar(__webpack_require__(1)); | const io = __importStar(__webpack_require__(1)); | ||||||
| const fs_1 = __webpack_require__(747); | const fs_1 = __webpack_require__(747); | ||||||
| const path = __importStar(__webpack_require__(622)); | const path = __importStar(__webpack_require__(622)); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const constants_1 = __webpack_require__(931); | const constants_1 = __webpack_require__(931); | ||||||
| function getTarPath(args, compressionMethod) { | function getTarPath(args, compressionMethod) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const IS_WINDOWS = process.platform === 'win32'; |         const IS_WINDOWS = process.platform === 'win32'; | ||||||
|         if (IS_WINDOWS) { |         if (IS_WINDOWS) { | ||||||
|             const systemTar = `${process.env['windir']}\\System32\\tar.exe`; |             const systemTar = `${process.env['windir']}\\System32\\tar.exe`; | ||||||
|             if (compressionMethod !== constants_1.CompressionMethod.Gzip) { |             if (compressionMethod !== constants_1.CompressionMethod.Gzip) { | ||||||
|                 // We only use zstandard compression on windows when gnu tar is installed due to
 |                 // We only use zstandard compression on windows when gnu tar is installed due to
 | ||||||
|                 // a bug with compressing large files with bsdtar + zstd
 |                 // a bug with compressing large files with bsdtar + zstd
 | ||||||
|                 args.push('--force-local'); |                 args.push('--force-local'); | ||||||
|             } |             } | ||||||
|             else if (fs_1.existsSync(systemTar)) { |             else if (fs_1.existsSync(systemTar)) { | ||||||
|                 return systemTar; |                 return systemTar; | ||||||
|             } |             } | ||||||
|             else if (yield utils.isGnuTarInstalled()) { |             else if (yield utils.isGnuTarInstalled()) { | ||||||
|                 args.push('--force-local'); |                 args.push('--force-local'); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return yield io.which('tar', true); |         return yield io.which('tar', true); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function execTar(args, compressionMethod, cwd) { | function execTar(args, compressionMethod, cwd) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         try { |         try { | ||||||
|             yield exec_1.exec(`"${yield getTarPath(args, compressionMethod)}"`, args, { cwd }); |             yield exec_1.exec(`"${yield getTarPath(args, compressionMethod)}"`, args, { cwd }); | ||||||
|         } |         } | ||||||
|         catch (error) { |         catch (error) { | ||||||
|             throw new Error(`Tar failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); |             throw new Error(`Tar failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| function getWorkingDirectory() { | function getWorkingDirectory() { | ||||||
|     var _a; |     var _a; | ||||||
|     return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); |     return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); | ||||||
| } | } | ||||||
| function extractTar(archivePath, compressionMethod) { | function extractTar(archivePath, compressionMethod) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Create directory to extract tar into
 |         // Create directory to extract tar into
 | ||||||
|         const workingDirectory = getWorkingDirectory(); |         const workingDirectory = getWorkingDirectory(); | ||||||
|         yield io.mkdirP(workingDirectory); |         yield io.mkdirP(workingDirectory); | ||||||
|         // --d: Decompress.
 |         // --d: Decompress.
 | ||||||
|         // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit.
 |         // --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.
 |         // Using 30 here because we also support 32-bit self-hosted runners.
 | ||||||
|         function getCompressionProgram() { |         function getCompressionProgram() { | ||||||
|             switch (compressionMethod) { |             switch (compressionMethod) { | ||||||
|                 case constants_1.CompressionMethod.Zstd: |                 case constants_1.CompressionMethod.Zstd: | ||||||
|                     return ['--use-compress-program', 'zstd -d --long=30']; |                     return ['--use-compress-program', 'zstd -d --long=30']; | ||||||
|                 case constants_1.CompressionMethod.ZstdWithoutLong: |                 case constants_1.CompressionMethod.ZstdWithoutLong: | ||||||
|                     return ['--use-compress-program', 'zstd -d']; |                     return ['--use-compress-program', 'zstd -d']; | ||||||
|                 default: |                 default: | ||||||
|                     return ['-z']; |                     return ['-z']; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         const args = [ |         const args = [ | ||||||
|             ...getCompressionProgram(), |             ...getCompressionProgram(), | ||||||
|             '-xf', |             '-xf', | ||||||
|             archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), |             archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), | ||||||
|             '-P', |             '-P', | ||||||
|             '-C', |             '-C', | ||||||
|             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/') |             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/') | ||||||
|         ]; |         ]; | ||||||
|         yield execTar(args, compressionMethod); |         yield execTar(args, compressionMethod); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.extractTar = extractTar; | exports.extractTar = extractTar; | ||||||
| function createTar(archiveFolder, sourceDirectories, compressionMethod) { | function createTar(archiveFolder, sourceDirectories, compressionMethod) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Write source directories to manifest.txt to avoid command length limits
 |         // Write source directories to manifest.txt to avoid command length limits
 | ||||||
|         const manifestFilename = 'manifest.txt'; |         const manifestFilename = 'manifest.txt'; | ||||||
|         const cacheFileName = utils.getCacheFileName(compressionMethod); |         const cacheFileName = utils.getCacheFileName(compressionMethod); | ||||||
|         fs_1.writeFileSync(path.join(archiveFolder, manifestFilename), sourceDirectories.join('\n')); |         fs_1.writeFileSync(path.join(archiveFolder, manifestFilename), sourceDirectories.join('\n')); | ||||||
|         const workingDirectory = getWorkingDirectory(); |         const workingDirectory = getWorkingDirectory(); | ||||||
|         // -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores.
 |         // -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.
 |         // --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.
 |         // 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.
 |         // 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() { |         function getCompressionProgram() { | ||||||
|             switch (compressionMethod) { |             switch (compressionMethod) { | ||||||
|                 case constants_1.CompressionMethod.Zstd: |                 case constants_1.CompressionMethod.Zstd: | ||||||
|                     return ['--use-compress-program', 'zstd -T0 --long=30']; |                     return ['--use-compress-program', 'zstd -T0 --long=30']; | ||||||
|                 case constants_1.CompressionMethod.ZstdWithoutLong: |                 case constants_1.CompressionMethod.ZstdWithoutLong: | ||||||
|                     return ['--use-compress-program', 'zstd -T0']; |                     return ['--use-compress-program', 'zstd -T0']; | ||||||
|                 default: |                 default: | ||||||
|                     return ['-z']; |                     return ['-z']; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         const args = [ |         const args = [ | ||||||
|             ...getCompressionProgram(), |             '--posix', | ||||||
|             '-cf', |             ...getCompressionProgram(), | ||||||
|             cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), |             '-cf', | ||||||
|             '-P', |             cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), | ||||||
|             '-C', |             '-P', | ||||||
|             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), |             '-C', | ||||||
|             '--files-from', |             workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), | ||||||
|             manifestFilename |             '--files-from', | ||||||
|         ]; |             manifestFilename | ||||||
|         yield execTar(args, compressionMethod, archiveFolder); |         ]; | ||||||
|     }); |         yield execTar(args, compressionMethod, archiveFolder); | ||||||
| } |     }); | ||||||
| exports.createTar = createTar; | } | ||||||
|  | exports.createTar = createTar; | ||||||
| //# sourceMappingURL=tar.js.map
 | //# sourceMappingURL=tar.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -32449,7 +33335,7 @@ module.exports = '4.0.0' | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -33132,67 +34018,67 @@ module.exports = {"application/1d-interleaved-parityfec":{"source":"iana"},"appl | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| /** | /** | ||||||
|  * Returns a copy of the upload options with defaults filled in. |  * Returns a copy of the upload options with defaults filled in. | ||||||
|  * |  * | ||||||
|  * @param copy the original upload options |  * @param copy the original upload options | ||||||
|  */ |  */ | ||||||
| function getUploadOptions(copy) { | function getUploadOptions(copy) { | ||||||
|     const result = { |     const result = { | ||||||
|         uploadConcurrency: 4, |         uploadConcurrency: 4, | ||||||
|         uploadChunkSize: 32 * 1024 * 1024 |         uploadChunkSize: 32 * 1024 * 1024 | ||||||
|     }; |     }; | ||||||
|     if (copy) { |     if (copy) { | ||||||
|         if (typeof copy.uploadConcurrency === 'number') { |         if (typeof copy.uploadConcurrency === 'number') { | ||||||
|             result.uploadConcurrency = copy.uploadConcurrency; |             result.uploadConcurrency = copy.uploadConcurrency; | ||||||
|         } |         } | ||||||
|         if (typeof copy.uploadChunkSize === 'number') { |         if (typeof copy.uploadChunkSize === 'number') { | ||||||
|             result.uploadChunkSize = copy.uploadChunkSize; |             result.uploadChunkSize = copy.uploadChunkSize; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     core.debug(`Upload concurrency: ${result.uploadConcurrency}`); |     core.debug(`Upload concurrency: ${result.uploadConcurrency}`); | ||||||
|     core.debug(`Upload chunk size: ${result.uploadChunkSize}`); |     core.debug(`Upload chunk size: ${result.uploadChunkSize}`); | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| exports.getUploadOptions = getUploadOptions; | exports.getUploadOptions = getUploadOptions; | ||||||
| /** | /** | ||||||
|  * Returns a copy of the download options with defaults filled in. |  * Returns a copy of the download options with defaults filled in. | ||||||
|  * |  * | ||||||
|  * @param copy the original download options |  * @param copy the original download options | ||||||
|  */ |  */ | ||||||
| function getDownloadOptions(copy) { | function getDownloadOptions(copy) { | ||||||
|     const result = { |     const result = { | ||||||
|         useAzureSdk: true, |         useAzureSdk: true, | ||||||
|         downloadConcurrency: 8, |         downloadConcurrency: 8, | ||||||
|         timeoutInMs: 30000 |         timeoutInMs: 30000 | ||||||
|     }; |     }; | ||||||
|     if (copy) { |     if (copy) { | ||||||
|         if (typeof copy.useAzureSdk === 'boolean') { |         if (typeof copy.useAzureSdk === 'boolean') { | ||||||
|             result.useAzureSdk = copy.useAzureSdk; |             result.useAzureSdk = copy.useAzureSdk; | ||||||
|         } |         } | ||||||
|         if (typeof copy.downloadConcurrency === 'number') { |         if (typeof copy.downloadConcurrency === 'number') { | ||||||
|             result.downloadConcurrency = copy.downloadConcurrency; |             result.downloadConcurrency = copy.downloadConcurrency; | ||||||
|         } |         } | ||||||
|         if (typeof copy.timeoutInMs === 'number') { |         if (typeof copy.timeoutInMs === 'number') { | ||||||
|             result.timeoutInMs = copy.timeoutInMs; |             result.timeoutInMs = copy.timeoutInMs; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     core.debug(`Use Azure SDK: ${result.useAzureSdk}`); |     core.debug(`Use Azure SDK: ${result.useAzureSdk}`); | ||||||
|     core.debug(`Download concurrency: ${result.downloadConcurrency}`); |     core.debug(`Download concurrency: ${result.downloadConcurrency}`); | ||||||
|     core.debug(`Request timeout (ms): ${result.timeoutInMs}`); |     core.debug(`Request timeout (ms): ${result.timeoutInMs}`); | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
| exports.getDownloadOptions = getDownloadOptions; | exports.getDownloadOptions = getDownloadOptions; | ||||||
| //# sourceMappingURL=options.js.map
 | //# sourceMappingURL=options.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -34018,7 +34904,7 @@ CombinedStream.prototype._emitError = function(err) { | |||||||
| 
 | 
 | ||||||
|   XMLDOMConfiguration = __webpack_require__(524); |   XMLDOMConfiguration = __webpack_require__(524); | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -34542,6 +35428,36 @@ Object.defineProperty(exports, "v5", { | |||||||
|     return _v4.default; |     return _v4.default; | ||||||
|   } |   } | ||||||
| }); | }); | ||||||
|  | Object.defineProperty(exports, "NIL", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _nil.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "version", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _version.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "validate", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _validate.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "stringify", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _stringify.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  | Object.defineProperty(exports, "parse", { | ||||||
|  |   enumerable: true, | ||||||
|  |   get: function () { | ||||||
|  |     return _parse.default; | ||||||
|  |   } | ||||||
|  | }); | ||||||
| 
 | 
 | ||||||
| var _v = _interopRequireDefault(__webpack_require__(173)); | var _v = _interopRequireDefault(__webpack_require__(173)); | ||||||
| 
 | 
 | ||||||
| @ -34551,6 +35467,16 @@ var _v3 = _interopRequireDefault(__webpack_require__(606)); | |||||||
| 
 | 
 | ||||||
| var _v4 = _interopRequireDefault(__webpack_require__(90)); | var _v4 = _interopRequireDefault(__webpack_require__(90)); | ||||||
| 
 | 
 | ||||||
|  | var _nil = _interopRequireDefault(__webpack_require__(24)); | ||||||
|  | 
 | ||||||
|  | var _version = _interopRequireDefault(__webpack_require__(104)); | ||||||
|  | 
 | ||||||
|  | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
|  | 
 | ||||||
|  | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
|  | 
 | ||||||
|  | var _parse = _interopRequireDefault(__webpack_require__(197)); | ||||||
|  | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -34940,7 +35866,7 @@ exports.default = void 0; | |||||||
| 
 | 
 | ||||||
| var _rng = _interopRequireDefault(__webpack_require__(733)); | var _rng = _interopRequireDefault(__webpack_require__(733)); | ||||||
| 
 | 
 | ||||||
| var _bytesToUuid = _interopRequireDefault(__webpack_require__(940)); | var _stringify = _interopRequireDefault(__webpack_require__(855)); | ||||||
| 
 | 
 | ||||||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
| @ -34963,7 +35889,7 @@ function v4(options, buf, offset) { | |||||||
|     return buf; |     return buf; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return (0, _bytesToUuid.default)(rnds); |   return (0, _stringify.default)(rnds); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var _default = v4; | var _default = v4; | ||||||
| @ -35231,7 +36157,7 @@ module.exports = require("net"); | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   module.exports = XMLCharacterData = (function(superClass) { |   module.exports = XMLCharacterData = (function(superClass) { | ||||||
|     extend(XMLCharacterData, superClass); |     extend(XMLCharacterData, superClass); | ||||||
| @ -36934,7 +37860,7 @@ module.exports = require("net"); | |||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   module.exports = XMLRaw = (function(superClass) { |   module.exports = XMLRaw = (function(superClass) { | ||||||
|     extend(XMLRaw, superClass); |     extend(XMLRaw, superClass); | ||||||
| @ -36976,7 +37902,7 @@ module.exports = require("net"); | |||||||
| 
 | 
 | ||||||
|   isObject = __webpack_require__(582).isObject; |   isObject = __webpack_require__(582).isObject; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -37335,35 +38261,26 @@ function isUnixExecutable(stats) { | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 676: | /***/ 676: | ||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| exports.fromCallback = function (fn) { | Object.defineProperty(exports, "__esModule", { | ||||||
|   return Object.defineProperty(function () { |   value: true | ||||||
|     if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) | }); | ||||||
|     else { | exports.default = void 0; | ||||||
|       return new Promise((resolve, reject) => { | 
 | ||||||
|         arguments[arguments.length] = (err, res) => { | var _regex = _interopRequireDefault(__webpack_require__(238)); | ||||||
|           if (err) return reject(err) | 
 | ||||||
|           resolve(res) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
|         } | 
 | ||||||
|         arguments.length++ | function validate(uuid) { | ||||||
|         fn.apply(this, arguments) |   return typeof uuid === 'string' && _regex.default.test(uuid); | ||||||
|       }) |  | ||||||
|     } |  | ||||||
|   }, 'name', { value: fn.name }) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| exports.fromPromise = function (fn) { |  | ||||||
|   return Object.defineProperty(function () { |  | ||||||
|     const cb = arguments[arguments.length - 1] |  | ||||||
|     if (typeof cb !== 'function') return fn.apply(this, arguments) |  | ||||||
|     else fn.apply(this, arguments).then(r => cb(null, r), cb) |  | ||||||
|   }, 'name', { value: fn.name }) |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | var _default = validate; | ||||||
|  | exports.default = _default; | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| @ -37486,152 +38403,152 @@ exports.default = run; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const path = __importStar(__webpack_require__(622)); | const path = __importStar(__webpack_require__(622)); | ||||||
| const utils = __importStar(__webpack_require__(15)); | const utils = __importStar(__webpack_require__(15)); | ||||||
| const cacheHttpClient = __importStar(__webpack_require__(114)); | const cacheHttpClient = __importStar(__webpack_require__(114)); | ||||||
| const tar_1 = __webpack_require__(434); | const tar_1 = __webpack_require__(434); | ||||||
| class ValidationError extends Error { | class ValidationError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|         this.name = 'ValidationError'; |         this.name = 'ValidationError'; | ||||||
|         Object.setPrototypeOf(this, ValidationError.prototype); |         Object.setPrototypeOf(this, ValidationError.prototype); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| exports.ValidationError = ValidationError; | exports.ValidationError = ValidationError; | ||||||
| class ReserveCacheError extends Error { | class ReserveCacheError extends Error { | ||||||
|     constructor(message) { |     constructor(message) { | ||||||
|         super(message); |         super(message); | ||||||
|         this.name = 'ReserveCacheError'; |         this.name = 'ReserveCacheError'; | ||||||
|         Object.setPrototypeOf(this, ReserveCacheError.prototype); |         Object.setPrototypeOf(this, ReserveCacheError.prototype); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| exports.ReserveCacheError = ReserveCacheError; | exports.ReserveCacheError = ReserveCacheError; | ||||||
| function checkPaths(paths) { | function checkPaths(paths) { | ||||||
|     if (!paths || paths.length === 0) { |     if (!paths || paths.length === 0) { | ||||||
|         throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); |         throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| function checkKey(key) { | function checkKey(key) { | ||||||
|     if (key.length > 512) { |     if (key.length > 512) { | ||||||
|         throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); |         throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); | ||||||
|     } |     } | ||||||
|     const regex = /^[^,]*$/; |     const regex = /^[^,]*$/; | ||||||
|     if (!regex.test(key)) { |     if (!regex.test(key)) { | ||||||
|         throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); |         throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| /** | /** | ||||||
|  * Restores cache from keys |  * Restores cache from keys | ||||||
|  * |  * | ||||||
|  * @param paths a list of file paths to restore from the cache |  * @param paths a list of file paths to restore from the cache | ||||||
|  * @param primaryKey an explicit key for restoring 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 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 |  * @param downloadOptions cache download options | ||||||
|  * @returns string returns the key for the cache hit, otherwise returns undefined |  * @returns string returns the key for the cache hit, otherwise returns undefined | ||||||
|  */ |  */ | ||||||
| function restoreCache(paths, primaryKey, restoreKeys, options) { | function restoreCache(paths, primaryKey, restoreKeys, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         checkPaths(paths); |         checkPaths(paths); | ||||||
|         restoreKeys = restoreKeys || []; |         restoreKeys = restoreKeys || []; | ||||||
|         const keys = [primaryKey, ...restoreKeys]; |         const keys = [primaryKey, ...restoreKeys]; | ||||||
|         core.debug('Resolved Keys:'); |         core.debug('Resolved Keys:'); | ||||||
|         core.debug(JSON.stringify(keys)); |         core.debug(JSON.stringify(keys)); | ||||||
|         if (keys.length > 10) { |         if (keys.length > 10) { | ||||||
|             throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); |             throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); | ||||||
|         } |         } | ||||||
|         for (const key of keys) { |         for (const key of keys) { | ||||||
|             checkKey(key); |             checkKey(key); | ||||||
|         } |         } | ||||||
|         const compressionMethod = yield utils.getCompressionMethod(); |         const compressionMethod = yield utils.getCompressionMethod(); | ||||||
|         // path are needed to compute version
 |         // path are needed to compute version
 | ||||||
|         const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { |         const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { | ||||||
|             compressionMethod |             compressionMethod | ||||||
|         }); |         }); | ||||||
|         if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { |         if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { | ||||||
|             // Cache not found
 |             // Cache not found
 | ||||||
|             return undefined; |             return undefined; | ||||||
|         } |         } | ||||||
|         const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); |         const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); | ||||||
|         core.debug(`Archive Path: ${archivePath}`); |         core.debug(`Archive Path: ${archivePath}`); | ||||||
|         try { |         try { | ||||||
|             // Download the cache from the cache entry
 |             // Download the cache from the cache entry
 | ||||||
|             yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); |             yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); | ||||||
|             const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); |             const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|             core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); |             core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); | ||||||
|             yield tar_1.extractTar(archivePath, compressionMethod); |             yield tar_1.extractTar(archivePath, compressionMethod); | ||||||
|         } |         } | ||||||
|         finally { |         finally { | ||||||
|             // Try to delete the archive to save space
 |             // Try to delete the archive to save space
 | ||||||
|             try { |             try { | ||||||
|                 yield utils.unlinkFile(archivePath); |                 yield utils.unlinkFile(archivePath); | ||||||
|             } |             } | ||||||
|             catch (error) { |             catch (error) { | ||||||
|                 core.debug(`Failed to delete archive: ${error}`); |                 core.debug(`Failed to delete archive: ${error}`); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return cacheEntry.cacheKey; |         return cacheEntry.cacheKey; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.restoreCache = restoreCache; | exports.restoreCache = restoreCache; | ||||||
| /** | /** | ||||||
|  * Saves a list of files with the specified key |  * Saves a list of files with the specified key | ||||||
|  * |  * | ||||||
|  * @param paths a list of file paths to be cached |  * @param paths a list of file paths to be cached | ||||||
|  * @param key an explicit key for restoring the cache |  * @param key an explicit key for restoring the cache | ||||||
|  * @param options cache upload options |  * @param options cache upload options | ||||||
|  * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails |  * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails | ||||||
|  */ |  */ | ||||||
| function saveCache(paths, key, options) { | function saveCache(paths, key, options) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         checkPaths(paths); |         checkPaths(paths); | ||||||
|         checkKey(key); |         checkKey(key); | ||||||
|         const compressionMethod = yield utils.getCompressionMethod(); |         const compressionMethod = yield utils.getCompressionMethod(); | ||||||
|         core.debug('Reserving Cache'); |         core.debug('Reserving Cache'); | ||||||
|         const cacheId = yield cacheHttpClient.reserveCache(key, paths, { |         const cacheId = yield cacheHttpClient.reserveCache(key, paths, { | ||||||
|             compressionMethod |             compressionMethod | ||||||
|         }); |         }); | ||||||
|         if (cacheId === -1) { |         if (cacheId === -1) { | ||||||
|             throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); |             throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); | ||||||
|         } |         } | ||||||
|         core.debug(`Cache ID: ${cacheId}`); |         core.debug(`Cache ID: ${cacheId}`); | ||||||
|         const cachePaths = yield utils.resolvePaths(paths); |         const cachePaths = yield utils.resolvePaths(paths); | ||||||
|         core.debug('Cache Paths:'); |         core.debug('Cache Paths:'); | ||||||
|         core.debug(`${JSON.stringify(cachePaths)}`); |         core.debug(`${JSON.stringify(cachePaths)}`); | ||||||
|         const archiveFolder = yield utils.createTempDirectory(); |         const archiveFolder = yield utils.createTempDirectory(); | ||||||
|         const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); |         const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); | ||||||
|         core.debug(`Archive Path: ${archivePath}`); |         core.debug(`Archive Path: ${archivePath}`); | ||||||
|         yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod); |         yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod); | ||||||
|         const fileSizeLimit = 5 * 1024 * 1024 * 1024; // 5GB per repo limit
 |         const fileSizeLimit = 5 * 1024 * 1024 * 1024; // 5GB per repo limit
 | ||||||
|         const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); |         const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); | ||||||
|         core.debug(`File Size: ${archiveFileSize}`); |         core.debug(`File Size: ${archiveFileSize}`); | ||||||
|         if (archiveFileSize > fileSizeLimit) { |         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.`); |             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})`); |         core.debug(`Saving Cache (ID: ${cacheId})`); | ||||||
|         yield cacheHttpClient.saveCache(cacheId, archivePath, options); |         yield cacheHttpClient.saveCache(cacheId, archivePath, options); | ||||||
|         return cacheId; |         return cacheId; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.saveCache = saveCache; | exports.saveCache = saveCache; | ||||||
| //# sourceMappingURL=cache.js.map
 | //# sourceMappingURL=cache.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -37852,7 +38769,7 @@ function rng() { | |||||||
| 
 | 
 | ||||||
|   isObject = __webpack_require__(582).isObject; |   isObject = __webpack_require__(582).isObject; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -38045,7 +38962,7 @@ function rng() { | |||||||
| 
 | 
 | ||||||
|   isObject = __webpack_require__(582).isObject; |   isObject = __webpack_require__(582).isObject; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -39910,7 +40827,7 @@ module.exports = require("stream"); | |||||||
| 
 | 
 | ||||||
|   ref = __webpack_require__(582), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; |   ref = __webpack_require__(582), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -40213,7 +41130,7 @@ module.exports = require("stream"); | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -40328,1092 +41245,346 @@ module.exports = __webpack_require__(512) | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 855: | /***/ 855: | ||||||
| /***/ (function(module, __unusedexports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| // Generated by CoffeeScript 1.12.7
 | "use strict"; | ||||||
| (function() { |  | ||||||
|   var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, |  | ||||||
|     hasProp = {}.hasOwnProperty; |  | ||||||
| 
 | 
 | ||||||
|   ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; |  | ||||||
| 
 | 
 | ||||||
|   XMLElement = null; | Object.defineProperty(exports, "__esModule", { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | exports.default = void 0; | ||||||
| 
 | 
 | ||||||
|   XMLCData = null; | var _validate = _interopRequireDefault(__webpack_require__(676)); | ||||||
| 
 | 
 | ||||||
|   XMLComment = null; | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||||||
| 
 | 
 | ||||||
|   XMLDeclaration = null; | /** | ||||||
|  |  * Convert array of 16 byte values to UUID string format of the form: | ||||||
|  |  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | ||||||
|  |  */ | ||||||
|  | const byteToHex = []; | ||||||
| 
 | 
 | ||||||
|   XMLDocType = null; | for (let i = 0; i < 256; ++i) { | ||||||
|  |   byteToHex.push((i + 0x100).toString(16).substr(1)); | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
|   XMLRaw = null; | function stringify(arr, offset = 0) { | ||||||
|  |   // Note: Be careful editing this code!  It's been tuned for performance
 | ||||||
|  |   // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
 | ||||||
|  |   const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID.  If this throws, it's likely due to one
 | ||||||
|  |   // of the following:
 | ||||||
|  |   // - One or more input array values don't map to a hex octet (leading to
 | ||||||
|  |   // "undefined" in the uuid)
 | ||||||
|  |   // - Invalid input values for the RFC `version` or `variant` fields
 | ||||||
| 
 | 
 | ||||||
|   XMLText = null; |   if (!(0, _validate.default)(uuid)) { | ||||||
|  |     throw TypeError('Stringified UUID is invalid'); | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   XMLProcessingInstruction = null; |   return uuid; | ||||||
| 
 | } | ||||||
|   XMLDummy = null; |  | ||||||
| 
 |  | ||||||
|   NodeType = null; |  | ||||||
| 
 |  | ||||||
|   XMLNodeList = null; |  | ||||||
| 
 |  | ||||||
|   XMLNamedNodeMap = null; |  | ||||||
| 
 |  | ||||||
|   DocumentPosition = null; |  | ||||||
| 
 |  | ||||||
|   module.exports = XMLNode = (function() { |  | ||||||
|     function XMLNode(parent1) { |  | ||||||
|       this.parent = parent1; |  | ||||||
|       if (this.parent) { |  | ||||||
|         this.options = this.parent.options; |  | ||||||
|         this.stringify = this.parent.stringify; |  | ||||||
|       } |  | ||||||
|       this.value = null; |  | ||||||
|       this.children = []; |  | ||||||
|       this.baseURI = null; |  | ||||||
|       if (!XMLElement) { |  | ||||||
|         XMLElement = __webpack_require__(796); |  | ||||||
|         XMLCData = __webpack_require__(657); |  | ||||||
|         XMLComment = __webpack_require__(919); |  | ||||||
|         XMLDeclaration = __webpack_require__(738); |  | ||||||
|         XMLDocType = __webpack_require__(735); |  | ||||||
|         XMLRaw = __webpack_require__(660); |  | ||||||
|         XMLText = __webpack_require__(708); |  | ||||||
|         XMLProcessingInstruction = __webpack_require__(491); |  | ||||||
|         XMLDummy = __webpack_require__(956); |  | ||||||
|         NodeType = __webpack_require__(683); |  | ||||||
|         XMLNodeList = __webpack_require__(265); |  | ||||||
|         XMLNamedNodeMap = __webpack_require__(451); |  | ||||||
|         DocumentPosition = __webpack_require__(65); |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nodeName', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.name; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nodeType', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.type; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nodeValue', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.value; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'parentNode', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.parent; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'childNodes', { |  | ||||||
|       get: function() { |  | ||||||
|         if (!this.childNodeList || !this.childNodeList.nodes) { |  | ||||||
|           this.childNodeList = new XMLNodeList(this.children); |  | ||||||
|         } |  | ||||||
|         return this.childNodeList; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'firstChild', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.children[0] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'lastChild', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.children[this.children.length - 1] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'previousSibling', { |  | ||||||
|       get: function() { |  | ||||||
|         var i; |  | ||||||
|         i = this.parent.children.indexOf(this); |  | ||||||
|         return this.parent.children[i - 1] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'nextSibling', { |  | ||||||
|       get: function() { |  | ||||||
|         var i; |  | ||||||
|         i = this.parent.children.indexOf(this); |  | ||||||
|         return this.parent.children[i + 1] || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'ownerDocument', { |  | ||||||
|       get: function() { |  | ||||||
|         return this.document() || null; |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     Object.defineProperty(XMLNode.prototype, 'textContent', { |  | ||||||
|       get: function() { |  | ||||||
|         var child, j, len, ref2, str; |  | ||||||
|         if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { |  | ||||||
|           str = ''; |  | ||||||
|           ref2 = this.children; |  | ||||||
|           for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|             child = ref2[j]; |  | ||||||
|             if (child.textContent) { |  | ||||||
|               str += child.textContent; |  | ||||||
|             } |  | ||||||
|           } |  | ||||||
|           return str; |  | ||||||
|         } else { |  | ||||||
|           return null; |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       set: function(value) { |  | ||||||
|         throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.setParent = function(parent) { |  | ||||||
|       var child, j, len, ref2, results; |  | ||||||
|       this.parent = parent; |  | ||||||
|       if (parent) { |  | ||||||
|         this.options = parent.options; |  | ||||||
|         this.stringify = parent.stringify; |  | ||||||
|       } |  | ||||||
|       ref2 = this.children; |  | ||||||
|       results = []; |  | ||||||
|       for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|         child = ref2[j]; |  | ||||||
|         results.push(child.setParent(this)); |  | ||||||
|       } |  | ||||||
|       return results; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.element = function(name, attributes, text) { |  | ||||||
|       var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; |  | ||||||
|       lastChild = null; |  | ||||||
|       if (attributes === null && (text == null)) { |  | ||||||
|         ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; |  | ||||||
|       } |  | ||||||
|       if (attributes == null) { |  | ||||||
|         attributes = {}; |  | ||||||
|       } |  | ||||||
|       attributes = getValue(attributes); |  | ||||||
|       if (!isObject(attributes)) { |  | ||||||
|         ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; |  | ||||||
|       } |  | ||||||
|       if (name != null) { |  | ||||||
|         name = getValue(name); |  | ||||||
|       } |  | ||||||
|       if (Array.isArray(name)) { |  | ||||||
|         for (j = 0, len = name.length; j < len; j++) { |  | ||||||
|           item = name[j]; |  | ||||||
|           lastChild = this.element(item); |  | ||||||
|         } |  | ||||||
|       } else if (isFunction(name)) { |  | ||||||
|         lastChild = this.element(name.apply()); |  | ||||||
|       } else if (isObject(name)) { |  | ||||||
|         for (key in name) { |  | ||||||
|           if (!hasProp.call(name, key)) continue; |  | ||||||
|           val = name[key]; |  | ||||||
|           if (isFunction(val)) { |  | ||||||
|             val = val.apply(); |  | ||||||
|           } |  | ||||||
|           if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { |  | ||||||
|             lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); |  | ||||||
|           } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { |  | ||||||
|             lastChild = this.dummy(); |  | ||||||
|           } else if (isObject(val) && isEmpty(val)) { |  | ||||||
|             lastChild = this.element(key); |  | ||||||
|           } else if (!this.options.keepNullNodes && (val == null)) { |  | ||||||
|             lastChild = this.dummy(); |  | ||||||
|           } else if (!this.options.separateArrayItems && Array.isArray(val)) { |  | ||||||
|             for (k = 0, len1 = val.length; k < len1; k++) { |  | ||||||
|               item = val[k]; |  | ||||||
|               childNode = {}; |  | ||||||
|               childNode[key] = item; |  | ||||||
|               lastChild = this.element(childNode); |  | ||||||
|             } |  | ||||||
|           } else if (isObject(val)) { |  | ||||||
|             if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { |  | ||||||
|               lastChild = this.element(val); |  | ||||||
|             } else { |  | ||||||
|               lastChild = this.element(key); |  | ||||||
|               lastChild.element(val); |  | ||||||
|             } |  | ||||||
|           } else { |  | ||||||
|             lastChild = this.element(key, val); |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } else if (!this.options.keepNullNodes && text === null) { |  | ||||||
|         lastChild = this.dummy(); |  | ||||||
|       } else { |  | ||||||
|         if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { |  | ||||||
|           lastChild = this.text(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { |  | ||||||
|           lastChild = this.cdata(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { |  | ||||||
|           lastChild = this.comment(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { |  | ||||||
|           lastChild = this.raw(text); |  | ||||||
|         } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { |  | ||||||
|           lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); |  | ||||||
|         } else { |  | ||||||
|           lastChild = this.node(name, attributes, text); |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       if (lastChild == null) { |  | ||||||
|         throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       return lastChild; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.insertBefore = function(name, attributes, text) { |  | ||||||
|       var child, i, newChild, refChild, removed; |  | ||||||
|       if (name != null ? name.type : void 0) { |  | ||||||
|         newChild = name; |  | ||||||
|         refChild = attributes; |  | ||||||
|         newChild.setParent(this); |  | ||||||
|         if (refChild) { |  | ||||||
|           i = children.indexOf(refChild); |  | ||||||
|           removed = children.splice(i); |  | ||||||
|           children.push(newChild); |  | ||||||
|           Array.prototype.push.apply(children, removed); |  | ||||||
|         } else { |  | ||||||
|           children.push(newChild); |  | ||||||
|         } |  | ||||||
|         return newChild; |  | ||||||
|       } else { |  | ||||||
|         if (this.isRoot) { |  | ||||||
|           throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); |  | ||||||
|         } |  | ||||||
|         i = this.parent.children.indexOf(this); |  | ||||||
|         removed = this.parent.children.splice(i); |  | ||||||
|         child = this.parent.element(name, attributes, text); |  | ||||||
|         Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|         return child; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.insertAfter = function(name, attributes, text) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       if (this.isRoot) { |  | ||||||
|         throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); |  | ||||||
|       } |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i + 1); |  | ||||||
|       child = this.parent.element(name, attributes, text); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return child; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.remove = function() { |  | ||||||
|       var i, ref2; |  | ||||||
|       if (this.isRoot) { |  | ||||||
|         throw new Error("Cannot remove the root element. " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; |  | ||||||
|       return this.parent; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.node = function(name, attributes, text) { |  | ||||||
|       var child, ref2; |  | ||||||
|       if (name != null) { |  | ||||||
|         name = getValue(name); |  | ||||||
|       } |  | ||||||
|       attributes || (attributes = {}); |  | ||||||
|       attributes = getValue(attributes); |  | ||||||
|       if (!isObject(attributes)) { |  | ||||||
|         ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; |  | ||||||
|       } |  | ||||||
|       child = new XMLElement(this, name, attributes); |  | ||||||
|       if (text != null) { |  | ||||||
|         child.text(text); |  | ||||||
|       } |  | ||||||
|       this.children.push(child); |  | ||||||
|       return child; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.text = function(value) { |  | ||||||
|       var child; |  | ||||||
|       if (isObject(value)) { |  | ||||||
|         this.element(value); |  | ||||||
|       } |  | ||||||
|       child = new XMLText(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.cdata = function(value) { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLCData(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.comment = function(value) { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLComment(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.commentBefore = function(value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i); |  | ||||||
|       child = this.parent.comment(value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.commentAfter = function(value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i + 1); |  | ||||||
|       child = this.parent.comment(value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.raw = function(value) { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLRaw(this, value); |  | ||||||
|       this.children.push(child); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dummy = function() { |  | ||||||
|       var child; |  | ||||||
|       child = new XMLDummy(this); |  | ||||||
|       return child; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.instruction = function(target, value) { |  | ||||||
|       var insTarget, insValue, instruction, j, len; |  | ||||||
|       if (target != null) { |  | ||||||
|         target = getValue(target); |  | ||||||
|       } |  | ||||||
|       if (value != null) { |  | ||||||
|         value = getValue(value); |  | ||||||
|       } |  | ||||||
|       if (Array.isArray(target)) { |  | ||||||
|         for (j = 0, len = target.length; j < len; j++) { |  | ||||||
|           insTarget = target[j]; |  | ||||||
|           this.instruction(insTarget); |  | ||||||
|         } |  | ||||||
|       } else if (isObject(target)) { |  | ||||||
|         for (insTarget in target) { |  | ||||||
|           if (!hasProp.call(target, insTarget)) continue; |  | ||||||
|           insValue = target[insTarget]; |  | ||||||
|           this.instruction(insTarget, insValue); |  | ||||||
|         } |  | ||||||
|       } else { |  | ||||||
|         if (isFunction(value)) { |  | ||||||
|           value = value.apply(); |  | ||||||
|         } |  | ||||||
|         instruction = new XMLProcessingInstruction(this, target, value); |  | ||||||
|         this.children.push(instruction); |  | ||||||
|       } |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.instructionBefore = function(target, value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i); |  | ||||||
|       child = this.parent.instruction(target, value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.instructionAfter = function(target, value) { |  | ||||||
|       var child, i, removed; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       removed = this.parent.children.splice(i + 1); |  | ||||||
|       child = this.parent.instruction(target, value); |  | ||||||
|       Array.prototype.push.apply(this.parent.children, removed); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.declaration = function(version, encoding, standalone) { |  | ||||||
|       var doc, xmldec; |  | ||||||
|       doc = this.document(); |  | ||||||
|       xmldec = new XMLDeclaration(doc, version, encoding, standalone); |  | ||||||
|       if (doc.children.length === 0) { |  | ||||||
|         doc.children.unshift(xmldec); |  | ||||||
|       } else if (doc.children[0].type === NodeType.Declaration) { |  | ||||||
|         doc.children[0] = xmldec; |  | ||||||
|       } else { |  | ||||||
|         doc.children.unshift(xmldec); |  | ||||||
|       } |  | ||||||
|       return doc.root() || doc; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dtd = function(pubID, sysID) { |  | ||||||
|       var child, doc, doctype, i, j, k, len, len1, ref2, ref3; |  | ||||||
|       doc = this.document(); |  | ||||||
|       doctype = new XMLDocType(doc, pubID, sysID); |  | ||||||
|       ref2 = doc.children; |  | ||||||
|       for (i = j = 0, len = ref2.length; j < len; i = ++j) { |  | ||||||
|         child = ref2[i]; |  | ||||||
|         if (child.type === NodeType.DocType) { |  | ||||||
|           doc.children[i] = doctype; |  | ||||||
|           return doctype; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       ref3 = doc.children; |  | ||||||
|       for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { |  | ||||||
|         child = ref3[i]; |  | ||||||
|         if (child.isRoot) { |  | ||||||
|           doc.children.splice(i, 0, doctype); |  | ||||||
|           return doctype; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       doc.children.push(doctype); |  | ||||||
|       return doctype; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.up = function() { |  | ||||||
|       if (this.isRoot) { |  | ||||||
|         throw new Error("The root node has no parent. Use doc() if you need to get the document object."); |  | ||||||
|       } |  | ||||||
|       return this.parent; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.root = function() { |  | ||||||
|       var node; |  | ||||||
|       node = this; |  | ||||||
|       while (node) { |  | ||||||
|         if (node.type === NodeType.Document) { |  | ||||||
|           return node.rootObject; |  | ||||||
|         } else if (node.isRoot) { |  | ||||||
|           return node; |  | ||||||
|         } else { |  | ||||||
|           node = node.parent; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.document = function() { |  | ||||||
|       var node; |  | ||||||
|       node = this; |  | ||||||
|       while (node) { |  | ||||||
|         if (node.type === NodeType.Document) { |  | ||||||
|           return node; |  | ||||||
|         } else { |  | ||||||
|           node = node.parent; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.end = function(options) { |  | ||||||
|       return this.document().end(options); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.prev = function() { |  | ||||||
|       var i; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       if (i < 1) { |  | ||||||
|         throw new Error("Already at the first node. " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       return this.parent.children[i - 1]; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.next = function() { |  | ||||||
|       var i; |  | ||||||
|       i = this.parent.children.indexOf(this); |  | ||||||
|       if (i === -1 || i === this.parent.children.length - 1) { |  | ||||||
|         throw new Error("Already at the last node. " + this.debugInfo()); |  | ||||||
|       } |  | ||||||
|       return this.parent.children[i + 1]; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.importDocument = function(doc) { |  | ||||||
|       var clonedRoot; |  | ||||||
|       clonedRoot = doc.root().clone(); |  | ||||||
|       clonedRoot.parent = this; |  | ||||||
|       clonedRoot.isRoot = false; |  | ||||||
|       this.children.push(clonedRoot); |  | ||||||
|       return this; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.debugInfo = function(name) { |  | ||||||
|       var ref2, ref3; |  | ||||||
|       name = name || this.name; |  | ||||||
|       if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { |  | ||||||
|         return ""; |  | ||||||
|       } else if (name == null) { |  | ||||||
|         return "parent: <" + this.parent.name + ">"; |  | ||||||
|       } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { |  | ||||||
|         return "node: <" + name + ">"; |  | ||||||
|       } else { |  | ||||||
|         return "node: <" + name + ">, parent: <" + this.parent.name + ">"; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.ele = function(name, attributes, text) { |  | ||||||
|       return this.element(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.nod = function(name, attributes, text) { |  | ||||||
|       return this.node(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.txt = function(value) { |  | ||||||
|       return this.text(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dat = function(value) { |  | ||||||
|       return this.cdata(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.com = function(value) { |  | ||||||
|       return this.comment(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.ins = function(target, value) { |  | ||||||
|       return this.instruction(target, value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.doc = function() { |  | ||||||
|       return this.document(); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.dec = function(version, encoding, standalone) { |  | ||||||
|       return this.declaration(version, encoding, standalone); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.e = function(name, attributes, text) { |  | ||||||
|       return this.element(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.n = function(name, attributes, text) { |  | ||||||
|       return this.node(name, attributes, text); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.t = function(value) { |  | ||||||
|       return this.text(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.d = function(value) { |  | ||||||
|       return this.cdata(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.c = function(value) { |  | ||||||
|       return this.comment(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.r = function(value) { |  | ||||||
|       return this.raw(value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.i = function(target, value) { |  | ||||||
|       return this.instruction(target, value); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.u = function() { |  | ||||||
|       return this.up(); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.importXMLBuilder = function(doc) { |  | ||||||
|       return this.importDocument(doc); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.replaceChild = function(newChild, oldChild) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.removeChild = function(oldChild) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.appendChild = function(newChild) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.hasChildNodes = function() { |  | ||||||
|       return this.children.length !== 0; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.cloneNode = function(deep) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.normalize = function() { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isSupported = function(feature, version) { |  | ||||||
|       return true; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.hasAttributes = function() { |  | ||||||
|       return this.attribs.length !== 0; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.compareDocumentPosition = function(other) { |  | ||||||
|       var ref, res; |  | ||||||
|       ref = this; |  | ||||||
|       if (ref === other) { |  | ||||||
|         return 0; |  | ||||||
|       } else if (this.document() !== other.document()) { |  | ||||||
|         res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; |  | ||||||
|         if (Math.random() < 0.5) { |  | ||||||
|           res |= DocumentPosition.Preceding; |  | ||||||
|         } else { |  | ||||||
|           res |= DocumentPosition.Following; |  | ||||||
|         } |  | ||||||
|         return res; |  | ||||||
|       } else if (ref.isAncestor(other)) { |  | ||||||
|         return DocumentPosition.Contains | DocumentPosition.Preceding; |  | ||||||
|       } else if (ref.isDescendant(other)) { |  | ||||||
|         return DocumentPosition.Contains | DocumentPosition.Following; |  | ||||||
|       } else if (ref.isPreceding(other)) { |  | ||||||
|         return DocumentPosition.Preceding; |  | ||||||
|       } else { |  | ||||||
|         return DocumentPosition.Following; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isSameNode = function(other) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.lookupPrefix = function(namespaceURI) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.lookupNamespaceURI = function(prefix) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isEqualNode = function(node) { |  | ||||||
|       var i, j, ref2; |  | ||||||
|       if (node.nodeType !== this.nodeType) { |  | ||||||
|         return false; |  | ||||||
|       } |  | ||||||
|       if (node.children.length !== this.children.length) { |  | ||||||
|         return false; |  | ||||||
|       } |  | ||||||
|       for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { |  | ||||||
|         if (!this.children[i].isEqualNode(node.children[i])) { |  | ||||||
|           return false; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       return true; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.getFeature = function(feature, version) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.setUserData = function(key, data, handler) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.getUserData = function(key) { |  | ||||||
|       throw new Error("This DOM method is not implemented." + this.debugInfo()); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.contains = function(other) { |  | ||||||
|       if (!other) { |  | ||||||
|         return false; |  | ||||||
|       } |  | ||||||
|       return other === this || this.isDescendant(other); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isDescendant = function(node) { |  | ||||||
|       var child, isDescendantChild, j, len, ref2; |  | ||||||
|       ref2 = this.children; |  | ||||||
|       for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|         child = ref2[j]; |  | ||||||
|         if (node === child) { |  | ||||||
|           return true; |  | ||||||
|         } |  | ||||||
|         isDescendantChild = child.isDescendant(node); |  | ||||||
|         if (isDescendantChild) { |  | ||||||
|           return true; |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       return false; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isAncestor = function(node) { |  | ||||||
|       return node.isDescendant(this); |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isPreceding = function(node) { |  | ||||||
|       var nodePos, thisPos; |  | ||||||
|       nodePos = this.treePosition(node); |  | ||||||
|       thisPos = this.treePosition(this); |  | ||||||
|       if (nodePos === -1 || thisPos === -1) { |  | ||||||
|         return false; |  | ||||||
|       } else { |  | ||||||
|         return nodePos < thisPos; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.isFollowing = function(node) { |  | ||||||
|       var nodePos, thisPos; |  | ||||||
|       nodePos = this.treePosition(node); |  | ||||||
|       thisPos = this.treePosition(this); |  | ||||||
|       if (nodePos === -1 || thisPos === -1) { |  | ||||||
|         return false; |  | ||||||
|       } else { |  | ||||||
|         return nodePos > thisPos; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.treePosition = function(node) { |  | ||||||
|       var found, pos; |  | ||||||
|       pos = 0; |  | ||||||
|       found = false; |  | ||||||
|       this.foreachTreeNode(this.document(), function(childNode) { |  | ||||||
|         pos++; |  | ||||||
|         if (!found && childNode === node) { |  | ||||||
|           return found = true; |  | ||||||
|         } |  | ||||||
|       }); |  | ||||||
|       if (found) { |  | ||||||
|         return pos; |  | ||||||
|       } else { |  | ||||||
|         return -1; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     XMLNode.prototype.foreachTreeNode = function(node, func) { |  | ||||||
|       var child, j, len, ref2, res; |  | ||||||
|       node || (node = this.document()); |  | ||||||
|       ref2 = node.children; |  | ||||||
|       for (j = 0, len = ref2.length; j < len; j++) { |  | ||||||
|         child = ref2[j]; |  | ||||||
|         if (res = func(child)) { |  | ||||||
|           return res; |  | ||||||
|         } else { |  | ||||||
|           res = this.foreachTreeNode(child, func); |  | ||||||
|           if (res) { |  | ||||||
|             return res; |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     return XMLNode; |  | ||||||
| 
 |  | ||||||
|   })(); |  | ||||||
| 
 |  | ||||||
| }).call(this); |  | ||||||
| 
 | 
 | ||||||
|  | var _default = stringify; | ||||||
|  | exports.default = _default; | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 865: | /***/ 865: | ||||||
| /***/ (function(module) { | /***/ (function(module) { | ||||||
| 
 | 
 | ||||||
| /*! ***************************************************************************** | /*! ***************************************************************************** | ||||||
| Copyright (c) Microsoft Corporation. | Copyright (c) Microsoft Corporation. | ||||||
| 
 | 
 | ||||||
| Permission to use, copy, modify, and/or distribute this software for any | Permission to use, copy, modify, and/or distribute this software for any | ||||||
| purpose with or without fee is hereby granted. | purpose with or without fee is hereby granted. | ||||||
| 
 | 
 | ||||||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||||||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||||||
| AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||||||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||||||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | 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 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||||||
| PERFORMANCE OF THIS SOFTWARE. | PERFORMANCE OF THIS SOFTWARE. | ||||||
| ***************************************************************************** */ | ***************************************************************************** */ | ||||||
| /* global global, define, System, Reflect, Promise */ | /* global global, define, System, Reflect, Promise */ | ||||||
| var __extends; | var __extends; | ||||||
| var __assign; | var __assign; | ||||||
| var __rest; | var __rest; | ||||||
| var __decorate; | var __decorate; | ||||||
| var __param; | var __param; | ||||||
| var __metadata; | var __metadata; | ||||||
| var __awaiter; | var __awaiter; | ||||||
| var __generator; | var __generator; | ||||||
| var __exportStar; | var __exportStar; | ||||||
| var __values; | var __values; | ||||||
| var __read; | var __read; | ||||||
| var __spread; | var __spread; | ||||||
| var __spreadArrays; | var __spreadArrays; | ||||||
| var __await; | var __await; | ||||||
| var __asyncGenerator; | var __asyncGenerator; | ||||||
| var __asyncDelegator; | var __asyncDelegator; | ||||||
| var __asyncValues; | var __asyncValues; | ||||||
| var __makeTemplateObject; | var __makeTemplateObject; | ||||||
| var __importStar; | var __importStar; | ||||||
| var __importDefault; | var __importDefault; | ||||||
| var __classPrivateFieldGet; | var __classPrivateFieldGet; | ||||||
| var __classPrivateFieldSet; | var __classPrivateFieldSet; | ||||||
| var __createBinding; | var __createBinding; | ||||||
| (function (factory) { | (function (factory) { | ||||||
|     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; |     var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; | ||||||
|     if (typeof define === "function" && define.amd) { |     if (typeof define === "function" && define.amd) { | ||||||
|         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); |         define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); | ||||||
|     } |     } | ||||||
|     else if ( true && typeof module.exports === "object") { |     else if ( true && typeof module.exports === "object") { | ||||||
|         factory(createExporter(root, createExporter(module.exports))); |         factory(createExporter(root, createExporter(module.exports))); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         factory(createExporter(root)); |         factory(createExporter(root)); | ||||||
|     } |     } | ||||||
|     function createExporter(exports, previous) { |     function createExporter(exports, previous) { | ||||||
|         if (exports !== root) { |         if (exports !== root) { | ||||||
|             if (typeof Object.create === "function") { |             if (typeof Object.create === "function") { | ||||||
|                 Object.defineProperty(exports, "__esModule", { value: true }); |                 Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 exports.__esModule = true; |                 exports.__esModule = true; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; |         return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
| (function (exporter) { | (function (exporter) { | ||||||
|     var extendStatics = Object.setPrototypeOf || |     var extendStatics = Object.setPrototypeOf || | ||||||
|         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |         ({ __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]; }; |         function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||||||
| 
 | 
 | ||||||
|     __extends = function (d, b) { |     __extends = function (d, b) { | ||||||
|         extendStatics(d, b); |         extendStatics(d, b); | ||||||
|         function __() { this.constructor = d; } |         function __() { this.constructor = d; } | ||||||
|         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __assign = Object.assign || function (t) { |     __assign = Object.assign || function (t) { | ||||||
|         for (var s, i = 1, n = arguments.length; i < n; i++) { |         for (var s, i = 1, n = arguments.length; i < n; i++) { | ||||||
|             s = arguments[i]; |             s = arguments[i]; | ||||||
|             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |             for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||||||
|         } |         } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __rest = function (s, e) { |     __rest = function (s, e) { | ||||||
|         var t = {}; |         var t = {}; | ||||||
|         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |         for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||||||
|             t[p] = s[p]; |             t[p] = s[p]; | ||||||
|         if (s != null && typeof Object.getOwnPropertySymbols === "function") |         if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||||||
|             for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |             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])) |                 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||||||
|                     t[p[i]] = s[p[i]]; |                     t[p[i]] = s[p[i]]; | ||||||
|             } |             } | ||||||
|         return t; |         return t; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __decorate = function (decorators, target, key, desc) { |     __decorate = function (decorators, target, key, desc) { | ||||||
|         var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |         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); |         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; |         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; |         return c > 3 && r && Object.defineProperty(target, key, r), r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __param = function (paramIndex, decorator) { |     __param = function (paramIndex, decorator) { | ||||||
|         return function (target, key) { decorator(target, key, paramIndex); } |         return function (target, key) { decorator(target, key, paramIndex); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __metadata = function (metadataKey, metadataValue) { |     __metadata = function (metadataKey, metadataValue) { | ||||||
|         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |         if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __awaiter = function (thisArg, _arguments, P, generator) { |     __awaiter = function (thisArg, _arguments, P, generator) { | ||||||
|         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |         function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|         return new (P || (P = Promise))(function (resolve, reject) { |         return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|             function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |             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 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); } |             function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|             step((generator = generator.apply(thisArg, _arguments || [])).next()); |             step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __generator = function (thisArg, body) { |     __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; |         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; |         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 verb(n) { return function (v) { return step([n, v]); }; } | ||||||
|         function step(op) { |         function step(op) { | ||||||
|             if (f) throw new TypeError("Generator is already executing."); |             if (f) throw new TypeError("Generator is already executing."); | ||||||
|             while (_) try { |             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 (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]; |                 if (y = 0, t) op = [op[0] & 2, t.value]; | ||||||
|                 switch (op[0]) { |                 switch (op[0]) { | ||||||
|                     case 0: case 1: t = op; break; |                     case 0: case 1: t = op; break; | ||||||
|                     case 4: _.label++; return { value: op[1], done: false }; |                     case 4: _.label++; return { value: op[1], done: false }; | ||||||
|                     case 5: _.label++; y = op[1]; op = [0]; continue; |                     case 5: _.label++; y = op[1]; op = [0]; continue; | ||||||
|                     case 7: op = _.ops.pop(); _.trys.pop(); continue; |                     case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||||||
|                     default: |                     default: | ||||||
|                         if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |                         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] === 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 (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 && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||||||
|                         if (t[2]) _.ops.pop(); |                         if (t[2]) _.ops.pop(); | ||||||
|                         _.trys.pop(); continue; |                         _.trys.pop(); continue; | ||||||
|                 } |                 } | ||||||
|                 op = body.call(thisArg, _); |                 op = body.call(thisArg, _); | ||||||
|             } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |             } 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 }; |             if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __exportStar = function(m, exports) { |     __exportStar = function(m, exports) { | ||||||
|         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); |         for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __createBinding = Object.create ? (function(o, m, k, k2) { |     __createBinding = Object.create ? (function(o, m, k, k2) { | ||||||
|         if (k2 === undefined) k2 = k; |         if (k2 === undefined) k2 = k; | ||||||
|         Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); |         Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||||||
|     }) : (function(o, m, k, k2) { |     }) : (function(o, m, k, k2) { | ||||||
|         if (k2 === undefined) k2 = k; |         if (k2 === undefined) k2 = k; | ||||||
|         o[k2] = m[k]; |         o[k2] = m[k]; | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     __values = function (o) { |     __values = function (o) { | ||||||
|         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |         var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||||||
|         if (m) return m.call(o); |         if (m) return m.call(o); | ||||||
|         if (o && typeof o.length === "number") return { |         if (o && typeof o.length === "number") return { | ||||||
|             next: function () { |             next: function () { | ||||||
|                 if (o && i >= o.length) o = void 0; |                 if (o && i >= o.length) o = void 0; | ||||||
|                 return { value: o && o[i++], done: !o }; |                 return { value: o && o[i++], done: !o }; | ||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |         throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __read = function (o, n) { |     __read = function (o, n) { | ||||||
|         var m = typeof Symbol === "function" && o[Symbol.iterator]; |         var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||||||
|         if (!m) return o; |         if (!m) return o; | ||||||
|         var i = m.call(o), r, ar = [], e; |         var i = m.call(o), r, ar = [], e; | ||||||
|         try { |         try { | ||||||
|             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |             while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||||||
|         } |         } | ||||||
|         catch (error) { e = { error: error }; } |         catch (error) { e = { error: error }; } | ||||||
|         finally { |         finally { | ||||||
|             try { |             try { | ||||||
|                 if (r && !r.done && (m = i["return"])) m.call(i); |                 if (r && !r.done && (m = i["return"])) m.call(i); | ||||||
|             } |             } | ||||||
|             finally { if (e) throw e.error; } |             finally { if (e) throw e.error; } | ||||||
|         } |         } | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spread = function () { |     __spread = function () { | ||||||
|         for (var ar = [], i = 0; i < arguments.length; i++) |         for (var ar = [], i = 0; i < arguments.length; i++) | ||||||
|             ar = ar.concat(__read(arguments[i])); |             ar = ar.concat(__read(arguments[i])); | ||||||
|         return ar; |         return ar; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __spreadArrays = function () { |     __spreadArrays = function () { | ||||||
|         for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |         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 r = Array(s), k = 0, i = 0; i < il; i++) | ||||||
|             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |             for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||||||
|                 r[k] = a[j]; |                 r[k] = a[j]; | ||||||
|         return r; |         return r; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __await = function (v) { |     __await = function (v) { | ||||||
|         return this instanceof __await ? (this.v = v, this) : new __await(v); |         return this instanceof __await ? (this.v = v, this) : new __await(v); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncGenerator = function (thisArg, _arguments, generator) { |     __asyncGenerator = function (thisArg, _arguments, generator) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var g = generator.apply(thisArg, _arguments || []), i, q = []; |         var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||||||
|         return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |         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 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 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 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 fulfill(value) { resume("next", value); } | ||||||
|         function reject(value) { resume("throw", 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]); } |         function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __asyncDelegator = function (o) { |     __asyncDelegator = function (o) { | ||||||
|         var i, p; |         var i, p; | ||||||
|         return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |         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; } |         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) { |     __asyncValues = function (o) { | ||||||
|         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |         if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||||||
|         var m = o[Symbol.asyncIterator], i; |         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); |         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 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); } |         function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __makeTemplateObject = function (cooked, raw) { |     __makeTemplateObject = function (cooked, raw) { | ||||||
|         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |         if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||||||
|         return cooked; |         return cooked; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     var __setModuleDefault = Object.create ? (function(o, v) { |     var __setModuleDefault = Object.create ? (function(o, v) { | ||||||
|         Object.defineProperty(o, "default", { enumerable: true, value: v }); |         Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||||||
|     }) : function(o, v) { |     }) : function(o, v) { | ||||||
|         o["default"] = v; |         o["default"] = v; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importStar = function (mod) { |     __importStar = function (mod) { | ||||||
|         if (mod && mod.__esModule) return mod; |         if (mod && mod.__esModule) return mod; | ||||||
|         var result = {}; |         var result = {}; | ||||||
|         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); |         if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||||||
|         __setModuleDefault(result, mod); |         __setModuleDefault(result, mod); | ||||||
|         return result; |         return result; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __importDefault = function (mod) { |     __importDefault = function (mod) { | ||||||
|         return (mod && mod.__esModule) ? mod : { "default": mod }; |         return (mod && mod.__esModule) ? mod : { "default": mod }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldGet = function (receiver, privateMap) { |     __classPrivateFieldGet = function (receiver, privateMap) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to get private field on non-instance"); |             throw new TypeError("attempted to get private field on non-instance"); | ||||||
|         } |         } | ||||||
|         return privateMap.get(receiver); |         return privateMap.get(receiver); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     __classPrivateFieldSet = function (receiver, privateMap, value) { |     __classPrivateFieldSet = function (receiver, privateMap, value) { | ||||||
|         if (!privateMap.has(receiver)) { |         if (!privateMap.has(receiver)) { | ||||||
|             throw new TypeError("attempted to set private field on non-instance"); |             throw new TypeError("attempted to set private field on non-instance"); | ||||||
|         } |         } | ||||||
|         privateMap.set(receiver, value); |         privateMap.set(receiver, value); | ||||||
|         return value; |         return value; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     exporter("__extends", __extends); |     exporter("__extends", __extends); | ||||||
|     exporter("__assign", __assign); |     exporter("__assign", __assign); | ||||||
|     exporter("__rest", __rest); |     exporter("__rest", __rest); | ||||||
|     exporter("__decorate", __decorate); |     exporter("__decorate", __decorate); | ||||||
|     exporter("__param", __param); |     exporter("__param", __param); | ||||||
|     exporter("__metadata", __metadata); |     exporter("__metadata", __metadata); | ||||||
|     exporter("__awaiter", __awaiter); |     exporter("__awaiter", __awaiter); | ||||||
|     exporter("__generator", __generator); |     exporter("__generator", __generator); | ||||||
|     exporter("__exportStar", __exportStar); |     exporter("__exportStar", __exportStar); | ||||||
|     exporter("__createBinding", __createBinding); |     exporter("__createBinding", __createBinding); | ||||||
|     exporter("__values", __values); |     exporter("__values", __values); | ||||||
|     exporter("__read", __read); |     exporter("__read", __read); | ||||||
|     exporter("__spread", __spread); |     exporter("__spread", __spread); | ||||||
|     exporter("__spreadArrays", __spreadArrays); |     exporter("__spreadArrays", __spreadArrays); | ||||||
|     exporter("__await", __await); |     exporter("__await", __await); | ||||||
|     exporter("__asyncGenerator", __asyncGenerator); |     exporter("__asyncGenerator", __asyncGenerator); | ||||||
|     exporter("__asyncDelegator", __asyncDelegator); |     exporter("__asyncDelegator", __asyncDelegator); | ||||||
|     exporter("__asyncValues", __asyncValues); |     exporter("__asyncValues", __asyncValues); | ||||||
|     exporter("__makeTemplateObject", __makeTemplateObject); |     exporter("__makeTemplateObject", __makeTemplateObject); | ||||||
|     exporter("__importStar", __importStar); |     exporter("__importStar", __importStar); | ||||||
|     exporter("__importDefault", __importDefault); |     exporter("__importDefault", __importDefault); | ||||||
|     exporter("__classPrivateFieldGet", __classPrivateFieldGet); |     exporter("__classPrivateFieldGet", __classPrivateFieldGet); | ||||||
|     exporter("__classPrivateFieldSet", __classPrivateFieldSet); |     exporter("__classPrivateFieldSet", __classPrivateFieldSet); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -41489,7 +41660,7 @@ exports.TraceAPI = TraceAPI; | |||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   module.exports = XMLAttribute = (function() { |   module.exports = XMLAttribute = (function() { | ||||||
|     function XMLAttribute(parent, name, value) { |     function XMLAttribute(parent, name, value) { | ||||||
| @ -42461,7 +42632,7 @@ exports.PollerStoppedError = PollerStoppedError; | |||||||
| /***/ (function(module, __unusedexports, __webpack_require__) { | /***/ (function(module, __unusedexports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| var iterate    = __webpack_require__(157) | var iterate    = __webpack_require__(157) | ||||||
|   , initState  = __webpack_require__(147) |   , initState  = __webpack_require__(903) | ||||||
|   , terminator = __webpack_require__(939) |   , terminator = __webpack_require__(939) | ||||||
|   ; |   ; | ||||||
| 
 | 
 | ||||||
| @ -42578,98 +42749,142 @@ module.exports = uuid; | |||||||
| /***/ (function(__unusedmodule, exports, __webpack_require__) { | /***/ (function(__unusedmodule, exports, __webpack_require__) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||||
|     return new (P || (P = Promise))(function (resolve, reject) { |     return new (P || (P = Promise))(function (resolve, reject) { | ||||||
|         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |         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 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); } |         function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||||||
|         step((generator = generator.apply(thisArg, _arguments || [])).next()); |         step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| var __importStar = (this && this.__importStar) || function (mod) { | var __importStar = (this && this.__importStar) || function (mod) { | ||||||
|     if (mod && mod.__esModule) return mod; |     if (mod && mod.__esModule) return mod; | ||||||
|     var result = {}; |     var result = {}; | ||||||
|     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; |     if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||||||
|     result["default"] = mod; |     result["default"] = mod; | ||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| const core = __importStar(__webpack_require__(470)); | const core = __importStar(__webpack_require__(470)); | ||||||
| const http_client_1 = __webpack_require__(539); | const http_client_1 = __webpack_require__(539); | ||||||
| function isSuccessStatusCode(statusCode) { | function isSuccessStatusCode(statusCode) { | ||||||
|     if (!statusCode) { |     if (!statusCode) { | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     return statusCode >= 200 && statusCode < 300; |     return statusCode >= 200 && statusCode < 300; | ||||||
| } | } | ||||||
| exports.isSuccessStatusCode = isSuccessStatusCode; | exports.isSuccessStatusCode = isSuccessStatusCode; | ||||||
| function isServerErrorStatusCode(statusCode) { | function isServerErrorStatusCode(statusCode) { | ||||||
|     if (!statusCode) { |     if (!statusCode) { | ||||||
|         return true; |         return true; | ||||||
|     } |     } | ||||||
|     return statusCode >= 500; |     return statusCode >= 500; | ||||||
| } | } | ||||||
| exports.isServerErrorStatusCode = isServerErrorStatusCode; | exports.isServerErrorStatusCode = isServerErrorStatusCode; | ||||||
| function isRetryableStatusCode(statusCode) { | function isRetryableStatusCode(statusCode) { | ||||||
|     if (!statusCode) { |     if (!statusCode) { | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     const retryableStatusCodes = [ |     const retryableStatusCodes = [ | ||||||
|         http_client_1.HttpCodes.BadGateway, |         http_client_1.HttpCodes.BadGateway, | ||||||
|         http_client_1.HttpCodes.ServiceUnavailable, |         http_client_1.HttpCodes.ServiceUnavailable, | ||||||
|         http_client_1.HttpCodes.GatewayTimeout |         http_client_1.HttpCodes.GatewayTimeout | ||||||
|     ]; |     ]; | ||||||
|     return retryableStatusCodes.includes(statusCode); |     return retryableStatusCodes.includes(statusCode); | ||||||
| } | } | ||||||
| exports.isRetryableStatusCode = isRetryableStatusCode; | exports.isRetryableStatusCode = isRetryableStatusCode; | ||||||
| function retry(name, method, getStatusCode, maxAttempts = 2) { | function retry(name, method, getStatusCode, maxAttempts = 2) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         let response = undefined; |         let response = undefined; | ||||||
|         let statusCode = undefined; |         let statusCode = undefined; | ||||||
|         let isRetryable = false; |         let isRetryable = false; | ||||||
|         let errorMessage = ''; |         let errorMessage = ''; | ||||||
|         let attempt = 1; |         let attempt = 1; | ||||||
|         while (attempt <= maxAttempts) { |         while (attempt <= maxAttempts) { | ||||||
|             try { |             try { | ||||||
|                 response = yield method(); |                 response = yield method(); | ||||||
|                 statusCode = getStatusCode(response); |                 statusCode = getStatusCode(response); | ||||||
|                 if (!isServerErrorStatusCode(statusCode)) { |                 if (!isServerErrorStatusCode(statusCode)) { | ||||||
|                     return response; |                     return response; | ||||||
|                 } |                 } | ||||||
|                 isRetryable = isRetryableStatusCode(statusCode); |                 isRetryable = isRetryableStatusCode(statusCode); | ||||||
|                 errorMessage = `Cache service responded with ${statusCode}`; |                 errorMessage = `Cache service responded with ${statusCode}`; | ||||||
|             } |             } | ||||||
|             catch (error) { |             catch (error) { | ||||||
|                 isRetryable = true; |                 isRetryable = true; | ||||||
|                 errorMessage = error.message; |                 errorMessage = error.message; | ||||||
|             } |             } | ||||||
|             core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); |             core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); | ||||||
|             if (!isRetryable) { |             if (!isRetryable) { | ||||||
|                 core.debug(`${name} - Error is not retryable`); |                 core.debug(`${name} - Error is not retryable`); | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|             attempt++; |             attempt++; | ||||||
|         } |         } | ||||||
|         throw Error(`${name} failed: ${errorMessage}`); |         throw Error(`${name} failed: ${errorMessage}`); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.retry = retry; | exports.retry = retry; | ||||||
| function retryTypedResponse(name, method, maxAttempts = 2) { | function retryTypedResponse(name, method, maxAttempts = 2) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         return yield retry(name, method, (response) => response.statusCode, maxAttempts); |         return yield retry(name, method, (response) => response.statusCode, maxAttempts); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.retryTypedResponse = retryTypedResponse; | exports.retryTypedResponse = retryTypedResponse; | ||||||
| function retryHttpClientResponse(name, method, maxAttempts = 2) { | function retryHttpClientResponse(name, method, maxAttempts = 2) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         return yield retry(name, method, (response) => response.message.statusCode, maxAttempts); |         return yield retry(name, method, (response) => response.message.statusCode, maxAttempts); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.retryHttpClientResponse = retryHttpClientResponse; | exports.retryHttpClientResponse = retryHttpClientResponse; | ||||||
| //# sourceMappingURL=requestUtils.js.map
 | //# sourceMappingURL=requestUtils.js.map
 | ||||||
| 
 | 
 | ||||||
|  | /***/ }), | ||||||
|  | 
 | ||||||
|  | /***/ 903: | ||||||
|  | /***/ (function(module) { | ||||||
|  | 
 | ||||||
|  | // 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; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 919: | /***/ 919: | ||||||
| @ -43245,25 +43460,25 @@ exports.setLogLevel = setLogLevel; | |||||||
| /***/ (function(__unusedmodule, exports) { | /***/ (function(__unusedmodule, exports) { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| Object.defineProperty(exports, "__esModule", { value: true }); | Object.defineProperty(exports, "__esModule", { value: true }); | ||||||
| var CacheFilename; | var CacheFilename; | ||||||
| (function (CacheFilename) { | (function (CacheFilename) { | ||||||
|     CacheFilename["Gzip"] = "cache.tgz"; |     CacheFilename["Gzip"] = "cache.tgz"; | ||||||
|     CacheFilename["Zstd"] = "cache.tzst"; |     CacheFilename["Zstd"] = "cache.tzst"; | ||||||
| })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); | })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); | ||||||
| var CompressionMethod; | var CompressionMethod; | ||||||
| (function (CompressionMethod) { | (function (CompressionMethod) { | ||||||
|     CompressionMethod["Gzip"] = "gzip"; |     CompressionMethod["Gzip"] = "gzip"; | ||||||
|     // Long range mode was added to zstd in v1.3.2.
 |     // 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
 |     // This enum is for earlier version of zstd that does not have --long support
 | ||||||
|     CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; |     CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; | ||||||
|     CompressionMethod["Zstd"] = "zstd"; |     CompressionMethod["Zstd"] = "zstd"; | ||||||
| })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); | })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); | ||||||
| // Socket timeout in milliseconds during download.  If no traffic is received
 | // Socket timeout in milliseconds during download.  If no traffic is received
 | ||||||
| // over the socket during this period, the socket is destroyed and the download
 | // over the socket during this period, the socket is destroyed and the download
 | ||||||
| // is aborted.
 | // is aborted.
 | ||||||
| exports.SocketTimeout = 5000; | exports.SocketTimeout = 5000; | ||||||
| //# sourceMappingURL=constants.js.map
 | //# sourceMappingURL=constants.js.map
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @ -43464,39 +43679,6 @@ function terminator(callback) | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), |  | ||||||
| 
 |  | ||||||
| /***/ 940: |  | ||||||
| /***/ (function(__unusedmodule, exports) { |  | ||||||
| 
 |  | ||||||
| "use strict"; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| Object.defineProperty(exports, "__esModule", { |  | ||||||
|   value: true |  | ||||||
| }); |  | ||||||
| exports.default = void 0; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Convert array of 16 byte values to UUID string format of the form: |  | ||||||
|  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |  | ||||||
|  */ |  | ||||||
| const byteToHex = []; |  | ||||||
| 
 |  | ||||||
| for (let i = 0; i < 256; ++i) { |  | ||||||
|   byteToHex.push((i + 0x100).toString(16).substr(1)); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function bytesToUuid(buf, offset_) { |  | ||||||
|   const offset = offset_ || 0; // Note: Be careful editing this code!  It's been tuned for performance
 |  | ||||||
|   // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
 |  | ||||||
| 
 |  | ||||||
|   return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase(); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| var _default = bytesToUuid; |  | ||||||
| exports.default = _default; |  | ||||||
| 
 |  | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 950: | /***/ 950: | ||||||
| @ -43574,7 +43756,7 @@ exports.checkBypass = checkBypass; | |||||||
|     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||||||
|     hasProp = {}.hasOwnProperty; |     hasProp = {}.hasOwnProperty; | ||||||
| 
 | 
 | ||||||
|   XMLNode = __webpack_require__(855); |   XMLNode = __webpack_require__(257); | ||||||
| 
 | 
 | ||||||
|   NodeType = __webpack_require__(683); |   NodeType = __webpack_require__(683); | ||||||
| 
 | 
 | ||||||
| @ -43934,7 +44116,7 @@ var tslib = __webpack_require__(865); | |||||||
| var tough = __webpack_require__(393); | var tough = __webpack_require__(393); | ||||||
| var http = __webpack_require__(605); | var http = __webpack_require__(605); | ||||||
| var https = __webpack_require__(211); | var https = __webpack_require__(211); | ||||||
| __webpack_require__(454); | var node_fetch = _interopDefault(__webpack_require__(454)); | ||||||
| var abortController = __webpack_require__(106); | var abortController = __webpack_require__(106); | ||||||
| var FormData = _interopDefault(__webpack_require__(790)); | var FormData = _interopDefault(__webpack_require__(790)); | ||||||
| var util = __webpack_require__(669); | var util = __webpack_require__(669); | ||||||
| @ -44121,7 +44303,7 @@ var Constants = { | |||||||
|      * @const |      * @const | ||||||
|      * @type {string} |      * @type {string} | ||||||
|      */ |      */ | ||||||
|     coreHttpVersion: "1.1.4", |     coreHttpVersion: "1.1.5", | ||||||
|     /** |     /** | ||||||
|      * Specifies HTTP. |      * Specifies HTTP. | ||||||
|      * |      * | ||||||
| @ -46428,11 +46610,6 @@ function isValidPort(port) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Copyright (c) Microsoft Corporation.
 | // Copyright (c) Microsoft Corporation.
 | ||||||
| var globalWithFetch = global; |  | ||||||
| if (typeof globalWithFetch.fetch !== "function") { |  | ||||||
|     var fetch_1 = __webpack_require__(454).default; |  | ||||||
|     globalWithFetch.fetch = fetch_1; |  | ||||||
| } |  | ||||||
| function getCachedAgent(isHttps, agentCache) { | function getCachedAgent(isHttps, agentCache) { | ||||||
|     return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; |     return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; | ||||||
| } | } | ||||||
| @ -46489,7 +46666,7 @@ var NodeFetchHttpClient = /** @class */ (function (_super) { | |||||||
|     NodeFetchHttpClient.prototype.fetch = function (input, init) { |     NodeFetchHttpClient.prototype.fetch = function (input, init) { | ||||||
|         return tslib.__awaiter(this, void 0, void 0, function () { |         return tslib.__awaiter(this, void 0, void 0, function () { | ||||||
|             return tslib.__generator(this, function (_a) { |             return tslib.__generator(this, function (_a) { | ||||||
|                 return [2 /*return*/, fetch(input, init)]; |                 return [2 /*return*/, node_fetch(input, init)]; | ||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
|  | |||||||
							
								
								
									
										30
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										30
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -5,9 +5,9 @@ | |||||||
|   "requires": true, |   "requires": true, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@actions/cache": { |     "@actions/cache": { | ||||||
|       "version": "1.0.1", |       "version": "1.0.2", | ||||||
|       "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.1.tgz", |       "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.2.tgz", | ||||||
|       "integrity": "sha512-QyMKGZTVB6bRBIMNEoW74LeqYtbY7cSaWNvaT1uqhzjredaW+vNFxv9XF/cyipzwZBVZgizOF2zpdVYnP0UVYg==", |       "integrity": "sha512-CzAseaJ4cKmOI58EIWUb/LfeYdM7Y25s39OEMtWAhEPrPPzrbSEjGHCLaYjJ0V8C4iojo8vBYh5B3OIJ37EiJw==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@actions/core": "^1.2.4", |         "@actions/core": "^1.2.4", | ||||||
|         "@actions/exec": "^1.0.1", |         "@actions/exec": "^1.0.1", | ||||||
| @ -87,9 +87,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@azure/core-http": { |     "@azure/core-http": { | ||||||
|       "version": "1.1.4", |       "version": "1.1.5", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.1.4.tgz", |       "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.1.5.tgz", | ||||||
|       "integrity": "sha512-81cNvyT51MfYBVIscPwC7Sl1n/xWimqho+R2eOQLw6Qqtfxs5dYlFWfLr9HbYX7QEXZdc5xdsyYTjvfJkjA7Hg==", |       "integrity": "sha512-4nrA7SzfPxoyTF7hzmN6Zi2RJf57/ZE5rKTSb2oCOrzxKqTRNZrBm0mCDxTLktxsRN1xbNUTxFy5dm/Irb1RCQ==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@azure/abort-controller": "^1.0.0", |         "@azure/abort-controller": "^1.0.0", | ||||||
|         "@azure/core-auth": "^1.1.3", |         "@azure/core-auth": "^1.1.3", | ||||||
| @ -134,9 +134,9 @@ | |||||||
|           "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" |           "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" | ||||||
|         }, |         }, | ||||||
|         "uuid": { |         "uuid": { | ||||||
|           "version": "8.2.0", |           "version": "8.3.0", | ||||||
|           "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz", |           "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", | ||||||
|           "integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==" |           "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @ -178,9 +178,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@azure/ms-rest-js": { |     "@azure/ms-rest-js": { | ||||||
|       "version": "2.0.7", |       "version": "2.0.8", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.0.7.tgz", |       "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.0.8.tgz", | ||||||
|       "integrity": "sha512-rQpNxDhyOIyS4E+4sUCBMvjrtbNwB32wH06cC2SFoQM4TR29bIKaTlIC1tMe0K07w9c5tNk/2uUHs6/ld/Z3+A==", |       "integrity": "sha512-PO4pnYaF66IAB/RWbhrTprGyhOzDzsgcbT7z8k3O38JKlwifbrhW+8M0fzx0ScZnaacP8rZyBazYMUF9P12c0g==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@types/node-fetch": "^2.3.7", |         "@types/node-fetch": "^2.3.7", | ||||||
|         "@types/tunnel": "0.0.1", |         "@types/tunnel": "0.0.1", | ||||||
| @ -2153,9 +2153,9 @@ | |||||||
|       "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" |       "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" | ||||||
|     }, |     }, | ||||||
|     "events": { |     "events": { | ||||||
|       "version": "3.1.0", |       "version": "3.2.0", | ||||||
|       "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", |       "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", | ||||||
|       "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==" |       "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" | ||||||
|     }, |     }, | ||||||
|     "exec-sh": { |     "exec-sh": { | ||||||
|       "version": "0.3.4", |       "version": "0.3.4", | ||||||
|  | |||||||
| @ -26,7 +26,7 @@ | |||||||
|     "@actions/core": "^1.2.0", |     "@actions/core": "^1.2.0", | ||||||
|     "@actions/exec": "^1.0.1", |     "@actions/exec": "^1.0.1", | ||||||
|     "@actions/io": "^1.0.1", |     "@actions/io": "^1.0.1", | ||||||
|     "@actions/cache": "^1.0.1" |     "@actions/cache": "^1.0.2" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@types/jest": "^24.0.13", |     "@types/jest": "^24.0.13", | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user