Hello yarn berry

This commit is contained in:
undefined committed 2021-05-26 23:35:36 +08:00
1 parent 04a4306895
commit 782f334a27
62 files changed
+448 -239

No files matched your search

+7
View File
@@ -14,6 +14,12 @@ dist/
globalConfig.json
*.out
.clinic/
.yarn/cache
.yarn/build-state.yml
.yarn/unplugged
.yarn/sdks
.yarn/install-state.gz
.pnp.*
# Config Files
/config.yaml
@@ -30,6 +36,7 @@ packages/**/*.js
!/install/jssh.d.ts
## ui-default
!packages/ui-default/**/*.js
!packages/geoip/download.js
!examples/**
packages/ui-default/public
packages/ui-default/misc/.iconfont
+5 -1
View File
@@ -8,6 +8,10 @@
"typescript.tsdk": "node_modules/typescript/lib",
"[json]": {
"files.insertFinalNewline": true,
"files.trimFinalNewlines": false,
"files.trimFinalNewlines": false
},
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
}
}
+77
View File
@@ -0,0 +1,77 @@
/* eslint-disable */
module.exports = {
name: "@yarnpkg/plugin-interactive-tools",
factory: function (require) {
var plugin;plugin=(()=>{var __webpack_modules__={7560:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>K});function r(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}const i=require("@yarnpkg/cli"),o=require("@yarnpkg/core");var u=n(9245),a=n(7382);const l=(0,a.memo)(({active:e})=>{const t=(0,a.useMemo)(()=>e?"◉":"◯",[e]),n=(0,a.useMemo)(()=>e?"green":"yellow",[e]);return a.createElement(u.Text,{color:n},t)});function s({active:e},t,n){const{stdin:r}=(0,u.useStdin)(),i=(0,a.useCallback)((e,n)=>t(e,n),n);(0,a.useEffect)(()=>{if(e&&r)return r.on("keypress",i),()=>{r.off("keypress",i)}},[e,i,r])}var c;!function(e){e.BEFORE="before",e.AFTER="after"}(c||(c={}));const f=function(e,t,{active:n,minus:r,plus:i,set:o,loop:u=!0}){s({active:n},(n,a)=>{const l=t.indexOf(e);switch(a.name){case r:{const e=l-1;if(u)return void o(t[(t.length+e)%t.length]);if(e<0)return;o(t[e])}break;case i:{const e=l+1;if(u)return void o(t[e%t.length]);if(e>=t.length)return;o(t[e])}}},[t,e,i,o,u])},d=({active:e=!0,children:t=[],radius:n=10,size:r=1,loop:i=!0,onFocusRequest:o,willReachEnd:l})=>{const d=a.Children.map(t,e=>(e=>{if(null===e.key)throw new Error("Expected all children to have a key");return e.key})(e)),p=d[0],[h,v]=(0,a.useState)(p),m=d.indexOf(h);(0,a.useEffect)(()=>{d.includes(h)||v(p)},[t]),(0,a.useEffect)(()=>{l&&m>=d.length-2&&l()},[m]),function({active:e},t,n){s({active:e},(e,n)=>{"tab"===n.name&&(n.shift?t(c.BEFORE):t(c.AFTER))},n)}({active:e&&!!o},e=>{null==o||o(e)},[o]),f(h,d,{active:e,minus:"up",plus:"down",set:v,loop:i});let g=m-n,y=m+n;y>d.length&&(g-=y-d.length,y=d.length),g<0&&(y+=-g,g=0),y>=d.length&&(y=d.length-1);const _=[];for(let n=g;n<=y;++n){const i=d[n],o=e&&i===h;_.push(a.createElement(u.Box,{key:i,height:r},a.createElement(u.Box,{marginLeft:1,marginRight:1},a.createElement(u.Text,null,o?a.createElement(u.Text,{color:"cyan",bold:!0},">"):" ")),a.createElement(u.Box,null,a.cloneElement(t[n],{active:o}))))}return a.createElement(u.Box,{flexDirection:"column",width:"100%"},_)},p=require("readline"),h=a.createContext(null),v=({children:e})=>{const{stdin:t,setRawMode:n}=(0,u.useStdin)();(0,a.useEffect)(()=>{n&&n(!0),t&&(0,p.emitKeypressEvents)(t)},[t,n]);const[r,i]=(0,a.useState)(new Map),o=(0,a.useMemo)(()=>({getAll:()=>r,get:e=>r.get(e),set:(e,t)=>i(new Map([...r,[e,t]]))}),[r,i]);return a.createElement(h.Provider,{value:o,children:e})};function m(e,t){const n=(0,a.useContext)(h);if(null===n)throw new Error("Expected this hook to run with a ministore context attached");if(void 0===e)return n.getAll();const r=(0,a.useCallback)(t=>{n.set(e,t)},[e,n.set]);let i=n.get(e);return void 0===i&&(i=t),[i,r]}async function g(e,t){let n;const{waitUntilExit:r}=(0,u.render)(a.createElement(v,null,a.createElement(e,Object.assign({},t,{useSubmit:e=>{const{exit:t}=(0,u.useApp)();s({active:!0},(r,i)=>{"return"===i.name&&(n=e,t())},[t,e])}}))));return await r(),n}const y=require("clipanion");var _=n(7840),b=n(4410);const w={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},E=n.n(b)()(w.appId,w.apiKey).initIndex(w.indexName),D=async(e,t=0)=>await E.search(e,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:t,hitsPerPage:10}),S=["regular","dev","peer"];class C extends i.BaseCommand{async execute(){const e=await o.Configuration.find(this.context.cwd,this.context.plugins),t=()=>a.createElement(u.Box,{flexDirection:"row"},a.createElement(u.Box,{flexDirection:"column",width:48},a.createElement(u.Box,null,a.createElement(u.Text,null,"Press ",a.createElement(u.Text,{bold:!0,color:"cyanBright"},"<up>"),"/",a.createElement(u.Text,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),a.createElement(u.Box,null,a.createElement(u.Text,null,"Press ",a.createElement(u.Text,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),a.createElement(u.Box,null,a.createElement(u.Text,null,"Press ",a.createElement(u.Text,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),a.createElement(u.Box,{flexDirection:"column"},a.createElement(u.Box,{marginLeft:1},a.createElement(u.Text,null,"Press ",a.createElement(u.Text,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),a.createElement(u.Box,{marginLeft:1},a.createElement(u.Text,null,"Press ",a.createElement(u.Text,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),n=()=>a.createElement(a.Fragment,null,a.createElement(u.Box,{width:15},a.createElement(u.Text,{bold:!0,underline:!0,color:"gray"},"Owner")),a.createElement(u.Box,{width:11},a.createElement(u.Text,{bold:!0,underline:!0,color:"gray"},"Version")),a.createElement(u.Box,{width:10Line truncated
/** @license React v0.24.0
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
e.exports=function t(r){"use strict";var i=n(9381),o=n(7382),u=n(7181);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null}),l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});var s="function"==typeof Symbol&&Symbol.for,c=s?Symbol.for("react.element"):60103,f=s?Symbol.for("react.portal"):60106,d=s?Symbol.for("react.fragment"):60107,p=s?Symbol.for("react.strict_mode"):60108,h=s?Symbol.for("react.profiler"):60114,v=s?Symbol.for("react.provider"):60109,m=s?Symbol.for("react.context"):60110,g=s?Symbol.for("react.concurrent_mode"):60111,y=s?Symbol.for("react.forward_ref"):60112,_=s?Symbol.for("react.suspense"):60113,b=s?Symbol.for("react.suspense_list"):60120,w=s?Symbol.for("react.memo"):60115,E=s?Symbol.for("react.lazy"):60116;s&&Symbol.for("react.fundamental"),s&&Symbol.for("react.responder"),s&&Symbol.for("react.scope");var D="function"==typeof Symbol&&Symbol.iterator;function S(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=D&&e[D]||e["@@iterator"])?e:null}function C(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return"Fragment";case f:return"Portal";case h:return"Profiler";case p:return"StrictMode";case _:return"Suspense";case b:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case m:return"Context.Consumer";case v:return"Context.Provider";case y:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case w:return C(e.type);case E:if(e=1===e._status?e._result:null)return C(e)}return null}function k(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function T(e){if(k(e)!==e)throw Error(a(188))}function x(e){var t=e.alternate;if(!t){if(null===(t=k(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return T(i),e;if(o===r)return T(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var u=!1,l=i.child;l;){if(l===n){u=!0,n=i,r=o;break}if(l===r){u=!0,r=i,n=o;break}l=l.sibling}if(!u){for(l=o.child;l;){if(l===n){u=!0,n=o,r=i;break}if(l===r){u=!0,r=o,n=i;break}l=l.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function A(e){if(!(e=x(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var O=r.getPublicInstance,P=r.getRootHostContext,I=r.getChildHostContext,N=r.prepareForCommit,M=r.resetAfterCommit,R=r.createInstance,F=r.appendInitialChild,L=r.finalizeInitialChildren,B=r.prepareUpdate,j=r.shouldSetTextContent,U=r.shouldDeprioritizeSubtree,z=r.createTextInstance,W=r.setTimeout,H=r.clearTimeout,V=r.noTimeout,q=r.isPrimaryRenderer,G=r.supportsMutation,$=r.supportsPersistence,Y=r.supportsHydration,K=r.appendChild,X=r.appendChildToContainer,Q=r.commitTextUpdate,J=r.commitMount,Z=r.commitUpdate,ee=r.insertBefore,te=r.insertInContainerBefore,ne=r.removeChild,re=r.removeChildFromContainer,ie=r.resetTextContent,oe=r.hideInstance,ue=r.hideTextInstance,ae=r.unhideInstance,le=r.unhideTextInstance,se=r.cloneInstance,ce=r.createContainerChildSet,fe=r.appendChildToContainerChildSet,de=r.finalizeContainerChildren,pe=r.replaceContainerChildren,he=r.cloneHiddenInstance,ve=r.cloneHiddenTextInstance,me=r.canHydrateInstance,ge=r.canHydrateTextInstance,ye=r.isSuspenseInstancePending,_e=r.isSuspenseInstanceFallback,be=r.getNextHydratableSibling,we=r.getFirstHydratableChild,Ee=r.hydrateInstance,De=r.hydrateTextInstance,Se=r.getNextHydratableInstanceAfterSuspenseInstance,Ce=r.commitHydratedContainer,ke=r.commitHydratedSuspenseInstance,Te=/^(.*)[\\\/]/;function xe(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=C(e.type);n=null,r&&(n=C(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Te,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}new Set;var Ae=[],Oe=-1;function Pe(e){0>Oe||(e.current=Ae[Oe],Ae[Oe]=null,Oe--)}function Ie(e,t){Oe++,Ae[Oe]=e.current,e.current=t}var Ne={},Me={current:Ne},Re={current:!1},Fe=Ne;funcLine truncated
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/e=n.nmd(e),function(){var i="Expected a function",o="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],a="[object Arguments]",l="[object Array]",s="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Function]",p="[object GeneratorFunction]",h="[object Map]",v="[object Number]",m="[object Object]",g="[object RegExp]",y="[object Set]",_="[object String]",b="[object Symbol]",w="[object WeakMap]",E="[object ArrayBuffer]",D="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",k="[object Int8Array]",T="[object Int16Array]",x="[object Int32Array]",A="[object Uint8Array]",O="[object Uint16Array]",P="[object Uint32Array]",I=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,L=RegExp(R.source),B=RegExp(F.source),j=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,G=RegExp(q.source),$=/^\s+|\s+$/g,Y=/^\s+/,K=/\s+$/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/\\(\\)?/g,te=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ne=/\w*$/,re=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,ae=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,se=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",he="["+de+"]",ve="["+fe+"]",me="\\d+",ge="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",_e="[^\\ud800-\\udfff"+de+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",be="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="(?:"+ye+"|"+_e+")",ke="(?:"+Se+"|"+_e+")",Te="(?:"+ve+"|"+be+")"+"?",xe="[\\ufe0e\\ufe0f]?"+Te+("(?:\\u200d(?:"+[we,Ee,De].join("|")+")[\\ufe0e\\ufe0f]?"+Te+")*"),Ae="(?:"+[ge,Ee,De].join("|")+")"+xe,Oe="(?:"+[we+ve+"?",ve,Ee,De,pe].join("|")+")",Pe=RegExp("['’]","g"),Ie=RegExp(ve,"g"),Ne=RegExp(be+"(?="+be+")|"+Oe+xe,"g"),Me=RegExp([Se+"?"+ye+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[he,Se,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[he,Se+Ce,"$"].join("|")+")",Se+"?"+Ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Se+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ae].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),Fe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Be=-1,je={};je[S]=je[C]=je[k]=je[T]=je[x]=je[A]=je["[object Uint8ClampedArray]"]=je[O]=je[P]=!0,je[a]=je[l]=je[E]=je[s]=je[D]=je[c]=je[f]=je[d]=je[h]=je[v]=je[m]=je[g]=je[y]=je[_]=je[w]=!1;var Ue={};Ue[a]=Ue[l]=Ue[E]=Ue[D]=Ue[s]=Ue[c]=Ue[S]=Ue[C]=Ue[k]=Ue[T]=Ue[x]=Ue[h]=Ue[v]=Ue[m]=Ue[g]=Ue[y]=Ue[_]=Ue[b]=Ue[A]=Ue["[object Uint8ClampedArray]"]=Ue[O]=Ue[P]=!0,Ue[f]=Ue[d]=Ue[w]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,He=parseInt,Ve="object"==typeof global&&global&&global.Object===Object&&global,qe="object"==typeof self&&self&&self.Object===Object&&self,Ge=Ve||qe||Function("return this")(),$e=t&&!t.nodeType&&t,Ye=$e&&e&&!e.nodeType&&e,Ke=Ye&&Ye.exports===$e,Xe=Ke&&Ve.process,Qe=function(){try{var e=Ye&&Ye.require&&Ye.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Je=Qe&&Qe.isArrayBuffer,Ze=Qe&&Qe.isDate,et=Qe&&Qe.isMap,tt=Qe&&Qe.isRegExp,nt=Qe&&Qe.isSet,rt=Qe&&Qe.isTypedArray;function it(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var u=e[i];t(r,u,n(u),e)}return r}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function at(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function st(e,t){for(var n=-1,r=null==e?Line truncated
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var u,a,l=i(e),s=1;s<arguments.length;s++){for(var c in u=Object(arguments[s]))n.call(u,c)&&(l[c]=u[c]);if(t){a=t(u);for(var f=0;f<a.length;f++)r.call(u,a[f])&&(l[a[f]]=u[a[f]])}}return l}},834:(e,t,n)=>{"use strict";const r=n(1573),i=new WeakMap,o=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,o=!1,u=0;const a=e.displayName||e.name||"<anonymous>",l=function(...r){if(i.set(l,++u),o){if(!0===t.throw)throw new Error(`Function \`${a}\` can only be called once`);return n}return o=!0,n=e.apply(this,r),e=null,n};return r(l,e),i.set(l,u),l};e.exports=o,e.exports.default=o,e.exports.callCount=e=>{if(!i.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return i.get(e)}},8070:(e,t,n)=>{"use strict";const r=n(2413),i=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];let o={};e.exports=e=>{const t=new r.PassThrough,n=new r.PassThrough;t.write=t=>e("stdout",t),n.write=t=>e("stderr",t);const u=new console.Console(t,n);for(const e of i)o[e]=console[e],console[e]=u[e];return()=>{for(const e of i)console[e]=o[e];o={}}}},5187:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){"use strict";e.exports=n(12)},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function u(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=u(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))i.call(n,c)&&(l[c]=n[c]);if(r){a=r(n);for(var f=0;f<a.length;f++)o.call(n,a[f])&&(l[a[f]]=n[a[f]])}}return l}},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,u=/^0o[0-7]+$/i,a=parseInt,l="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t,s="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,c=l||s||Function("return this")(),f=Object.prototype.toString,d=Math.max,p=Math.min,h=function(){return c.Date.now()};function v(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function m(e){return"symbol"==n(e)||function(e){return!!e&&"object"==n(e)}(e)&&"[object Symbol]"==f.call(e)}function g(e){if("number"==typeof e)return e;if(m(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||u.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),function(e,t,n){var r,i,o,u,a,l,s=0,c=!1,f=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,s=t,u=e.apply(o,n)}function _(e){return s=e,a=setTimeout(w,t),c?y(e):u}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-s>=o}function w(){var e=h();if(b(e))return E(e);a=setTimeout(w,function(e){var n=t-(e-l);return f?p(n,o-(e-s)):n}(e))}function E(e){return a=void 0,m&&r?y(e):(r=i=void 0,u)}function D(){var e=h(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return _(l);if(f)return a=setTimeout(w,t),y(l)}return void 0===a&&(a=setTimeout(w,t)),u}return t=g(t)||0,v(n)&&(c=!!n.leading,o=(f="maxWait"in n)?d(g(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),D.cancel=function(){void 0!==a&&clearTimeout(a),s=0,r=l=i=a=void 0},D.flush=function(){return void 0===a?u:E(h())},D}(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(4))},function(e,t,n){(function(n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;t=e.exports=p,i="object"===(void 0===n?"undefined":r(n))&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var o=Number.MAX_SAFE_INTEGER||9007199254740991,u=t.re=[],a=t.src=[],l=t.tokens={},s=0;function c(e){l[e]=s++}c("NUMERICIDENTIFIER"),a[l.NUMERICIDENTIFIER]="0|[1-9]\\d*",c("NUMERICIDENTIFIERLOOSE"),a[l.NUMERICIDENTIFIERLOOSE]="[0-9]+",c("NONNUMERICIDENTIFIER"),a[l.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",c("MAINVERSION"),a[l.MAINVERSION]="("+a[l.NUMERICIDENTIFIER]+")\\.("+a[l.NUMERICIDENTIFIER]+")\\.("+a[l.NUMERICIDENTIFIER]+")",c("MAINVERSIONLOOSE"),a[l.MAINVERSIONLOOSE]="("+a[l.NUMERICIDENTIFIERLOOSE]+")\\.("+a[l.NUMERICIDENTIFIERLOOSE]+")\\.("+a[l.NUMERICIDENTIFIERLOOSE]+")",c("PRERELEASEIDENTIFIER"),a[l.PRERELEASEIDENTIFIER]="(?:"+a[l.NUMERICIDENTIFIER]+"|"+a[l.NONNUMERICIDENTIFIER]+")",c("PRERELEASEIDENTIFIERLOOSE"),a[l.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[l.NUMERICIDENTIFIERLOOSE]+"|"+a[l.NONNUMERICIDENTIFIER]+")",c("PRERELEASE"),a[l.PRERELEASE]="(?:-("+a[l.PRERELEASEIDENTIFIER]+"(?:\\."+a[l.PRERELEASEIDENTIFIER]+")*))",c("PRERELEASELOOSE"),a[l.PRERELEASELOOSE]="(?:-?("+a[l.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[l.PRERELEASEIDENTIFIERLOOSE]+")*))",c("BUILDIDENTIFIER"),a[l.BUILDIDENTIFIER]="[0-9A-Za-z-]+",c("BUILD"),a[l.BUILD]="(?:\\+("+a[l.BUILDIDENTIFIER]+"(?:\\."+a[l.BUILDIDENTIFIER]+")*))",c("FULL"),c("FULLPLAIN"),a[l.FULLPLAIN]="v?"+a[l.MAINVERSION]+a[l.PRERELEASE]+"?"+a[l.BUILD]+"?",a[l.FULL]="^"+a[l.FULLPLAIN]+"$",c("LOOSEPLAIN"),a[l.LOOSEPLAIN]="[v=\Line truncated
/*! promise-polyfill 2.0.1 */
function(r){function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if("object"!=n(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(e,i(a,this),i(l,this))}function u(e){var t=this;return null===this._state?void this._deferreds.push(e):void d((function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)}else(t._state?e.resolve:e.reject)(t._value)}))}function a(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==n(e)||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void f(i(t,e),i(a,this),i(l,this))}this._state=!0,this._value=e,s.call(this)}catch(e){l.call(this,e)}}function l(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;t>e;e++)u.call(this,this._deferreds[e]);this._deferreds=null}function c(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function f(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(e){if(r)return;r=!0,n(e)}}var d=o.immediateFn||"function"==typeof t&&t||function(e){setTimeout(e,1)},p=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=this;return new o((function(r,i){u.call(n,new c(e,t,r,i))}))},o.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&p(arguments[0])?arguments[0]:arguments);return new o((function(t,r){function i(u,a){try{if(a&&("object"==n(a)||"function"==typeof a)){var l=a.then;if("function"==typeof l)return void l.call(a,(function(e){i(u,e)}),r)}e[u]=a,0==--o&&t(e)}catch(e){r(e)}}if(0===e.length)return t([]);for(var o=e.length,u=0;u<e.length;u++)i(u,e[u])}))},o.resolve=function(e){return e&&"object"==n(e)&&e.constructor===o?e:new o((function(t){t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.race=function(e){return new o((function(t,n){for(var r=0,i=e.length;i>r;r++)e[r].then(t,n)}))},e.exports?e.exports=o:r.Promise||(r.Promise=o)}(this),u.copy=function(e){return new Promise((function(t,n){if("string"!=typeof e&&!("text/plain"in e))throw new Error("You must provide a text/plain type.");var r="string"==typeof e?e:e["text/plain"];window.clipboardData.setData("Text",r)?t():n(new Error("Copying was rejected."))}))},u.paste=function(){return new Promise((function(e,t){var n=window.clipboardData.getData("Text");n?e(n):t(new Error("Pasting was rejected."))}))}),u}()}).call(this,n(13).setImmediate)},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";n.r(t),t.default=":root {\n /**\n * IMPORTANT: When new theme variables are added below– also add them to SettingsContext updateThemeVariables()\n */\n\n /* Light theme */\n --light-color-attribute-name: #ef6632;\n --light-color-attribute-name-not-editable: #23272f;\n --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7);\n --light-color-attribute-value: #1a1aa6;\n --light-color-attribute-value-inverted: #ffffff;\n --light-color-attribute-editable-value: #1a1aa6;\n --light-color-background: #ffffff;\n --light-color-background-hover: rgba(0, 136, 250, 0.1);\n --light-color-background-inactive: #e5e5e5;\n --light-color-background-invalid: #fff0f0;\n --light-color-background-selected: #0088fa;\n --light-color-button-background: #ffffff;\n --light-color-button-background-focus: #ededed;\n --light-color-button: #5f6673;\n --light-color-button-disabled: #cfd1d5;\n --light-color-button-active: #0088fa;\n --light-color-button-focus: #23272f;\n --light-color-button-hover: #23272f;\n --light-color-border: #eeeeee;\n --light-color-commit-did-not-render-fill: #cfd1d5;\n --light-color-commit-did-not-render-fill-text: #000000;\n --light-color-commit-did-not-render-pattern: #cfd1d5;\n --light-color-commit-did-not-render-pattern-text: #333333;\n --light-color-commit-gradient-0: #37afa9;\n --light-color-commit-gradient-1: #63b19e;\n --light-color-commit-gradient-2: #80b393;\n --light-color-commit-gradient-3: #97b488;\n --light-color-commit-gradient-4: #abb67d;\n --light-color-commit-gradient-5: #beb771;\n --light-color-commit-gradient-6: #cfb965;\n --light-color-commit-gradient-7: #dfba57;\n --light-color-commit-gradient-8: #efbb49;\n --light-color-commit-gradient-9: #febc38;\n --light-color-commit-gradient-text: #000000;\n --light-color-component-name: #6a51b2;\n --light-color-component-name-inverted: #ffffff;\n --light-color-component-badge-background: rgba(0, 0, 0, 0.1);\n --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25);\n --light-color-component-badge-count: #777d88;\n --light-color-component-badge-count-inverted: rgba(255, 255, 2Line truncated
/** @license React v0.0.0-experimental-51a3aa6af
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=60103,o=60106,u=60107,a=60108,l=60114,s=60109,c=60110,f=60112,d=60113,p=60120,h=60115,v=60116,m=60121,g=60122,y=60117,_=60129,b=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;i=w("react.element"),o=w("react.portal"),u=w("react.fragment"),a=w("react.strict_mode"),l=w("react.profiler"),s=w("react.provider"),c=w("react.context"),f=w("react.forward_ref"),d=w("react.suspense"),p=w("react.suspense_list"),h=w("react.memo"),v=w("react.lazy"),m=w("react.block"),g=w("react.server.block"),y=w("react.fundamental"),_=w("react.debug_trace_mode"),b=w("react.legacy_hidden")}function E(e){if("object"===r(e)&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case u:case l:case a:case d:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case h:case s:return e;default:return t}}case o:return t}}}var D=s,S=i,C=f,k=u,T=v,x=h,A=o,O=l,P=a,I=d;t.ContextConsumer=c,t.ContextProvider=D,t.Element=S,t.ForwardRef=C,t.Fragment=k,t.Lazy=T,t.Memo=x,t.Portal=A,t.Profiler=O,t.StrictMode=P,t.Suspense=I,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"===r(e)&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===u},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===h},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===u||e===l||e===_||e===a||e===d||e===p||e===b||"object"===r(e)&&null!==e&&(e.$$typeof===v||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===m||e[0]===g)},t.typeOf=E},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(14),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,u,a,l=1,s={},c=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(u="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(u)&&h(+t.data.slice(u.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(u+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(h,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return s[l]=i,r(l),l++},d.clearImmediate=p}function p(e){delete s[e]}function h(e){if(c)setTimeout(h,0,e);else{var t=s[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(4),n(5))},function(e,t,n){"use strict";
/** @license React v0.0.0-experimental-51a3aa6af
* react-debug-tools.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(1),o=n(16),u=n(18).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,a=60128;if("function"==typeof Symbol&&Symbol.for){var l=Symbol.for;a=l("react.opaque.id")}var s=[],c=null,f=null;function d(){if(null===c){var e=new Map;try{v.useContext({_currentValue:null}),v.useState(null),v.useReducer((function(e){return e}),null),v.useRef(null),v.useLayoutEffect((function(){})),v.useEffect((function(){})),v.useImperativeHandle(void 0,(function(){return null})),v.useDebugValue(null),v.useCallback((function(){})),v.useMemo((function(){return null}))}finally{var t=s;s=[]}for(var n=0;n<t.length;n++){var r=t[n];e.set(r.primitive,o.parse(r.stackError))}c=e}return c}var p=null;function h(){var e=p;return null!==e&&(p=e.next),e}var v={readContext:function(e){return e._currentValue},useCallback:function(e){var t=h();return s.push({primitive:"Callback",stackError:Error(),value:null!==t?t.memoizedState[0]:e}),e},useContext:function(e){return s.push({primitive:"Context",stackError:Error(),value:e._currentValue}),e._currentValue},useEffect:function(e){h(),s.push({primitive:"Effect",stackError:Error(),value:e})},useImperativeHandle:function(e){h();var t=void 0;null!==e&&"object"===r(e)&&(t=e.current),s.push({primitive:"ImperativeHandle",stackError:Error(),value:t})},useDebugValue:function(e,t){s.push({primitive:"DebugValue",stackError:Error(),value:"function"==typeof t?t(e):e})},useLayoutEffect:function(e){h(),s.push({primitive:"LayoutEffect",stackError:Error(),value:e})},useMemo:function(e){var t=h();return e=null!==t?t.memoizedState[0]:e(),s.push({primitive:"Memo",stackError:Error(),value:e}),e},useReducer:function(e,t,n){return t=null!==(e=h())?e.memoizedState:void 0!==n?n(t):t,s.push({primitive:"Reducer",stackError:Error(),value:t}),[t,function(){}]},useRef:function(e){var t=h();return e=null!==t?t.memoizedState:{current:e},s.push({primitive:"Ref",stackError:Error(),value:e.current}),e},useState:function(e){var t=h();return e=null!==t?t.memoizedState:"function"==typeof e?e():e,s.push({primitive:"State",stackError:Error(),value:e}),[e,function(){}]},useTransition:function(){return h(),h(),s.push({primitive:"Transition",stackError:Error(),value:void 0}),[function(){},!1]},useMutableSource:function(e,t){return h(),h(),h(),h(),e=t(e._source),s.push({primitive:"MutableSource",stackError:Error(),value:e}),e},useDeferredValue:function(e){return h(),h(),s.push({primitive:"DeferredValue",stackError:Error(),value:e}),e},useOpaqueIdentifier:function(){var e=h();return f&&0===f.mode&&h(),(e=null===e?void 0:e.memoizedState)&&e.$$typeof===a&&(e=void 0),s.push({primitive:"OpaqueIdentifier",stackError:Error(),value:e}),e}},m=0;function g(e,t,n){var r=t[n].source,i=0;e:for(;i<e.length;i++)if(e[i].source===r){for(var o=n+1,u=i+1;o<t.length&&u<e.length;o++,u++)if(e[u].source!==t[o].source)continue e;return i}return-1}function y(e,t){return!(!e||(t="use"+t,e.length<t.length||e.lastIndexOf(t)!==e.length-t.length))}function _(e){if(!e)return"";var t=e.lastIndexOf(".");return-1===t&&(t=0),"use"===e.substr(t,3)&&(t+=3),e.substr(t)}function b(e,t){for(var n=[],r=null,i=n,u=0,a=[],l=0;l<t.length;l++){var s=t[l],c=e,f=o.parse(s.stackError);e:{var p=f,h=g(p,c,m);if(-1!==h)c=h;else{for(var v=0;v<c.length&&5>v;v++)if(-1!==(h=g(p,c,v))){m=v,c=h;break e}c=-1}}e:{if(p=f,void 0!==(h=d().get(s.primitive)))for(v=0;v<h.length&&v<p.length;v++)if(h[v].source!==p[v].source){v<p.length-1&&y(p[v].functionName,s.primitive)&&v++,v<p.length-1&&y(p[v].functionName,s.primitive)&&v++,p=v;break e}p=-1}if(null!==(f=-1===c||-1===p||2>c-p?null:f.slice(p,c-1))){if(c=0,null!==r){for(;c<f.length&&c<r.length&&f[f.length-c-1].source===r[r.length-c-1].source;)c++;for(r=r.length-1;r>c;r--)i=a.pop()}for(r=f.length-c-1;1<=r;r--)c=[],i.push({id:null,isStateEditable:!1,name:_(f[r-1].functionName),value:void 0,subHooks:c}),a.push(i),i=c;r=f}c="Context"===(f=s.primitive)||"DebugValue"===f?null:u++,i.push({id:c,isStateEditable:"Reducer"===f||"State"===f,name:f,value:s.value,subHooks:[]})}return function e(t,n){for(var r=[],i=0;i<t.length;i++){var o=t[i];"DebugValue"===o.name&&0===o.subHooks.length?(t.splice(i,1),i--,r.push(o)):e(o.subHooks,o)}null!==n&&(1===r.length?n.value=r[0].value:1<r.length&&(n.value=r.map((function(e){return e.value}))))}(n,null),n}function w(e,t,n){null==n&&(n=u.ReactCurrentDispatcher);var r=n.current;n.current=v;try{var i=Error();e(t)}finally{e=s,s=[],n.current=r}return b(n=o.parse(i),e)}t.inspectHooks=w,t.inspectHooksOfFiber=function(e,t){if(null==t&&(t=u.ReactCurrentDispatcher),f=e,0!==e.tag&&15!==e.tag&&11!==e.tag&&22!==e.tag)throw Error("Unknown Fiber. Needs to be a function component to inspect hooks.");d();var n=e.type,r=e.memoizedProps;if(n!==e.elementType&&n&&n.defaultProps){r=i({},r);var a=n.defaultProps;for(l in a)void 0Line truncated
/** @license React v0.0.0-experimental-51a3aa6af
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(1),o=60103,u=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,l=60110,s=60112;t.Suspense=60113,t.unstable_SuspenseList=60120;var c=60115,f=60116,d=60121;if(t.unstable_DebugTracingMode=60129,t.unstable_LegacyHidden=60131,"function"==typeof Symbol&&Symbol.for){var p=Symbol.for;o=p("react.element"),u=p("react.portal"),t.Fragment=p("react.fragment"),t.StrictMode=p("react.strict_mode"),t.Profiler=p("react.profiler"),a=p("react.provider"),l=p("react.context"),s=p("react.forward_ref"),t.Suspense=p("react.suspense"),t.unstable_SuspenseList=p("react.suspense_list"),c=p("react.memo"),f=p("react.lazy"),d=p("react.block"),t.unstable_DebugTracingMode=p("react.debug_trace_mode"),t.unstable_LegacyHidden=p("react.legacy_hidden")}var h="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function _(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==r(e)&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=y.prototype;var w=b.prototype=new _;w.constructor=b,i(w,y.prototype),w.isPureReactComponent=!0;var E={current:null},D=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r,i={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)D.call(t,r)&&!S.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var s=Array(l),c=0;c<l;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:u,ref:a,props:i,_owner:E.current}}function k(e){return"object"===r(e)&&null!==e&&e.$$typeof===o}var T=/\/+/g;function x(e,t){return"object"===r(e)&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,n,i,a){var l=r(e);"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case o:case u:s=!0}}if(s)return a=a(s=e),e=""===i?"."+x(s,0):i,Array.isArray(a)?(n="",null!=e&&(n=e.replace(T,"$&/")+"/"),A(a,t,n,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+e)),t.push(a)),1;if(s=0,i=""===i?".":i+":",Array.isArray(e))for(var c=0;c<e.length;c++){var f=i+x(l=e[c],c);s+=A(l,t,n,f,a)}else if("function"==typeof(f=function(e){return null===e||"object"!==r(e)?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e)))for(e=f.call(e),c=0;!(l=e.next()).done;)s+=A(l=l.value,t,n,f=i+x(l,c++),a);else if("object"===l)throw t=""+e,Error(v(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function O(e,t,n){if(null==e)return e;var r=[],i=0;return A(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function P(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}function I(e){return{$$typeof:d,_data:e.load.apply(null,e.args),_render:e.render}}var N={current:null};function M(){var e=N.current;if(null===e)throw Error(v(321));return e}var R={transition:0},F={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:R,ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:i};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error(v(143));return e}},t.Component=y,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var r=i({},e.props),u=e.key,a=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,l=E.cuLine truncated
/** @license React v16.13.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(9381),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,u=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||y}function w(){}function E(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||y}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=b.prototype;var D=E.prototype=new w;D.constructor=E,r(D,b.prototype),D.isPureReactComponent=!0;var S={current:null},C=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,i={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)C.call(t,r)&&!k.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var s=Array(l),c=0;c<l;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:u,ref:a,props:i,_owner:S.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var A=/\/+/g,O=[];function P(e,t,n,r){if(O.length){var i=O.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function N(e,t,n){return null==e?0:function e(t,n,r,i){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case u:l=!0}}if(l)return r(i,t,""===n?"."+M(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var c=n+M(a=t[s],s);l+=e(a,c,r,i)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=m&&t[m]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),s=0;!(a=t.next()).done;)l+=e(a=a.value,c=n+M(a,s++),r,i);else if("object"===a)throw r=""+t,Error(g(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function R(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,r,n,(function(e){return e})):null!=e&&(x(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n)),r.push(e))}function L(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),N(e,F,t=P(t,o,r,i)),I(t)}var B={current:null};function j(){var e=B.current;if(null===e)throw Error(g(321));return e}var U={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;N(e,R,t=P(null,null,t,n)),I(t)},count:function(e){return N(e,(function(){return null}),null)},toArray:function(e){var t=[];return L(e,t,null,(function(e){return e})),t},only:function(e){if(!x(e))throw Error(g(143));return e}},t.Component=b,t.Fragment=a,t.Profiler=s,t.PureComponent=E,t.StrictMode=l,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.cloneElement=function(e,t,n){if(null==e)throw Error(g(267,e));var i=r({},e.props),u=e.key,a=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,l=S.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)C.call(t,c)&&!k.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];i.children=s}return{$$typeof:o,Line truncated
/** @license React v0.18.0
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n,r,i,o,u;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,s=function(){if(null!==a)try{var e=t.unstable_now();a(!0,e),a=null}catch(e){throw setTimeout(s,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},n=function(e){null!==a?setTimeout(n,0,e):(a=e,setTimeout(s,0))},r=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},u=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var m=d.now();t.unstable_now=function(){return d.now()-m}}var g=!1,y=null,_=-1,b=5,w=0;o=function(){return t.unstable_now()>=w},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):b=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,D=E.port2;E.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+b;try{y(!0,e)?D.postMessage(null):(g=!1,y=null)}catch(e){throw D.postMessage(null),e}}else g=!1},n=function(e){y=e,g||(g=!0,D.postMessage(null))},r=function(e,n){_=p((function(){e(t.unstable_now())}),n)},i=function(){h(_),_=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<T(i,t)))break e;e[r]=t,e[n]=i,n=r}}function C(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,u=e[o],a=o+1,l=e[a];if(void 0!==u&&0>T(u,n))void 0!==l&&0>T(l,u)?(e[r]=l,e[a]=n,r=a):(e[r]=u,e[o]=n,r=o);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[a]=n,r=a}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],A=[],O=1,P=null,I=3,N=!1,M=!1,R=!1;function F(e){for(var t=C(A);null!==t;){if(null===t.callback)k(A);else{if(!(t.startTime<=e))break;k(A),t.sortIndex=t.expirationTime,S(x,t)}t=C(A)}}function L(e){if(R=!1,F(e),!M)if(null!==C(x))M=!0,n(B);else{var t=C(A);null!==t&&r(L,t.startTime-e)}}function B(e,n){M=!1,R&&(R=!1,i()),N=!0;var u=I;try{for(F(n),P=C(x);null!==P&&(!(P.expirationTime>n)||e&&!o());){var a=P.callback;if(null!==a){P.callback=null,I=P.priorityLevel;var l=a(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?P.callback=l:P===C(x)&&k(x),F(n)}else k(x);P=C(x)}if(null!==P)var s=!0;else{var c=C(A);null!==c&&r(L,c.startTime-n),s=!1}return s}finally{P=null,I=u,N=!1}}function j(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=u;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_scheduleCallback=function(e,o,u){var a=t.unstable_now();if("object"==typeof u&&null!==u){var l=u.delay;l="number"==typeof l&&0<l?a+l:a,u="number"==typeof u.timeout?u.timeout:j(e)}else u=j(e),l=a;return e={id:O++,callback:o,priorityLevel:e,startTime:l,expirationTime:u=l+u,sortIndex:-1},l>a?(e.sortIndex=l,S(A,e),null===C(x)&&e===C(A)&&(R?i():R=!0,r(L,l-a))):(e.sortIndex=u,S(x,e),M||N||(M=!0,n(B))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_shouldYield=function(){var e=t.unstable_now();F(e);var n=C(x);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||o()},t.unstable_requestPaint=U,t.unstable_continueExecution=function(){M||N||(M=!0,n(B))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return C(x)},t.unstable_Profiling=null},7181:(e,t,n)=>{"use strict";e.exports=n(706)},6458:(e,t,n)=>{var r,i=n(2357),o=n(8082),u=n(8614);function a(){c&&(c=!1,o.forEach((function(e){try{process.removeListener(e,s[e])}catch(e){}})),process.emit=h,process.reallyExit=d,r.count-=1)}function l(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))}"function"!=typeof u&&(u=u.EventEmitter),process.__sig Line truncated
return plugin;
}
};
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env node
module.exports=(()=>{var e={25545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25545,e.exports=t},44692:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143);const n={optional:!0},o=[["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":n}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":n,"postcss-jsx":n,"postcss-less":n,"postcss-markdown":n,"postcss-scss":n}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:n}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@*",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@*",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4"},peerDependenciesMeta:{eslint:n}}],["rc-animate@*",{peerDependencies:{react:"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:n,"utf-8-validate":n}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}]];let i,s,a;const c=new Map([[A.makeIdent(null,"fsevents").identHash,function(){return void 0===i&&(i=r(78761).brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),i}],[A.makeIdent(null,"resolve").identHash,function(){return void 0===s&&(s=r(78761).brotliDecompressSync(Buffer.from("G1QTIIzURnVBnGa0VPvr81orV8AFIqdU0sqrdcVgCdukgAZwi8a50gLk9+19Z2NcUILjmzXkzt4dzm5a6Yoys+/9qnKiaApXukOiuoyUaMcynG4X7X4vBaIE/PL30gwG6HSGJkLxb9PnLjfMr+748n7sM6C/NycK6ber/bX1reVVxta6W/31tZIhfrS+upoE/TPRHj0S/l0T59gTGdtKOp1OmMOJt9rhfucDdLJ2tgyfnO+u4YMkQAcYq/nebTcDmbXhqhgo6iQA4M3m4xya4Cos3p6klmkmQT+S4DLDZfwfMF+sUCx36KleOtaHLQfEIz0Bmncj/Ngi3lqOl4391EWEfIss6gVp3oDUGwsSZJKeOVONJWZg+Mue3KUMV3aMqYJ+7b2219D+GFDi8EV5y/Y+5J+He0oNjKAgqLsJziEsS9uIaCu3BHBKSXxNKKa2ShbfglcWoiiVT2kfGI7Gw+YJ/Sqy1H6wdFWtyVUQIa82JPwbeV25YKLzc5ZIFM6GCPSA+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CLine truncated
/*! *****************************************************************************
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.
***************************************************************************** */
function R(e,t,r,A){var n,o=arguments.length,i=o<3?t:null===A?A=Object.getOwnPropertyDescriptor(t,r):A;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,A);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}M.Entries={};class x extends M{async execute(){this.context.stdout.write(this.cli.usage(null))}}R([M.Path("--help"),M.Path("-h")],x.prototype,"execute",null);class L extends M{async execute(){var e;this.context.stdout.write((null!==(e=this.cli.binaryVersion)&&void 0!==e?e:"<unknown>")+"\n")}}R([M.Path("--version"),M.Path("-v")],L.prototype,"execute",null);const P={bold:e=>`${e}`,error:e=>`${e}`,code:e=>`${e}`},O={bold:e=>e,error:e=>e,code:e=>e};function U(e,{format:t,paragraphs:r}){return e=(e=(e=(e=(e=e.replace(/\r\n?/g,"\n")).replace(/^[\t ]+|[\t ]+$/gm,"")).replace(/^\n+|\n+$/g,"")).replace(/^-([^\n]*?)\n+/gm,"-$1\n\n")).replace(/\n(\n)?\n*/g,"$1"),r&&(e=e.split(/\n/).map((function(e){let t=e.match(/^[*-][\t ]+(.*)/);return t?t[1].match(/(.{1,78})(?: |$)/g).map((e,t)=>(0===t?"- ":" ")+e).join("\n"):e.match(/(.{1,80})(?: |$)/g).join("\n")})).join("\n\n")),(e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(function(e,r,A){return t.code(r+A+r)})))?e+"\n":""}class T extends M{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){const r=new T(t);r.path=e.path;for(const t of e.options)switch(t.name){case"-c":r.commands.push(Number(t.value));break;case"-i":r.index=Number(t.value)}return r}async execute(){let e=this.commands;if(void 0!==this.index&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),0===e.length)this.context.stdout.write(this.cli.usage());else if(1===e.length)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write("Multiple commands match your selection:\n"),this.context.stdout.write("\n");let e=0;for(const t of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[t].commandClass,{prefix:(e+++". ").padStart(5)}));this.context.stdout.write("\n"),this.context.stdout.write("Run again with -h=<index> to see the longer details of any of those commands.\n")}}}function j(){return"0"!==process.env.FORCE_COLOR&&("1"===process.env.FORCE_COLOR||!(void 0===process.stdout||!process.stdout.isTTY))}class Y{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:r,enableColors:A=j()}={}){this.registrations=new Map,this.builder=new K({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=r,this.enableColors=A}static from(e,t={}){const r=new Y(t);for(const t of e)r.register(t);return r}register(e){const t=this.builder.command();this.registrations.set(e,t.cliIndex);const{definitions:r}=e.resolveMeta(e.prototype);for(const e of r)e(t);t.setContext({commandClass:e})}process(e){const{contexts:t,process:r}=this.builder.compile(),A=r(e);switch(A.selectedIndex){case-1:return T.from(A,t);default:{const{commandClass:e}=t[A.selectedIndex],r=this.registrations.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the command class to have been registered.");const n=this.builder.getBuilderByIndex(r),o=new e;o.path=A.path;const{transformers:i}=e.resolveMeta(e.prototype);for(const e of i)e(A,o,n);return o}}}async run(e,t){let r,A;if(Array.isArray(e))try{r=this.process(e)}catch(e){return t.stdout.write(this.error(e)),1}else r=e;if(r.help)return t.stdout.write(this.usage(r,{detailed:!0})),0;r.context=t,r.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(e,t)=>this.error(e,t),process:e=>this.process(e),run:(e,r)=>this.run(e,Object.assign(Object.assign({},t),r)),usage:(e,t)=>this.usage(e,t)};try{A=await r.validateAndExecute().catch(e=>r.catch(e).then(()=>0))}catch(e){return t.stdout.write(this.error(e,{command:r})),1}return A}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){const{contexts:r,process:A,suggest:n}=this.builder.compile();return n(e,t)}definitions({colored:e=!1}={}){const t=[];for(const[r,A]of this.registrations){if(void 0===r.usage)continue;const{usage:n}=this.getUsageByIndex(A,{detailed:!1}),{usage:o,options:i}=this.getUsageByIndex(A,{detailed:!0,inlineOptions:!1}),s=void 0!==r.usage.category?U(r.usage.category,{format:this.format(e),paragraphs:!1}):void 0,a=void 0!==r.usage.description?U(r.usage.description,{format:this.format(e),paragraphs:!1}):void 0,c=void 0!==r.usage.details?U(r.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=void 0!==r.usage.examples?r.usage.examples.map(([t,r])=>[U(t,{format:this.format(e),paragraphs:!1}),r.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:n,usage:o,category:s,description:a,details:c,examples:g,options:i})}return t}usage(e=null,{colored:t,detailed:r=!1,prefix:A="$ "}={}){const n=null!==e&&void 0===e.getMeta?e.constructor:e;let o="Line truncated
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/const A=r(31669),n=r(84615),o=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),i=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),a=e=>{let t=""+e,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},c=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},g=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},l=(e,t,r,A)=>{if(r)return n(e,t,{wrap:!1,...A});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},u=(e,t,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,A=r.capture?"":"?:";return t?`(${A}${e.join("|")})`:e.join("|")}return n(e,t,r)},h=(...e)=>new RangeError("Invalid range arguments: "+A.inspect(...e)),p=(e,t,r)=>{if(!0===r.strictRanges)throw h([e,t]);return[]},d=(e,t,r=1,A={})=>{let n=Number(e),o=Number(t);if(!Number.isInteger(n)||!Number.isInteger(o)){if(!0===A.strictRanges)throw h([e,t]);return[]}0===n&&(n=0),0===o&&(o=0);let i=n>o,s=String(e),p=String(t),d=String(r);r=Math.max(Math.abs(r),1);let C=a(s)||a(p)||a(d),f=C?Math.max(s.length,p.length,d.length):0,I=!1===C&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,A),E=A.transform||(e=>t=>!0===e?Number(t):String(t))(I);if(A.toRegex&&1===r)return l(g(e,f),g(t,f),!0,A);let B={negatives:[],positives:[]},y=[],m=0;for(;i?n>=o:n<=o;)!0===A.toRegex&&r>1?B[(w=n)<0?"negatives":"positives"].push(Math.abs(w)):y.push(c(E(n,m),f,I)),n=i?n-r:n+r,m++;var w;return!0===A.toRegex?r>1?((e,t)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,A=t.capture?"":"?:",n="",o="";return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(o=`-(${A}${e.negatives.join("|")})`),r=n&&o?`${n}|${o}`:n||o,t.wrap?`(${A}${r})`:r})(B,A):u(y,null,{wrap:!1,...A}):y},C=(e,t,r,A={})=>{if(null==t&&i(e))return[e];if(!i(e)||!i(t))return p(e,t,A);if("function"==typeof r)return C(e,t,1,{transform:r});if(o(r))return C(e,t,0,r);let n={...A};return!0===n.capture&&(n.wrap=!0),r=r||n.step||1,s(r)?s(e)&&s(t)?d(e,t,r,n):((e,t,r=1,A={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return p(e,t,A);let n=A.transform||(e=>String.fromCharCode(e)),o=(""+e).charCodeAt(0),i=(""+t).charCodeAt(0),a=o>i,c=Math.min(o,i),g=Math.max(o,i);if(A.toRegex&&1===r)return l(c,g,!1,A);let h=[],d=0;for(;a?o>=i:o<=i;)h.push(n(o,d)),o=a?o-r:o+r,d++;return!0===A.toRegex?u(h,null,{wrap:!1,options:A}):h})(e,t,Math.max(Math.abs(r),1),n):null==r||o(r)?C(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,n)};e.exports=C},50683:e=>{e.exports=function(e){return[...e].reduce((e,[t,r])=>(e[t]=r,e),{})}},13302:(e,t,r)=>{e.exports=r(35747).constants||r(27619)},72137:(e,t,r)=>{"use strict";const{PassThrough:A}=r(92413);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new A({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",e=>{a.push(e),o?s=a.length:s+=e.length}),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i}},58764:(e,t,r)=>{"use strict";const A=r(50372),n=r(72137);class o extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function i(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:r}=t;let i;return await new Promise((s,a)=>{const c=e=>{e&&(e.bufferedData=i.getBufferedValue()),a(e)};i=A(e,n(t),e=>{e?c(e):s()}),i.on("data",()=>{i.getBufferedLength()>r&&c(new o)})}),i.getBufferedValue()}e.exports=i,e.exports.default=i,e.exports.buffer=(e,t)=>i(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>i(e,{...t,array:!0}),e.exports.MaxBufferError=o},97098:(e,t,r)=>{"use strict";var A=r(18193),n=r(85622).posix.dirname,o="win32"===r(12087).platform(),i=/\\/g,s=/[\{\[].*[\/]*.*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\*\?\|\[\]\(\)\{\}])/g;e.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&o&&e.indexOf("/")<0&&(e=e.replace(i,"/")),s.test(e)&&(e+="/"),e+="a";do{e=n(e)}while(A(e)||a.test(e));return e.replace(c,"$1")}},90734:(e,t,r)=>{"use strict";const{promisify:A}=r(31669),n=r(35747),o=r(85622),i=r(19347),s=r(46458),a=r(17234),c=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],g=A(n.readFile),l=(e,t)=>{const r=a(o.relative(t.cwd,o.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(e=>!e.startsWith("#")).map((e=>t=>t.startsWith("!")?"!"+o.posix.join(e,t.slice(1)):o.posix.join(e,t))(r))},u=e=>e.reduce((e,t)=>(e.add(l(t.content,{cwd:t.cwd,fileName:t.filePath})),e),s()),h=(e,t)=>r=>e.ignores(a(o.relative(t,((e,t)=>{if(e=a(e),o.isAbsolute(t)){if(t.startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return o.join(e,t)})(t,r)))),p=({ignore:e=[],cwd:t=a(process.cwd())}={})=>({ignore:e,cwd:t});e.exports=async Line truncated
/*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/
e.exports=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}},18193:(e,t,r)=>{
/*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var A=r(44486),n={"{":"}","(":")","[":"]"},o=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,i=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;e.exports=function(e,t){if("string"!=typeof e||""===e)return!1;if(A(e))return!0;var r,s=o;for(t&&!1===t.strict&&(s=i);r=s.exec(e);){if(r[2])return!0;var a=r.index+r[0].length,c=r[1],g=c?n[c]:null;if(c&&g){var l=e.indexOf(g,a);-1!==l&&(a=l+1)}e=e.slice(a)}return!1}},59235:e=>{"use strict";
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},97369:(e,t)=>{var r,A,n,o;
/*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright © 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*/o=function(){"use strict";return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}},t&&"object"==typeof t?e.exports=o():(A=[],void 0===(n="function"==typeof(r=o)?r.apply(t,A):r)||(e.exports=n))},64151:(e,t,r)=>{var A;r(35747);function n(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,A){n(e,t||{},(function(e,t){e?A(e):r(t)}))}))}A(e,t||{},(function(e,A){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,A=!1),r(e,A)}))}A="win32"===process.platform||global.TESTING_WINDOWS?r(3202):r(2151),e.exports=n,n.sync=function(e,t){try{return A.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},2151:(e,t,r)=>{e.exports=n,n.sync=function(e,t){return o(A.statSync(e),t)};var A=r(35747);function n(e,t,r){A.stat(e,(function(e,A){r(e,!e&&o(A,t))}))}function o(e,t){return e.isFile()&&function(e,t){var r=e.mode,A=e.uid,n=e.gid,o=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),i=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),s=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=s|a;return r&c||r&a&&n===i||r&s&&A===o||r&g&&0===o}(e,t)}},3202:(e,t,r)=>{e.exports=o,o.sync=function(e,t){return n(A.statSync(e),e,t)};var A=r(35747);function n(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var A=0;A<r.length;A++){var n=r[A].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}(t,r)}function o(e,t,r){A.stat(e,(function(A,o){r(A,!A&&n(o,e,t))}))}},21194:(e,t,r)=>{"use strict";var A=r(40744);e.exports=A},40744:(e,t,r)=>{"use strict";var A=r(55384),n=r(24129);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=r(81704),e.exports.Schema=r(8212),e.exports.FAILSAFE_SCHEMA=r(44413),e.exports.JSON_SCHEMA=r(45247),e.exports.CORE_SCHEMA=r(8769),e.exports.DEFAULT_SAFE_SCHEMA=r(65483),e.exports.DEFAULT_FULL_SCHEMA=r(5235),e.exports.load=A.load,e.exports.loadAll=A.loadAll,e.exports.safeLoad=A.safeLoad,e.exports.safeLoadAll=A.safeLoadAll,e.exports.dump=n.dump,e.exports.safeDump=n.safeDump,e.exports.YAMLException=r(17345),e.exports.MINIMAL_SCHEMA=r(44413),e.exports.SAFE_SCHEMA=r(65483),e.exports.DEFAULT_SCHEMA=r(5235),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},28149:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var r,A="";for(r=0;r<t;r+=1)A+=e;return A},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var r,A,n,o;if(t)for(r=0,A=(o=Object.keys(t)).length;r<A;r+=1)e[n=o[r]]=t[n];return e}},24129:(e,t,r)=>{"use strict";var A=r(28149),n=r(17345),o=r(5235),i=r(65483),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},g=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function l(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else{if(!(e<=4294967295))throw new n("code point within a string may not be greater than 0xFFFFFFFF");r="U",o=8}return"\\"+r+A.repeat("0",o-t.length)+t}function u(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=A.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,A,n,o,i,s,c;if(null===t)return{};for(r={},n=0,o=(A=Object.keys(t)).length;n<o;n+=1)i=A[n],s=String(t[i]),"!!"===i.slice(0,2)&&(i="tag:yaml.org,2002:"+i.slice(2)),(c=e.compiledTypeMap.fallback[i])&&a.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[i]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function h(e,t){for(var r,n=A.repeat(" ",t),o=0,i=-1,s="",a=e.length;o<a;)-1===(i=e.indexOf("\n",o))?(r=e.slice(o),o=a):(r=e.slice(o,i+1),o=i+1),r.length&&"\n"!==r&&(s+=n),s+=r;return s}function p(e,t){return"\n"+A.repeat(" ",e.indent*t)}function d(e){return 32===e||9===e}function C(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function f(e){return C(e)&&65279!==e&&44!==e&&91!==e&&93!==e&&123Line truncated
/*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*/const A=r(59235),n=(e,t,r)=>{if(!1===A(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===A(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};"boolean"==typeof o.strictZeros&&(o.relaxZeros=!1===o.strictZeros);let a=e+":"+t+"="+String(o.relaxZeros)+String(o.shorthand)+String(o.capture)+String(o.wrap);if(n.cache.hasOwnProperty(a))return n.cache[a].result;let c=Math.min(e,t),g=Math.max(e,t);if(1===Math.abs(c-g)){let r=e+"|"+t;return o.capture?`(${r})`:!1===o.wrap?r:`(?:${r})`}let l=p(e)||p(t),u={min:e,max:t,a:c,b:g},h=[],d=[];if(l&&(u.isPadded=l,u.maxLen=String(u.max).length),c<0){d=i(g<0?Math.abs(g):1,Math.abs(c),u,o),c=u.a=0}return g>=0&&(h=i(c,g,u,o)),u.negatives=d,u.positives=h,u.result=function(e,t,r){let A=s(e,t,"-",!1,r)||[],n=s(t,e,"",!1,r)||[],o=s(e,t,"-?",!0,r)||[];return A.concat(o).concat(n).join("|")}(d,h,o),!0===o.capture?u.result=`(${u.result})`:!1!==o.wrap&&h.length+d.length>1&&(u.result=`(?:${u.result})`),n.cache[a]=u,u.result};function o(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let A=function(e,t){let r=[];for(let A=0;A<e.length;A++)r.push([e[A],t[A]]);return r}(e,t),n=A.length,o="",i=0;for(let e=0;e<n;e++){let[t,n]=A[e];t===n?o+=t:"0"!==t||"9"!==n?o+=h(t,n,r):i++}return i&&(o+=!0===r.shorthand?"\\d":"[0-9]"),{pattern:o,count:[i],digits:n}}function i(e,t,r,A){let n,i=function(e,t){let r=1,A=1,n=g(e,r),o=new Set([t]);for(;e<=n&&n<=t;)o.add(n),r+=1,n=g(e,r);for(n=l(t+1,A)-1;e<n&&n<=t;)o.add(n),A+=1,n=l(t+1,A)-1;return o=[...o],o.sort(a),o}(e,t),s=[],c=e;for(let e=0;e<i.length;e++){let t=i[e],a=o(String(c),String(t),A),g="";r.isPadded||!n||n.pattern!==a.pattern?(r.isPadded&&(g=d(t,r,A)),a.string=g+a.pattern+u(a.count),s.push(a),c=t+1,n=a):(n.count.length>1&&n.count.pop(),n.count.push(a.count[0]),n.string=n.pattern+u(n.count),c=t+1)}return s}function s(e,t,r,A,n){let o=[];for(let n of e){let{string:e}=n;A||c(t,"string",e)||o.push(r+e),A&&c(t,"string",e)&&o.push(r+e)}return o}function a(e,t){return e>t?1:t>e?-1:0}function c(e,t,r){return e.some(e=>e[t]===r)}function g(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function l(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function h(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function p(e){return/^-?(0+)\d/.test(e)}function d(e,t,r){if(!t.isPadded)return e;let A=Math.abs(t.maxLen-String(e).length),n=!1!==r.relaxZeros;switch(A){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${A}}`:`0{${A}}`}}n.cache={},n.clearCache=()=>n.cache={},e.exports=n},75158:e=>{function t(e,t){var r=e.length,A=new Array(r),n={},o=r,i=function(e){for(var t=new Map,r=0,A=e.length;r<A;r++){var n=e[r];t.has(n[0])||t.set(n[0],new Set),t.has(n[1])||t.set(n[1],new Set),t.get(n[0]).add(n[1])}return t}(t),s=function(e){for(var t=new Map,r=0,A=e.length;r<A;r++)t.set(e[r],r);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));o--;)n[o]||a(e[o],o,new Set);return A;function a(e,t,o){if(o.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!n[t]){n[t]=!0;var g=i.get(e)||new Set;if(t=(g=Array.from(g)).length){o.add(e);do{var l=g[--t];a(l,s.get(l),o)}while(t);o.delete(e)}A[--r]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,r=0,A=e.length;r<A;r++){var n=e[r];t.add(n[0]),t.add(n[1])}return Array.from(t)}(e),e)},e.exports.array=t},94682:function(e){e.exports=function(){function e(t,r,A,n,o,i,s){var a,c,g="",l=0,u=n.slice(0);if(u.push([r,A])&&n.length>0&&(n.forEach((function(e,t){t>0&&(g+=(e[1]?" ":"│")+" "),c||e[0]!==r||(c=!0)})),g+=function(e,t){var r=t?"└":"├";return r+=e?"─ ":"──┐"}(t,A)+t,o&&("object"!=typeof r||r instanceof Date)&&(g+=": "+r),c&&(g+=" (circular ref.)"),s(g)),!c&&"object"==typeof r){var h=function(e,t){var r=[];for(var A in e)e.hasOwnProperty(A)&&(t&&"function"==typeof e[A]||r.push(A));return r}(r,i);h.forEach((function(t){a=++l===h.length,e(t,r[t],a,u,o,i,s)}))}}var t={asLines:function(t,r,A,n){e(".",t,!1,[],r,"function"!=typeof A&&A,n||A)},asTree:function(t,r,A){var n="";return e(".",t,!1,[],r,A,(function(e){n+=e+"\n"})),n}};return t}()},36370:(e,t,r)=>{"use strict";r.d(t,{gn:()=>A});function A(e,t,r,A){var n,o=arguments.length,i=o<3?t:null===A?A=Object.getOwnPropertyDescriptor(t,r):A;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,A);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}},98161:(e,t,r)=>{e.exports=r(69876)},69876:(e,t,r)=>{"use strict";r(11631);var A,n=r(4016),o=r(98605Line truncated
+10
View File
@@ -0,0 +1,10 @@
packageExtensions:
koa-body@*:
dependencies:
"@types/koa": "*"
koa: "*"
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-berry.js
+3 -3
View File
@@ -5,7 +5,7 @@ const path = require('path');
const cluster = require('cluster');
const fs = require('fs-extra');
const { filter } = require('lodash');
const { argv } = require('yargs');
const argv = require('cac')().parse();
const hydro = require('hydrooj');
if (!cluster.isMaster) {
@@ -24,7 +24,7 @@ if (!cluster.isMaster) {
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
try {
const ui = argv.ui || '@hydrooj/ui-default';
const ui = argv.options.ui || '@hydrooj/ui-default';
require.resolve(ui);
addons = [ui, ...addons];
} catch (e) {
@@ -33,7 +33,7 @@ if (!cluster.isMaster) {
addons = Array.from(new Set(addons));
for (const addon of addons) hydro.addon(addon);
(argv._[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
(argv.args[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
console.error(e);
process.exit(1);
});
+1 -1
View File
@@ -15,7 +15,7 @@ export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"`;
if (__user !== 'root') log.fatal('请使用 root 用户运行该工具。');
if (__arch !== 'amd64') log.fatal('不支持的架构 %s ,请尝试手动安装', __arch);
const dev = (cli.prompt('您是否希望安装为开发模式?(y/N)') || 'n').toLowerCase().trim() === 'y';
const dev = !!cli.get('dev');
const _NODE_ = [
'https://mirrors.tuna.tsinghua.edu.cn/nodejs-release',
+12 -10
View File
@@ -6,6 +6,7 @@
],
"main": "package.json",
"scripts": {
"node": "node",
"build": "node build/prepare.js && tsc -b",
"build:watch": "node build/prepare.js && tsc -b --watch",
"build:ui": "node packages/ui-default/build",
@@ -27,29 +28,30 @@
"version": "1.0.0",
"license": "AGPL-3.0-only",
"devDependencies": {
"@shelf/jest-mongodb": "^1.2.3",
"@shelf/jest-mongodb": "^1.2.4",
"@types/cross-spawn": "^6.0.2",
"@types/jest": "^26.0.23",
"@types/node": "^15.3.0",
"@types/semver": "^7.3.5",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"@types/node": "^15.6.1",
"@types/semver": "^7.3.6",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
"cac": "^6.7.3",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"eslint": "^7.26.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint": "^7.27.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-import": "^2.23.2",
"eslint-plugin-import": "^2.23.3",
"fs-extra": "^10.0.0",
"globby": "^11.0.3",
"jest": "^26.6.3",
"latest-version": "^5.1.0",
"mongodb": "^3.6.8",
"nmls": "^3.0.0",
"ora": "^5.4.0",
"semver": "^7.3.5",
"ts-jest": "^26.5.6",
"typedoc": "^0.20.36",
"typescript": "4.2.4",
"yargs": "^17.0.1"
"typescript": "4.2.4"
}
}
+8
View File
@@ -5,8 +5,16 @@
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"dependencies": {
"js-yaml": "^4.1.0",
"superagent": "^6.1.0"
},
"devDependencies": {
"@types/js-yaml": "^4.0.1",
"@types/node": "^15.6.1"
},
"peerDependencies": {
"hydrooj": "*"
}
}
+2 -1
View File
@@ -7,5 +7,6 @@
"license": "MIT",
"dependencies": {
"js-yaml": "^4.1.0"
}
},
"preferUnplugged": true
}
+4 -3
View File
@@ -6,17 +6,18 @@
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"dependencies": {
"adm-zip": "^0.5.5",
"decode-html": "^2.0.0",
"fs-extra": "^10.0.0",
"mongodb": "^3.6.8",
"xml2js": "^0.4.23"
},
"devDependencies": {
"@types/xml2js": "^0.4.8",
"bson": "^4.3.0"
"@types/xml2js": "^0.4.8"
},
"peerDependencies": {
"hydrooj": "^2.20.0"
"hydrooj": "*"
}
}
+5
View File
@@ -0,0 +1,5 @@
const { spawnSync } = require('child_process');
const os = require('os');
if (os.platform() === 'linux') {
spawnSync('bash download.sh');
}
+3 -2
View File
@@ -6,10 +6,11 @@
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"maxmind": "^4.3.1"
"maxmind": "^4.3.2"
},
"preferUnplugged": true,
"scripts": {
"postinstall": "./download.sh"
"postinstall": "node download.js"
},
"peerDependencies": {
"hydrooj": "^2.15.0"
+3 -2
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env node
const { argv } = require('yargs');
const argv = require('cac')().parse();
if ((argv._ || [])[0] == 'cache') require('../dist/cache')()
if (argv.options.debug) process.env.DEV = 'on';
if (argv.args[0] === 'cache') require('../dist/cache')();
else require('../dist/daemon')();
+15 -10
View File
@@ -1,27 +1,32 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.6.6",
"version": "2.7.0",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
"dependencies": {
"@hydrooj/utils": "^1.0.14",
"axios": "^0.21.1",
"bson": "^4.3.0",
"cac": "^6.7.3",
"fs-extra": "^10.0.0",
"js-yaml": "^4.0.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"p-queue": "^6.6.1",
"mongodb": "^3.6.8",
"p-queue": "^6.6.2",
"shell-quote": "^1.7.2",
"ws": "^7.4.5",
"yargs": "^17.0.1"
"ws": "^7.4.6"
},
"preferUnplugged": true,
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"@types/bson": "^4.0.2",
"@types/fs-extra": "^9.0.10",
"@types/js-yaml": "^4.0.0",
"@types/shell-quote": "^1.7.0"
"@types/fs-extra": "^9.0.11",
"@types/js-yaml": "^4.0.1",
"@types/lodash": "^4.14.170",
"@types/shell-quote": "^1.7.0",
"@types/ws": "^7.4.4"
},
"peerDependencies": {
"hydrooj": "*"
}
}
+6 -4
View File
@@ -1,18 +1,20 @@
import path from 'path';
import fs from 'fs-extra';
import { argv } from 'yargs';
import cac from 'cac';
import { Logger } from './log';
import { getConfig } from './config';
const argv = cac().parse();
const logger = new Logger('cache');
export = function main() {
const CACHE_DIR = getConfig('cache_dir');
if (argv._[1] === 'clean') {
if (argv.args[1] === 'clean') {
fs.emptyDirSync(CACHE_DIR);
logger.info('Cleaned cache.');
} else if (argv._[1] === 'prune') {
const duration = +argv.duration || 30;
} else if (argv.args[1] === 'prune') {
const duration = +argv.options.duration || 30;
const now = new Date().getTime();
const hosts = fs.readdirSync(CACHE_DIR);
let cnt = 0;
+12 -11
View File
@@ -1,11 +1,12 @@
/* eslint-disable prefer-const */
import { argv } from 'yargs';
import cac from 'cac';
import os from 'os';
import path from 'path';
import fs from 'fs-extra';
import yaml from 'js-yaml';
import log from './log';
const argv = cac().parse();
let CONFIG_FILE = path.resolve(os.homedir(), '.config', 'hydro', 'judge.yaml');
let LANGS_FILE = path.resolve(os.homedir(), '.config', 'hydro', 'langs.yaml');
@@ -43,20 +44,20 @@ if (fs.existsSync(path.resolve(process.cwd(), '.env'))) {
if (!global.Hydro) {
// standalone
if (process.env.CONFIG_FILE || argv.config) {
CONFIG_FILE = path.resolve(process.env.CONFIG_FILE || argv.config as string);
if (process.env.CONFIG_FILE || argv.options.config) {
CONFIG_FILE = path.resolve(process.env.CONFIG_FILE || argv.options.config);
}
if (process.env.LANGS_FILE || argv.langs) {
LANGS_FILE = path.resolve(process.env.LANGS_FILE || argv.langs as string);
if (process.env.LANGS_FILE || argv.options.langs) {
LANGS_FILE = path.resolve(process.env.LANGS_FILE || argv.options.langs);
}
if (process.env.TEMP_DIR || argv.tmp) {
config.tmp_dir = path.resolve(process.env.TEMP_DIR || argv.tmp as string);
if (process.env.TEMP_DIR || argv.options.tmp) {
config.tmp_dir = path.resolve(process.env.TEMP_DIR || argv.options.tmp);
}
if (process.env.CACHE_DIR || argv.cache) {
config.cache_dir = path.resolve(process.env.CACHE_DIR || argv.cache as string);
if (process.env.CACHE_DIR || argv.options.cache) {
config.cache_dir = path.resolve(process.env.CACHE_DIR || argv.options.cache);
}
if (process.env.EXECUTION_HOST || argv.sandbox) {
config.sandbox_host = path.resolve(process.env.EXECUTION_HOST || argv.execute as string);
if (process.env.EXECUTION_HOST || argv.options.sandbox) {
config.sandbox_host = path.resolve(process.env.EXECUTION_HOST || argv.options.sandbox);
}
const configFile = fs.readFileSync(CONFIG_FILE).toString();
config = { ...config, ...yaml.load(configFile) as any };
+5 -3
View File
@@ -3,9 +3,9 @@ import path from 'path';
import axios from 'axios';
import fs from 'fs-extra';
import WebSocket from 'ws';
import { argv } from 'yargs';
import cac from 'cac';
import { noop } from 'lodash';
import { ObjectID } from 'bson';
import { ObjectID } from 'mongodb';
import { LangConfig } from '@hydrooj/utils/lib/lang';
import * as tmpfs from '../tmpfs';
import log from '../log';
@@ -17,6 +17,8 @@ import readCases from '../cases';
import judge from '../judge';
import * as sysinfo from '../sysinfo';
const argv = cac().parse();
class JudgeTask {
stat: Record<string, Date>;
session: any;
@@ -86,7 +88,7 @@ class JudgeTask {
});
} else {
log.error(e);
this.next({ message: { message: e.message, params: e.params || [], ...argv.debug ? { stack: e.stack } : {} } });
this.next({ message: { message: e.message, params: e.params || [], ...argv.options.debug ? { stack: e.stack } : {} } });
this.end({
status: STATUS_SYSTEM_ERROR, score: 0, time_ms: 0, memory_kb: 0,
});
+1 -2
View File
@@ -1,7 +1,6 @@
import Queue from 'p-queue';
import path from 'path';
import fs from 'fs-extra';
import { argv } from 'yargs';
import * as STATUS from '../status';
import { SystemError } from '../error';
import { parseFilename } from '../utils';
@@ -173,7 +172,7 @@ export const judge = async (ctx) => {
if (effective) ctx.total_score += scores[sid];
}
ctx.stat.done = new Date();
if (argv.debug) ctx.next({ message: JSON.stringify(ctx.stat) });
if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) });
ctx.end({
status: ctx.total_status,
score: ctx.total_score,
+1 -2
View File
@@ -1,6 +1,5 @@
import Queue from 'p-queue';
import fs from 'fs-extra';
import { argv } from 'yargs';
import * as STATUS from '../status';
import { parse } from '../testlib';
import { findFileSync, parseFilename } from '../utils';
@@ -123,7 +122,7 @@ export const judge = async (ctx) => {
}
await Promise.all(tasks);
ctx.stat.done = new Date();
if (argv.debug) ctx.next({ message: JSON.stringify(ctx.stat) });
if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) });
console.log({
status: ctx.total_status,
score: ctx.total_score,
+1 -2
View File
@@ -1,6 +1,5 @@
import fs from 'fs-extra';
import path from 'path';
import { argv } from 'yargs';
import * as STATUS from '../status';
import { run } from '../sandbox';
import compile from '../compile';
@@ -100,7 +99,7 @@ export const judge = async (ctx) => {
},
});
ctx.stat.done = new Date();
if (argv.debug) ctx.next({ message: JSON.stringify(ctx.stat) });
if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) });
ctx.end({
status,
score: status === STATUS.STATUS_ACCEPTED ? 100 : 0,
+4 -2
View File
@@ -1,5 +1,7 @@
import { inspect, InspectOptions, format } from 'util';
import { argv } from 'yargs';
import cac from 'cac';
const argv = cac().parse();
namespace Time {
export const second = 1000;
@@ -41,7 +43,7 @@ export class Logger {
static readonly INFO = 2;
static readonly WARN = 2;
static readonly DEBUG = 3;
static baseLevel = argv.debug ? 3 : 2;
static baseLevel = argv.options.debug ? 3 : 2;
static showDiff = false;
static levels: Record<string, number> = {};
static lastTime = 0;
+6 -5
View File
@@ -1,12 +1,13 @@
import Axios from 'axios';
import fs from 'fs-extra';
import { argv } from 'yargs';
import cac from 'cac';
import * as STATUS from './status';
import { FormatError, SystemError } from './error';
import { cmd, parseMemoryMB } from './utils';
import { getConfig } from './config';
import { Logger } from './log';
const argv = cac().parse();
const logger = new Logger('sandbox');
let callId = 0;
@@ -90,9 +91,9 @@ export async function runMultiple(execute) {
body.cmd[1].files[0] = null;
body.cmd[1].files[1] = null;
const id = callId++;
if (argv['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(body));
if (argv.options['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(body));
res = await Axios.create({ baseURL: getConfig('sandbox_host') }).post('/run', body);
if (argv['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(res.data));
if (argv.options['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(res.data));
} catch (e) {
if (e instanceof FormatError) throw e;
throw new SystemError('Sandbox Error');
@@ -113,9 +114,9 @@ export async function run(execute, params?) {
try {
const body = { cmd: [proc({ execute, ...params })] };
const id = callId++;
if (argv['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(body));
if (argv.options['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(body));
const res = await Axios.create({ baseURL: getConfig('sandbox_host') }).post('/run', body);
if (argv['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(res.data));
if (argv.options['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(res.data));
[result] = res.data;
} catch (e) {
if (e instanceof FormatError) throw e;
+3 -3
View File
@@ -2,8 +2,8 @@
/* eslint-disable no-await-in-loop */
import 'hydrooj';
import path from 'path';
import { argv } from 'yargs';
import { ObjectID } from 'bson';
import cac from 'cac';
import { ObjectID } from 'mongodb';
import fs from 'fs-extra';
import { noop } from 'lodash';
import { Logger } from 'hydrooj/dist/logger';
@@ -217,7 +217,7 @@ async function postInit() {
});
} else {
logger.error(e);
this.next({ message: { message: e.message, params: e.params, ...argv.debug ? { stack: e.stack } : {} } });
this.next({ message: { message: e.message, params: e.params, ...process.env.DEV ? { stack: e.stack } : {} } });
this.end({
status: STATUS_SYSTEM_ERROR, score: 0, time_ms: 0, memory_kb: 0,
});
+8 -8
View File
@@ -4,7 +4,7 @@ const os = require('os');
const path = require('path');
const cluster = require('cluster');
const fs = require('fs-extra');
const { argv } = require('yargs');
const argv = require('cac')().parse();
const child = require('child_process');
function buildUrl(opts) {
@@ -29,24 +29,24 @@ if (!cluster.isMaster) {
if (!fs.existsSync(addonPath)) fs.writeFileSync(addonPath, '[]');
let addons = JSON.parse(fs.readFileSync(addonPath).toString());
if (argv._[0] === 'db') {
if (argv.args[0] === 'db') {
const dbConfig = fs.readFileSync(path.resolve(hydroPath, 'config.json'), 'utf-8');
const url = buildUrl(JSON.parse(dbConfig));
return child.spawn('mongo', [url], { stdio: 'inherit' });
}
try {
const ui = argv.ui || '@hydrooj/ui-default';
const ui = argv.options.ui || '@hydrooj/ui-default';
require.resolve(ui);
addons.push(ui);
} catch (e) {
console.error('Please also install @hydrooj/ui-default');
}
if (argv._[0] && argv._[0] !== 'cli') {
const operation = argv._[0];
const arg1 = argv._[1];
const arg2 = argv._[2];
if (argv.args[0] && argv.args[0] !== 'cli') {
const operation = argv.args[0];
const arg1 = argv.args[1];
const arg2 = argv.args[2];
if (operation === 'addon') {
if (arg1 === 'add') addons.push(arg2);
else if (arg1 === 'remove') {
@@ -65,7 +65,7 @@ if (!cluster.isMaster) {
const hydro = require('../dist/loader');
addons = Array.from(new Set(addons));
for (const addon of addons) hydro.addon(addon);
(argv._[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
(argv.args[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
console.error(e);
process.exit(1);
});
+19 -18
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.27.3",
"version": "2.27.4",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
@@ -10,50 +10,51 @@
"engines": {
"node": ">=14"
},
"preferUnplugged": true,
"dependencies": {
"@hydrooj/utils": "^1.0.17",
"adm-zip": "^0.5.5",
"ansi_up": "^5.0.1",
"cac": "^6.7.3",
"cookies": "^0.8.0",
"detect-browser": "^5.1.1",
"detect-browser": "^5.2.0",
"fs-extra": "^10.0.0",
"js-yaml": "^4.0.0",
"js-yaml": "^4.1.0",
"koa": "^2.13.1",
"koa-body": "^4.2.0",
"koa-compress": "^5.0.1",
"koa-proxies": "^0.12.1",
"koa-router": "^10.0.0",
"koa-static-cache": "^5.1.3",
"koa-static-cache": "^5.1.4",
"lodash": "^4.17.21",
"lru-cache": "^6.0.0",
"minio": "7.0.17",
"moment-timezone": "^0.5.32",
"mongodb": "^3.6.6",
"nodemailer": "^6.6.0",
"moment-timezone": "^0.5.33",
"mongodb": "^3.6.8",
"nodemailer": "^6.6.1",
"p-queue": "^6.6.2",
"reflect-metadata": "^0.1.13",
"serialize-javascript": "^5.0.1",
"sockjs": "^0.3.20",
"superagent": "^6.1.0",
"yargs": "^17.0.1"
"sockjs": "^0.3.21",
"superagent": "^6.1.0"
},
"devDependencies": {
"@types/adm-zip": "^0.4.34",
"@types/fs-extra": "^9.0.10",
"@types/js-yaml": "^4.0.0",
"@types/fs-extra": "^9.0.11",
"@types/js-yaml": "^4.0.1",
"@types/koa": "^2.13.1",
"@types/koa-compress": "^4.0.1",
"@types/koa-router": "^7.4.1",
"@types/koa-router": "^7.4.2",
"@types/koa-static-cache": "^5.1.0",
"@types/lodash": "^4.14.168",
"@types/lodash": "^4.14.170",
"@types/lru-cache": "^5.1.0",
"@types/minio": "^7.0.7",
"@types/mongodb": "^3.6.12",
"@types/nodemailer": "^6.4.1",
"@types/mongodb": "^3.6.16",
"@types/nodemailer": "^6.4.2",
"@types/serialize-javascript": "^5.0.0",
"@types/sockjs": "^0.3.32",
"@types/superagent": "^4.1.11",
"@types/yargs": "^16.0.1",
"formidable": "^1.2.2"
"formidable": "^1.2.2",
"moment": "^2.29.1"
}
}
+3 -2
View File
@@ -1,7 +1,7 @@
/* eslint-disable no-await-in-loop */
/* eslint-disable import/no-dynamic-require */
import { argv } from 'yargs';
import { ObjectID } from 'mongodb';
import cac from 'cac';
import {
lib, service, model, script,
builtinLib, builtinModel, builtinScript,
@@ -11,6 +11,7 @@ import { validate } from '../lib/validator';
import * as bus from '../service/bus';
import db from '../service/db';
const argv = cac().parse();
const COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
const ARR = /=>.*$/mg;
function parseParameters(fn: Function) {
@@ -29,7 +30,7 @@ async function runScript(name: string, arg: any) {
}
async function cli() {
const [, modelName, func, ...args] = argv._ as [string, string, string, ...any[]];
const [, modelName, func, ...args] = argv.args as [string, string, string, ...any[]];
if (modelName === 'script') {
let arg: any;
try {
+3 -2
View File
@@ -3,7 +3,7 @@
import os from 'os';
import path from 'path';
import fs from 'fs-extra';
import { argv } from 'yargs';
import cac from 'cac';
import { builtinModel } from './common';
import { Entry } from '../loader';
import { Logger } from '../logger';
@@ -11,13 +11,14 @@ import options from '../options';
import * as bus from '../service/bus';
import db from '../service/db';
const argv = cac().parse();
const logger = new Logger('entry/master');
const tmpdir = path.resolve(os.tmpdir(), 'hydro');
const lockfile = path.resolve(tmpdir, 'lock.json');
export async function load(call: Entry) {
fs.ensureDirSync(tmpdir);
if (fs.existsSync(lockfile) && !argv.ignorelock) {
if (fs.existsSync(lockfile) && !argv.options.ignorelock) {
try {
const file = require(lockfile);
process.kill(file.pid, 0);
+2 -2
View File
@@ -6,11 +6,11 @@ import Koa, { Context } from 'koa';
import Body from 'koa-body';
import cache from 'koa-static-cache';
import mongodb from 'mongodb';
import { argv } from 'yargs';
import cac from 'cac';
import { Logger } from '../logger';
const logger = new Logger('setup');
const listenPort = argv.port || 8888;
const listenPort = cac().parse().options.port || 8888;
async function get(ctx: Context) {
ctx.body = `<!DOCTYPE html>
+23 -22
View File
@@ -1,6 +1,6 @@
/* eslint-disable no-await-in-loop */
/* eslint-disable import/no-dynamic-require */
import { argv } from 'yargs';
import cac from 'cac';
import {
locale, template, lib, service, model, handler, script, setting, uistatic,
builtinLib, builtinScript, builtinHandler, builtinModel,
@@ -11,32 +11,33 @@ import db from '../service/db';
import { Logger } from '../logger';
const logger = new Logger('loader/worker');
const detail = cac().parse().options.loaderDetail;
export async function load() {
const pending = global.addons;
const fail = [];
const active = [];
if (argv.loaderDetail) logger.info('start');
if (detail) logger.info('start');
require('../lib/i18n');
require('../utils');
require('../error');
require('../options');
if (argv.loaderDetail) logger.info('finish: options');
if (detail) logger.info('finish: options');
await Promise.all([
locale(pending, fail),
template(pending, fail),
uistatic(pending, fail),
]);
if (argv.loaderDetail) logger.info('finish: locale/template/static');
if (detail) logger.info('finish: locale/template/static');
const opts = options();
await db.start(opts);
if (argv.loaderDetail) logger.info('finish: db.connect');
if (detail) logger.info('finish: db.connect');
const modelSystem = require('../model/system');
await modelSystem.runConfig();
if (argv.loaderDetail) logger.info('finish: config');
if (detail) logger.info('finish: config');
const storage = require('../service/storage');
await storage.start();
if (argv.loaderDetail) logger.info('finish: storage.connect');
if (detail) logger.info('finish: storage.connect');
for (const i of builtinLib) {
let t;
try {
@@ -46,40 +47,40 @@ export async function load() {
}
require(t);
}
if (argv.loaderDetail) logger.info('finish: lib.builtin');
if (detail) logger.info('finish: lib.builtin');
await lib(pending, fail);
if (argv.loaderDetail) logger.info('finish: lib.extra');
if (detail) logger.info('finish: lib.extra');
require('../service/gridfs');
require('../service/monitor');
if (argv.loaderDetail) logger.info('finish: gridfs/monitor');
if (detail) logger.info('finish: gridfs/monitor');
const server = require('../service/server');
await server.prepare();
if (argv.loaderDetail) logger.info('finish: server');
if (detail) logger.info('finish: server');
await service(pending, fail);
if (argv.loaderDetail) logger.info('finish: service.extra');
if (detail) logger.info('finish: service.extra');
for (const i of builtinModel) require(`../model/${i}`);
if (argv.loaderDetail) logger.info('finish: model.builtin');
if (detail) logger.info('finish: model.builtin');
for (const i of builtinHandler) require(`../handler/${i}`);
if (argv.loaderDetail) logger.info('finish: handler.builtin');
if (detail) logger.info('finish: handler.builtin');
await model(pending, fail);
if (argv.loaderDetail) logger.info('finish: model.extra');
if (detail) logger.info('finish: model.extra');
const modelSetting = require('../model/setting');
await setting(pending, fail, modelSetting);
if (argv.loaderDetail) logger.info('finish: setting');
if (detail) logger.info('finish: setting');
await handler(pending, fail);
if (argv.loaderDetail) logger.info('finish: handler.extra');
if (detail) logger.info('finish: handler.extra');
for (const i in global.Hydro.handler) await global.Hydro.handler[i]();
if (argv.loaderDetail) logger.info('finish: handler.apply');
if (detail) logger.info('finish: handler.apply');
const notfound = require('../handler/notfound');
await notfound.apply();
for (const i of builtinScript) require(`../script/${i}`);
if (argv.loaderDetail) logger.info('finish: script.builtin');
if (detail) logger.info('finish: script.builtin');
await script(pending, fail, active);
if (argv.loaderDetail) logger.info('finish: script.extra');
if (detail) logger.info('finish: script.extra');
await bus.serial('app/started');
if (argv.loaderDetail) logger.info('finish: bus.serial(start)');
if (detail) logger.info('finish: bus.serial(start)');
await server.start();
if (argv.loaderDetail) logger.info('finish: server.start');
if (detail) logger.info('finish: server.start');
setInterval(() => {
process.send({ event: 'stat', count: global.Hydro.stat.reqCount });
global.Hydro.stat.reqCount = 0;
+19 -11
View File
@@ -8,6 +8,15 @@ import 'reflect-metadata';
const versionNum = +process.version.replace(/v/gim, '').split('.')[0];
if (versionNum < 14) throw new Error('NodeJS >=v14 required');
import cac from 'cac';
const argv = cac().parse();
if (argv.options.debug) {
process.env.NODE_ENV = 'development';
process.env.DEV = 'on';
} else process.env.NODE_ENV = process.env.NODE_ENV || 'production';
if (!global.Hydro) {
global.Hydro = {
version: {
@@ -44,7 +53,6 @@ import os from 'os';
import path from 'path';
import cluster from 'cluster';
import fs from 'fs-extra';
import { argv } from 'yargs';
import './utils';
import { Logger } from './logger';
import './ui';
@@ -95,7 +103,7 @@ async function stopWorker() {
}
async function startWorker(cnt: number, createFirst = true) {
if (argv.single) {
if (argv.options.single) {
await entry({ entry: 'worker' });
} else {
await fork(createFirst ? ['--firstWorker'] : undefined);
@@ -154,7 +162,7 @@ export function addon(addonPath: string, prepend = false) {
export async function load() {
addon(path.resolve(__dirname, '..'), true);
Error.stackTraceLimit = 50;
if (cluster.isMaster || argv.startAsMaster) {
if (cluster.isMaster || argv.options.startAsMaster) {
logger.info(`Master ${process.pid} Starting`);
const cnt = await entry({ entry: 'master' });
logger.info('Master started');
@@ -173,14 +181,14 @@ export async function load() {
});
await startWorker(cnt);
} else {
global.addons = JSON.parse(Buffer.from(argv.addons as string, 'base64').toString());
global.addons = JSON.parse(Buffer.from(argv.options.addons as string, 'base64').toString());
logger.info('%o', global.addons);
if (argv.entry) {
logger.info(`Worker ${process.pid} Starting as ${argv.entry}`);
await entry({ entry: argv.entry as string });
logger.success(`Worker ${process.pid} Started as ${argv.entry}`);
if (argv.options.entry) {
logger.info(`Worker ${process.pid} Starting as ${argv.options.entry}`);
await entry({ entry: argv.options.entry });
logger.success(`Worker ${process.pid} Started as ${argv.options.entry}`);
} else {
if (argv.firstWorker) global.Hydro.isFirstWorker = true;
if (argv.options.firstWorker) global.Hydro.isFirstWorker = true;
else global.Hydro.isFirstWorker = false;
logger.info(`Worker ${process.pid} Starting`);
await entry({ entry: 'worker' });
@@ -195,8 +203,8 @@ export async function loadCli() {
process.kill(process.pid, 'SIGINT');
}
if (argv.pandora || require.main === module) {
const func = argv._[0] === 'cli' ? load : loadCli;
if (argv.options.pandora || require.main === module) {
const func = argv.args[0] === 'cli' ? load : loadCli;
func().catch((e) => {
logger.error(e);
process.exit(1);
+1 -2
View File
@@ -1,5 +1,4 @@
import { inspect, format, InspectOptions } from 'util';
import { argv } from 'yargs';
import { Time } from './utils';
const colors = [
@@ -20,7 +19,7 @@ export class Logger {
static readonly INFO = 2;
static readonly WARN = 2;
static readonly DEBUG = 3;
static baseLevel = argv.debug ? 3 : 2;
static baseLevel = process.env.DEV ? 3 : 2;
static showDiff = false;
static levels: Record<string, number> = {};
static lastTime = 0;
+1 -1
View File
@@ -16,7 +16,7 @@ class BlackListModel {
const res = await coll.findOneAndUpdate(
{ _id: id },
{ $set: { expireAt } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
+17 -17
View File
@@ -100,7 +100,7 @@ export async function set<K extends keyof DocType>(
const res = await coll.findOneAndUpdate(
{ domainId, docType, docId },
update,
{ returnOriginal: false, upsert: true },
{ returnDocument: 'after', upsert: true },
);
return res.value;
}
@@ -141,7 +141,7 @@ export async function inc<K extends keyof DocType>(
const res = await coll.findOneAndUpdate(
{ domainId, docType, docId },
{ $inc: { [key]: value } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
@@ -153,7 +153,7 @@ export async function incAndSet<K extends keyof DocType>(
const res = await coll.findOneAndUpdate(
{ domainId, docType, docId },
{ $inc: { [key]: value }, $set: args },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
@@ -183,7 +183,7 @@ export async function push(
const doc = await coll.findOneAndUpdate(
{ domainId, docType, docId },
{ $push: { [key]: v } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return [doc.value, _id];
}
@@ -195,7 +195,7 @@ export async function pull<K extends keyof DocType, T extends ArrayKeys<DocType[
const res = await coll.findOneAndUpdate(
{ domainId, docType, docId },
{ $pull: { [setKey]: { $in: contents } } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
@@ -208,7 +208,7 @@ export async function deleteSub<T extends keyof DocType, K extends ArrayKeys<Doc
const res = await coll.findOneAndUpdate(
{ domainId, docType, docId },
{ $pull: { [key]: { _id: { $in: subId } } } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
@@ -244,7 +244,7 @@ export async function setSub<T extends keyof DocType, K extends ArrayKeys<DocTyp
[key]: { $elemMatch: { _id: subId } },
},
{ $set },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
@@ -256,7 +256,7 @@ export async function addToSet<T extends keyof DocType, K extends ArrayKeys<DocT
const res = await coll.findOneAndUpdate(
{ domainId, docType, docId },
{ $addToSet: { [setKey]: content } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
@@ -285,7 +285,7 @@ export async function setStatus<K extends keyof DocStatusType>(
const res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
{ $set: args },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
@@ -308,7 +308,7 @@ export async function setIfNotStatus<T extends keyof DocStatusType, K extends ke
const res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
{ $set: { [key]: value, ...args } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
@@ -322,7 +322,7 @@ export async function setStatusIfNotCondition<T extends keyof DocStatusType>(
const res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
{ $set: args },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
@@ -336,7 +336,7 @@ export async function cappedIncStatus<T extends keyof DocStatusType>(
const res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid, [key]: { $not } },
{ $inc: { [key]: value } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
@@ -348,7 +348,7 @@ export async function incStatus<T extends keyof DocStatusType>(
const res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
{ $inc: { [key]: value } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
@@ -360,13 +360,13 @@ export async function revPushStatus<T extends keyof DocStatusType>(
let res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid, [`${key}.${id}`]: value[id] },
{ $set: { [`${key}.$`]: value }, $inc: { rev: 1 } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
if (!res.value) {
res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
{ $push: { [key]: value }, $inc: { rev: 1 } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
}
return res.value;
@@ -378,7 +378,7 @@ export async function revInitStatus<T extends keyof DocStatusType>(
const res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
{ $inc: { rev: 1 } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value;
}
@@ -389,7 +389,7 @@ export async function revSetStatus<T extends keyof DocStatusType>(
): Promise<any> {
const filter = { domainId, docType, docId, uid, rev };
const update = { $set: args, $inc: { rev: 1 } };
const res = await collStatus.findOneAndUpdate(filter, update, { returnOriginal: false });
const res = await collStatus.findOneAndUpdate(filter, update, { returnDocument: 'after' });
return res.value;
}
+3 -3
View File
@@ -80,7 +80,7 @@ class DomainModel {
static async edit(domainId: string, $set: Partial<DomainDoc>) {
await bus.serial('domain/before-update', domainId, $set);
const result = await coll.findOneAndUpdate({ _id: domainId }, { $set }, { returnOriginal: false });
const result = await coll.findOneAndUpdate({ _id: domainId }, { $set }, { returnDocument: 'after' });
await bus.serial('domain/update', domainId, $set, result.value);
return result.value;
}
@@ -92,7 +92,7 @@ class DomainModel {
// FIXME
// @ts-expect-error
{ $inc: { [field]: n } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value[field];
}
@@ -113,7 +113,7 @@ class DomainModel {
@ArgMethod
static async setUserRole(domainId: string, uid: MaybeArray<number>, role: string) {
if (!(uid instanceof Array)) {
const res = await collUser.findOneAndUpdate({ domainId, uid }, { $set: { role } }, { upsert: true, returnOriginal: false });
const res = await collUser.findOneAndUpdate({ domainId, uid }, { $set: { role } }, { upsert: true, returnDocument: 'after' });
const udoc = await UserModel.getById(domainId, uid);
deleteUserCache(udoc);
return res;
+1 -1
View File
@@ -46,7 +46,7 @@ class MessageModel {
const result = await coll.findOneAndUpdate(
{ _id: messageId },
{ $bit: { flag: { xor: flag } } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return result.value;
}
+1 -1
View File
@@ -19,7 +19,7 @@ class OauthModel {
const res = await coll.findOneAndUpdate(
{ _id },
{ $set: { value } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
return res.value.uid;
}
+1 -1
View File
@@ -132,7 +132,7 @@ class RecordModel {
const res = await RecordModel.coll.findOneAndUpdate(
{ _id, domainId },
$update,
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
+2 -2
View File
@@ -35,7 +35,7 @@ export class StorageModel {
}
static async get(path: string, savePath?: string) {
const { value } = await StorageModel.coll.findOneAndUpdate({ path }, { $set: { lastUsage: new Date() } }, { returnOriginal: false });
const { value } = await StorageModel.coll.findOneAndUpdate({ path }, { $set: { lastUsage: new Date() } }, { returnDocument: 'after' });
if (value) return await storage.get(value._id, savePath);
return await storage.get(path, savePath);
}
@@ -61,7 +61,7 @@ export class StorageModel {
}
static async getMeta(path: string) {
const { value } = await StorageModel.coll.findOneAndUpdate({ path }, { $set: { lastUsage: new Date() } }, { returnOriginal: false });
const { value } = await StorageModel.coll.findOneAndUpdate({ path }, { $set: { lastUsage: new Date() } }, { returnDocument: 'after' });
if (!value) return null;
return {
...value.meta,
+7 -7
View File
@@ -15,22 +15,22 @@ export function get(key: string): any {
export function getMany<
A extends keyof SystemKeys, B extends keyof SystemKeys,
>(keys: [A, B]): [SystemKeys[A], SystemKeys[B]];
>(keys: [A, B]): [SystemKeys[A], SystemKeys[B]];
export function getMany<
A extends keyof SystemKeys, B extends keyof SystemKeys, C extends keyof SystemKeys,
>(keys: [A, B, C]): [SystemKeys[A], SystemKeys[B], SystemKeys[C]];
>(keys: [A, B, C]): [SystemKeys[A], SystemKeys[B], SystemKeys[C]];
export function getMany<
A extends keyof SystemKeys, B extends keyof SystemKeys, C extends keyof SystemKeys,
D extends keyof SystemKeys,
>(keys: [A, B, C, D]): [SystemKeys[A], SystemKeys[B], SystemKeys[C], SystemKeys[D]];
>(keys: [A, B, C, D]): [SystemKeys[A], SystemKeys[B], SystemKeys[C], SystemKeys[D]];
export function getMany<
A extends keyof SystemKeys, B extends keyof SystemKeys, C extends keyof SystemKeys,
D extends keyof SystemKeys, E extends keyof SystemKeys,
>(keys: [A, B, C, D, E]): [SystemKeys[A], SystemKeys[B], SystemKeys[C], SystemKeys[D], SystemKeys[E]];
>(keys: [A, B, C, D, E]): [SystemKeys[A], SystemKeys[B], SystemKeys[C], SystemKeys[D], SystemKeys[E]];
export function getMany<
A extends keyof SystemKeys, B extends keyof SystemKeys, C extends keyof SystemKeys,
D extends keyof SystemKeys, E extends keyof SystemKeys, F extends keyof SystemKeys,
>(keys: [A, B, C, D, E, F]): [SystemKeys[A], SystemKeys[B], SystemKeys[C], SystemKeys[D], SystemKeys[E], SystemKeys[F]];
>(keys: [A, B, C, D, E, F]): [SystemKeys[A], SystemKeys[B], SystemKeys[C], SystemKeys[D], SystemKeys[E], SystemKeys[F]];
export function getMany(keys: (keyof SystemKeys)[]): any[];
export function getMany(keys: string[]): any[] {
return keys.map((key) => cache[key]);
@@ -43,7 +43,7 @@ export async function set(_id: string, value: any, boardcast = true) {
const res = await coll.findOneAndUpdate(
{ _id },
{ $set: { value } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
cache[_id] = res.value.value;
return res.value.value;
@@ -55,7 +55,7 @@ export async function inc<K extends NumberKeys<SystemKeys>>(_id: K) {
// FIXME NumberKeys<>
// @ts-ignore
{ $inc: { value: 1 } },
{ upsert: true, returnOriginal: false },
{ upsert: true, returnDocument: 'after' },
);
cache[_id] = res.value.value;
return res.value.value;
+1 -1
View File
@@ -53,7 +53,7 @@ class TokenModel {
tokenType,
},
},
{ returnOriginal: false },
{ returnDocument: 'after' },
);
return res.value;
}
+3 -3
View File
@@ -204,7 +204,7 @@ class UserModel {
const op: any = {};
if ($set && Object.keys($set).length) op.$set = $set;
if ($unset && Object.keys($unset).length) op.$unset = $unset;
const res = await coll.findOneAndUpdate({ _id: uid }, op, { returnOriginal: false });
const res = await coll.findOneAndUpdate({ _id: uid }, op, { returnDocument: 'after' });
deleteUserCache(res.value);
return res;
}
@@ -220,7 +220,7 @@ class UserModel {
const res = await coll.findOneAndUpdate(
{ _id: uid },
{ $set: { salt, hash: pwhash(password, salt), hashType: 'hydro' } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
deleteUserCache(res.value);
return res.value;
@@ -290,7 +290,7 @@ class UserModel {
const res = await coll.findOneAndUpdate(
{ _id: uid },
{ $set: { priv } },
{ returnOriginal: false },
{ returnDocument: 'after' },
);
deleteUserCache(res.value);
return res.value;
+7 -6
View File
@@ -1,7 +1,7 @@
/* eslint-disable no-await-in-loop */
import cluster from 'cluster';
import serialize from 'serialize-javascript';
import { argv } from 'yargs';
import cac from 'cac';
import type { Db, FilterQuery, OnlyFieldsOfType } from 'mongodb';
import type { Handler } from './server';
import { Logger } from '../logger';
@@ -16,6 +16,7 @@ import type { UserRegisterHandler } from '../handler/user';
const _hooks: Record<keyof any, Array<(...args: any[]) => any>> = {};
const logger = new Logger('bus', true);
const argv = cac().parse();
function isBailed(value: any) {
return value !== null && value !== false && value !== undefined;
@@ -146,9 +147,9 @@ export function off<K extends keyof EventMap>(name: K, listener: EventMap[K]) {
export async function parallel<K extends keyof EventMap>(name: K, ...args: Parameters<EventMap[K]>): Promise<void> {
const tasks: Promise<any>[] = [];
if (argv.showBus) logger.debug('parallel: %s %o', name, args);
if (argv.options.showBus) logger.debug('parallel: %s %o', name, args);
for (const callback of _hooks[name] || []) {
if (argv.busDetail) logger.debug(callback.toString());
if (argv.options.busDetail) logger.debug(callback.toString());
tasks.push(callback.apply(this, args));
}
await Promise.all(tasks);
@@ -159,16 +160,16 @@ export function emit<K extends keyof EventMap>(name: K, ...args: Parameters<Even
}
export async function serial<K extends keyof EventMap>(name: K, ...args: Parameters<EventMap[K]>): Promise<void> {
if (argv.showBus) logger.debug('serial: %s %o', name, args);
if (argv.options.showBus) logger.debug('serial: %s %o', name, args);
const hooks = Array.from(_hooks[name] || []);
for (const callback of hooks) {
if (argv.busDetail) logger.debug(callback.toString());
if (argv.options.busDetail) logger.debug(callback.toString());
await callback.apply(this, args);
}
}
export function bail<K extends keyof EventMap>(name: K, ...args: Parameters<EventMap[K]>): ReturnType<EventMap[K]> {
if (argv.showBus) logger.debug('bail: %s %o', name, args);
if (argv.options.showBus) logger.debug('bail: %s %o', name, args);
const hooks = Array.from(_hooks[name] || []);
for (const callback of hooks) {
const result = callback.apply(this, args);
+8 -7
View File
@@ -15,7 +15,7 @@ import Router from 'koa-router';
import proxy from 'koa-proxies';
import cache from 'koa-static-cache';
import sockjs from 'sockjs';
import { argv } from 'yargs';
import cac from 'cac';
import { createHash } from 'crypto';
import type { SetOption } from 'cookies';
import * as bus from './bus';
@@ -38,6 +38,7 @@ import token from '../model/token';
import * as opcount from '../model/opcount';
import { PERM, PRIV } from '../model/builtin';
const argv = cac().parse();
const logger = new Logger('server');
export const app = new Koa();
export const server = http.createServer(app.callback());
@@ -248,8 +249,8 @@ export async function prepare() {
rewrite: (p) => p.replace('/fs', ''),
}));
app.use(Compress());
if (argv.public) {
app.use(cache(argv.public, {
if (argv.options.public) {
app.use(cache(argv.options.public, {
maxAge: 0,
}));
} else {
@@ -257,7 +258,7 @@ export async function prepare() {
maxAge: 30 * 24 * 60 * 60,
}));
}
if (argv.debug) {
if (process.env.DEV) {
app.use(async (ctx: Context, next: Function) => {
const startTime = new Date().getTime();
await next();
@@ -482,7 +483,7 @@ export class Handler extends HandlerCommon {
}
async init({ domainId }) {
if (!argv.benchmark) await this.limitRate('global', 10, 88);
if (!argv.options.benchmark) await this.limitRate('global', 10, 88);
const [absoluteDomain, inferDomain, bdoc] = await Promise.all([
domain.get(domainId),
domain.getByHost(this.request.host),
@@ -844,8 +845,8 @@ export function start() {
if (started) return;
const port = system.get('server.port');
app.use(router.routes()).use(router.allowedMethods());
server.listen(argv.port || port);
logger.success('Server listening at: %d', argv.port || port);
server.listen(argv.options.port || port);
logger.success('Server listening at: %d', argv.options.port || port);
started = true;
}
-4
View File
@@ -1,10 +1,7 @@
/* eslint-disable @typescript-eslint/no-shadow */
import cluster from 'cluster';
import { argv } from 'yargs';
import * as bus from './service/bus';
const disabledTerminal = argv.legacy || argv._.length || process.env.NODE_ENV === 'test';
export namespace Progress {
export class Progress {
constructor(public args) {
@@ -40,7 +37,6 @@ async function terminate() {
}
process.on('SIGINT', terminate);
if (cluster.isMaster) {
if (!disabledTerminal) console.log('Not running in a terminal environment. Interactive mode disabled.');
bus.on('message/log', (message) => {
process.stdout.write(`${message}\n`);
});
+1
View File
@@ -6,6 +6,7 @@
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"dependencies": {
"adm-zip": "^0.5.5",
"decode-html": "^2.0.0",
+1
View File
@@ -5,6 +5,7 @@
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"scripts": {
"lint": "eslint lib.ts --fix",
"build": "tsc"
+1
View File
@@ -5,6 +5,7 @@
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"scripts": {
"lint": "eslint lib.ts --fix",
"build": "tsc"
+1
View File
@@ -5,6 +5,7 @@
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"scripts": {
"lint": "eslint lib.ts --fix",
"build": "tsc"
+3 -2
View File
@@ -5,10 +5,11 @@
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"dependencies": {
"ws": "^7.4.5"
"ws": "^7.4.6"
},
"devDependencies": {
"@types/ws": "^7.4.2"
"@types/ws": "^7.4.4"
}
}
+1
View File
@@ -5,6 +5,7 @@
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"scripts": {
"lint": "eslint lib.ts script.ts --fix",
"build": "tsc"
+3 -2
View File
@@ -4,11 +4,12 @@
"main": "package.json",
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"preferUnplugged": true,
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"@types/mongodb": "^3.6.12"
"@types/mongodb": "^3.6.16"
},
"dependencies": {
"mongodb": "^3.6.6"
"mongodb": "^3.6.8"
}
}
+1
View File
@@ -4,5 +4,6 @@
"main": "package.json",
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"preferUnplugged": true,
"license": "SEE LICENSE IN LICENSE"
}
+1
View File
@@ -6,6 +6,7 @@
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined",
"license": "SEE LICENSE IN LICENSE",
"preferUnplugged": true,
"dependencies": {
"superagent": "^6.1.0"
}
+1
View File
@@ -4,6 +4,7 @@
"description": "Sonic search service",
"main": "service.js",
"typings": "service.d.ts",
"preferUnplugged": true,
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "SEE LICENSE IN LICENSE",
+7 -6
View File
@@ -4,20 +4,21 @@ const yaml = require('js-yaml');
const serialize = require('serialize-javascript');
const nunjucks = require('nunjucks');
const { filter } = require('lodash');
const { argv } = require('yargs');
const argv = require('cac')().parse();
const { findFileSync } = require('@hydrooj/utils/lib/utils');
const status = require('@hydrooj/utils/lib/status');
const markdown = require('./markdown');
const { misc, buildContent, avatar } = global.Hydro.lib;
if (argv.template && argv.template !== 'string') argv.template = findFileSync('@hydrooj/ui-default/templates');
else if (argv.template) argv.template = findFileSync(argv.template);
let template = argv.options.template;
if (template && typeof template !== 'string') template = findFileSync('@hydrooj/ui-default/templates');
else if (template) template = findFileSync(template);
class Loader extends nunjucks.Loader {
// eslint-disable-next-line class-methods-use-this
getSource(name) {
if (!argv.template) {
if (!template) {
if (!global.Hydro.ui.template[name]) throw new Error(`Cannot get template ${name}`);
return {
src: global.Hydro.ui.template[name],
@@ -26,7 +27,7 @@ class Loader extends nunjucks.Loader {
};
}
let fullpath = null;
const p = path.resolve(argv.template, name);
const p = path.resolve(template, name);
if (fs.existsSync(p)) fullpath = p;
if (!fullpath) {
if (global.Hydro.ui.template[name]) {
@@ -147,7 +148,7 @@ async function render(name, state) {
...state,
formatJudgeTexts: (texts) => texts.map((text) => {
if (typeof text === 'string') return text;
return state._(text.message).format(...text.params || []) + ((argv.debug && text.stack) ? `\n${text.stack}` : '');
return state._(text.message).format(...text.params || []) + ((process.env.DEV && text.stack) ? `\n${text.stack}` : '');
}).join('\n'),
perm: global.Hydro.model.builtin.PERM,
PRIV: global.Hydro.model.builtin.PRIV,
+5 -3
View File
@@ -1,5 +1,5 @@
/* eslint-disable import/no-extraneous-dependencies */
import { argv } from 'yargs';
import cac from 'cac';
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import gulp from 'gulp';
@@ -9,6 +9,8 @@ import root from './utils/root';
import gulpConfig from './config/gulp';
import webpackConfig from './config/webpack';
const argv = cac().parse();
function runWebpack({
watch, production, measure, dev,
}) {
@@ -35,7 +37,7 @@ function runWebpack({
if (err.details) console.error(err.details);
reject(err);
}
if (argv.detail) console.log(stats.toString());
if (argv.options.detail) console.log(stats.toString());
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
resolve();
}
@@ -70,7 +72,7 @@ async function main() {
const dir = process.cwd();
process.chdir(root());
await runGulp();
await runWebpack(argv);
await runWebpack(argv.options);
process.chdir(dir);
}
+2 -2
View File
@@ -1,8 +1,8 @@
const { writeFileSync } = require('fs');
const { argv } = require('yargs');
const argv = require('cac')().parse();
const pkg = require('../package.json');
if (argv.dev) pkg.version = `${pkg.version}-dev`;
if (argv.options.dev) pkg.version = `${pkg.version}-dev`;
else pkg.version = pkg.version.replace('-dev', '');
writeFileSync(`${process.cwd()}/package.json`, JSON.stringify(pkg, null, 2));
+32 -32
View File
@@ -1,30 +1,31 @@
{
"name": "@hydrooj/ui-default",
"version": "4.10.3",
"version": "4.10.4",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
"repository": "https://github.com/hydro-dev/Hydro.git",
"preferUnplugged": true,
"devDependencies": {
"@babel/cli": "^7.13.14",
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "7.14.2",
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/eslint-parser": "7.14.3",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-export-namespace-from": "^7.12.13",
"@babel/plugin-proposal-export-namespace-from": "^7.14.2",
"@babel/plugin-proposal-function-sent": "^7.12.13",
"@babel/plugin-proposal-json-strings": "^7.13.8",
"@babel/plugin-proposal-numeric-separator": "^7.12.13",
"@babel/plugin-proposal-json-strings": "^7.14.2",
"@babel/plugin-proposal-numeric-separator": "^7.14.2",
"@babel/plugin-proposal-throw-expressions": "^7.12.13",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/preset-env": "^7.14.1",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"@babel/preset-react": "^7.13.13",
"@babel/register": "^7.13.14",
"@babel/register": "^7.13.16",
"@babel/runtime-corejs3": "^7.14.0",
"@blueprintjs/core": "^3.44.2",
"@blueprintjs/icons": "^3.26.0",
"@blueprintjs/select": "^3.16.2",
"@blueprintjs/core": "^3.44.3",
"@blueprintjs/icons": "^3.26.1",
"@blueprintjs/select": "^3.16.3",
"@hydrooj/utils": "^1.0.15",
"@undefined-moe/monaco-yaml": "^2.5.0",
"ansi_up": "^5.0.1",
@@ -35,18 +36,18 @@
"chalk": "^4.1.1",
"classnames": "^2.3.1",
"clipboard": "^2.0.8",
"copy-webpack-plugin": "^6.1.1",
"css-loader": "^4.2.2",
"copy-webpack-plugin": "^6.4.1",
"css-loader": "^4.3.0",
"diff-dom": "^4.2.2",
"echarts": "^5.1.1",
"emojify.js": "^1.1.0",
"eslint": "^7.26.0",
"eslint": "^7.27.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-import-resolver-webpack": "^0.13.1",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-import": "^2.23.2",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react": "^7.23.2",
"fancy-log": "^1.3.3",
"file-loader": "^6.2.0",
"friendly-errors-webpack-plugin": "^1.7.0",
@@ -65,11 +66,11 @@
"mini-css-extract-plugin": "^1.6.0",
"moment": "^2.29.1",
"monaco-editor": "^0.24.0",
"monaco-editor-webpack-plugin": "^3.0.1",
"monaco-editor-webpack-plugin": "^3.1.0",
"nanoid": "^3.1.23",
"normalize.css": "^8.0.1",
"nprogress": "^0.2.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"optimize-css-assets-webpack-plugin": "^5.0.6",
"pickadate": "^3.6.4",
"plugin-error": "^1.0.1",
"postcss-loader": "^3.0.0",
@@ -80,10 +81,10 @@
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-split-pane": "^0.1.92",
"redux": "^4.0.5",
"redux": "^4.1.0",
"redux-logger": "^3.0.6",
"redux-promise-middleware": "^6.1.2",
"redux-thunk": "^2.2.0",
"redux-thunk": "^2.3.0",
"rupture": "^0.7.1",
"slideout": "^1.0.1",
"sockjs-client": "^1.5.1",
@@ -92,34 +93,33 @@
"style-loader": "^2.0.0",
"stylus": "^0.54.8",
"stylus-loader": "^3.0.2",
"tether": "^1.4.6",
"tether": "^1.4.7",
"tether-drop": "^1.4.2",
"through2": "^4.0.2",
"timeago-react": "^3.0.2",
"timeago.js": "^4.0.2",
"vditor": "^3.8.4",
"vditor": "^3.8.5",
"vinyl-buffer": "^1.0.1",
"wastyle": "^0.0.5",
"web-streams-polyfill": "^3.0.2",
"webpack": "^4.44.2",
"web-streams-polyfill": "^3.0.3",
"webpack": "^4.46.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-dev-server": "^3.11.2",
"webpackbar": "^5.0.0-3"
},
"dependencies": {
"js-yaml": "^4.0.0",
"js-yaml": "^4.1.0",
"katex": "^0.13.11",
"lodash": "^4.17.21",
"markdown-it": "^12.0.6",
"markdown-it-anchor": "^7.1.0",
"markdown-it-footnote": "^3.0.2",
"markdown-it-footnote": "^3.0.3",
"markdown-it-imsize": "^2.0.1",
"markdown-it-mark": "^3.0.1",
"markdown-it-merge-cells": "^1.0.1",
"markdown-it-table-of-contents": "^0.5.2",
"nunjucks": "^3.2.3",
"streamsaver": "^2.0.5",
"xss": "^1.0.9",
"yargs": "^17.0.1"
"xss": "^1.0.9"
}
}
+1 -1
View File
@@ -2,7 +2,7 @@ import path from 'path';
import fs from 'fs-extra';
import os from 'os';
import { Duplex } from 'stream';
import { ObjectID } from 'bson';
import { ObjectID } from 'mongodb';
import { isMoment } from 'moment';
import type { Moment } from 'moment-timezone';
+7 -2
View File
@@ -6,12 +6,17 @@
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-only",
"preferUnplugged": true,
"dependencies": {
"bson": "^4.3.0",
"fs-extra": "^10.0.0",
"js-yaml": "^4.1.0",
"moment": "^2.29.1",
"systeminformation": "^5.6.20"
"mongodb": "^3.6.8",
"systeminformation": "^5.7.3"
},
"devDependencies": {
"@types/fs-extra": "^9.0.11",
"@types/node": "^15.6.1",
"moment-timezone": "^0.5.33"
}
}