mirror of
https://github.com/expo/expo-github-action.git
synced 2026-11-15 17:32:45 -10:00
refactor: allow multiple entrypoints for different sub-actions (#121)
* feature: add perform action to run actions on GitHub * refactor: move default entrypoint to actions folder * refactor: upgrade ncc and add multiple entrypoints * chore: rebuild action files * core: force-write lf in build files * chore: rebuild from macos
This commit is contained in:
1 parent
c20146f3b7
commit
8a7306a978
23 files changed
+383
-160330
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ branding:
|
||||
color: gray-dark
|
||||
runs:
|
||||
using: node12
|
||||
main: build/index.js
|
||||
main: build/setup/index.js
|
||||
inputs:
|
||||
expo-version:
|
||||
description: The Expo CLI version to install (use any semver/dist-tag available).
|
||||
|
||||
-160294
File diff suppressed because it is too large.
Load diff
Executable → Regular
File renamed without changes.
@@ -0,0 +1,253 @@
|
||||
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(42186));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(42186));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
|
||||
/*!
|
||||
* 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
|
||||
/*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* MIT Licensed
|
||||
*/
|
||||
e.exports=n(73313)},43583:(e,t,n)=>{"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
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/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
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/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";
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/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";
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/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";
|
||||
/*!
|
||||
* Copyright (c) 2018, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/const i=n(29975);function getPublicSuffix(e){return i.get(e)}t.getPublicSuffix=getPublicSuffix},460:(e,t)=>{"use strict";
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/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=>{
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
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
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +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/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/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/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/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/node_modules/@azure/core-http/node_modules/uuid/dist/sha1.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/stringify.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/v1.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/v3.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/v35.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/v4.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/v5.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/validate.js","../webpack:/expo-github-action/node_modules/@azure/core-http/node_modules/uuid/dist/version.js","../webpack:/expo-github-action/node_modules/@azure/core-lro/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-paging/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/core-tracing/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/logger/dist/index.js","../webpack:/expo-github-action/node_modules/@azure/storage-blob/dist/index.js","../webpack:/expo-github-action/node_modules/@opentelemetry/api/build/src/api/context.js","../webpack:/expo-github-action/node_Line truncated
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
(()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},284:(e,r,n)=>{e=n.nmd(e);var t=n(596).SourceMapConsumer;var o=n(622);var i;try{i=n(747);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function handlerExec(e){return function(r){for(var n=0;n<e.length;n++){var t=e[n](r);if(t){return t}}return null}}var m=handlerExec(h);h.push((function(e){e=e.trim();if(/^file:/.test(e)){e=e.replace(/file:\/\/\/(\w:)?/,(function(e,r){return r?"":"/"}))}if(e in p){return p[e]}var r="";try{if(!i){var n=new XMLHttpRequest;n.open("GET",e,false);n.send(null);if(n.readyState===4&&n.status===200){r=n.responseText}}else if(i.existsSync(e)){r=i.readFileSync(e,"utf8")}}catch(e){}return p[e]=r}));function supportRelativeURL(e,r){if(!e)return r;var n=o.dirname(e);var t=/^\w+:\/\/[^\/]*/.exec(n);var i=t?t[0]:"";var a=n.slice(i.length);if(i&&/^\/\w\:/.test(a)){i+="/";return i+o.resolve(n.slice(i.length),r).replace(/\\/g,"/")}return i+o.resolve(n.slice(i.length),r)}function retrieveSourceMapURL(e){var r;if(isInBrowser()){try{var n=new XMLHttpRequest;n.open("GET",e,false);n.send(null);r=n.readyState===4?n.responseText:null;var t=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(t){return t}}catch(e){}}r=m(e);var o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;var i,a;while(a=o.exec(r))i=a;if(!i)return null;return i[1]}var v=handlerExec(d);d.push((function(e){var r=retrieveSourceMapURL(e);if(!r)return null;var n;if(g.test(r)){var t=r.slice(r.indexOf(",")+1);n=a(t,"base64").toString();r=e}else{r=supportRelativeURL(e,r);n=m(r)}if(!n){return null}return{url:r,map:n}}));function mapSourcePosition(e){var r=f[e.source];if(!r){var n=v(e.source);if(n){r=f[e.source]={url:n.url,map:new t(n.map)};if(r.map.sourcesContent){r.map.sources.forEach((function(e,n){var t=r.map.sourcesContent[n];if(t){var o=supportRelativeURL(r.url,e);p[o]=t}}))}}else{r=f[e.source]={url:null,map:null}}}if(r&&r.map&&typeof r.map.originalPositionFor==="function"){var o=r.map.originalPositionFor(e);if(o.source!==null){o.source=supportRelativeURL(r.url,o.source);return o}}return e}function mapEvalOrigin(e){var r=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(r){var n=mapSourcePosition({source:r[2],line:+r[3],column:r[4]-1});return"eval at "+r[1]+" ("+n.source+":"+n.line+":"+(n.column+1)+")"}r=/^eval at ([^(]+) \((.+)\)$/.exec(e);if(r){return"eval at "+r[1]+" ("+mapEvalOrigin(r[2])+")"}return e}function CallSiteToString(){var e;var r="";if(this.isNative()){r="native"}else{e=this.getScriptNameOrSourceURL();if(!e&&this.isEval()){r=this.getEvalOrigin();r+=", "}if(e){r+=e}else{r+="<anonymous>"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"<anonymous>")}}else if(u){o+="new "+(i||"<anonymous>")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isLine truncated
|
||||
@@ -0,0 +1,47 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const ncc = require('@vercel/ncc');
|
||||
|
||||
const BUILD_DIR = path.resolve(__dirname, 'build');
|
||||
const ACTION_DIR = path.resolve(__dirname, 'src/actions');
|
||||
|
||||
const options = {
|
||||
cache: false,
|
||||
minify: true,
|
||||
sourceMap: true,
|
||||
quiet: true,
|
||||
};
|
||||
|
||||
async function write(file, content) {
|
||||
await fs.promises.writeFile(file, content, { encoding: 'utf-8' });
|
||||
}
|
||||
|
||||
async function build(file) {
|
||||
const { code, map, assets } = await ncc(file, options);
|
||||
const name = path.basename(file, path.extname(file));
|
||||
const dir = path.resolve(BUILD_DIR, name);
|
||||
|
||||
await fs.promises.mkdir(dir, { recursive: true })
|
||||
|
||||
for (const asset in assets) {
|
||||
await fs.promises.mkdir(path.join(dir, path.dirname(asset)), { recursive: true })
|
||||
await write(path.join(dir, asset), assets[asset].source);
|
||||
}
|
||||
|
||||
await write(path.join(dir, 'index.js'), code.replace(/\r\n/g, '\n'));
|
||||
await write(path.join(dir, 'index.map.js'), map.replace(/\r\n/g, '\n'));
|
||||
|
||||
console.log(`✓ ${path.relative(__dirname, file)}`);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const actionPath = path.resolve(__dirname, './src/actions')
|
||||
const actionFiles = (await fs.promises.readdir(actionPath, { withFileTypes: true }))
|
||||
.filter(entity => entity.isFile())
|
||||
.map(entity => path.join(ACTION_DIR, entity.name));
|
||||
|
||||
return Promise.all(actionFiles.map(build))
|
||||
}
|
||||
|
||||
main();
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"lint": "tsc --noEmit && eslint ./src ./tests",
|
||||
"build": "ncc build src/index.ts --out build",
|
||||
"build": "node ncc.js",
|
||||
"clean": "rimraf build",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
@@ -39,7 +39,7 @@
|
||||
"@types/semver": "^7.3.6",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"@zeit/ncc": "^0.22.3",
|
||||
"@vercel/ncc": "^0.31.1",
|
||||
"conventional-changelog-conventionalcommits": "^4.6.0",
|
||||
"eslint": "^8.2.0",
|
||||
"eslint-plugin-jest": "^25.2.4",
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import { addPath, getInput, group, info } from '@actions/core';
|
||||
|
||||
import { install } from './install';
|
||||
import * as tools from './tools';
|
||||
import { install } from '../install';
|
||||
import * as tools from '../tools';
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
// Auto-execute in GitHub actions
|
||||
tools.performAction(setupAction);
|
||||
|
||||
export async function setupAction(): Promise<void> {
|
||||
const expoVersion = await installCli('expo-cli');
|
||||
const easVersion = await installCli('eas-cli');
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { run } from './run';
|
||||
|
||||
run();
|
||||
+14
-1
@@ -18,7 +18,7 @@ export type AuthenticateOptions = {
|
||||
* Get a boolean value from string, useful for GitHub Actions boolean inputs.
|
||||
*/
|
||||
export function getBoolean(value: string, defaultValue = false): boolean {
|
||||
return (value.toLowerCase() || (defaultValue ? 'true' : 'false')) === 'true';
|
||||
return (value || String(defaultValue)).toLowerCase() === 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,3 +130,16 @@ export async function handleError(name: PackageName, error: Error) {
|
||||
|
||||
core.setFailed(error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto-execute the action if it's not running in a test environment.
|
||||
* This is useful to test the action, without running it in tests.
|
||||
* The method can also be mocked.
|
||||
*/
|
||||
export function performAction(action: () => Promise<void>) {
|
||||
if (process.env.JEST_WORKER_ID) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
return action();
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { getToolsMock } from '../utils';
|
||||
|
||||
const core = {
|
||||
addPath: jest.fn(),
|
||||
getInput: jest.fn(),
|
||||
@@ -6,49 +8,43 @@ const core = {
|
||||
};
|
||||
const exec = { exec: jest.fn() };
|
||||
const install = { install: jest.fn() };
|
||||
const tools = {
|
||||
getBoolean: jest.fn((v, d) => v ? v === 'true' : d),
|
||||
getBinaryName: jest.fn(v => v.replace('-cli', '')),
|
||||
resolveVersion: jest.fn((n, v) => v),
|
||||
maybeAuthenticate: jest.fn(),
|
||||
maybePatchWatchers: jest.fn(),
|
||||
};
|
||||
const tools = getToolsMock();
|
||||
|
||||
jest.mock('@actions/core', () => core);
|
||||
jest.mock('@actions/exec', () => exec);
|
||||
jest.mock('../src/tools', () => tools);
|
||||
jest.mock('../src/install', () => install);
|
||||
jest.mock('../../src/tools', () => tools);
|
||||
jest.mock('../../src/install', () => install);
|
||||
|
||||
import { run } from '../src/run';
|
||||
import { setupAction } from '../../src/actions/setup';
|
||||
|
||||
describe('run', () => {
|
||||
it('patches the system when set to true', async () => {
|
||||
mockInput({ patchWatchers: 'true' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(tools.maybePatchWatchers).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('patches the system when not set', async () => {
|
||||
mockInput({ patchWatchers: '' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(tools.maybePatchWatchers).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('skips the system patch when set to false', async () => {
|
||||
mockInput({ patchWatchers: 'false' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(tools.maybePatchWatchers).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('authenticates with provided credentials', async () => {
|
||||
mockInput({ username: 'bycedric', password: 'mypassword', patchWatchers: 'false' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(tools.maybeAuthenticate).toBeCalledWith({ username: 'bycedric', password: 'mypassword' });
|
||||
});
|
||||
|
||||
it('authenticates with provided token', async () => {
|
||||
mockInput({ token: 'ABC123', patchWatchers: 'false' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(tools.maybeAuthenticate).toBeCalledWith({ token: 'ABC123' });
|
||||
});
|
||||
|
||||
@@ -58,13 +54,13 @@ describe('run', () => {
|
||||
describe(packageName, () => {
|
||||
it(`skips installation without \`${cliName}-version\``, async () => {
|
||||
mockInput();
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(install.install).not.toBeCalledWith({ package: packageName });
|
||||
});
|
||||
|
||||
it('installs with yarn by default', async () => {
|
||||
mockInput({ [`${cliName}Version`]: 'latest' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(install.install).toBeCalledWith({
|
||||
package:
|
||||
packageName,
|
||||
@@ -76,7 +72,7 @@ describe('run', () => {
|
||||
|
||||
it('installs provided version with npm', async () => {
|
||||
mockInput({ [`${cliName}Version`]: '3.0.10', packager: 'npm' });
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(install.install).toBeCalledWith({
|
||||
package: packageName,
|
||||
version: '3.0.10',
|
||||
@@ -91,7 +87,7 @@ describe('run', () => {
|
||||
[`${cliName}Version`]: '4.2.0',
|
||||
[`${cliName}Cache`]: 'true',
|
||||
});
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(install.install).toBeCalledWith({
|
||||
package: packageName,
|
||||
version: '4.2.0',
|
||||
@@ -107,7 +103,7 @@ describe('run', () => {
|
||||
[`${cliName}Cache`]: 'true',
|
||||
[`${cliName}CacheKey`]: 'custom-key'
|
||||
});
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(install.install).toBeCalledWith({
|
||||
package: packageName,
|
||||
version: '4.2.0',
|
||||
@@ -119,7 +115,7 @@ describe('run', () => {
|
||||
|
||||
it('installs path to global path', async () => {
|
||||
install.install.mockResolvedValue(`/${cliName}/install/path`);
|
||||
await run();
|
||||
await setupAction();
|
||||
expect(core.addPath).toBeCalledWith(`/${cliName}/install/path`);
|
||||
});
|
||||
});
|
||||
@@ -149,7 +145,7 @@ function mockInput(props: MockInputProps = {}) {
|
||||
case 'expo-cache':
|
||||
return props.expoCache || '';
|
||||
case 'expo-cache-key':
|
||||
return props.expoCacheKey || '';
|
||||
return props.expoCacheKey || '';``
|
||||
case 'eas-version':
|
||||
return props.easVersion || '';
|
||||
case 'eas-cache':
|
||||
@@ -342,3 +342,23 @@ describe(tools.handleError, () => {
|
||||
expect(core.setFailed).toBeCalledWith(error);
|
||||
});
|
||||
});
|
||||
|
||||
describe(tools.performAction, () => {
|
||||
it('skips the test in a jest environment', async () => {
|
||||
utils.setEnv('JEST_WORKER_ID', '69');
|
||||
const action = jest.fn();
|
||||
const result = await tools.performAction(action);
|
||||
expect(result).toBeNull();
|
||||
expect(action).not.toBeCalled();
|
||||
utils.restoreEnv();
|
||||
});
|
||||
|
||||
it('runs the test outside a jest environment', async () => {
|
||||
utils.setEnv('JEST_WORKER_ID', '');
|
||||
const action = jest.fn();
|
||||
const result = await tools.performAction(action);
|
||||
expect(result).toBeUndefined();
|
||||
expect(action).toBeCalled();
|
||||
utils.restoreEnv();
|
||||
});
|
||||
});
|
||||
@@ -32,3 +32,19 @@ export function setEnv(name: string, value: string): void {
|
||||
export function restoreEnv(): void {
|
||||
process.env = originalEnv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a mocked version of the tools.
|
||||
*/
|
||||
export function getToolsMock() {
|
||||
return {
|
||||
getBoolean: jest.fn((v, d) => v ? v === 'true' : d),
|
||||
getBinaryName: jest.fn(v => v.replace('-cli', '')),
|
||||
resolveVersion: jest.fn((n, v) => v),
|
||||
maybeAuthenticate: jest.fn(),
|
||||
maybePatchWatchers: jest.fn(),
|
||||
maybeWarnForUpdate: jest.fn(),
|
||||
handleError: jest.fn(),
|
||||
performAction: jest.fn(),
|
||||
};
|
||||
}
|
||||
@@ -1302,10 +1302,10 @@
|
||||
"@typescript-eslint/types" "5.4.0"
|
||||
eslint-visitor-keys "^3.0.0"
|
||||
|
||||
"@zeit/ncc@^0.22.3":
|
||||
version "0.22.3"
|
||||
resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.22.3.tgz#fca6b86b4454ce7a7e1e7e755165ec06457f16cd"
|
||||
integrity sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ==
|
||||
"@vercel/ncc@^0.31.1":
|
||||
version "0.31.1"
|
||||
resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.31.1.tgz#9346c7e59326f5eeac75c0286e47df94c2d6d8f7"
|
||||
integrity sha512-g0FAxwdViI6UzsiVz5HssIHqjcPa1EHL6h+2dcJD893SoCJaGdqqgUF09xnMW6goWnnhbLvgiKlgJWrJa+7qYA==
|
||||
|
||||
JSONStream@^1.0.4, JSONStream@^1.3.4:
|
||||
version "1.3.5"
|
||||
|
||||
Reference in new issue
Block a user