mirror of
https://github.com/expo/expo-github-action.git
synced 2026-11-15 17:32:45 -10:00
refactor: replace libnpm with npm cli (#139)
* refactor: add npm version resolver * refactor: replace libnpm with npm cli execution * refactor: remove libnpm from project * chore: fix linting issues * chore: rebuild project
This commit is contained in:
1 parent
3134e26b3a
commit
4f28493708
11 files changed
+142
-1424
No files matched your search
+12
-48
@@ -1,60 +1,24 @@
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={27799:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=s(n(70448));const a=s(n(85622));const c=s(n(91518));const l=s(n(98245));const u=n(56490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function restoreCache(e,t,n,s){return i(this,void 0,void 0,(function*(){checkPaths(e);n=n||[];const i=[t,...n];o.debug("Resolved Keys:");o.debug(JSON.stringify(i));if(i.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of i){checkKey(e)}const p=yield c.getCompressionMethod();const h=yield l.getCacheEntry(i,e,{compressionMethod:p});if(!(h===null||h===void 0?void 0:h.archiveLocation)){return undefined}const m=a.join(yield c.createTempDirectory(),c.getCacheFileName(p));o.debug(`Archive Path: ${m}`);try{yield l.downloadCache(h.archiveLocation,m,s);if(o.isDebug()){yield u.listTar(m,p)}const e=c.getArchiveFileSizeIsBytes(m);o.info(`Cache Size: ~${Math.round(e/(1024*1024))} MB (${e} B)`);yield u.extractTar(m,p);o.info("Cache restored successfully")}finally{try{yield c.unlinkFile(m)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return h.cacheKey}))}t.restoreCache=restoreCache;function saveCache(e,t,n){return i(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const i=yield c.getCompressionMethod();o.debug("Reserving Cache");const s=yield l.reserveCache(t,e,{compressionMethod:i});if(s===-1){throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache.`)}o.debug(`Cache ID: ${s}`);const p=yield c.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(p)}`);const h=yield c.createTempDirectory();const m=a.join(h,c.getCacheFileName(i));o.debug(`Archive Path: ${m}`);yield u.createTar(h,p,i);if(o.isDebug()){yield u.listTar(m,i)}const d=5*1024*1024*1024;const g=c.getArchiveFileSizeIsBytes(m);o.debug(`File Size: ${g}`);if(g>d){throw new Error(`Cache size of ~${Math.round(g/(1024*1024))} MB (${g} B) is over the 5GB limit, not saving cache.`)}o.debug(`Saving Cache (ID: ${s})`);yield l.saveCache(s,m,n);return s}))}t.saveCache=saveCache},98245:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=s(n(70448));const a=n(39925);const c=n(23702);const l=s(n(76417));const u=s(n(35747));const p=n(78835);const h=s(n(91518));const m=n(88840);const d=n(55500);const g=n(76215);const y=n(13981);const v="1.0";function getCacheApiUrl(e){const t=(process.env["ACTIONS_CACHE_URL"]||process.env["ACTIONS_RUNTIME_URL"]||"").replace("pipelines","artifactcache");if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const n=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${n}`);return n}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new c.BearerCredentialHandler(e);return new a.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersiLine truncated
|
||||
require('./sourcemap-register.js');(()=>{var e={7799:function(e,t,r){"use strict";var a=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(a.next(e))}catch(e){n(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(448));const o=n(r(5622));const s=n(r(1518));const c=n(r(8245));const l=r(6490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function restoreCache(e,t,r,n){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const a=[t,...r];i.debug("Resolved Keys:");i.debug(JSON.stringify(a));if(a.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of a){checkKey(e)}const u=yield s.getCompressionMethod();const p=yield c.getCacheEntry(a,e,{compressionMethod:u});if(!(p===null||p===void 0?void 0:p.archiveLocation)){return undefined}const m=o.join(yield s.createTempDirectory(),s.getCacheFileName(u));i.debug(`Archive Path: ${m}`);try{yield c.downloadCache(p.archiveLocation,m,n);if(i.isDebug()){yield l.listTar(m,u)}const e=s.getArchiveFileSizeIsBytes(m);i.info(`Cache Size: ~${Math.round(e/(1024*1024))} MB (${e} B)`);yield l.extractTar(m,u);i.info("Cache restored successfully")}finally{try{yield s.unlinkFile(m)}catch(e){i.debug(`Failed to delete archive: ${e}`)}}return p.cacheKey}))}t.restoreCache=restoreCache;function saveCache(e,t,r){return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=yield s.getCompressionMethod();i.debug("Reserving Cache");const n=yield c.reserveCache(t,e,{compressionMethod:a});if(n===-1){throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache.`)}i.debug(`Cache ID: ${n}`);const u=yield s.resolvePaths(e);i.debug("Cache Paths:");i.debug(`${JSON.stringify(u)}`);const p=yield s.createTempDirectory();const m=o.join(p,s.getCacheFileName(a));i.debug(`Archive Path: ${m}`);yield l.createTar(p,u,a);if(i.isDebug()){yield l.listTar(m,a)}const d=5*1024*1024*1024;const f=s.getArchiveFileSizeIsBytes(m);i.debug(`File Size: ${f}`);if(f>d){throw new Error(`Cache size of ~${Math.round(f/(1024*1024))} MB (${f} B) is over the 5GB limit, not saving cache.`)}i.debug(`Saving Cache (ID: ${n})`);yield c.saveCache(n,m,r);return n}))}t.saveCache=saveCache},8245:function(e,t,r){"use strict";var a=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(a.next(e))}catch(e){n(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(448));const o=r(9925);const s=r(3702);const c=n(r(6417));const l=n(r(5747));const u=r(8835);const p=n(r(1518));const m=r(8840);const d=r(5500);const f=r(6215);const h=r(3981);const g="1.0";function getCacheApiUrl(e){const t=(process.env["ACTIONS_CACHE_URL"]||process.env["ACTIONS_RUNTIME_URL"]||"").replace("pipelines","artifactcache");if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const r=`${t}_apis/artifactcache/${e}`;i.debug(`Resource Url: ${r}`);return r}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new s.BearerCredentialHandler(e);return new o.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t){const r=e.concat(!t||t===m.ComLine truncated
|
||||
/*!
|
||||
* Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Azure Core LRO SDK for JavaScript - 1.0.5
|
||||
*/Object.defineProperty(t,"__esModule",{value:true});var i=n(4351);var s=function(e){i.__extends(PollerStoppedError,e);function PollerStoppedError(t){var n=e.call(this,t)||this;n.name="PollerStoppedError";Object.setPrototypeOf(n,PollerStoppedError.prototype);return n}return PollerStoppedError}(Error);var o=function(e){i.__extends(PollerCancelledError,e);function PollerCancelledError(t){var n=e.call(this,t)||this;n.name="PollerCancelledError";Object.setPrototypeOf(n,PollerCancelledError.prototype);return n}return PollerCancelledError}(Error);var a=function(){function Poller(e){var t=this;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise((function(e,n){t.resolve=e;t.reject=n}));this.promise.catch((function(){}))}Poller.prototype.startPolling=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:if(this.stopped){this.stopped=false}e.label=1;case 1:if(!(!this.isStopped()&&!this.isDone()))return[3,4];return[4,this.poll()];case 2:e.sent();return[4,this.delay()];case 3:e.sent();return[3,1];case 4:return[2]}}))}))};Poller.prototype.pollOnce=function(e){if(e===void 0){e={}}return i.__awaiter(this,void 0,void 0,(function(){var t,n;return i.__generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,3,,4]);if(!!this.isDone())return[3,2];t=this;return[4,this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})];case 1:t.operation=i.sent();if(this.isDone()&&this.resolve){this.resolve(this.operation.state.result)}i.label=2;case 2:return[3,4];case 3:n=i.sent();this.operation.state.error=n;if(this.reject){this.reject(n)}throw n;case 4:return[2]}}))}))};Poller.prototype.fireProgress=function(e){for(var t=0,n=this.pollProgressCallbacks;t<n.length;t++){var i=n[t];i(e)}};Poller.prototype.cancelOnce=function(e){if(e===void 0){e={}}return i.__awaiter(this,void 0,void 0,(function(){var t;return i.__generator(this,(function(n){switch(n.label){case 0:t=this;return[4,this.operation.cancel(e)];case 1:t.operation=n.sent();if(this.reject){this.reject(new o("Poller cancelled"))}return[2]}}))}))};Poller.prototype.poll=function(e){var t=this;if(e===void 0){e={}}if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);var clearPollOncePromise=function(){t.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise};Poller.prototype.pollUntilDone=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){if(this.stopped){this.startPolling().catch(this.reject)}return[2,this.promise]}))}))};Poller.prototype.onProgress=function(e){var t=this;this.pollProgressCallbacks.push(e);return function(){t.pollProgressCallbacks=t.pollProgressCallbacks.filter((function(t){return t!==e}))}};Poller.prototype.isDone=function(){var e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)};Poller.prototype.stopPolling=function(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new s("This poller is already stopped"))}}};Poller.prototype.isStopped=function(){return this.stopped};Poller.prototype.cancelOperation=function(e){if(e===void 0){e={}}if(!this.stopped){this.stopped=true}if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise};Poller.prototype.getOperationState=function(){return this.operation.state};Poller.prototype.getResult=function(){var e=this.operation.state;return e.result};Poller.prototype.toString=function(){return this.operation.toString()};return Poller}();t.Poller=a;t.PollerCancelledError=o;t.PollerStoppedError=s},74559:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});n(76821)},94175:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=n(65163);var s=n(4351);var o=function(){function NoOpSpan(){}NoOpSpan.prototype.context=function(){return{spanId:"",traceId:"",traceFlags:0}};NoOpSpan.prototype.end=function(e){};NoOpSpan.prototype.setAttribute=function(e,t){return this};NoOpSpan.prototype.setAttributes=function(e){return this};NoOpSpan.prototype.addEvent=function(e,t){return this};NoOpSpan.prototype.setStatus=function(e){return this};NoOpSpan.prototype.updateName=function(e){return this};NoOpSpan.prototype.isRecording=function(){return false};NoOpSpan.prototype.recordException=function(e,t){};return NoOpSpan}();var a=function(){function NoOpTracer(){}NoOpTracer.prototype.startSpan=function(e,t){return new o};NoOpTracer.prototype.getCurrentSpan=function(){return new o};NoOpTracer.prototype.withSpan=function(e,t){return t()};NoOpTracer.prototype.bind=function(e,t){return e};return NoOpTracer}();function getGlobalObject(){return global}var c=4;var l=Symbol.for("@azure/core-tracing.tracerCache3");var u;function loadTracerCache(){var e=getGlobalObject();var t=e[l];var n=truLine truncated
|
||||
/*!
|
||||
* @overview es6-promise - a tiny implementation of Promises/A+.
|
||||
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
||||
* @license Licensed under MIT license
|
||||
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
||||
* @version v4.2.8+1e68dce6
|
||||
*/
|
||||
(function(t,n){true?e.exports=n():0})(this,(function(){"use strict";function objectOrFunction(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}function isFunction(e){return typeof e==="function"}var e=void 0;if(Array.isArray){e=Array.isArray}else{e=function(e){return Object.prototype.toString.call(e)==="[object Array]"}}var t=e;var n=0;var i=void 0;var s=void 0;var o=function asap(e,t){h[n]=e;h[n+1]=t;n+=2;if(n===2){if(s){s(flush)}else{m()}}};function setScheduler(e){s=e}function setAsap(e){o=e}var a=typeof window!=="undefined"?window:undefined;var c=a||{};var l=c.MutationObserver||c.WebKitMutationObserver;var u=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var p=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function useNextTick(){return function(){return process.nextTick(flush)}}function useVertxTimer(){if(typeof i!=="undefined"){return function(){i(flush)}}return useSetTimeout()}function useMutationObserver(){var e=0;var t=new l(flush);var n=document.createTextNode("");t.observe(n,{characterData:true});return function(){n.data=e=++e%2}}function useMessageChannel(){var e=new MessageChannel;e.port1.onmessage=flush;return function(){return e.port2.postMessage(0)}}function useSetTimeout(){var e=setTimeout;return function(){return e(flush,1)}}var h=new Array(1e3);function flush(){for(var e=0;e<n;e+=2){var t=h[e];var i=h[e+1];t(i);h[e]=undefined;h[e+1]=undefined}n=0}function attemptVertx(){try{var e=Function("return this")().require("vertx");i=e.runOnLoop||e.runOnContext;return useVertxTimer()}catch(e){return useSetTimeout()}}var m=void 0;if(u){m=useNextTick()}else if(l){m=useMutationObserver()}else if(p){m=useMessageChannel()}else if(a===undefined&&"function"==="function"){m=attemptVertx()}else{m=useSetTimeout()}function then(e,t){var n=this;var i=new this.constructor(noop);if(i[d]===undefined){makePromise(i)}var s=n._state;if(s){var a=arguments[s-1];o((function(){return invokeCallback(s,i,a,n._result)}))}else{subscribe(n,i,e,t)}return i}function resolve$1(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e}var n=new t(noop);resolve(n,e);return n}var d=Math.random().toString(36).substring(2);function noop(){}var g=void 0;var y=1;var v=2;function selfFulfillment(){return new TypeError("You cannot resolve a promise with itself")}function cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.")}function tryThen(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}function handleForeignThenable(e,t,n){o((function(e){var i=false;var s=tryThen(n,t,(function(n){if(i){return}i=true;if(t!==n){resolve(e,n)}else{fulfill(e,n)}}),(function(t){if(i){return}i=true;reject(e,t)}),"Settle: "+(e._label||" unknown promise"));if(!i&&s){i=true;reject(e,s)}}),e)}function handleOwnThenable(e,t){if(t._state===y){fulfill(e,t._result)}else if(t._state===v){reject(e,t._result)}else{subscribe(t,undefined,(function(t){return resolve(e,t)}),(function(t){return reject(e,t)}))}}function handleMaybeThenable(e,t,n){if(t.constructor===e.constructor&&n===then&&t.constructor.resolve===resolve$1){handleOwnThenable(e,t)}else{if(n===undefined){fulfill(e,t)}else if(isFunction(n)){handleForeignThenable(e,t,n)}else{fulfill(e,t)}}}function resolve(e,t){if(e===t){reject(e,selfFulfillment())}else if(objectOrFunction(t)){var n=void 0;try{n=t.then}catch(t){reject(e,t);return}handleMaybeThenable(e,t,n)}else{fulfill(e,t)}}function publishRejection(e){if(e._onerror){e._onerror(e._result)}publish(e)}function fulfill(e,t){if(e._state!==g){return}e._result=t;e._state=y;if(e._subscribers.length!==0){o(publish,e)}}function reject(e,t){if(e._state!==g){return}e._state=v;e._result=t;o(publishRejection,e)}function subscribe(e,t,n,i){var s=e._subscribers;var a=s.length;e._onerror=null;s[a]=t;s[a+y]=n;s[a+v]=i;if(a===0&&e._state){o(publish,e)}}function publish(e){var t=e._subscribers;var n=e._state;if(t.length===0){return}var i=void 0,s=void 0,o=e._result;for(var a=0;a<t.length;a+=3){i=t[a];s=t[a+n];if(i){invokeCallback(n,i,s,o)}else{s(o)}}e._subscribers.length=0}function invokeCallback(e,t,n,i){var s=isFunction(n),o=void 0,a=void 0,c=true;if(s){try{o=n(i)}catch(e){c=false;a=e}if(t===o){reject(t,cannotReturnOwn());return}}else{o=i}if(t._state!==g){}else if(s&&c){resolve(t,o)}else if(c===false){reject(t,a)}else if(e===y){fulfill(t,o)}else if(e===v){reject(t,o)}}function initializePromise(e,t){try{t((function resolvePromise(t){resolve(e,t)}),(function rejectPromise(t){reject(e,t)}))}catch(t){reject(e,t)}}var b=0;function nextId(){return b++}function makePromise(e){e[d]=b++;e._state=undefined;e._result=undefined;e._subscribers=[]}function validationError(){return new Error("Array Methods must be provided an Array")}var w=function(){function Enumerator(e,n){this._instanceConstructor=e;this.promise=new e(noop);if(!this.promise[d]){makePromise(this.promise)}if(t(n)){this.length=n.length;thiLine truncated
|
||||
/*!
|
||||
* humanize-ms - index.js
|
||||
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
||||
* MIT Licensed
|
||||
*/var i=n(31669);var s=n(80900);e.exports=function(e){if(typeof e==="number")return e;var t=s(e);if(t===undefined){var n=new Error(i.format("humanize-ms(%j) result undefined",e));console.warn(n.stack)}return t}},39695:(e,t,n)=>{"use strict";var i=n(15118).Buffer;t._dbcs=DBCSCodec;var s=-1,o=-2,a=-10,c=-1e3,l=new Array(256),u=-1;for(var p=0;p<256;p++)l[p]=s;function DBCSCodec(e,t){this.encodingName=e.encodingName;if(!e)throw new Error("DBCS codec is called without the data.");if(!e.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var n=e.table();this.decodeTables=[];this.decodeTables[0]=l.slice(0);this.decodeTableSeq=[];for(var i=0;i<n.length;i++)this._addDecodeChunk(n[i]);if(typeof e.gb18030==="function"){this.gb18030=e.gb18030();var a=this.decodeTables.length;this.decodeTables.push(l.slice(0));var u=this.decodeTables.length;this.decodeTables.push(l.slice(0));var p=this.decodeTables[0];for(var i=129;i<=254;i++){var h=this.decodeTables[c-p[i]];for(var m=48;m<=57;m++){if(h[m]===s){h[m]=c-a}else if(h[m]>c){throw new Error("gb18030 decode tables conflict at byte 2")}var d=this.decodeTables[c-h[m]];for(var g=129;g<=254;g++){if(d[g]===s){d[g]=c-u}else if(d[g]===c-u){continue}else if(d[g]>c){throw new Error("gb18030 decode tables conflict at byte 3")}var y=this.decodeTables[c-d[g]];for(var v=48;v<=57;v++){if(y[v]===s)y[v]=o}}}}}this.defaultCharUnicode=t.defaultCharUnicode;this.encodeTable=[];this.encodeTableSeq=[];var b={};if(e.encodeSkipVals)for(var i=0;i<e.encodeSkipVals.length;i++){var w=e.encodeSkipVals[i];if(typeof w==="number")b[w]=true;else for(var m=w.from;m<=w.to;m++)b[m]=true}this._fillEncodeTable(0,0,b);if(e.encodeAdd){for(var x in e.encodeAdd)if(Object.prototype.hasOwnProperty.call(e.encodeAdd,x))this._setEncodeChar(x.charCodeAt(0),e.encodeAdd[x])}this.defCharSB=this.encodeTable[0][t.defaultCharSingleByte.charCodeAt(0)];if(this.defCharSB===s)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===s)this.defCharSB="?".charCodeAt(0)}DBCSCodec.prototype.encoder=DBCSEncoder;DBCSCodec.prototype.decoder=DBCSDecoder;DBCSCodec.prototype._getDecodeTrieNode=function(e){var t=[];for(;e>0;e>>>=8)t.push(e&255);if(t.length==0)t.push(0);var n=this.decodeTables[0];for(var i=t.length-1;i>0;i--){var o=n[t[i]];if(o==s){n[t[i]]=c-this.decodeTables.length;this.decodeTables.push(n=l.slice(0))}else if(o<=c){n=this.decodeTables[c-o]}else throw new Error("Overwrite byte in "+this.encodingName+", addr: "+e.toString(16))}return n};DBCSCodec.prototype._addDecodeChunk=function(e){var t=parseInt(e[0],16);var n=this._getDecodeTrieNode(t);t=t&255;for(var i=1;i<e.length;i++){var s=e[i];if(typeof s==="string"){for(var o=0;o<s.length;){var c=s.charCodeAt(o++);if(55296<=c&&c<56320){var l=s.charCodeAt(o++);if(56320<=l&&l<57344)n[t++]=65536+(c-55296)*1024+(l-56320);else throw new Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+e[0])}else if(4080<c&&c<=4095){var u=4095-c+2;var p=[];for(var h=0;h<u;h++)p.push(s.charCodeAt(o++));n[t++]=a-this.decodeTableSeq.length;this.decodeTableSeq.push(p)}else n[t++]=c}}else if(typeof s==="number"){var m=n[t-1]+1;for(var o=0;o<s;o++)n[t++]=m++}else throw new Error("Incorrect type '"+typeof s+"' given in "+this.encodingName+" at chunk "+e[0])}if(t>255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+e[0]+": too long"+t)};DBCSCodec.prototype._getEncodeBucket=function(e){var t=e>>8;if(this.encodeTable[t]===undefined)this.encodeTable[t]=l.slice(0);return this.encodeTable[t]};DBCSCodec.prototype._setEncodeChar=function(e,t){var n=this._getEncodeBucket(e);var i=e&255;if(n[i]<=a)this.encodeTableSeq[a-n[i]][u]=t;else if(n[i]==s)n[i]=t};DBCSCodec.prototype._setEncodeSequence=function(e,t){var n=e[0];var i=this._getEncodeBucket(n);var o=n&255;var c;if(i[o]<=a){c=this.encodeTableSeq[a-i[o]]}else{c={};if(i[o]!==s)c[u]=i[o];i[o]=a-this.encodeTableSeq.length;this.encodeTableSeq.push(c)}for(var l=1;l<e.length-1;l++){var p=c[n];if(typeof p==="object")c=p;else{c=c[n]={};if(p!==undefined)c[u]=p}}n=e[e.length-1];c[n]=t};DBCSCodec.prototype._fillEncodeTable=function(e,t,n){var i=this.decodeTables[e];var s=false;var o={};for(var l=0;l<256;l++){var u=i[l];var p=t+l;if(n[p])continue;if(u>=0){this._setEncodeChar(u,p);s=true}else if(u<=c){var h=c-u;if(!o[h]){var m=p<<8>>>0;if(this._fillEncodeTable(h,m,n))s=true;else o[h]=true}}else if(u<=a){this._setEncodeSequence(this.decodeTableSeq[a-u],p);s=true}}return s};function DBCSEncoder(e,t){this.leadSurrogate=-1;this.seqObj=undefined;this.encodeTable=t.encodeTable;this.encodeTableSeq=t.encodeTableSeq;this.defaultCharSingleByte=t.defCharSB;this.gb18030=t.gb18030}DBCSEncoder.prototype.write=function(e){var t=i.alloc(e.length*(this.gb18030?4:3)),n=this.leadSurrogate,o=this.seqObj,c=-1,l=0,p=0;while(true){if(c===-1){if(l==e.length)break;var h=e.charCodeAt(l++)}else{var h=c;c=-1}if(55296<=h&&h<57344){if(h<56320){if(n===-1){n=h;continue}else{n=h;h=s}}else{if(n!==-1){h=65536+(n-55296)*1024+(h-56320);n=-1}else{h=s}}}else if(n!==Line truncated
|
||||
/**
|
||||
* @preserve
|
||||
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
||||
*
|
||||
* @author <a href="mailto:[email protected]">Jens Taylor</a>
|
||||
* @see http://github.com/homebrewing/brauhaus-diff
|
||||
* @author <a href="mailto:[email protected]">Gary Court</a>
|
||||
* @see http://github.com/garycourt/murmurhash-js
|
||||
* @author <a href="mailto:[email protected]">Austin Appleby</a>
|
||||
* @see http://sites.google.com/site/murmurhash/
|
||||
*/
|
||||
(function(){var t;function MurmurHash3(e,n){var i=this instanceof MurmurHash3?this:t;i.reset(n);if(typeof e==="string"&&e.length>0){i.hash(e)}if(i!==this){return i}}MurmurHash3.prototype.hash=function(e){var t,n,i,s,o;o=e.length;this.len+=o;n=this.k1;i=0;switch(this.rem){case 0:n^=o>i?e.charCodeAt(i++)&65535:0;case 1:n^=o>i?(e.charCodeAt(i++)&65535)<<8:0;case 2:n^=o>i?(e.charCodeAt(i++)&65535)<<16:0;case 3:n^=o>i?(e.charCodeAt(i)&255)<<24:0;n^=o>i?(e.charCodeAt(i++)&65280)>>8:0}this.rem=o+this.rem&3;o-=this.rem;if(o>0){t=this.h1;while(1){n=n*11601+(n&65535)*3432906752&4294967295;n=n<<15|n>>>17;n=n*13715+(n&65535)*461832192&4294967295;t^=n;t=t<<13|t>>>19;t=t*5+3864292196&4294967295;if(i>=o){break}n=e.charCodeAt(i++)&65535^(e.charCodeAt(i++)&65535)<<8^(e.charCodeAt(i++)&65535)<<16;s=e.charCodeAt(i++);n^=(s&255)<<24^(s&65280)>>8}n=0;switch(this.rem){case 3:n^=(e.charCodeAt(i+2)&65535)<<16;case 2:n^=(e.charCodeAt(i+1)&65535)<<8;case 1:n^=e.charCodeAt(i)&65535}this.h1=t}this.k1=n;return this};MurmurHash3.prototype.result=function(){var e,t;e=this.k1;t=this.h1;if(e>0){e=e*11601+(e&65535)*3432906752&4294967295;e=e<<15|e>>>17;e=e*13715+(e&65535)*461832192&4294967295;t^=e}t^=this.len;t^=t>>>16;t=t*51819+(t&65535)*2246770688&4294967295;t^=t>>>13;t=t*44597+(t&65535)*3266445312&4294967295;t^=t>>>16;return t>>>0};MurmurHash3.prototype.reset=function(e){this.h1=typeof e==="number"?e:0;this.rem=this.k1=this.len=0;return this};t=new MurmurHash3;if(true){e.exports=MurmurHash3}else{}})()},65476:(e,t,n)=>{const i=new Map;const s=n(35747);const{dirname:o,resolve:a}=n(85622);const lstat=e=>new Promise(((t,n)=>s.lstat(e,((e,i)=>e?n(e):t(i)))));const inferOwner=e=>{e=a(e);if(i.has(e))return Promise.resolve(i.get(e));const statThen=t=>{const{uid:n,gid:s}=t;i.set(e,{uid:n,gid:s});return{uid:n,gid:s}};const t=o(e);const n=t===e?null:n=>inferOwner(t).then((t=>{i.set(e,t);return t}));return lstat(e).then(statThen,n)};const inferOwnerSync=e=>{e=a(e);if(i.has(e))return i.get(e);const t=o(e);let n=true;try{const o=s.lstatSync(e);n=false;const{uid:a,gid:c}=o;i.set(e,{uid:a,gid:c});return{uid:a,gid:c}}finally{if(n&&t!==e){const n=inferOwnerSync(t);i.set(e,n);return n}}};const c=new Map;e.exports=e=>{e=a(e);if(c.has(e))return Promise.resolve(c.get(e));const t=inferOwner(e).then((t=>{c.delete(e);return t}));c.set(e,t);return t};e.exports.sync=inferOwnerSync;e.exports.clearCache=()=>{i.clear();c.clear()}},52492:(e,t,n)=>{var i=n(62940);var s=Object.create(null);var o=n(1223);e.exports=i(inflight);function inflight(e,t){if(s[e]){s[e].push(t);return null}else{s[e]=[t];return makeres(e)}}function makeres(e){return o((function RES(){var t=s[e];var n=t.length;var i=slice(arguments);try{for(var o=0;o<n;o++){t[o].apply(null,i)}}finally{if(t.length>n){t.splice(0,n);process.nextTick((function(){RES.apply(null,i)}))}else{delete s[e]}}}))}function slice(e){var t=e.length;var n=[];for(var i=0;i<t;i++)n[i]=e[i];return n}},44124:(e,t,n)=>{try{var i=n(31669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(t){e.exports=n(8544)}},8544:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},28885:(e,t)=>{t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var n=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var i=[];var s="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var o=t.whitespace?" = ":"=";Object.keys(e).forEach((function(t,a,c){var l=e[t];if(l&&Array.isArray(l)){l.forEach((function(e){s+=safe(t+"[]")+o+safe(e)+"\n"}))}else if(l&&typeof l==="object")i.push(t);else s+=safe(t)+o+safe(l)+n}));if(t.section&&s.length)s="["+safe(t.section)+"]"+n+s;i.forEach((function(i,o,a){var c=dotSplit(i).join("\\.");var l=(t.section?t.section+".":"")+c;var u=encode(e[i],{section:l,whitespace:t.whitespace});if(s.length&&u.length)s+=n;s+=u}));return s}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(e){var t={};var n=t;var i=null;var s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var o=e.split(/[\r\n]+/g);o.forEach((function(e,o,a){if(!e||e.match(/^\s*[;#]/))return;var c=e.match(s);if(!c)return;if(c[1]!==undefined){i=unsafe(c[1]);if(i==="__proto__"){n={};return}n=t[i]=t[i]||{};return}var l=unsafe(c[2]);if(l==="__proto__")return;var u=c[3]?unsafe(c[4]):true;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(l.length>2&&l.slice(-2)==="[]"){l=l.substring(0,l.length-2);if(l==="__proto__")return;if(!n[l])n[l]=[];else if(!Array.isArray(n[l]))n[l]=[n[l]]}if(Array.isArLine truncated
|
||||
Wanted: ${e}
|
||||
Found: ${t}`);n.code="EINTEGRITY";n.expected=e;n.found=t;return n}},14660:(e,t,n)=>{"use strict";const i=n(78710);const s=n(63899);const o=n(76417);const a=n(63571);const c=n(48624);const l=n(77758);const u=n(52850);const p=n(33758);const h=n(85622);const m=n(13433);const d=n(7211);const g=n(19791).Jw.K;const y=i.promisify(l.appendFile);const v=i.promisify(l.readFile);const b=i.promisify(l.readdir);const w=p.concat;const x=p.from;e.exports.NotFoundError=class NotFoundError extends Error{constructor(e,t){super(d`No cache entry for \`${t}\` found in \`${e}\``);this.code="ENOENT";this.cache=e;this.key=t}};const S=a({metadata:{},size:{}});e.exports.insert=insert;function insert(e,t,n,i){i=S(i);const s=bucketPath(e,t);const o={key:t,integrity:n&&m.stringify(n),time:Date.now(),size:i.size,metadata:i.metadata};return c.mkdirfix(e,h.dirname(s)).then((()=>{const e=JSON.stringify(o);return y(s,`\n${hashEntry(e)}\t${e}`)})).then((()=>c.chownr(e,s))).catch({code:"ENOENT"},(()=>{})).then((()=>formatEntry(e,o)))}e.exports.insert.sync=insertSync;function insertSync(e,t,n,i){i=S(i);const s=bucketPath(e,t);const o={key:t,integrity:n&&m.stringify(n),time:Date.now(),size:i.size,metadata:i.metadata};c.mkdirfix.sync(e,h.dirname(s));const a=JSON.stringify(o);l.appendFileSync(s,`\n${hashEntry(a)}\t${a}`);try{c.chownr.sync(e,s)}catch(e){if(e.code!=="ENOENT"){throw e}}return formatEntry(e,o)}e.exports.find=find;function find(e,t){const n=bucketPath(e,t);return bucketEntries(n).then((n=>n.reduce(((n,i)=>{if(i&&i.key===t){return formatEntry(e,i)}else{return n}}),null))).catch((e=>{if(e.code==="ENOENT"){return null}else{throw e}}))}e.exports.find.sync=findSync;function findSync(e,t){const n=bucketPath(e,t);try{return bucketEntriesSync(n).reduce(((n,i)=>{if(i&&i.key===t){return formatEntry(e,i)}else{return n}}),null)}catch(e){if(e.code==="ENOENT"){return null}else{throw e}}}e.exports.delete=del;function del(e,t,n){return insert(e,t,null,n)}e.exports.delete.sync=delSync;function delSync(e,t,n){return insertSync(e,t,null,n)}e.exports.lsStream=lsStream;function lsStream(e){const t=bucketDir(e);const n=x.obj();readdirOrEmpty(t).map((i=>{const s=h.join(t,i);return readdirOrEmpty(s).map((t=>{const i=h.join(s,t);return readdirOrEmpty(i).map((t=>{const s=bucketEntries(h.join(i,t)).reduce(((e,t)=>{e.set(t.key,t);return e}),new Map);return s.then((t=>{for(let i of t.values()){const t=formatEntry(e,i);t&&n.push(t)}})).catch({code:"ENOENT"},nop)}))}))})).then((()=>{n.push(null)}),(e=>{n.emit("error",e)}));return n}e.exports.ls=ls;function ls(e){return i.fromNode((t=>{lsStream(e).on("error",t).pipe(w((e=>{t(null,e.reduce(((e,t)=>{e[t.key]=t;return e}),{}))})))}))}function bucketEntries(e,t){return v(e,"utf8").then((e=>_bucketEntries(e,t)))}function bucketEntriesSync(e,t){const n=l.readFileSync(e,"utf8");return _bucketEntries(n,t)}function _bucketEntries(e,t){let n=[];e.split("\n").forEach((e=>{if(!e){return}const t=e.split("\t");if(!t[1]||hashEntry(t[1])!==t[0]){return}let i;try{i=JSON.parse(t[1])}catch(e){return}if(i){n.push(i)}}));return n}e.exports._bucketDir=bucketDir;function bucketDir(e){return h.join(e,`index-v${g}`)}e.exports._bucketPath=bucketPath;function bucketPath(e,t){const n=hashKey(t);return h.join.apply(h,[bucketDir(e)].concat(u(n)))}e.exports._hashKey=hashKey;function hashKey(e){return hash(e,"sha256")}e.exports._hashEntry=hashEntry;function hashEntry(e){return hash(e,"sha1")}function hash(e,t){return o.createHash(t).update(e).digest("hex")}function formatEntry(e,t){if(!t.integrity){return null}return{key:t.key,integrity:t.integrity,path:s(e,t.integrity),size:t.size,time:t.time,metadata:t.metadata}}function readdirOrEmpty(e){return b(e).catch({code:"ENOENT"},(()=>[])).catch({code:"ENOTDIR"},(()=>[]))}function nop(){}},66009:(e,t,n)=>{"use strict";const i=n(42605);const s=50*1024*1024;const o=3*60*1e3;let a=new i({max:s,maxAge:o,length:(e,t)=>{if(t.startsWith("key:")){return e.data.length}else if(t.startsWith("digest:")){return e.length}}});e.exports.clearMemoized=clearMemoized;function clearMemoized(){const e={};a.forEach(((t,n)=>{e[n]=t}));a.reset();return e}e.exports.put=put;function put(e,t,n,i){pickMem(i).set(`key:${e}:${t.key}`,{entry:t,data:n});putDigest(e,t.integrity,n,i)}e.exports.put.byDigest=putDigest;function putDigest(e,t,n,i){pickMem(i).set(`digest:${e}:${t}`,n)}e.exports.get=get;function get(e,t,n){return pickMem(n).get(`key:${e}:${t}`)}e.exports.get.byDigest=getDigest;function getDigest(e,t,n){return pickMem(n).get(`digest:${e}:${t}`)}class ObjProxy{constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}}function pickMem(e){if(!e||!e.memoize){return a}else if(e.memoize.get&&e.memoize.set){return e.memoize}else if(typeof e.memoize==="object"){return new ObjProxy(e.memoize)}else{return a}}},48624:(e,t,n)=>{"use strict";const i=n(78710);const s=i.promisify(n(28640));const o=i.promisify(n(66186));const a=n(50439);const c=n(65476);const l={uid:null,gid:null};const getSelf=()=>{if(typeof l.uid!=="nuLine truncated
|
||||
Wanted: ${e}
|
||||
Found: ${t}`);n.code="EINTEGRITY";n.expected=e;n.found=t;return n}},27417:(e,t,n)=>{"use strict";const i=n(78710);const s=n(23438);const o=n(76417);const a=n(63571);const c=n(27736);const l=n(77758);const u=n(75159);const p=n(33758);const h=n(85622);const m=n(32173);const d=n(7653);const g=n(38449).Jw.K;const y=i.promisify(l.appendFile);const v=i.promisify(l.readFile);const b=i.promisify(l.readdir);const w=p.concat;const x=p.from;e.exports.NotFoundError=class NotFoundError extends Error{constructor(e,t){super(d`No cache entry for \`${t}\` found in \`${e}\``);this.code="ENOENT";this.cache=e;this.key=t}};const S=a({metadata:{},size:{}});e.exports.insert=insert;function insert(e,t,n,i){i=S(i);const s=bucketPath(e,t);const o={key:t,integrity:n&&m.stringify(n),time:Date.now(),size:i.size,metadata:i.metadata};return c.mkdirfix(e,h.dirname(s)).then((()=>{const e=JSON.stringify(o);return y(s,`\n${hashEntry(e)}\t${e}`)})).then((()=>c.chownr(e,s))).catch({code:"ENOENT"},(()=>{})).then((()=>formatEntry(e,o)))}e.exports.insert.sync=insertSync;function insertSync(e,t,n,i){i=S(i);const s=bucketPath(e,t);const o={key:t,integrity:n&&m.stringify(n),time:Date.now(),size:i.size,metadata:i.metadata};c.mkdirfix.sync(e,h.dirname(s));const a=JSON.stringify(o);l.appendFileSync(s,`\n${hashEntry(a)}\t${a}`);try{c.chownr.sync(e,s)}catch(e){if(e.code!=="ENOENT"){throw e}}return formatEntry(e,o)}e.exports.find=find;function find(e,t){const n=bucketPath(e,t);return bucketEntries(n).then((n=>n.reduce(((n,i)=>{if(i&&i.key===t){return formatEntry(e,i)}else{return n}}),null))).catch((e=>{if(e.code==="ENOENT"){return null}else{throw e}}))}e.exports.find.sync=findSync;function findSync(e,t){const n=bucketPath(e,t);try{return bucketEntriesSync(n).reduce(((n,i)=>{if(i&&i.key===t){return formatEntry(e,i)}else{return n}}),null)}catch(e){if(e.code==="ENOENT"){return null}else{throw e}}}e.exports.delete=del;function del(e,t,n){return insert(e,t,null,n)}e.exports.delete.sync=delSync;function delSync(e,t,n){return insertSync(e,t,null,n)}e.exports.lsStream=lsStream;function lsStream(e){const t=bucketDir(e);const n=x.obj();readdirOrEmpty(t).map((i=>{const s=h.join(t,i);return readdirOrEmpty(s).map((t=>{const i=h.join(s,t);return readdirOrEmpty(i).map((t=>{const s=bucketEntries(h.join(i,t)).reduce(((e,t)=>{e.set(t.key,t);return e}),new Map);return s.then((t=>{for(let i of t.values()){const t=formatEntry(e,i);t&&n.push(t)}})).catch({code:"ENOENT"},nop)}))}))})).then((()=>{n.push(null)}),(e=>{n.emit("error",e)}));return n}e.exports.ls=ls;function ls(e){return i.fromNode((t=>{lsStream(e).on("error",t).pipe(w((e=>{t(null,e.reduce(((e,t)=>{e[t.key]=t;return e}),{}))})))}))}function bucketEntries(e,t){return v(e,"utf8").then((e=>_bucketEntries(e,t)))}function bucketEntriesSync(e,t){const n=l.readFileSync(e,"utf8");return _bucketEntries(n,t)}function _bucketEntries(e,t){let n=[];e.split("\n").forEach((e=>{if(!e){return}const t=e.split("\t");if(!t[1]||hashEntry(t[1])!==t[0]){return}let i;try{i=JSON.parse(t[1])}catch(e){return}if(i){n.push(i)}}));return n}e.exports._bucketDir=bucketDir;function bucketDir(e){return h.join(e,`index-v${g}`)}e.exports._bucketPath=bucketPath;function bucketPath(e,t){const n=hashKey(t);return h.join.apply(h,[bucketDir(e)].concat(u(n)))}e.exports._hashKey=hashKey;function hashKey(e){return hash(e,"sha256")}e.exports._hashEntry=hashEntry;function hashEntry(e){return hash(e,"sha1")}function hash(e,t){return o.createHash(t).update(e).digest("hex")}function formatEntry(e,t){if(!t.integrity){return null}return{key:t.key,integrity:t.integrity,path:s(e,t.integrity),size:t.size,time:t.time,metadata:t.metadata}}function readdirOrEmpty(e){return b(e).catch({code:"ENOENT"},(()=>[])).catch({code:"ENOTDIR"},(()=>[]))}function nop(){}},32120:(e,t,n)=>{"use strict";const i=n(19888);const s=50*1024*1024;const o=3*60*1e3;let a=new i({max:s,maxAge:o,length:(e,t)=>{if(t.startsWith("key:")){return e.data.length}else if(t.startsWith("digest:")){return e.length}}});e.exports.clearMemoized=clearMemoized;function clearMemoized(){const e={};a.forEach(((t,n)=>{e[n]=t}));a.reset();return e}e.exports.put=put;function put(e,t,n,i){pickMem(i).set(`key:${e}:${t.key}`,{entry:t,data:n});putDigest(e,t.integrity,n,i)}e.exports.put.byDigest=putDigest;function putDigest(e,t,n,i){pickMem(i).set(`digest:${e}:${t}`,n)}e.exports.get=get;function get(e,t,n){return pickMem(n).get(`key:${e}:${t}`)}e.exports.get.byDigest=getDigest;function getDigest(e,t,n){return pickMem(n).get(`digest:${e}:${t}`)}class ObjProxy{constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}}function pickMem(e){if(!e||!e.memoize){return a}else if(e.memoize.get&&e.memoize.set){return e.memoize}else if(typeof e.memoize==="object"){return new ObjProxy(e.memoize)}else{return a}}},27736:(e,t,n)=>{"use strict";const i=n(78710);const s=i.promisify(n(1297));const o=i.promisify(n(66186));const a=n(50439);const c=n(65476);const l={uid:null,gid:null};const getSelf=()=>{if(typeof l.uid!=="numLine truncated
|
||||
*/Object.defineProperty(t,"__esModule",{value:true});var a=r(4351);var n=function(e){a.__extends(PollerStoppedError,e);function PollerStoppedError(t){var r=e.call(this,t)||this;r.name="PollerStoppedError";Object.setPrototypeOf(r,PollerStoppedError.prototype);return r}return PollerStoppedError}(Error);var i=function(e){a.__extends(PollerCancelledError,e);function PollerCancelledError(t){var r=e.call(this,t)||this;r.name="PollerCancelledError";Object.setPrototypeOf(r,PollerCancelledError.prototype);return r}return PollerCancelledError}(Error);var o=function(){function Poller(e){var t=this;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise((function(e,r){t.resolve=e;t.reject=r}));this.promise.catch((function(){}))}Poller.prototype.startPolling=function(){return a.__awaiter(this,void 0,void 0,(function(){return a.__generator(this,(function(e){switch(e.label){case 0:if(this.stopped){this.stopped=false}e.label=1;case 1:if(!(!this.isStopped()&&!this.isDone()))return[3,4];return[4,this.poll()];case 2:e.sent();return[4,this.delay()];case 3:e.sent();return[3,1];case 4:return[2]}}))}))};Poller.prototype.pollOnce=function(e){if(e===void 0){e={}}return a.__awaiter(this,void 0,void 0,(function(){var t,r;return a.__generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!!this.isDone())return[3,2];t=this;return[4,this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})];case 1:t.operation=a.sent();if(this.isDone()&&this.resolve){this.resolve(this.operation.state.result)}a.label=2;case 2:return[3,4];case 3:r=a.sent();this.operation.state.error=r;if(this.reject){this.reject(r)}throw r;case 4:return[2]}}))}))};Poller.prototype.fireProgress=function(e){for(var t=0,r=this.pollProgressCallbacks;t<r.length;t++){var a=r[t];a(e)}};Poller.prototype.cancelOnce=function(e){if(e===void 0){e={}}return a.__awaiter(this,void 0,void 0,(function(){var t;return a.__generator(this,(function(r){switch(r.label){case 0:t=this;return[4,this.operation.cancel(e)];case 1:t.operation=r.sent();if(this.reject){this.reject(new i("Poller cancelled"))}return[2]}}))}))};Poller.prototype.poll=function(e){var t=this;if(e===void 0){e={}}if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);var clearPollOncePromise=function(){t.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise};Poller.prototype.pollUntilDone=function(){return a.__awaiter(this,void 0,void 0,(function(){return a.__generator(this,(function(e){if(this.stopped){this.startPolling().catch(this.reject)}return[2,this.promise]}))}))};Poller.prototype.onProgress=function(e){var t=this;this.pollProgressCallbacks.push(e);return function(){t.pollProgressCallbacks=t.pollProgressCallbacks.filter((function(t){return t!==e}))}};Poller.prototype.isDone=function(){var e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)};Poller.prototype.stopPolling=function(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new n("This poller is already stopped"))}}};Poller.prototype.isStopped=function(){return this.stopped};Poller.prototype.cancelOperation=function(e){if(e===void 0){e={}}if(!this.stopped){this.stopped=true}if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise};Poller.prototype.getOperationState=function(){return this.operation.state};Poller.prototype.getResult=function(){var e=this.operation.state;return e.result};Poller.prototype.toString=function(){return this.operation.toString()};return Poller}();t.Poller=o;t.PollerCancelledError=i;t.PollerStoppedError=n},4559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});r(6821)},4175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a=r(5163);var n=r(4351);var i=function(){function NoOpSpan(){}NoOpSpan.prototype.context=function(){return{spanId:"",traceId:"",traceFlags:0}};NoOpSpan.prototype.end=function(e){};NoOpSpan.prototype.setAttribute=function(e,t){return this};NoOpSpan.prototype.setAttributes=function(e){return this};NoOpSpan.prototype.addEvent=function(e,t){return this};NoOpSpan.prototype.setStatus=function(e){return this};NoOpSpan.prototype.updateName=function(e){return this};NoOpSpan.prototype.isRecording=function(){return false};NoOpSpan.prototype.recordException=function(e,t){};return NoOpSpan}();var o=function(){function NoOpTracer(){}NoOpTracer.prototype.startSpan=function(e,t){return new i};NoOpTracer.prototype.getCurrentSpan=function(){return new i};NoOpTracer.prototype.withSpan=function(e,t){return t()};NoOpTracer.prototype.bind=function(e,t){return e};return NoOpTracer}();function getGlobalObject(){return global}var s=4;var c=Symbol.for("@azure/core-tracing.tracerCache3");var l;function loadTracerCache(){var e=getGlobalObject();var t=e[c];var r=true;ifLine truncated
|
||||
/*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* MIT Licensed
|
||||
*/
|
||||
e.exports=n(73313)},43583:(e,t,n)=>{"use strict";
|
||||
e.exports=r(3313)},3583:(e,t,r)=>{"use strict";
|
||||
/*!
|
||||
* mime-types
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/var i=n(47426);var s=n(85622).extname;var o=/^\s*([^;\s]*)(?:;|\s|$)/;var a=/^text\//i;t.charset=charset;t.charsets={lookup:charset};t.contentType=contentType;t.extension=extension;t.extensions=Object.create(null);t.lookup=lookup;t.types=Object.create(null);populateMaps(t.extensions,t.types);function charset(e){if(!e||typeof e!=="string"){return false}var t=o.exec(e);var n=t&&i[t[1].toLowerCase()];if(n&&n.charset){return n.charset}if(t&&a.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var n=e.indexOf("/")===-1?t.lookup(e):e;if(!n){return false}if(n.indexOf("charset")===-1){var i=t.charset(n);if(i)n+="; charset="+i.toLowerCase()}return n}function extension(e){if(!e||typeof e!=="string"){return false}var n=o.exec(e);var i=n&&t.extensions[n[1].toLowerCase()];if(!i||!i.length){return false}return i[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var n=s("x."+e).toLowerCase().substr(1);if(!n){return false}return t.types[n]||false}function populateMaps(e,t){var n=["nginx","apache",undefined,"iana"];Object.keys(i).forEach((function forEachMimeType(s){var o=i[s];var a=o.extensions;if(!a||!a.length){return}e[s]=a;for(var c=0;c<a.length;c++){var l=a[c];if(t[l]){var u=n.indexOf(i[t[l]].source);var p=n.indexOf(o.source);if(t[l]!=="application/octet-stream"&&(u>p||u===p&&t[l].substr(0,12)==="application/")){continue}}t[l]=s}}))}},83973:(e,t,n)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var i={sep:"/"};try{i=n(85622)}catch(e){}var s=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var o=n(33717);var a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var c="[^/]";var l=c+"*?";var u="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var p="(?:(?!(?:\\/|^)\\.).)*?";var h=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var m=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(n,i,s){return minimatch(n,e,t)}}function ext(e,t){e=e||{};t=t||{};var n={};Object.keys(t).forEach((function(e){n[e]=t[e]}));Object.keys(e).forEach((function(t){n[t]=e[t]}));return n}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var n=function minimatch(n,i,s){return t.minimatch(n,i,ext(e,s))};n.Minimatch=function Minimatch(n,i){return new t.Minimatch(n,ext(e,i))};return n};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,n){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!n)n={};if(!n.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,n).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var n=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,n);n=this.globParts=n.map((function(e){return e.split(m)}));this.debug(this.pattern,n);n=n.map((function(e,t,n){return e.map(this.parse,this)}),this);this.debug(this.pattern,n);n=n.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,n);this.set=n}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var n=this.options;var i=0;if(n.nonegate)return;for(var s=0,o=e.length;s<o&&e.charAt(s)==="!";s++){t=!t;i++}if(i)this.pattern=e.substr(i);this.negate=t}minimatch.braceExpand=function(e,t){return braceExpand(e,t)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(e,t){if(!t){if(this instanceof Minimatch){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;if(typeof e==="undefined"){throw new TypeError("undefined pattern")}if(t.nobrace||!e.match(/\{.*\}/)){return[e]}return o(e)}Minimatch.prototype.parse=parse;var d={};function parse(e,t){if(e.length>1024*64){throw new TypeError("pattern is too long")}var n=this.options;if(!n.noglobstar&&e==="**")return s;if(e==="")return"";var i="";var o=!!n.nocase;var u=false;var p=[];var m=[];var g;var y=false;var v=-1;var b=-1;var w=e.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var x=this;function clearStateChar(){if(g){switch(g){case"*":i+=l;o=true;break;case"?":i+=c;o=true;break;default:i+="\\"+g;break}x.debug("clearStateChar %j %j",g,i);g=false}}for(var S=0,k=e.length,_;S<k&&(_=e.charAt(S));S++){this.debLine truncated
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/var t=Object.getOwnPropertySymbols;var n=Object.prototype.hasOwnProperty;var i=Object.prototype.propertyIsEnumerable;function toObject(e){if(e===null||e===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(e)}function shouldUseNative(){try{if(!Object.assign){return false}var e=new String("abc");e[5]="de";if(Object.getOwnPropertyNames(e)[0]==="5"){return false}var t={};for(var n=0;n<10;n++){t["_"+String.fromCharCode(n)]=n}var i=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if(i.join("")!=="0123456789"){return false}var s={};"abcdefghijklmnopqrst".split("").forEach((function(e){s[e]=e}));if(Object.keys(Object.assign({},s)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(e){return false}}e.exports=shouldUseNative()?Object.assign:function(e,s){var o;var a=toObject(e);var c;for(var l=1;l<arguments.length;l++){o=Object(arguments[l]);for(var u in o){if(n.call(o,u)){a[u]=o[u]}}if(t){c=t(o);for(var p=0;p<c.length;p++){if(i.call(o,c[p])){a[c[p]]=o[c[p]]}}}}return a}},1223:(e,t,n)=>{var i=n(62940);e.exports=i(once);e.exports.strict=i(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},43406:(e,t,n)=>{"use strict";var i=n(12087);function homedir(){var e=process.env;var t=e.HOME;var n=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||t||null}if(process.platform==="darwin"){return t||(n?"/Users/"+n:null)}if(process.platform==="linux"){return t||(process.getuid()===0?"/root":n?"/home/"+n:null)}return t||null}e.exports=typeof i.homedir==="function"?i.homedir:homedir},71284:e=>{"use strict";var t=process.platform==="win32";var n=t?/[^:]\\$/:/.\/$/;e.exports=function(){var e;if(t){e=process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp"}else{e=process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp"}if(n.test(e)){e=e.slice(0,-1)}return e}},84669:(e,t,n)=>{var i=process.platform==="win32";var s=n(85622);var o=n(63129).exec;var a=n(71284);var c=n(43406);function memo(e,n,i){var s=false;var a=false;t[e]=function(c){var l=n();if(!l&&!s&&!a&&i){s=true;a=true;o(i,(function(e,t,n){a=false;if(e)return;l=t.trim()}))}t[e]=function(e){if(e)process.nextTick(e.bind(null,null,l));return l};if(c&&!a)process.nextTick(c.bind(null,null,l));return l}}memo("user",(function(){return i?process.env.USERDOMAIN+"\\"+process.env.USERNAME:process.env.USER}),"whoami");memo("prompt",(function(){return i?process.env.PROMPT:process.env.PS1}));memo("hostname",(function(){return i?process.env.COMPUTERNAME:process.env.HOSTNAME}),"hostname");memo("tmpdir",(function(){return a()}));memo("home",(function(){return c()}));memo("path",(function(){return(process.env.PATH||process.env.Path||process.env.path).split(i?";":":")}));memo("editor",(function(){return process.env.EDITOR||process.env.VISUAL||(i?"notepad.exe":"vi")}));memo("shell",(function(){return i?process.env.ComSpec||"cmd":process.env.SHELL||"bash"}))},57684:(e,t,n)=>{"use strict";const i=n(80746);const pLimit=e=>{if(!((Number.isInteger(e)||e===Infinity)&&e>0)){return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"))}const t=[];let n=0;const next=()=>{n--;if(t.length>0){t.shift()()}};const run=(e,t,...s)=>{n++;const o=i(e,...s);t(o);o.then(next,next)};const enqueue=(i,s,...o)=>{if(n<e){run(i,s,...o)}else{t.push(run.bind(null,i,s,...o))}};const generator=(e,...t)=>new Promise((n=>enqueue(e,n,...t)));Object.defineProperties(generator,{activeCount:{get:()=>n},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}});return generator};e.exports=pLimit;e.exports.default=pLimit},80746:e=>{"use strict";const pTry=(e,...t)=>new Promise((n=>{n(e(...t))}));e.exports=pTry;e.exports.default=pTry},61950:(e,t,n)=>{var i=n(51642).Transform;var s=n(44124);var o=n(73680);var a=n(31669);var ParallelTransform=function(e,t,n){if(!(this instanceof ParallelTransform))return new ParallelTransform(e,t,n);if(typeof e==="function"){n=e;t=null;e=1}if(typeof t==="function"){n=t;t=null}if(!t)t={};if(!t.highWaterMark)t.highWaterMark=Math.max(e,16);if(t.objectMode!==false)t.objectMode=true;i.call(this,t);this._maxParallel=e;this._ontransform=n;this._destroyed=false;this._flushed=false;this._ordered=t.ordered!==false;this._buffer=this._ordered?o(e):[];this._top=0;this._bottom=0;this._ondrain=null};s(PaLine truncated
|
||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}}if(s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,n){return s(e,t,n)}SafeBuffer.prototype=Object.create(s.prototype);copyProps(s,SafeBuffer);SafeBuffer.from=function(e,t,n){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return s(e,t,n)};SafeBuffer.alloc=function(e,t,n){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=s(e);if(t!==undefined){if(typeof n==="string"){i.fill(t,n)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},15118:(e,t,n)=>{"use strict";var i=n(64293);var s=i.Buffer;var o={};var a;for(a in i){if(!i.hasOwnProperty(a))continue;if(a==="SlowBuffer"||a==="Buffer")continue;o[a]=i[a]}var c=o.Buffer={};for(a in s){if(!s.hasOwnProperty(a))continue;if(a==="allocUnsafe"||a==="allocUnsafeSlow")continue;c[a]=s[a]}o.Buffer.prototype=s.prototype;if(!c.from||c.from===Uint8Array.from){c.from=function(e,t,n){if(typeof e==="number"){throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e)}if(e&&typeof e.length==="undefined"){throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}return s(e,t,n)}}if(!c.alloc){c.alloc=function(e,t,n){if(typeof e!=="number"){throw new TypeError('The "size" argument must be of type number. Received type '+typeof e)}if(e<0||e>=2*(1<<30)){throw new RangeError('The value "'+e+'" is invalid for option "size"')}var i=s(e);if(!t||t.length===0){i.fill(0)}else if(typeof n==="string"){i.fill(t,n)}else{i.fill(t)}return i}}if(!o.kStringMaxLength){try{o.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}}if(!o.constants){o.constants={MAX_LENGTH:o.kMaxLength};if(o.kStringMaxLength){o.constants.MAX_STRING_LENGTH=o.kStringMaxLength}}e.exports=o},72043:(e,t,n)=>{(function(e){e.parser=function(e,t){return new SAXParser(e,t)};e.SAXParser=SAXParser;e.SAXStream=SAXStream;e.createStream=createStream;e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(t,n){if(!(this instanceof SAXParser)){return new SAXParser(t,n)}var i=this;clearBuffers(i);i.q=i.c="";i.bufferCheckPosition=e.MAX_BUFFER_LENGTH;i.opt=n||{};i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags;i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase";i.tags=[];i.closed=i.closedRoot=i.sawRoot=false;i.tag=i.error=null;i.strict=!!t;i.noscript=!!(t||i.opt.noscript);i.state=g.BEGIN;i.strictEntities=i.opt.strictEntities;i.ENTITIES=i.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES);i.attribList=[];if(i.opt.xmlns){i.ns=Object.create(u)}i.trackPosition=i.opt.position!==false;if(i.trackPosition){i.position=i.line=i.column=0}emit(i,"onready")}if(!Object.create){Object.create=function(e){function F(){}F.prototype=e;var t=new F;return t}}if(!Object.keys){Object.keys=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n))t.push(n);return t}}function checkBufferLength(n){var i=Math.max(e.MAX_BUFFER_LENGTH,10);var s=0;for(var o=0,a=t.length;o<a;o++){var c=n[t[o]].length;if(c>i){switch(t[o]){case"textNode":closeText(n);break;case"cdata":emitNode(n,"oncdata",n.cdata);n.cdata="";break;case"script":emitNode(n,"onscript",n.script);n.script="";break;default:error(n,"Max buffer length exceeded: "+t[o])}}s=Math.max(s,c)}var l=e.MAX_BUFFER_LENGTH-s;n.bufferCheckPosition=l+n.position}function clearBuffers(e){for(var n=0,i=t.length;n<i;n++){e[t[n]]=""}}function flushBuffers(e){closeText(e);if(e.cdata!==""){emitNode(e,"oncdata",e.cdata);e.cdata=""}if(e.script!==""){emitNode(e,"onscript",e.script);e.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var i;try{i=n(92413).Stream}catch(e){i=function(){}}var s=e.EVENTS.filter((function(e){return e!=="error"&&e!=="end"}));function createStream(e,t){return new SAXStream(e,t)}function SAXStream(e,t){if(!(this instanceof SAXStream)){return new SAXStream(e,t)}i.apply(this);this._parser=new SAXParser(e,t);this.writable=true;this.readable=true;var n=this;this._parser.onend=function(){n.emit("end")};this._parser.onerror=function(e){n.emit("error",e);n._parser.error=null};this._decoder=null;s.forEach((Line truncated
|
||||
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var n=16384;var i=[];var s;var o;var a=-1;var c=arguments.length;if(!c){return""}var l="";while(++a<c){var u=Number(arguments[a]);if(!isFinite(u)||u<0||u>1114111||t(u)!==u){throw RangeError("Invalid code point: "+u)}if(u<=65535){i.push(u)}else{u-=65536;s=(u>>10)+55296;o=u%1024+56320;i.push(s,o)}if(a+1===c||i.length>n){l+=e.apply(null,i);i.length=0}}return l};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},91532:(e,t,n)=>{const i=Symbol("SemVer ANY");class Comparator{static get ANY(){return i}constructor(e,t){t=s(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===i){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR];const n=e.match(t);if(!n){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=i}else{this.semver=new u(n[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===i||e===i){return true}if(typeof e==="string"){try{e=new u(e,this.options)}catch(e){return false}}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new p(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new p(this.value,t).test(e.semver)}const n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const s=this.semver.version===e.semver.version;const o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const a=c(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=c(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&o||a||l}}e.exports=Comparator;const s=n(40785);const{re:o,t:a}=n(9523);const c=n(75098);const l=n(50427);const u=n(48088);const p=n(9828)},9828:(e,t,n)=>{class Range{constructor(e,t){t=o(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof a){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0)this.set=[e];else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const n=`parseRange:${t}:${e}`;const i=s.get(n);if(i)return i;const o=this.options.loose;const l=o?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];e=e.replace(l,hyphenReplace(this.options.includePrerelease));c("hyphen replace",e);e=e.replace(u[p.COMPARATORTRIM],h);c("comparator trim",e,u[p.COMPARATORTRIM]);e=e.replace(u[p.TILDETRIM],m);e=e.replace(u[p.CARETTRIM],d);e=e.split(/\s+/).join(" ");const g=o?u[p.COMPARATORLOOSE]:u[p.COMPARATOR];const y=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options))).filter(this.options.loose?e=>!!e.match(g):()=>true).map((e=>new a(e,this.options)));const v=y.length;const b=new Map;for(const e of y){if(isNullSet(e))return[e];b.set(e.value,e)}if(b.size>1&&b.has(""))b.delete("");const w=[...b.values()];s.set(n,w);return w}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,t)&&e.set.some((e=>isSatisfiable(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;t<this.set.length;t++){if(testSet(this.set[t],e,this.options)){return true}}return false}}e.exports=Range;const i=n(7129);const s=new i({max:1e3});const o=n(40785);const a=n(91532);const c=n(50427);const l=n(48088);conLine truncated
|
||||
*/var a=r(7426);var n=r(5622).extname;var i=/^\s*([^;\s]*)(?:;|\s|$)/;var o=/^text\//i;t.charset=charset;t.charsets={lookup:charset};t.contentType=contentType;t.extension=extension;t.extensions=Object.create(null);t.lookup=lookup;t.types=Object.create(null);populateMaps(t.extensions,t.types);function charset(e){if(!e||typeof e!=="string"){return false}var t=i.exec(e);var r=t&&a[t[1].toLowerCase()];if(r&&r.charset){return r.charset}if(t&&o.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var r=e.indexOf("/")===-1?t.lookup(e):e;if(!r){return false}if(r.indexOf("charset")===-1){var a=t.charset(r);if(a)r+="; charset="+a.toLowerCase()}return r}function extension(e){if(!e||typeof e!=="string"){return false}var r=i.exec(e);var a=r&&t.extensions[r[1].toLowerCase()];if(!a||!a.length){return false}return a[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var r=n("x."+e).toLowerCase().substr(1);if(!r){return false}return t.types[r]||false}function populateMaps(e,t){var r=["nginx","apache",undefined,"iana"];Object.keys(a).forEach((function forEachMimeType(n){var i=a[n];var o=i.extensions;if(!o||!o.length){return}e[n]=o;for(var s=0;s<o.length;s++){var c=o[s];if(t[c]){var l=r.indexOf(a[t[c]].source);var u=r.indexOf(i.source);if(t[c]!=="application/octet-stream"&&(l>u||l===u&&t[c].substr(0,12)==="application/")){continue}}t[c]=n}}))}},3973:(e,t,r)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var a={sep:"/"};try{a=r(5622)}catch(e){}var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var i=r(3717);var o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var s="[^/]";var c=s+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var u="(?:(?!(?:\\/|^)\\.).)*?";var p=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var m=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,a,n){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach((function(e){r[e]=t[e]}));Object.keys(e).forEach((function(t){r[t]=e[t]}));return r}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var r=function minimatch(r,a,n){return t.minimatch(r,a,ext(e,n))};r.Minimatch=function Minimatch(r,a){return new t.Minimatch(r,ext(e,a))};return r};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(a.sep!=="/"){e=e.split(a.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map((function(e){return e.split(m)}));this.debug(this.pattern,r);r=r.map((function(e,t,r){return e.map(this.parse,this)}),this);this.debug(this.pattern,r);r=r.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var a=0;if(r.nonegate)return;for(var n=0,i=e.length;n<i&&e.charAt(n)==="!";n++){t=!t;a++}if(a)this.pattern=e.substr(a);this.negate=t}minimatch.braceExpand=function(e,t){return braceExpand(e,t)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(e,t){if(!t){if(this instanceof Minimatch){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;if(typeof e==="undefined"){throw new TypeError("undefined pattern")}if(t.nobrace||!e.match(/\{.*\}/)){return[e]}return i(e)}Minimatch.prototype.parse=parse;var d={};function parse(e,t){if(e.length>1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return n;if(e==="")return"";var a="";var i=!!r.nocase;var l=false;var u=[];var m=[];var f;var h=false;var g=-1;var y=-1;var v=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var b=this;function clearStateChar(){if(f){switch(f){case"*":a+=c;i=true;break;case"?":a+=s;i=true;break;default:a+="\\"+f;break}b.debug("clearStateChar %j %j",f,a);f=false}}for(var x=0,S=e.length,w;x<S&&(w=e.charAt(x));x++){this.debug("%Line truncated
|
||||
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var r=16384;var a=[];var n;var i;var o=-1;var s=arguments.length;if(!s){return""}var c="";while(++o<s){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||t(l)!==l){throw RangeError("Invalid code point: "+l)}if(l<=65535){a.push(l)}else{l-=65536;n=(l>>10)+55296;i=l%1024+56320;a.push(n,i)}if(o+1===s||a.length>r){c+=e.apply(null,a);a.length=0}}return c};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},1532:(e,t,r)=>{const a=Symbol("SemVer ANY");class Comparator{static get ANY(){return a}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}c("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===a){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=a}else{this.semver=new l(r[2],this.options.loose)}}toString(){return this.value}test(e){c("Comparator.test",e,this.options.loose);if(this.semver===a||e===a){return true}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}return s(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new u(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new u(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const a=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const o=s(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const c=s(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||a||n&&i||o||c}}e.exports=Comparator;const n=r(785);const{re:i,t:o}=r(9523);const s=r(5098);const c=r(427);const l=r(8088);const u=r(9828)},9828:(e,t,r)=>{class Range{constructor(e,t){t=i(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof o){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0)this.set=[e];else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const a=n.get(r);if(a)return a;const i=this.options.loose;const c=i?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(c,hyphenReplace(this.options.includePrerelease));s("hyphen replace",e);e=e.replace(l[u.COMPARATORTRIM],p);s("comparator trim",e,l[u.COMPARATORTRIM]);e=e.replace(l[u.TILDETRIM],m);e=e.replace(l[u.CARETTRIM],d);e=e.split(/\s+/).join(" ");const f=i?l[u.COMPARATORLOOSE]:l[u.COMPARATOR];const h=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options))).filter(this.options.loose?e=>!!e.match(f):()=>true).map((e=>new o(e,this.options)));const g=h.length;const y=new Map;for(const e of h){if(isNullSet(e))return[e];y.set(e.value,e)}if(y.size>1&&y.has(""))y.delete("");const v=[...y.values()];n.set(r,v);return v}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}for(let t=0;t<this.set.length;t++){if(testSet(this.set[t],e,this.options)){return true}}return false}}e.exports=Range;const a=r(7129);const n=new a({max:1e3});const i=r(785);const o=r(1532);const s=r(427);const c=r(8088);const{re:l,t:u,cLine truncated
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
@@ -84,7 +48,7 @@ var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/const i=n(94213);const s=n(78835).parse;const o=n(31669);const a=n(94401);const c=n(460).y;const l=n(52640).m;const u=n(54336).U;const p=n(93199);const{fromCallback:h}=n(70260);const m=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/;const d=/[\x00-\x1F]/;const g=["\n","\r","\0"];const y=/[\x20-\x3A\x3C-\x7E]+/;const v=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/;const b={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11};const w=2147483647e3;const x=0;const S='Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"';function checkSameSiteContext(e){const t=String(e).toLowerCase();if(t==="none"||t==="lax"||t==="strict"){return t}else{return null}}const k=Object.freeze({SILENT:"silent",STRICT:"strict",DISABLED:"unsafe-disabled"});var _=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;function parseDigits(e,t,n,i){let s=0;while(s<e.length){const t=e.charCodeAt(s);if(t<=47||t>=58){break}s++}if(s<t||s>n){return null}if(!i&&s!=e.length){return null}return parseInt(e.substr(0,s),10)}function parseTime(e){const t=e.split(":");const n=[0,0,0];if(t.length!==3){return null}for(let e=0;e<3;e++){const i=e==2;const s=parseDigits(t[e],1,2,i);if(s===null){return null}n[e]=s}return n}function parseMonth(e){e=String(e).substr(0,3).toLowerCase();const t=b[e];return t>=0?t:null}function parseDate(e){if(!e){return}const t=e.split(v);if(!t){return}let n=null;let i=null;let s=null;let o=null;let a=null;let c=null;for(let e=0;e<t.length;e++){const l=t[e].trim();if(!l.length){continue}let u;if(s===null){u=parseTime(l);if(u){n=u[0];i=u[1];s=u[2];continue}}if(o===null){u=parseDigits(l,1,2,true);if(u!==null){o=u;continue}}if(a===null){u=parseMonth(l);if(u!==null){a=u;continue}}if(c===null){u=parseDigits(l,2,4,true);if(u!==null){c=u;if(c>=70&&c<=99){c+=1900}else if(c>=0&&c<=69){c+=2e3}}}}if(o===null||a===null||c===null||s===null||o<1||o>31||c<1601||n>23||i>59||s>59){return}return new Date(Date.UTC(c,a,o,n,i,s))}function formatDate(e){return e.toUTCString()}function canonicalDomain(e){if(e==null){return null}e=e.trim().replace(/^\./,"");if(i&&/[^\u0001-\u007f]/.test(e)){e=i.toASCII(e)}return e.toLowerCase()}function domainMatch(e,t,n){if(e==null||t==null){return null}if(n!==false){e=canonicalDomain(e);t=canonicalDomain(t)}if(e==t){return true}const i=e.indexOf(t);if(i<=0){return false}if(e.length!==t.length+i){return false}if(e.substr(i-1,1)!=="."){return false}if(_.test(e)){return false}return true}function defaultPath(e){if(!e||e.substr(0,1)!=="/"){return"/"}if(e==="/"){return e}const t=e.lastIndexOf("/");if(t===0){return"/"}return e.slice(0,t)}function trimTerminator(e){for(let t=0;t<g.length;t++){const n=e.indexOf(g[t]);if(n!==-1){e=e.substr(0,n)}}return e}function parseCookiePair(e,t){e=trimTerminator(e);let n=e.indexOf("=");if(t){if(n===0){e=e.substr(1);n=e.indexOf("=")}}else{if(n<=0){return}}let i,s;if(n<=0){i="";s=e.trim()}else{i=e.substr(0,n).trim();s=e.substr(n+1).trim()}if(d.test(i)||d.test(s)){return}const o=new Cookie;o.key=i;o.value=s;return o}function parse(e,t){if(!t||typeof t!=="object"){t={}}e=e.trim();const n=e.indexOf(";");const i=n===-1?e:e.substr(0,n);const s=parseCookiePair(i,!!t.loose);if(!s){return}if(n===-1){return s}const o=e.slice(n+1).trim();if(o.length===0){return s}const a=o.split(";");while(a.length){const e=a.shift().trim();if(e.length===0){continue}const t=e.indexOf("=");let n,i;if(t===-1){n=e;i=null}else{n=e.substr(0,t);i=e.substr(t+1)}n=n.trim().toLowerCase();if(i){i=i.trim()}switch(n){case"expires":if(i){const e=parseDate(i);if(e){s.expires=e}}break;case"max-age":if(i){if(/^-?[0-9]+$/.test(i)){const e=parseInt(i,10);s.setMaxAge(e)}}break;case"domain":if(i){const e=i.trim().replace(/^\./,"");if(e){s.domain=e.toLowerCase()}}break;case"path":s.path=i&&i[0]==="/"?i:null;break;case"secure":s.secure=true;break;case"httponly":s.httpOnly=true;break;casLine truncated
|
||||
*/const a=r(4213);const n=r(8835).parse;const i=r(1669);const o=r(4401);const s=r(460).y;const c=r(2640).m;const l=r(4336).U;const u=r(3199);const{fromCallback:p}=r(260);const m=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/;const d=/[\x00-\x1F]/;const f=["\n","\r","\0"];const h=/[\x20-\x3A\x3C-\x7E]+/;const g=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/;const y={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11};const v=2147483647e3;const b=0;const x='Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"';function checkSameSiteContext(e){const t=String(e).toLowerCase();if(t==="none"||t==="lax"||t==="strict"){return t}else{return null}}const S=Object.freeze({SILENT:"silent",STRICT:"strict",DISABLED:"unsafe-disabled"});var w=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;function parseDigits(e,t,r,a){let n=0;while(n<e.length){const t=e.charCodeAt(n);if(t<=47||t>=58){break}n++}if(n<t||n>r){return null}if(!a&&n!=e.length){return null}return parseInt(e.substr(0,n),10)}function parseTime(e){const t=e.split(":");const r=[0,0,0];if(t.length!==3){return null}for(let e=0;e<3;e++){const a=e==2;const n=parseDigits(t[e],1,2,a);if(n===null){return null}r[e]=n}return r}function parseMonth(e){e=String(e).substr(0,3).toLowerCase();const t=y[e];return t>=0?t:null}function parseDate(e){if(!e){return}const t=e.split(g);if(!t){return}let r=null;let a=null;let n=null;let i=null;let o=null;let s=null;for(let e=0;e<t.length;e++){const c=t[e].trim();if(!c.length){continue}let l;if(n===null){l=parseTime(c);if(l){r=l[0];a=l[1];n=l[2];continue}}if(i===null){l=parseDigits(c,1,2,true);if(l!==null){i=l;continue}}if(o===null){l=parseMonth(c);if(l!==null){o=l;continue}}if(s===null){l=parseDigits(c,2,4,true);if(l!==null){s=l;if(s>=70&&s<=99){s+=1900}else if(s>=0&&s<=69){s+=2e3}}}}if(i===null||o===null||s===null||n===null||i<1||i>31||s<1601||r>23||a>59||n>59){return}return new Date(Date.UTC(s,o,i,r,a,n))}function formatDate(e){return e.toUTCString()}function canonicalDomain(e){if(e==null){return null}e=e.trim().replace(/^\./,"");if(a&&/[^\u0001-\u007f]/.test(e)){e=a.toASCII(e)}return e.toLowerCase()}function domainMatch(e,t,r){if(e==null||t==null){return null}if(r!==false){e=canonicalDomain(e);t=canonicalDomain(t)}if(e==t){return true}const a=e.indexOf(t);if(a<=0){return false}if(e.length!==t.length+a){return false}if(e.substr(a-1,1)!=="."){return false}if(w.test(e)){return false}return true}function defaultPath(e){if(!e||e.substr(0,1)!=="/"){return"/"}if(e==="/"){return e}const t=e.lastIndexOf("/");if(t===0){return"/"}return e.slice(0,t)}function trimTerminator(e){for(let t=0;t<f.length;t++){const r=e.indexOf(f[t]);if(r!==-1){e=e.substr(0,r)}}return e}function parseCookiePair(e,t){e=trimTerminator(e);let r=e.indexOf("=");if(t){if(r===0){e=e.substr(1);r=e.indexOf("=")}}else{if(r<=0){return}}let a,n;if(r<=0){a="";n=e.trim()}else{a=e.substr(0,r).trim();n=e.substr(r+1).trim()}if(d.test(a)||d.test(n)){return}const i=new Cookie;i.key=a;i.value=n;return i}function parse(e,t){if(!t||typeof t!=="object"){t={}}e=e.trim();const r=e.indexOf(";");const a=r===-1?e:e.substr(0,r);const n=parseCookiePair(a,!!t.loose);if(!n){return}if(r===-1){return n}const i=e.slice(r+1).trim();if(i.length===0){return n}const o=i.split(";");while(o.length){const e=o.shift().trim();if(e.length===0){continue}const t=e.indexOf("=");let r,a;if(t===-1){r=e;a=null}else{r=e.substr(0,t);a=e.substr(t+1)}r=r.trim().toLowerCase();if(a){a=a.trim()}switch(r){case"expires":if(a){const e=parseDate(a);if(e){n.expires=e}}break;case"max-age":if(a){if(/^-?[0-9]+$/.test(a)){const e=parseInt(a,10);n.setMaxAge(e)}}break;case"domain":if(a){const e=a.trim().replace(/^\./,"");if(e){n.domain=e.toLowerCase()}}break;case"path":n.path=a&&a[0]==="/"?a:null;break;case"secure":n.secure=true;break;case"httponly":n.httpOnly=true;break;case"samesitLine truncated
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
@@ -114,7 +78,7 @@ var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/const{fromCallback:i}=n(70260);const s=n(460).y;const o=n(55986).permuteDomain;const a=n(54336).U;const c=n(31669);class MemoryCookieStore extends s{constructor(){super();this.synchronous=true;this.idx={};if(c.inspect.custom){this[c.inspect.custom]=this.inspect}}inspect(){return`{ idx: ${c.inspect(this.idx,false,2)} }`}findCookie(e,t,n,i){if(!this.idx[e]){return i(null,undefined)}if(!this.idx[e][t]){return i(null,undefined)}return i(null,this.idx[e][t][n]||null)}findCookies(e,t,n,i){const s=[];if(typeof n==="function"){i=n;n=false}if(!e){return i(null,[])}let c;if(!t){c=function matchAll(e){for(const t in e){const n=e[t];for(const e in n){s.push(n[e])}}}}else{c=function matchRFC(e){Object.keys(e).forEach((n=>{if(a(t,n)){const t=e[n];for(const e in t){s.push(t[e])}}}))}}const l=o(e,n)||[e];const u=this.idx;l.forEach((e=>{const t=u[e];if(!t){return}c(t)}));i(null,s)}putCookie(e,t){if(!this.idx[e.domain]){this.idx[e.domain]={}}if(!this.idx[e.domain][e.path]){this.idx[e.domain][e.path]={}}this.idx[e.domain][e.path][e.key]=e;t(null)}updateCookie(e,t,n){this.putCookie(t,n)}removeCookie(e,t,n,i){if(this.idx[e]&&this.idx[e][t]&&this.idx[e][t][n]){delete this.idx[e][t][n]}i(null)}removeCookies(e,t,n){if(this.idx[e]){if(t){delete this.idx[e][t]}else{delete this.idx[e]}}return n(null)}removeAllCookies(e){this.idx={};return e(null)}getAllCookies(e){const t=[];const n=this.idx;const i=Object.keys(n);i.forEach((e=>{const i=Object.keys(n[e]);i.forEach((i=>{const s=Object.keys(n[e][i]);s.forEach((s=>{if(s!==null){t.push(n[e][i][s])}}))}))}));t.sort(((e,t)=>(e.creationIndex||0)-(t.creationIndex||0)));e(null,t)}}["findCookie","findCookies","putCookie","updateCookie","removeCookie","removeCookies","removeAllCookies","getAllCookies"].forEach((e=>{MemoryCookieStore[e]=i(MemoryCookieStore.prototype[e])}));t.m=MemoryCookieStore},54336:(e,t)=>{"use strict";
|
||||
*/const{fromCallback:a}=r(260);const n=r(460).y;const i=r(5986).permuteDomain;const o=r(4336).U;const s=r(1669);class MemoryCookieStore extends n{constructor(){super();this.synchronous=true;this.idx={};if(s.inspect.custom){this[s.inspect.custom]=this.inspect}}inspect(){return`{ idx: ${s.inspect(this.idx,false,2)} }`}findCookie(e,t,r,a){if(!this.idx[e]){return a(null,undefined)}if(!this.idx[e][t]){return a(null,undefined)}return a(null,this.idx[e][t][r]||null)}findCookies(e,t,r,a){const n=[];if(typeof r==="function"){a=r;r=false}if(!e){return a(null,[])}let s;if(!t){s=function matchAll(e){for(const t in e){const r=e[t];for(const e in r){n.push(r[e])}}}}else{s=function matchRFC(e){Object.keys(e).forEach((r=>{if(o(t,r)){const t=e[r];for(const e in t){n.push(t[e])}}}))}}const c=i(e,r)||[e];const l=this.idx;c.forEach((e=>{const t=l[e];if(!t){return}s(t)}));a(null,n)}putCookie(e,t){if(!this.idx[e.domain]){this.idx[e.domain]={}}if(!this.idx[e.domain][e.path]){this.idx[e.domain][e.path]={}}this.idx[e.domain][e.path][e.key]=e;t(null)}updateCookie(e,t,r){this.putCookie(t,r)}removeCookie(e,t,r,a){if(this.idx[e]&&this.idx[e][t]&&this.idx[e][t][r]){delete this.idx[e][t][r]}a(null)}removeCookies(e,t,r){if(this.idx[e]){if(t){delete this.idx[e][t]}else{delete this.idx[e]}}return r(null)}removeAllCookies(e){this.idx={};return e(null)}getAllCookies(e){const t=[];const r=this.idx;const a=Object.keys(r);a.forEach((e=>{const a=Object.keys(r[e]);a.forEach((a=>{const n=Object.keys(r[e][a]);n.forEach((n=>{if(n!==null){t.push(r[e][a][n])}}))}))}));t.sort(((e,t)=>(e.creationIndex||0)-(t.creationIndex||0)));e(null,t)}}["findCookie","findCookies","putCookie","updateCookie","removeCookie","removeCookies","removeAllCookies","getAllCookies"].forEach((e=>{MemoryCookieStore[e]=a(MemoryCookieStore.prototype[e])}));t.m=MemoryCookieStore},4336:(e,t)=>{"use strict";
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
@@ -144,7 +108,7 @@ var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/function pathMatch(e,t){if(t===e){return true}const n=e.indexOf(t);if(n===0){if(t.substr(-1)==="/"){return true}if(e.substr(t.length,1)==="/"){return true}}return false}t.U=pathMatch},55986:(e,t,n)=>{"use strict";
|
||||
*/function pathMatch(e,t){if(t===e){return true}const r=e.indexOf(t);if(r===0){if(t.substr(-1)==="/"){return true}if(e.substr(t.length,1)==="/"){return true}}return false}t.U=pathMatch},5986:(e,t,r)=>{"use strict";
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
@@ -174,7 +138,7 @@ var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/const i=n(94401);const s=["local"];function permuteDomain(e,t){let n=null;if(t){const t=e.split(".");if(s.includes(t[t.length-1])){n=`${t[t.length-2]}.${t[t.length-1]}`}else{n=i.getPublicSuffix(e)}}else{n=i.getPublicSuffix(e)}if(!n){return null}if(n==e){return[e]}const o=e.slice(0,-(n.length+1));const a=o.split(".").reverse();let c=n;const l=[c];while(a.length){c=`${a.shift()}.${c}`;l.push(c)}return l}t.permuteDomain=permuteDomain},94401:(e,t,n)=>{"use strict";
|
||||
*/const a=r(4401);const n=["local"];function permuteDomain(e,t){let r=null;if(t){const t=e.split(".");if(n.includes(t[t.length-1])){r=`${t[t.length-2]}.${t[t.length-1]}`}else{r=a.getPublicSuffix(e)}}else{r=a.getPublicSuffix(e)}if(!r){return null}if(r==e){return[e]}const i=e.slice(0,-(r.length+1));const o=i.split(".").reverse();let s=r;const c=[s];while(o.length){s=`${o.shift()}.${s}`;c.push(s)}return c}t.permuteDomain=permuteDomain},4401:(e,t,r)=>{"use strict";
|
||||
/*!
|
||||
* Copyright (c) 2018, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
@@ -204,7 +168,7 @@ var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/const i=n(29975);function getPublicSuffix(e){return i.get(e)}t.getPublicSuffix=getPublicSuffix},460:(e,t)=>{"use strict";
|
||||
*/const a=r(9975);function getPublicSuffix(e){return a.get(e)}t.getPublicSuffix=getPublicSuffix},460:(e,t)=>{"use strict";
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
@@ -234,7 +198,7 @@ var i=n(64293);var s=i.Buffer;function copyProps(e,t){for(var n in e){t[n]=e[n]}
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/class Store{constructor(){this.synchronous=false}findCookie(e,t,n,i){throw new Error("findCookie is not implemented")}findCookies(e,t,n,i){throw new Error("findCookies is not implemented")}putCookie(e,t){throw new Error("putCookie is not implemented")}updateCookie(e,t,n){throw new Error("updateCookie is not implemented")}removeCookie(e,t,n,i){throw new Error("removeCookie is not implemented")}removeCookies(e,t,n){throw new Error("removeCookies is not implemented")}removeAllCookies(e){throw new Error("removeAllCookies is not implemented")}getAllCookies(e){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}}t.y=Store},93199:e=>{e.exports="4.0.0"},70260:(e,t)=>{"use strict";t.fromCallback=function(e){return Object.defineProperty((function(){if(typeof arguments[arguments.length-1]==="function")e.apply(this,arguments);else{return new Promise(((t,n)=>{arguments[arguments.length]=(e,i)=>{if(e)return n(e);t(i)};arguments.length++;e.apply(this,arguments)}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if(typeof t!=="function")return e.apply(this,arguments);else e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}},4351:e=>{
|
||||
*/class Store{constructor(){this.synchronous=false}findCookie(e,t,r,a){throw new Error("findCookie is not implemented")}findCookies(e,t,r,a){throw new Error("findCookies is not implemented")}putCookie(e,t){throw new Error("putCookie is not implemented")}updateCookie(e,t,r){throw new Error("updateCookie is not implemented")}removeCookie(e,t,r,a){throw new Error("removeCookie is not implemented")}removeCookies(e,t,r){throw new Error("removeCookies is not implemented")}removeAllCookies(e){throw new Error("removeAllCookies is not implemented")}getAllCookies(e){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}}t.y=Store},3199:e=>{e.exports="4.0.0"},260:(e,t)=>{"use strict";t.fromCallback=function(e){return Object.defineProperty((function(){if(typeof arguments[arguments.length-1]==="function")e.apply(this,arguments);else{return new Promise(((t,r)=>{arguments[arguments.length]=(e,a)=>{if(e)return r(e);t(a)};arguments.length++;e.apply(this,arguments)}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if(typeof t!=="function")return e.apply(this,arguments);else e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}},4351:e=>{
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
@@ -249,5 +213,5 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
var t;var n;var i;var s;var o;var a;var c;var l;var u;var p;var h;var m;var d;var g;var y;var v;var b;var w;var x;var S;var k;var _;var C;var N;(function(t){var n=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd){define("tslib",["exports"],(function(e){t(createExporter(n,createExporter(e)))}))}else if(true&&typeof e.exports==="object"){t(createExporter(n,createExporter(e.exports)))}else{t(createExporter(n))}function createExporter(e,t){if(e!==n){if(typeof Object.create==="function"){Object.defineProperty(e,"__esModule",{value:true})}else{e.__esModule=true}}return function(n,i){return e[n]=t?t(n,i):i}}})((function(e){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};t=function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");R(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)};n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};i=function(e,t){var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0)n[i]=e[i];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++){if(t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s]))n[i[s]]=e[i[s]]}return n};s=function(e,t,n,i){var s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,i);else for(var c=e.length-1;c>=0;c--)if(a=e[c])o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o;return s>3&&o&&Object.defineProperty(t,n,o),o};o=function(e,t){return function(n,i){t(n,i,e)}};a=function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};c=function(e,t,n,i){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};l=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,a;return a={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function verb(e){return function(t){return step([e,t])}}function step(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];s=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};u=function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))N(t,e,n)};N=Object.create?function(e,t,n,i){if(i===undefined)i=n;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]};p=function(e){var t=typeof Symbol==="function"&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&i>=e.length)e=void 0;return{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};h=function(e,t){var n=typeof Symbol==="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),s,o=[],a;try{while((t===void 0||t-- >0)&&!(s=i.next()).done)o.push(s.value)}catch(e){a={error:e}}finally{try{if(s&&!s.done&&(n=i["return"]))n.call(i)}finally{if(a)throw a.error}}return o};m=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e};d=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),s=0,t=0;t<n;t++)for(var o=arguments[t],a=0,c=o.length;a<c;a++,s++)i[s]=o[a];return i};g=function(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++){if(o||!(i in t)){if(!o)o=Array.prototype.slice.call(t,0,i);o[i]=t[i]}}return e.concat(o||t)};y=function(e){return this instanceof y?(this.v=e,this):new y(e)};v=function(e,t,n){if(!Symbol.asyncItLine truncated
|
||||
var t;var r;var a;var n;var i;var o;var s;var c;var l;var u;var p;var m;var d;var f;var h;var g;var y;var v;var b;var x;var S;var w;var k;var N;(function(t){var r=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd){define("tslib",["exports"],(function(e){t(createExporter(r,createExporter(e)))}))}else if(true&&typeof e.exports==="object"){t(createExporter(r,createExporter(e.exports)))}else{t(createExporter(r))}function createExporter(e,t){if(e!==r){if(typeof Object.create==="function"){Object.defineProperty(e,"__esModule",{value:true})}else{e.__esModule=true}}return function(r,a){return e[r]=t?t(r,a):a}}})((function(e){var C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};t=function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");C(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)};r=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};a=function(e,t){var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0)r[a]=e[a];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++){if(t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n]))r[a[n]]=e[a[n]]}return r};n=function(e,t,r,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,t,r,a);else for(var s=e.length-1;s>=0;s--)if(o=e[s])i=(n<3?o(i):n>3?o(t,r,i):o(t,r))||i;return n>3&&i&&Object.defineProperty(t,r,i),i};i=function(e,t){return function(r,a){t(r,a,e)}};o=function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};s=function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(a.next(e))}catch(e){n(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};c=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(a)throw new TypeError("Generator is already executing.");while(r)try{if(a=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];n=0}finally{a=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};l=function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))N(t,e,r)};N=Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]};u=function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],a=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&a>=e.length)e=void 0;return{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};p=function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),n,i=[],o;try{while((t===void 0||t-- >0)&&!(n=a.next()).done)i.push(n.value)}catch(e){o={error:e}}finally{try{if(n&&!n.done&&(r=a["return"]))r.call(a)}finally{if(o)throw o.error}}return i};m=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e};d=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var a=Array(e),n=0,t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,n++)a[n]=i[o];return a};f=function(e,t,r){if(r||arguments.length===2)for(var a=0,n=t.length,i;a<n;a++){if(i||!(a in t)){if(!i)i=Array.prototype.slice.call(t,0,a);i[a]=t[a]}}return e.concat(i||t)};h=function(e){return this instanceof h?(this.v=e,this):new h(e)};g=function(e,t,r){if(!Symbol.asyncItLine truncated
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["../webpack:/expo-github-action/node_modules/@actions/cache/lib/cache.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/cacheHttpClient.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/cacheUtils.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/constants.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/downloadUtils.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/requestUtils.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/tar.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/options.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/semver/semver.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/exec/lib/exec.js","../webpack:/expo-github-action/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/glob.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-glob-options-helper.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-globber.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-match-kind.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-path-helper.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-path.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-pattern-helper.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-pattern.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-search-state.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/http-client/auth.js","../webpack:/expo-github-action/node_modules/@actions/http-client/index.js","../webpack:/expo-github-action/node_modules/@actions/http-client/proxy.js","../webpack:/expo-github-action/node_modules/@actions/io/lib/io-util.js","../webpack:/expo-github-action/node_modules/@actions/io/lib/io.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/lib/manifest.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/lib/retry-helper.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/lib/tool-cache.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/semver/semver.js","../webpack:/expo-github-action/node_modules/@azure/abort-controller/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-asynciterator-polyfill/dist-esm/index.js","../webpack:/expo-github-action/node_modules/@azure/core-auth/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-http/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/md5.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/nil.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/parse.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/regex.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/rng.js","../webpack:/expo-github-action/nodLine truncated
|
||||
{"version":3,"sources":["../webpack:/expo-github-action/node_modules/@actions/cache/lib/cache.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/cacheHttpClient.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/cacheUtils.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/constants.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/downloadUtils.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/requestUtils.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/internal/tar.js","../webpack:/expo-github-action/node_modules/@actions/cache/lib/options.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/cache/node_modules/semver/semver.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/expo-github-action/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/exec/lib/exec.js","../webpack:/expo-github-action/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/glob.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-glob-options-helper.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-globber.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-match-kind.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-path-helper.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-path.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-pattern-helper.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-pattern.js","../webpack:/expo-github-action/node_modules/@actions/glob/lib/internal-search-state.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/http-client/auth.js","../webpack:/expo-github-action/node_modules/@actions/http-client/index.js","../webpack:/expo-github-action/node_modules/@actions/http-client/proxy.js","../webpack:/expo-github-action/node_modules/@actions/io/lib/io-util.js","../webpack:/expo-github-action/node_modules/@actions/io/lib/io.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/lib/manifest.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/lib/retry-helper.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/lib/tool-cache.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js","../webpack:/expo-github-action/node_modules/@actions/tool-cache/node_modules/semver/semver.js","../webpack:/expo-github-action/node_modules/@azure/abort-controller/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-asynciterator-polyfill/dist-esm/index.js","../webpack:/expo-github-action/node_modules/@azure/core-auth/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-http/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/md5.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/nil.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/parse.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/regex.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/rng.js","../webpack:/expo-github-action/nodLine truncated
|
||||
@@ -26,7 +26,6 @@
|
||||
"@actions/exec": "^1.1.0",
|
||||
"@actions/io": "^1.1.1",
|
||||
"@actions/tool-cache": "^1.7.1",
|
||||
"libnpm": "^3.0.1",
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { addPath, getBooleanInput, getInput, group, info } from '@actions/core';
|
||||
|
||||
import { install } from '../install';
|
||||
import { resolveVersion } from '../packager';
|
||||
import * as tools from '../tools';
|
||||
|
||||
// Auto-execute in GitHub actions
|
||||
@@ -33,7 +34,7 @@ async function installCli(name: tools.PackageName): Promise<string | void> {
|
||||
return info(`Skipping installation of ${name}, \`${shortName}-version\` not provided.`);
|
||||
}
|
||||
|
||||
const version = await tools.resolveVersion(name, inputVersion);
|
||||
const version = await resolveVersion(name, inputVersion);
|
||||
const cache = getBooleanInput(`${shortName}-cache`);
|
||||
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { exec } from '@actions/exec';
|
||||
|
||||
/**
|
||||
* Resolve a package with version range to an exact version.
|
||||
* This is useful to invalidate the cache _and_ using dist-tags or version ranges.
|
||||
* It executes `npm info` and parses the latest manifest.
|
||||
*/
|
||||
export async function resolveVersion(name: string, range: string): Promise<string> {
|
||||
let stdout = '';
|
||||
|
||||
try {
|
||||
await exec('npm', ['info', `${name}@${range}`, 'version', '--json'], {
|
||||
silent: true,
|
||||
listeners: {
|
||||
stdout(data) {
|
||||
stdout += data.toString();
|
||||
},
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
throw new Error(`Could not resolve version "${range}" of "${name}", reason:\n${error.message || error}`);
|
||||
}
|
||||
|
||||
// thanks npm, for returning a "x.x.x" json value...
|
||||
if (stdout.startsWith('"')) {
|
||||
stdout = `[${stdout}]`;
|
||||
}
|
||||
|
||||
return JSON.parse(stdout).at(-1);
|
||||
}
|
||||
+1
-11
@@ -2,8 +2,7 @@ import * as core from '@actions/core';
|
||||
import * as cli from '@actions/exec';
|
||||
import semver from 'semver';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const registry = require('libnpm');
|
||||
import { resolveVersion } from './packager';
|
||||
|
||||
export type PackageName = 'expo-cli' | 'eas-cli';
|
||||
|
||||
@@ -23,15 +22,6 @@ export function getBinaryName(name: PackageName, forWindows = false): string {
|
||||
return forWindows ? `${bin}.cmd` : bin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the provided semver to exact version of `expo-cli`.
|
||||
* This uses the npm registry and accepts latest, dist-tags or version ranges.
|
||||
* It's used to determine the cached version of `expo-cli`.
|
||||
*/
|
||||
export async function resolveVersion(name: PackageName, version: string): Promise<string> {
|
||||
return (await registry.manifest(`${name}@${version}`)).version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate with Expo using either the token or username/password method.
|
||||
* If both of them are set, token has priority.
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { getToolsMock, mockInput } from '../utils';
|
||||
|
||||
jest.mock('../../src/tools', () => getToolsMock());
|
||||
jest.mock('../../src/packager', () => ({
|
||||
async resolveVersion(_: string, version: string) {
|
||||
return version;
|
||||
},
|
||||
}));
|
||||
|
||||
import * as core from '@actions/core';
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import { valid as validVersion } from 'semver';
|
||||
import { resolveVersion } from '../src/packager';
|
||||
|
||||
describe(resolveVersion, () => {
|
||||
it('resolves expo-cli@^2.0.0 to 2.21.2', async () => {
|
||||
await expect(resolveVersion('expo-cli', '^2.0.0')).resolves.toBe('2.21.2');
|
||||
});
|
||||
|
||||
it('resolves expo-cli@~3.15.0 to 3.15.5', async () => {
|
||||
await expect(resolveVersion('expo-cli', '~3.15.0')).resolves.toBe('3.15.5');
|
||||
});
|
||||
|
||||
it('resolves eas-cli@~0.33.0 to 0.33.1', async () => {
|
||||
await expect(resolveVersion('eas-cli', '~0.33.0')).resolves.toBe('0.33.1');
|
||||
});
|
||||
|
||||
it('resolves expo-cli@latest to a valid version', async () => {
|
||||
const version = await resolveVersion('expo-cli', 'latest');
|
||||
expect(validVersion(version)).not.toBeNull();
|
||||
});
|
||||
|
||||
it('rejects donotpublishthispackageoryouwillbefired with proper error', async () => {
|
||||
await expect(resolveVersion('donotpublishthispackageoryouwillbefired', 'latest')).rejects.toThrow(
|
||||
'Could not resolve version "latest" of "donotpublishthispackageoryouwillbefired"'
|
||||
);
|
||||
});
|
||||
});
|
||||
+15
-23
@@ -1,10 +1,8 @@
|
||||
const registry = { manifest: jest.fn() };
|
||||
jest.mock('libnpm', () => registry);
|
||||
|
||||
import * as core from '@actions/core';
|
||||
import * as cli from '@actions/exec';
|
||||
|
||||
import * as tools from '../src/tools';
|
||||
import * as packager from '../src/packager';
|
||||
import * as utils from './utils';
|
||||
|
||||
describe(tools.getBinaryName, () => {
|
||||
@@ -21,20 +19,6 @@ describe(tools.getBinaryName, () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe(tools.resolveVersion, () => {
|
||||
it('fetches exact version of expo-cli', async () => {
|
||||
registry.manifest.mockResolvedValue({ version: '3.0.10' });
|
||||
expect(await tools.resolveVersion('expo-cli', 'latest')).toBe('3.0.10');
|
||||
expect(registry.manifest).toBeCalledWith('expo-cli@latest');
|
||||
});
|
||||
|
||||
it('fetches exact version of eas-cli', async () => {
|
||||
registry.manifest.mockResolvedValue({ version: '4.2.0' });
|
||||
expect(await tools.resolveVersion('eas-cli', 'latest')).toBe('4.2.0');
|
||||
expect(registry.manifest).toBeCalledWith('eas-cli@latest');
|
||||
});
|
||||
});
|
||||
|
||||
describe(tools.maybeAuthenticate, () => {
|
||||
const token = 'ABC123';
|
||||
const username = 'bycedric';
|
||||
@@ -268,21 +252,25 @@ describe(tools.maybeWarnForUpdate, () => {
|
||||
let spy: { [key: string]: jest.SpyInstance } = {};
|
||||
|
||||
beforeEach(() => {
|
||||
spy = { warning: jest.spyOn(core, 'warning').mockImplementation() };
|
||||
spy = {
|
||||
warning: jest.spyOn(core, 'warning').mockImplementation(),
|
||||
resolveVersion: jest.spyOn(packager, 'resolveVersion').mockImplementation(),
|
||||
};
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
spy.warning.mockRestore();
|
||||
spy.resolveVersion.mockRestore();
|
||||
});
|
||||
|
||||
it('is silent when major version is up to date', async () => {
|
||||
registry.manifest.mockResolvedValueOnce({ version: '4.1.0' }).mockResolvedValueOnce({ version: '4.0.1' });
|
||||
spy.resolveVersion.mockResolvedValueOnce('4.1.0').mockResolvedValueOnce('4.0.1');
|
||||
await tools.maybeWarnForUpdate('eas-cli');
|
||||
expect(spy.warning).not.toBeCalled();
|
||||
});
|
||||
|
||||
it('warns when major version is outdated', async () => {
|
||||
registry.manifest.mockResolvedValueOnce({ version: '4.1.0' }).mockResolvedValueOnce({ version: '3.0.1' });
|
||||
spy.resolveVersion.mockResolvedValueOnce('4.1.0').mockResolvedValueOnce('3.0.1');
|
||||
await tools.maybeWarnForUpdate('expo-cli');
|
||||
expect(spy.warning).toBeCalledWith('There is a new major version available of the Expo CLI (4.1.0)');
|
||||
expect(spy.warning).toBeCalledWith('If you run into issues, try upgrading your workflow to "expo-version: 4.x"');
|
||||
@@ -293,23 +281,27 @@ describe(tools.handleError, () => {
|
||||
let spy: { [key: string]: jest.SpyInstance } = {};
|
||||
|
||||
beforeEach(() => {
|
||||
spy = { setFailed: jest.spyOn(core, 'setFailed').mockImplementation() };
|
||||
spy = {
|
||||
setFailed: jest.spyOn(core, 'setFailed').mockImplementation(),
|
||||
resolveVersion: jest.spyOn(packager, 'resolveVersion').mockImplementation(),
|
||||
};
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
spy.setFailed.mockRestore();
|
||||
spy.resolveVersion.mockRestore();
|
||||
});
|
||||
|
||||
it('marks the job as failed with expo-cli', async () => {
|
||||
const error = new Error('test');
|
||||
registry.manifest.mockResolvedValue('4.0.0');
|
||||
spy.resolveVersion.mockResolvedValue('4.0.0');
|
||||
await tools.handleError('expo-cli', error);
|
||||
expect(core.setFailed).toBeCalledWith(error);
|
||||
});
|
||||
|
||||
it('fails with original error when update warning failed', async () => {
|
||||
const error = new Error('test');
|
||||
registry.manifest.mockRejectedValue(new Error('npm issue'));
|
||||
spy.resolveVersion.mockRejectedValue(new Error('npm issue'));
|
||||
await tools.handleError('eas-cli', error);
|
||||
expect(core.setFailed).toBeCalledWith(error);
|
||||
});
|
||||
|
||||
@@ -41,7 +41,6 @@ export function restoreEnv(): void {
|
||||
export function getToolsMock() {
|
||||
return {
|
||||
getBinaryName: jest.fn(v => v.replace('-cli', '')),
|
||||
resolveVersion: jest.fn((n, v) => v),
|
||||
maybeAuthenticate: jest.fn(),
|
||||
maybePatchWatchers: jest.fn(),
|
||||
maybeWarnForUpdate: jest.fn(),
|
||||
|
||||
Reference in new issue
Block a user