Initial commit

This commit is contained in:
Jaco Greeff committed 2020-09-21 14:59:46 +02:00
commit 314bf6f252
26 files changed
+19185

No files matched your search

+1
View File
@@ -0,0 +1 @@
0
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('./babel.config.js');
+4
View File
@@ -0,0 +1,4 @@
exclude_patterns:
- "**/*.spec.js"
- "**/*.spec.ts"
- "docs/**/*.js"
+10
View File
@@ -0,0 +1,10 @@
root = true
[*]
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=120
insert_final_newline=true
+8
View File
@@ -0,0 +1,8 @@
.eslintrc.js
.github/**
.vscode/**
.yarn/**
**/binaryen/*
**/build/*
**/coverage/*
**/node_modules/*
+19
View File
@@ -0,0 +1,19 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint');
module.exports = {
...base,
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.json'
]
},
rules: {
...base.rules,
// this seems very broken atm, false positives
'@typescript-eslint/unbound-method': 'off'
}
};
+18
View File
@@ -0,0 +1,18 @@
name: PR
on: [pull_request]
jobs:
pr:
strategy:
matrix:
step: ['lint', 'test', 'build', 'docs']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }}
+34
View File
@@ -0,0 +1,34 @@
name: Master
on:
push:
branches:
- master
jobs:
master:
strategy:
matrix:
step: ['build:release', 'docs:release']
name: ${{ matrix.step }}
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/phishing'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
GH_PAGES_SRC: docs
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }}
dummy:
runs-on: ubuntu-latest
steps:
- name: dummy
run: |
echo "Dummy skip step"
+27
View File
@@ -0,0 +1,27 @@
binaryen*
build/
build-docs/
coverage/
docs/.vuepress/dist/
node_modules/
pkg/
target/
tmp/
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.npmrc
.pnp.*
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
cc-test-reporter
lerna-debug.log*
npm-debug.log*
package-lock.json
report.*.json
yarn-debug.log*
yarn-error.log*
View File
Whitespace-only changes.
+1
View File
@@ -0,0 +1 @@
12
+38
View File
@@ -0,0 +1,38 @@
/* eslint-disable */
module.exports = {
name: "@yarnpkg/plugin-interactive-tools",
factory: function (require) {
var plugin;plugin=(()=>{var __webpack_modules__={120:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>H});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}var i,o=n(2594),u=n(966),a=n(4930),l=n(7382),s=n.n(l);!function(e){e.BEFORE="before",e.AFTER="after"}(i||(i={}));const c=function(e,t,{active:n,minus:r,plus:i,set:o,loop:u=!0}){const{stdin:s}=(0,l.useContext)(a.StdinContext);(0,l.useEffect)(()=>{if(!n)return;const a=(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])}}};return s.on("keypress",a),()=>{s.off("keypress",a)}},[t,e,n])},f=({active:e=!0,children:t=[],radius:n=10,size:r=1,loop:o=!0,onFocusRequest:u,willReachEnd:f})=>{const d=s().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,m]=(0,l.useState)(p),v=d.indexOf(h);(0,l.useEffect)(()=>{d.includes(h)||m(p)},[t]),(0,l.useEffect)(()=>{f&&v>=d.length-2&&f()},[v]),function({active:e,handler:t}){const{stdin:n}=(0,l.useContext)(a.StdinContext);(0,l.useEffect)(()=>{if(!e||void 0===t)return;const r=(e,n)=>{"tab"===n.name&&(n.shift?t(i.BEFORE):t(i.AFTER))};return n.on("keypress",r),()=>{n.off("keypress",r)}},[e,t])}({active:e,handler:u}),c(h,d,{active:e,minus:"up",plus:"down",set:m,loop:o});let b=v-n,g=v+n;g>d.length&&(b-=g-d.length,g=d.length),b<0&&(g+=-b,b=0),g>=d.length&&(g=d.length-1);const _=[];for(let n=b;n<=g;++n){const i=d[n],o=e&&i===h;_.push(s().createElement(a.Box,{key:i,height:r},s().createElement(a.Box,{marginLeft:1,marginRight:1},o?s().createElement(a.Color,{cyan:!0,bold:!0},">"):" "),s().createElement(a.Box,null,s().cloneElement(t[n],{active:o}))))}return s().createElement(a.Box,{flexDirection:"column",width:"100%"},_)},d=s().createContext(null),p=function({children:e}){const{setRawMode:t}=(0,l.useContext)(a.StdinContext);(0,l.useEffect)(()=>{t&&t(!0)},[]);const[n,r]=(0,l.useState)(new Map),i=(0,l.useMemo)(()=>({getAll:()=>n,get:e=>n.get(e),set:(e,t)=>r(new Map([...n,[e,t]]))}),[n,r]);return s().createElement(d.Provider,{value:i,children:e})};function h(e,t){const n=(0,l.useContext)(d);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,l.useCallback)(t=>{n.set(e,t)},[e,n.set]);let i=n.get(e);return void 0===i&&(i=t),[i,r]}async function m(e,t){let n;const{waitUntilExit:r}=(0,a.render)(s().createElement(p,null,s().createElement(e,Object.assign({},t,{useSubmit:e=>{const{exit:t}=(0,l.useContext)(a.AppContext),{stdin:r}=(0,l.useContext)(a.StdinContext);(0,l.useEffect)(()=>{const i=(r,i)=>{"return"===i.name&&(n=e,t())};return r.on("keypress",i),()=>{r.off("keypress",i)}},[r,t,e])}}))));return await r(),n}var v=n(8042),b=n(9645),g=n(4410);const _={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},y=n.n(g)()(_.appId,_.apiKey).initIndex(_.indexName),D=async(e,t=0)=>await y.search(e,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:t,hitsPerPage:10}),w=["regular","dev","peer"];class E extends o.BaseCommand{async execute(){const e=await u.Configuration.find(this.context.cwd,this.context.plugins),t=()=>s().createElement(a.Box,{flexDirection:"row"},s().createElement(a.Box,{flexDirection:"column",width:48},s().createElement(a.Box,null,"Press ",s().createElement(a.Color,{bold:!0,cyanBright:!0},"<up>"),"/",s().createElement(a.Color,{bold:!0,cyanBright:!0},"<down>")," to move between packages."),s().createElement(a.Box,null,"Press ",s().createElement(a.Color,{bold:!0,cyanBright:!0},"<space>")," to select a package."),s().createElement(a.Box,null,"Press ",s().createElement(a.Color,{bold:!0,cyanBright:!0},"<space>")," again to change the target.")),s().createElement(a.Box,{flexDirection:"column"},s().createElement(a.Box,{marginLeft:1},"Press ",s().createElement(a.Color,{bold:!0,cyanBright:!0},"<enter>")," to install the selected packages."),s().createElement(a.Box,{marginLeft:1},"Press ",s().createElement(a.Color,{bold:!0,cyanBright:!0},"<ctrl+c>")," to abort."))),n=()=>s().createElement(s().Fragment,null,s().createElement(a.Box,{width:15},s().createElement(a.Color,{bold:!0,underline:!0,gray:!0},"Owner")),s().createElement(a.Box,{width:11},s().createElement(a.Color,{bold:!0,underline:!0,gray:!0},"Version")),s().createElement(a.Box,{width:10},s().createElement(a.Color,{bold:!0,underline:!0,gray:!0},"Downloads"))),r=()=>s().createElement(a.Box,{width:17},s().createElement(a.Color,{bold:!0,underline:!0,gray:!0},"Target")),i=({hit:t,active:n})=>{conLine truncated
/** @license React v0.20.4
* 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(5201);function a(e,t,n,r,i,o,u,a){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,u,a],s=0;(e=Error(t.replace(/%s/g,(function(){return l[s++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}function l(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);a(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;s.hasOwnProperty("ReactCurrentDispatcher")||(s.ReactCurrentDispatcher={current:null});var c="function"==typeof Symbol&&Symbol.for,f=c?Symbol.for("react.element"):60103,d=c?Symbol.for("react.portal"):60106,p=c?Symbol.for("react.fragment"):60107,h=c?Symbol.for("react.strict_mode"):60108,m=c?Symbol.for("react.profiler"):60114,v=c?Symbol.for("react.provider"):60109,b=c?Symbol.for("react.context"):60110,g=c?Symbol.for("react.concurrent_mode"):60111,_=c?Symbol.for("react.forward_ref"):60112,y=c?Symbol.for("react.suspense"):60113,D=c?Symbol.for("react.memo"):60115,w=c?Symbol.for("react.lazy"):60116,E="function"==typeof Symbol&&Symbol.iterator;function C(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||e["@@iterator"])?e:null}function T(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 g:return"ConcurrentMode";case p:return"Fragment";case d:return"Portal";case m:return"Profiler";case h:return"StrictMode";case y:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case b:return"Context.Consumer";case v:return"Context.Provider";case _:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case D:return T(e.type);case w:if(e=1===e._status?e._result:null)return T(e)}return null}function k(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function S(e){2!==k(e)&&l("188")}function M(e){var t=e.alternate;if(!t)return 3===(t=k(e))&&l("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var u=i.child;u;){if(u===n)return S(i),e;if(u===r)return S(i),t;u=u.sibling}l("188")}if(n.return!==r.return)n=i,r=o;else{u=!1;for(var a=i.child;a;){if(a===n){u=!0,n=i,r=o;break}if(a===r){u=!0,r=i,n=o;break}a=a.sibling}if(!u){for(a=o.child;a;){if(a===n){u=!0,n=o,r=i;break}if(a===r){u=!0,r=o,n=i;break}a=a.sibling}u||l("189")}}n.alternate!==r&&l("190")}return 3!==n.tag&&l("188"),n.stateNode.current===n?e:t}function x(e){if(!(e=M(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 A=r.getPublicInstance,P=r.getRootHostContext,O=r.getChildHostContext,R=r.prepareForCommit,N=r.resetAfterCommit,I=r.createInstance,F=r.appendInitialChild,B=r.finalizeInitialChildren,L=r.prepareUpdate,U=r.shouldSetTextContent,j=r.shouldDeprioritizeSubtree,W=r.createTextInstance,z=r.scheduleDeferredCallback,q=r.cancelDeferredCallback,H=r.shouldYield,G=r.setTimeout,V=r.clearTimeout,Y=r.noTimeout,K=r.schedulePassiveEffects,$=r.cancelPassiveEffects,X=r.now,J=r.isPrimaryRenderer,Q=r.supportsMutation,Z=r.supportsPersistence,ee=r.supportsHydration,te=r.appendChild,ne=r.appendChildToContainer,re=r.commitTextUpdate,ie=r.commitMount,oe=r.commitUpdate,ue=r.insertBefore,ae=r.insertInContainerBefore,le=r.removeChild,se=r.removeChildFromContainer,ce=r.resetTextContent,fe=r.hideInstance,de=r.hideTextInstance,pe=r.unhideInstance,he=r.unhideTextInstance,me=r.cloneInstance,ve=r.createContainerChildSet,be=r.appendChildToContainerChildSet,ge=r.finalizeContainerChildren,_e=r.replaceContainerChildren,ye=r.cloneHiddenInstance,De=r.cloneUnhiddenInstance,we=r.createHiddenTextInstance,Ee=r.canHydrateInstance,Ce=r.canHydrateTextInstance,Te=r.getNextHydratableSibling,ke=r.getFirstHydratableChild,Se=r.hydrateInstance,Me=r.hydrateTextInstance,xe=/^(.*)[\\\/]/;function Ae(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=T(e.type);n=null,r&&(n=T(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(xe,"")+":"+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 Pe=[],Oe=-1;function Re(e){0>Oe||(e.current=Pe[Oe],Pe[Oe]=null,Oe--)}function Ne(e,t){Oe++,Pe[Oe]=e.current,e.current=t}var Ie={},Fe={current:Ie},Be={current:!1},Le=Ie;function Ue(e,t){var n=e.typLine 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}},4767:(e,t,n)=>{"use strict";const r=n(2658);e.exports=(e,t)=>{if(!0===t)throw new TypeError("The second argument is now an options object");if("function"!=typeof e)throw new TypeError("Expected a function");let n;t=t||{};let i=!1;const o=e.displayName||e.name||"<anonymous>",u=function(){if(i){if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n}return i=!0,n=e.apply(this,arguments),e=null,n};return r(u,e),u}},6976:(e,t,n)=>{"use strict";var r=n(9090);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,u){if(u!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},6271:(e,t,n)=>{e.exports=n(6976)()},9090:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6099:(e,t,n)=>{"use strict";
/** @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,m=i?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function b(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 g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function y(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||g}function D(){}function w(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(b(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},D.prototype=y.prototype;var E=w.prototype=new D;E.constructor=w,r(E,y.prototype),E.isPureReactComponent=!0;var C={current:null},T=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function S(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)T.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:C.current}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var x=/\/+/g,A=[];function P(e,t,n,r){if(A.length){var i=A.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 O(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function R(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?"."+N(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var c=n+N(a=t[s],s);l+=e(a,c,r,i)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=v&&t[v]||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+N(a,s++),r,i);else if("object"===a)throw r=""+t,Error(b(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function N(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 I(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)?B(e,r,n,(function(e){return e})):null!=e&&(M(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(x,"$&/")+"/")+n)),r.push(e))}function B(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(x,"$&/")+"/"),R(e,F,t=P(t,o,r,i)),O(t)}var L={current:null};function U(){var e=L.current;if(null===e)throw Error(b(321));return e}var j={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return B(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,I,t=P(null,null,t,n)),O(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return B(e,t,null,(function(e){return e})),t},only:function(e){if(!M(e))throw Error(b(143));return e}},t.Component=y,t.Fragment=a,t.Profiler=s,t.PureComponent=w,t.StrictMode=l,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,t.cloneElement=function(e,t,n){if(null==e)throw Error(b(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=C.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)T.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.13.6
* 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.
*/Object.defineProperty(t,"__esModule",{value:!0});var n=null,r=!1,i=3,o=-1,u=-1,a=!1,l=!1;function s(){if(!a){var e=n.expirationTime;l?E():l=!0,w(d,e)}}function c(){var e=n,t=n.next;if(n===t)n=null;else{var r=n.previous;n=r.next=t,t.previous=r}e.next=e.previous=null,r=e.callback,t=e.expirationTime,e=e.priorityLevel;var o=i,a=u;i=e,u=t;try{var l=r()}finally{i=o,u=a}if("function"==typeof l)if(l={callback:l,priorityLevel:e,expirationTime:t,next:null,previous:null},null===n)n=l.next=l.previous=l;else{r=null,e=n;do{if(e.expirationTime>=t){r=e;break}e=e.next}while(e!==n);null===r?r=n:r===n&&(n=l,s()),(t=r.previous).next=r.previous=l,l.next=r,l.previous=t}}function f(){if(-1===o&&null!==n&&1===n.priorityLevel){a=!0;try{do{c()}while(null!==n&&1===n.priorityLevel)}finally{a=!1,null!==n?s():l=!1}}}function d(e){a=!0;var i=r;r=e;try{if(e)for(;null!==n;){var o=t.unstable_now();if(!(n.expirationTime<=o))break;do{c()}while(null!==n&&n.expirationTime<=o)}else if(null!==n)do{c()}while(null!==n&&!C())}finally{a=!1,r=i,null!==n?s():l=!1,f()}}var p,h,m=Date,v="function"==typeof setTimeout?setTimeout:void 0,b="function"==typeof clearTimeout?clearTimeout:void 0,g="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,_="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function y(e){p=g((function(t){b(h),e(t)})),h=v((function(){_(p),e(t.unstable_now())}),100)}if("object"==typeof performance&&"function"==typeof performance.now){var D=performance;t.unstable_now=function(){return D.now()}}else t.unstable_now=function(){return m.now()};var w,E,C,T=null;if("undefined"!=typeof window?T=window:"undefined"!=typeof global&&(T=global),T&&T._schedMock){var k=T._schedMock;w=k[0],E=k[1],C=k[2],t.unstable_now=k[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var S=null,M=function(e){if(null!==S)try{S(e)}finally{S=null}};w=function(e){null!==S?setTimeout(w,0,e):(S=e,setTimeout(M,0,!1))},E=function(){S=null},C=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof g&&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 _&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var x=null,A=!1,P=-1,O=!1,R=!1,N=0,I=33,F=33;C=function(){return N<=t.unstable_now()};var B=new MessageChannel,L=B.port2;B.port1.onmessage=function(){A=!1;var e=x,n=P;x=null,P=-1;var r=t.unstable_now(),i=!1;if(0>=N-r){if(!(-1!==n&&n<=r))return O||(O=!0,y(U)),x=e,void(P=n);i=!0}if(null!==e){R=!0;try{e(i)}finally{R=!1}}};var U=function(e){if(null!==x){y(U);var t=e-N+F;t<F&&I<F?(8>t&&(t=8),F=t<I?I:t):I=t,N=e+F,A||(A=!0,L.postMessage(void 0))}else O=!1};w=function(e,t){x=e,P=t,R||0>t?L.postMessage(void 0):O||(O=!0,y(U))},E=function(){x=null,A=!1,P=-1}}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,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=i,u=o;i=e,o=t.unstable_now();try{return n()}finally{i=r,o=u,f()}},t.unstable_next=function(e){switch(i){case 1:case 2:case 3:var n=3;break;default:n=i}var r=i,u=o;i=n,o=t.unstable_now();try{return e()}finally{i=r,o=u,f()}},t.unstable_scheduleCallback=function(e,r){var u=-1!==o?o:t.unstable_now();if("object"==typeof r&&null!==r&&"number"==typeof r.timeout)r=u+r.timeout;else switch(i){case 1:r=u+-1;break;case 2:r=u+250;break;case 5:r=u+1073741823;break;case 4:r=u+1e4;break;default:r=u+5e3}if(e={callback:e,priorityLevel:i,expirationTime:r,next:null,previous:null},null===n)n=e.next=e.previous=e,s();else{u=null;var a=n;do{if(a.expirationTime>r){u=a;break}a=a.next}while(a!==n);null===u?u=n:u===n&&(n=e,s()),(r=u.previous).next=u.previous=e,e.next=u,e.previous=r}return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)n=null;else{e===n&&(n=t);var r=e.previous;r.next=t,t.previous=r}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var n=i;return function(){var r=i,u=o;i=n,o=t.unstable_now();try{return e.apply(this,arguments)}finally{i=r,o=u,f()}}},t.unstable_getCurrentPriorityLevel=function(){return i},t.unstable_shouldYield=function(){return!r&&(null!==n&&n.expirationTime<u||C())},t.unstable_continueExecution=function(){null!==n&&s()},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return n}},5201:(e,t,n)=>{"use strict";e.exports=n(8992)},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.__signal_exit_emitter__?r=process.__signal_exit_emitter__:((r=process.__signal_exit_emit Line truncated
return plugin;
}
};
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env node
module.exports=(()=>{var __webpack_modules__={80150:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(5624);const i={optional:!0},A=[["@samverschueren/stream-to-observable@*",{peerDependenciesMeta:{rxjs:i,zenObservable:i}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:i,zenObservable:i}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@*",{peerDependenciesMeta:{"supports-color":i}}],["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":i,"postcss-jsx":i,"postcss-less":i,"postcss-markdown":i,"postcss-scss":i}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@*",{peerDependencies:{react:"^16.8.2"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:i}}]];let o,s,a;const c=new Map([[n.structUtils.makeIdent(null,"fsevents").identHash,function(){return void 0===o&&(o=r(78761).brotliDecompressSync(Buffer.from("G8AcICwLeENqnk8o74LOyiZCqCn+nfkoHoOW2Wy/ZaLbawoJug0vEah6g6y0zM2VGKAGUXjpuyyX/35emYdTZ6IKvYYekxabWJ1MJUiPj18N39noRCXSRrg4d2/37WX2X0qjlXq3R++KiYujNAsyg/RYlEBIhMIYluF015kiMUIInfP/zLRSUC4vdAA5Hz54RWXtId4PIrS/APSpqXY7WSjFrGFx1NpG7a1wkmKkqQ3t1AEgHU4ayRIZccu55KrViKVdWamBsYZElYvL+xzjdHr7IAf3XDhHh294rE87BITNRj4i4r7zsis3y1dyzswVF4ICvCQhRQ44dvdWLhSmQW3++3Oy8IrUcOu0vcNk1UWyjgI/icHvNAC6WXkq6MXNs3+eOK1pkhb7wwvev2j5JPssZR293ExF+QYuwPyu/EKKFKCQkbYH1NZ9GlJ+DieCJ+8PFYF8renTSEr6GSJZTtzYrUIgN44cG5WnWJphIHh8mD5A6UGvfPC8RxSgpYPus/yoHw+idviDBeCWy+hxN5v2A2dDSuiz+tpLphJ01JO3IduKMVtNfr1qq/BLCqkP59S+vFP/Cof0sWbqkffhPFcl4SLIxWq1qFcKYDKzclwBBzVFiPWC7LlvMk9m8xGjaQ2R2P+BZR3anFJoyXATv0PvZnP/tioMsJJFC7f5gI9Fmy4U/LRUVo3N/OxY2a6kykxjwVvchhI5t5BdDPjYONcUTtkrzMtXFhSASbtzx7uIxYfhvs4/3mW6hKqwLBaipralUhPdfo5h4SiOic7o+oOUwl5/Aff6cyh3wEeDB4tVA79bq29MEeRfTV+Oe3fr/UhZQtkY0iE8vqSle2b58SXY0mkGmBiRjoPIkAFs1OSlJ3nSz9raEeB1ZWvJ2xiclGu1xTT6NRw3NaHU0k4R+4t0SIlltXJAW4kHj92+lB7TLjIWZfWfBNncDSYqP8jmg+jV7VyIgy/uk09ipbLdLM6Xr76rabkrZyQ3Qk8S71SEqlWRxEjWsKaELHnDeAxqaYrL0ITQr2S9xbXg0rnId4wtsQgZw21lye/up1/dTfXT+MkD5AP0i4YCh99d1V3sdxTAEDlI0nFBTjPoJwJnctqtFkgcP+Xakk36SgMSHuOZh/KUlex2NIizXmbBwicMK9s1LK6dQOqBuFZlX9lanWTwnVGuVvr3olrdhlClWC3T7S9NdfVsaYZKBDfYEZnTL7pZcKnE60KSutBZSaSgM+0BQbg1+qJHaVwb0X2Dhv70O7k7ALDJiNiA7GdsX1Ygf4ktBZv66did31wGeUm5JBJLemdjZHRa2YATgMFlye4t0hcz9ha4eXoVOc2EXHVqDdjeItztOwm7tBzcHR8Mwwb/HqtC/VKZC0IiH8TE/FE7x9SHWGUnTUNEBlucGudFTKYYlQaIjoANOgXsGLVtemCeplca3Wv1CMijvkZXTiUd8KmEZ2z6frw/kpo7gG/nDo2VkG6e+veL+scVhKDSObOXKcdtw+/Wbbw269oDLe5BLyqsR9VTc631RKspQYcCMx9M2xRKn7uZog504EXqMOPmUCHwW0yqiHxxoN+sMqYhjo/A8r4KAJ9TX7siey+38u6rhHYtDIMBKBk/lewEzgzDqFxxnqmvRK+XjeObr1axojyQobCerDLaHtzU1fwLHasuURSspKMhvR6QpWketRn2MJqMRLU0DQC0YCVLT+qeCS1LaZKQsQ0ZS1I1rKPmRjp7QQ2YDzdwpIHdTmPuBEIyIgXXiUQ/w6ZcFj4AA2ozg5zYaI5+3zGniD4ABtHXjuwGdRlRW6dngE5mECYu/0QnYwo5I6Z3KfM7BmZ/l4//i25lwXry79v/jxsAaMAc","base64")).toString()),o}],[n.structUtils.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+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CA+ZySVaUJr2d3A70BC/uBCKr2OVrWgC3fSwb7NlfkgSEEiejrMGvhya9lMbVI6lMsFKN330A1/FOaefHQdNGLEZ3IwFF87H3xVlM0Xxsmbi/7A60oymRcIe0tH90alG6ez/yA7jwYotxuHWZdR+1HlMcddGHAV6QD/gXYPV0wnNv47I+5FGevzZFMqWSO8GU4nQ3FjsdgdJcD+c1rvudERKuLyd7bxiBpnsMDHsvPP4nXdXkld/gUNks3GAE1Otmb90bavDyiw4Mrx496Iw+jbLTgsCZGZXSZ9vM55C7KGe4HyJAKXEk0iT/Cj/PFwLJBN7pcP7ZFfYtUApGTWKkYhI9IE2zt/5ByH72wdvH+88b71zuv/FMCX3w6x5nzhY44Cg5IYv9LeKwHuHIWgPbfgrAcUxOlKkPRdQOIDF/aBuLPJAXD+TgxCNXx4jQxeR/qlBWVikFPfEI4rXMUc4kZ2w9KbPKYRvFUag0dVlVoyUP4zfidbTXAdZF88jAckl+NHjLFCNdX7EQ1PbLSOl+P+MqgwEOCi6dxgWZ7NCwJBjWKpk1LaxwKrhZ4aEC/0lMPJYe5S8xAakDcmA2kSS86GjEMTrv3VEu0S0YGZcxToMV524G4WAc4CReePePdipvs4aXRL5p+aeN96yfMGjsiTbQNxgbdRKc+keQ+NxYIEm1mBtEO29WrcbrqNbQRMR66KpGG4aG0NtmRyZ2JhUvu0paCklRlID8PT3gSiwZrqr4XZXoBBzBMrveWCuOg7iTgGDXDdbGi8XHkQf5KXDGFUxWueu5wkSa6gMWY1599g2piQjwBKIAPt4N5cOZdFBidz2feGwEAy1j1UydGxDSCCUsh314cUIIRV/dWCheceubL2gU8CibewmP7UxmN5kN4I7zfQhPxkP0NCcei8GXQpw4c3krEzW7PR2hgi/hqqqR58UJ/ZVfWxfcH5ZKMo4itkmPK0FCGxzzIRP20lK/gz28Y03sY233KvSVWUKl9rcbX6MbHjpUG8MvNlw72p6FwTejv92zgpnCxVJnIHHZhCBxNcHF5RTveRp513hUtTHHq4BIndlytZT5xoTSYfHKqKNr4o9kcGINIz6tZSKRdtbON3Ydr9cgqxHIeisMNIsvPg/IFMZuBbSqqDLeSO5dak1cGr76FtH2PC7hs0S0Oq3GsmF1Ga4Line 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 i(e,t,r,n){var i,A=arguments.length,o=A<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(A<3?i(o):A>3?i(t,r,o):i(t,r))||o);return A>3&&o&&Object.defineProperty(t,r,o),o}n.Entries={};class A extends n{async execute(){this.context.stdout.write(this.cli.usage(null))}}i([n.Path("--help"),n.Path("-h")],A.prototype,"execute",null);class o extends n{async execute(){var e;this.context.stdout.write((null!==(e=this.cli.binaryVersion)&&void 0!==e?e:"<unknown>")+"\n")}}i([n.Path("--version"),n.Path("-v")],o.prototype,"execute",null);const s=/^(-h|--help)(?:=([0-9]+))?$/,a=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,c=/^-[a-zA-Z]{2,}$/,g=/^([^=]+)=([\s\S]*)$/,l="1"===process.env.DEBUG_CLI;class u extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}}class h extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",0===this.candidates.length)this.message="Command not found, but we're not sure what's the alternative.";else if(1===this.candidates.length&&null!==this.candidates[0].reason){const[{usage:e,reason:t}]=this.candidates;this.message=`${t}\n\n$ ${e}`}else if(1===this.candidates.length){const[{usage:t}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${t}\n${p(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:e},t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${p(e)}`}}class f extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find who to pick amongst the following alternatives:\n\n${this.usages.map((e,t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${p(e)}`}}const p=e=>"While running "+e.filter(e=>"\0"!==e).map(e=>{const t=JSON.stringify(e);return e.match(/\s/)||0===e.length||t!==`"${e}"`?t:e}).join(" ");function C(e){l&&console.log(e)}function d(e,t){return e.nodes.push(t),e.nodes.length-1}function I(e,t,r=!1){C("Running a vm on "+JSON.stringify(t));let n=[{node:0,state:{candidateUsage:null,errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];!function(e,{prefix:t=""}={}){C(t+"Nodes are:");for(let r=0;r<e.nodes.length;++r)C(`${t} ${r}: ${JSON.stringify(e.nodes[r])}`)}(e,{prefix:" "});const i=["",...t];for(let A=0;A<i.length;++A){const o=i[A];C(" Processing "+JSON.stringify(o));const s=[];for(const{node:t,state:a}of n){C(" Current node is "+t);const n=e.nodes[t];if(2===t){s.push({node:t,state:a});continue}console.assert(0===n.shortcuts.length,"Shortcuts should have been eliminated by now");const c=Object.prototype.hasOwnProperty.call(n.statics,o);if(!r||A<i.length-1||c)if(c){const e=n.statics[o];for(const{to:t,reducer:r}of e)s.push({node:t,state:void 0!==r?k(N,r,a,o):a}),C(` Static transition to ${t} found`)}else C(" No static transition found");else{let e=!1;for(const t of Object.keys(n.statics))if(t.startsWith(o)){if(o===t)for(const{to:e,reducer:r}of n.statics[t])s.push({node:e,state:void 0!==r?k(N,r,a,o):a}),C(` Static transition to ${e} found`);else for(const{to:e,reducer:r}of n.statics[t])s.push({node:e,state:Object.assign(Object.assign({},a),{remainder:t.slice(o.length)})}),C(` Static transition to ${e} found (partial match)`);e=!0}e||C(" No partial static transition found")}if("\0"!==o)for(const[e,{to:t,reducer:r}]of n.dynamics)k(F,e,a,o)&&(s.push({node:t,state:void 0!==r?k(N,r,a,o):a}),C(` Dynamic transition to ${t} found (via ${e})`))}if(0===s.length)throw new h(t,n.filter(({node:e})=>2!==e).map(({state:e})=>({usage:e.candidateUsage,reason:null})));if(s.every(({node:e})=>2===e))throw new h(t,s.map(({state:e})=>({usage:e.candidateUsage,reason:e.errorMessage})));n=B(s)}if(n.length>0){C(" Results:");for(const e of n)C(` - ${e.node} -> ${JSON.stringify(e.state)}`)}else C(" No results");return n}function E(e,t){if(null!==t.selectedIndex)return!0;if(Object.prototype.hasOwnProperty.call(e.statics,"\0"))for(const{to:t}of e.statics["\0"])if(1===t)return!0;return!1}function m(e,t){return function(e,t){const r=t.filter(e=>null!==e.selectedIndex);if(0===r.length)throw new Error;let n=0;for(const e of r)e.path.length>n&&(n=e.path.length);const i=r.filter(e=>e.path.length===n),A=e=>e.positionals.filter(({extra:e})=>!e).length+e.options.length,o=i.map(e=>({state:e,positionalCount:A(e)}));let s=0;for(const{positionalCount:e}of o)e>s&&(s=e);const a=function(e){const t=[],r=[];for(const n of e)-1===n.selectedIndex?r.push(n):t.push(n);r.length>0&&t.push({candidateUsage:null,errorMessage:null,ignoreOptions:!1,path:w(...r.map(e=>e.path)),positionals:[],options:r.reduce((e,t)=>e.concat(t.options),[]),remainder:null,selectedIndex:-1});return t}(o.filter(({positionalCount:e})=>e===s).map(({state:e})=>e));if(a.leLine truncated
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/const n=r(31669),i=r(84615),A=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=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,n)=>{if(r)return i(e,t,{wrap:!1,...n});let A=String.fromCharCode(e);return e===t?A:`[${A}-${String.fromCharCode(t)}]`},u=(e,t,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return i(e,t,r)},h=(...e)=>new RangeError("Invalid range arguments: "+n.inspect(...e)),f=(e,t,r)=>{if(!0===r.strictRanges)throw h([e,t]);return[]},p=(e,t,r=1,n={})=>{let i=Number(e),A=Number(t);if(!Number.isInteger(i)||!Number.isInteger(A)){if(!0===n.strictRanges)throw h([e,t]);return[]}0===i&&(i=0),0===A&&(A=0);let o=i>A,s=String(e),f=String(t),p=String(r);r=Math.max(Math.abs(r),1);let C=a(s)||a(f)||a(p),d=C?Math.max(s.length,f.length,p.length):0,I=!1===C&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,n),E=n.transform||(e=>t=>!0===e?Number(t):String(t))(I);if(n.toRegex&&1===r)return l(g(e,d),g(t,d),!0,n);let m={negatives:[],positives:[]},B=[],w=0;for(;o?i>=A:i<=A;)!0===n.toRegex&&r>1?m[(y=i)<0?"negatives":"positives"].push(Math.abs(y)):B.push(c(E(i,w),d,I)),i=o?i-r:i+r,w++;var y;return!0===n.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,n=t.capture?"":"?:",i="",A="";return e.positives.length&&(i=e.positives.join("|")),e.negatives.length&&(A=`-(${n}${e.negatives.join("|")})`),r=i&&A?`${i}|${A}`:i||A,t.wrap?`(${n}${r})`:r})(m,n):u(B,null,{wrap:!1,...n}):B},C=(e,t,r,n={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return f(e,t,n);if("function"==typeof r)return C(e,t,1,{transform:r});if(A(r))return C(e,t,0,r);let i={...n};return!0===i.capture&&(i.wrap=!0),r=r||i.step||1,s(r)?s(e)&&s(t)?p(e,t,r,i):((e,t,r=1,n={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return f(e,t,n);let i=n.transform||(e=>String.fromCharCode(e)),A=(""+e).charCodeAt(0),o=(""+t).charCodeAt(0),a=A>o,c=Math.min(A,o),g=Math.max(A,o);if(n.toRegex&&1===r)return l(c,g,!1,n);let h=[],p=0;for(;a?A>=o:A<=o;)h.push(i(A,p)),A=a?A-r:A+r,p++;return!0===n.toRegex?u(h,null,{wrap:!1,options:n}):h})(e,t,Math.max(Math.abs(r),1),i):null==r||A(r)?C(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,i)};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:n}=r(92413);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const i="buffer"===r;let A=!1;t?A=!(r||i):r=r||"utf8",i&&(r=null);const o=new n({objectMode:A});r&&o.setEncoding(r);let s=0;const a=[];return o.on("data",e=>{a.push(e),A?s=a.length:s+=e.length}),o.getBufferedValue=()=>t?a:i?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}},58764:(e,t,r)=>{"use strict";const n=r(50372),i=r(72137);class A extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function o(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:r}=t;let o;return await new Promise((s,a)=>{const c=e=>{e&&(e.bufferedData=o.getBufferedValue()),a(e)};o=n(e,i(t),e=>{e?c(e):s()}),o.on("data",()=>{o.getBufferedLength()>r&&c(new A)})}),o.getBufferedValue()}e.exports=o,e.exports.default=o,e.exports.buffer=(e,t)=>o(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>o(e,{...t,array:!0}),e.exports.MaxBufferError=A},97098:(e,t,r)=>{"use strict";var n=r(18193),i=r(85622).posix.dirname,A="win32"===r(12087).platform(),o=/\\/g,s=/[\{\[].*[\/]*.*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\*\?\|\[\]\(\)\{\}])/g;e.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&A&&e.indexOf("/")<0&&(e=e.replace(o,"/")),s.test(e)&&(e+="/"),e+="a";do{e=i(e)}while(n(e)||a.test(e));return e.replace(c,"$1")}},90734:(e,t,r)=>{"use strict";const{promisify:n}=r(31669),i=r(35747),A=r(85622),o=r(19347),s=r(46458),a=r(17234),c=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],g=n(i.readFile),l=(e,t)=>{const r=a(A.relative(t.cwd,A.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(e=>!e.startsWith("#")).map((e=>t=>t.startsWith("!")?"!"+A.posix.join(e,t.slice(1)):A.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(A.relative(t,((e,t)=>{if(e=a(e),A.isAbsolute(t)){if(t.startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return A.join(e,t)})(t,r)))),f=({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 n=r(44486),i={"{":"}","(":")","[":"]"},A=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,o=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;e.exports=function(e,t){if("string"!=typeof e||""===e)return!1;if(n(e))return!0;var r,s=A;for(t&&!1===t.strict&&(s=o);r=s.exec(e);){if(r[2])return!0;var a=r.index+r[0].length,c=r[1],g=c?i[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,n,i,A;
/*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright © 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*/A=function(){"use strict";return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}},t&&"object"==typeof t?e.exports=A():(n=[],void 0===(i="function"==typeof(r=A)?r.apply(t,n):r)||(e.exports=i))},64151:(e,t,r)=>{var n;r(35747);function i(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,n){i(e,t||{},(function(e,t){e?n(e):r(t)}))}))}n(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}n="win32"===process.platform||global.TESTING_WINDOWS?r(3202):r(2151),e.exports=i,i.sync=function(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},2151:(e,t,r)=>{e.exports=i,i.sync=function(e,t){return A(n.statSync(e),t)};var n=r(35747);function i(e,t,r){n.stat(e,(function(e,n){r(e,!e&&A(n,t))}))}function A(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,A=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),o=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&&i===o||r&s&&n===A||r&g&&0===A}(e,t)}},3202:(e,t,r)=>{e.exports=A,A.sync=function(e,t){return i(n.statSync(e),e,t)};var n=r(35747);function i(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 n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function A(e,t,r){n.stat(e,(function(n,A){r(n,!n&&i(A,e,t))}))}},21194:(e,t,r)=>{"use strict";var n=r(40744);e.exports=n},40744:(e,t,r)=>{"use strict";var n=r(55384),i=r(24129);function A(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=n.load,e.exports.loadAll=n.loadAll,e.exports.safeLoad=n.safeLoad,e.exports.safeLoadAll=n.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.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=A("scan"),e.exports.parse=A("parse"),e.exports.compose=A("compose"),e.exports.addConstructor=A("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,n="";for(r=0;r<t;r+=1)n+=e;return n},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var r,n,i,A;if(t)for(r=0,n=(A=Object.keys(t)).length;r<n;r+=1)e[i=A[r]]=t[i];return e}},24129:(e,t,r)=>{"use strict";var n=r(28149),i=r(17345),A=r(5235),o=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,A;if(t=e.toString(16).toUpperCase(),e<=255)r="x",A=2;else if(e<=65535)r="u",A=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");r="U",A=8}return"\\"+r+n.repeat("0",A-t.length)+t}function u(e){this.schema=e.schema||A,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,i,A,o,s,c;if(null===t)return{};for(r={},i=0,A=(n=Object.keys(t)).length;i<A;i+=1)o=n[i],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(c=e.compiledTypeMap.fallback[o])&&a.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=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,i=n.repeat(" ",t),A=0,o=-1,s="",a=e.length;A<a;)-1===(o=e.indexOf("\n",A))?(r=e.slice(A),A=a):(r=e.slice(A,o+1),A=o+1),r.length&&"\n"!==r&&(s+=i),s+=r;return s}function f(e,t){return"\n"+n.repeat(" ",e.indent*t)}function p(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 d(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 n=r(59235),i=(e,t,r)=>{if(!1===n(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===n(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let A={relaxZeros:!0,...r};"boolean"==typeof A.strictZeros&&(A.relaxZeros=!1===A.strictZeros);let a=e+":"+t+"="+String(A.relaxZeros)+String(A.shorthand)+String(A.capture)+String(A.wrap);if(i.cache.hasOwnProperty(a))return i.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 A.capture?`(${r})`:!1===A.wrap?r:`(?:${r})`}let l=f(e)||f(t),u={min:e,max:t,a:c,b:g},h=[],p=[];if(l&&(u.isPadded=l,u.maxLen=String(u.max).length),c<0){p=o(g<0?Math.abs(g):1,Math.abs(c),u,A),c=u.a=0}return g>=0&&(h=o(c,g,u,A)),u.negatives=p,u.positives=h,u.result=function(e,t,r){let n=s(e,t,"-",!1,r)||[],i=s(t,e,"",!1,r)||[],A=s(e,t,"-?",!0,r)||[];return n.concat(A).concat(i).join("|")}(p,h,A),!0===A.capture?u.result=`(${u.result})`:!1!==A.wrap&&h.length+p.length>1&&(u.result=`(?:${u.result})`),i.cache[a]=u,u.result};function A(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=function(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}(e,t),i=n.length,A="",o=0;for(let e=0;e<i;e++){let[t,i]=n[e];t===i?A+=t:"0"!==t||"9"!==i?A+=h(t,i,r):o++}return o&&(A+=!0===r.shorthand?"\\d":"[0-9]"),{pattern:A,count:[o],digits:i}}function o(e,t,r,n){let i,o=function(e,t){let r=1,n=1,i=g(e,r),A=new Set([t]);for(;e<=i&&i<=t;)A.add(i),r+=1,i=g(e,r);for(i=l(t+1,n)-1;e<i&&i<=t;)A.add(i),n+=1,i=l(t+1,n)-1;return A=[...A],A.sort(a),A}(e,t),s=[],c=e;for(let e=0;e<o.length;e++){let t=o[e],a=A(String(c),String(t),n),g="";r.isPadded||!i||i.pattern!==a.pattern?(r.isPadded&&(g=p(t,r,n)),a.string=g+a.pattern+u(a.count),s.push(a),c=t+1,i=a):(i.count.length>1&&i.count.pop(),i.count.push(a.count[0]),i.string=i.pattern+u(i.count),c=t+1)}return s}function s(e,t,r,n,i){let A=[];for(let i of e){let{string:e}=i;n||c(t,"string",e)||A.push(r+e),n&&c(t,"string",e)&&A.push(r+e)}return A}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 f(e){return/^-?(0+)\d/.test(e)}function p(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),i=!1!==r.relaxZeros;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}i.cache={},i.clearCache=()=>i.cache={},e.exports=i},75158:e=>{function t(e,t){var r=e.length,n=new Array(r),i={},A=r,o=function(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),s=function(e){for(var t=new Map,r=0,n=e.length;r<n;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.")}));A--;)i[A]||a(e[A],A,new Set);return n;function a(e,t,A){if(A.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(!i[t]){i[t]=!0;var g=o.get(e)||new Set;if(t=(g=Array.from(g)).length){A.add(e);do{var l=g[--t];a(l,s.get(l),A)}while(t);A.delete(e)}n[--r]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var i=e[r];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=t},94682:function(e){e.exports=function(){function e(t,r,n,i,A,o,s){var a,c,g="",l=0,u=i.slice(0);if(u.push([r,n])&&i.length>0&&(i.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,n)+t,A&&("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 n in e)e.hasOwnProperty(n)&&(t&&"function"==typeof e[n]||r.push(n));return r}(r,o);h.forEach((function(t){a=++l===h.length,e(t,r[t],a,u,A,o,s)}))}}var t={asLines:function(t,r,n,i){e(".",t,!1,[],r,"function"!=typeof n&&n,i||n)},asTree:function(t,r,n){var i="";return e(".",t,!1,[],r,n,(function(e){i+=e+"\n"})),i}};return t}()},36370:(e,t,r)=>{"use strict";r.d(t,{gn:()=>n});function n(e,t,r,n){var i,A=arguments.length,o=A<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(A<3?i(o):A>3?i(t,r,o):i(t,r))||o);return A>3&&o&&Object.defineProperty(t,r,o),o}},98161:(e,t,r)=>{e.exports=r(69876)},69876:(e,t,r)=>{"use strict";r(11631);var n,i=r(4016),A=r(98605Line truncated
+11
View File
@@ -0,0 +1,11 @@
enableImmutableInstalls: false
enableProgressBars: false
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-2.2.2.cjs
+5
View File
@@ -0,0 +1,5 @@
# CHANGELOG
## 0.1.1 Sep 21, 2020
- Initial release
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+3
View File
@@ -0,0 +1,3 @@
# @polkadot/phishing
A curated list of known less-than-honest sites including a simple JS utility function to check any host against this list.
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/babel');
+8
View File
@@ -0,0 +1,8 @@
{
"allow": [
],
"deny": [
"polkawallets.site",
"polkodot.network"
]
}
+13
View File
@@ -0,0 +1,13 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest');
module.exports = Object.assign({}, config, {
moduleNameMapper: {
},
modulePathIgnorePatterns: [
'<rootDir>/build'
],
resolver: './jest.resolver.js'
});
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
const path = require('path');
module.exports = function resolver (file, config) {
return file.includes('package.json')
? path.join(config.basedir.replace('/src', '/'), file)
: config.defaultResolver(file, config);
};
+28
View File
@@ -0,0 +1,28 @@
{
"repository": "https://github.com/polkadot-js/phishing",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"resolutions": {
"babel-core": "^7.0.0-bridge.0",
"typescript": "^4.0.2"
},
"scripts": {
"build": "polkadot-dev-build-ts",
"build:release": "polkadot-ci-ghact-build --skip-beta",
"docs": "echo \"no docs build step\"",
"docs:release": "polkadot-ci-ghact-docs",
"lint": "polkadot-dev-run-lint",
"clean": "polkadot-dev-clean-build",
"postinstall": "polkadot-dev-yarn-only",
"test": "echo \"no tests\""
},
"dependencies": {
"@polkadot/x-fetch": "^0.3.2"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@polkadot/dev": "^0.55.53",
"@types/jest": "^26.0.10"
},
"version": "0.1.0"
}
+38
View File
@@ -0,0 +1,38 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { HostList } from './types';
import fetch from '@polkadot/x-fetch';
// retrieve allow/deny from our list provider
export async function retrieveHostList (): Promise<HostList> {
const response = await fetch('https://polkadot.js.org/phishing/all.json');
const list = (await response.json()) as HostList;
return list;
}
// checks a host to see if it appears in the list
export async function checkHost (items: string[], host: string): Promise<boolean> {
const hostParts = host.split('.').reverse();
return items.some((item): boolean => {
const checkParts = item.split('.').reverse();
// first we need to ensure it has less or equal parts to our source
if (checkParts.length > hostParts.length) {
return false;
}
// ensure each section matches
return checkParts.every((part, index) => hostParts[index] === part);
});
}
// retrieve the deny list and check the host against it
export default async function retrieveCheckDeny (host: string): Promise<boolean> {
const { deny } = await retrieveHostList();
return checkHost(deny, host);
}
+7
View File
@@ -0,0 +1,7 @@
// Copyright 2020 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
export interface HostList {
allow: string[];
deny: string[];
}
+16
View File
@@ -0,0 +1,16 @@
{
"extends": "@polkadot/dev/config/tsconfig",
"exclude": [
"build/**/*",
"**/build/**/*"
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
},
"skipLibCheck": true,
"typeRoots": [
"./node_modules/@types"
]
}
}
+18622
View File
File diff suppressed because it is too large. Load diff