diff --git a/.eslintrc.js b/.eslintrc.js index 3f804620..af31a3d9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,7 +14,6 @@ module.exports = { '@typescript-eslint/explicit-module-boundary-types': 'off', 'sort-imports-es6-autofix/sort-imports-es6': 'error', '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-unused-vars': [ 'warn', { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bdf8e9b..0a27e313 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - run: yarn check - run: yarn build-wasm - run: yarn lint - - run: yarn test - run: yarn build + - run: yarn test - name: Test substrate-api-sidecard with chopsticks node - run: sh e2e/scripts/sidecard-chopsticks.sh + run: yarn workspace @acala-network/chopsticks-e2e run sidecar diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3b00285c..c9840411 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,7 +36,7 @@ jobs: - run: yarn check - run: yarn build-wasm - run: yarn build - - run: node -e "assert(require('./package.json').version === require('./executor/pkg/package.json').version, 'Chopsticks and executor version not the same. Please update Cargo.toml version')" + - run: node -e "assert(require('./packages/chopsticks/package.json').version === require('./executor/pkg/package.json').version, 'Chopsticks and executor version not the same. Please update Cargo.toml version')" # Writes token to .yarnrc.yml. If written directly in .yarnrc.yml, it will cause an error - run: | echo npmAuthToken: "\${NPM_AUTH_TOKEN}" >> ./.yarnrc.yml @@ -44,6 +44,10 @@ jobs: run: yarn workspace @acala-network/chopsticks npm publish --tolerate-republish --access public env: NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + # - name: Publish @acala-network/chopsticks-core + # run: yarn workspace @acala-network/chopsticks-core npm publish --tolerate-republish --access public + # env: + # NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - name: Publish @acala-network/chopsticks-executor run: yarn workspace @acala-network/chopsticks-executor npm publish --tolerate-republish --access public env: diff --git a/.gitignore b/.gitignore index 5febb8a1..ea4b9ae3 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,5 @@ dist .DS_store preview/ + +lib diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec1..00000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index c32c81cd..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -yarn lint-staged -yarn lint-staged diff --git a/.prettierignore b/.prettierignore index 83555d16..d6e23915 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,5 +5,3 @@ executor/ vendor/ .pnp.cjs .pnp.loader.mjs -dist/ -preview/ diff --git a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs new file mode 100644 index 00000000..911cd235 --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs @@ -0,0 +1,28 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-workspace-tools", +factory: function (require) { +var plugin=(()=>{var wr=Object.create,me=Object.defineProperty,Sr=Object.defineProperties,vr=Object.getOwnPropertyDescriptor,Hr=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,kr=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable;var rt=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))tt.call(t,r)&&rt(e,r,t[r]);if(et)for(var r of et(t))Tr.call(t,r)&&rt(e,r,t[r]);return e},Q=(e,t)=>Sr(e,Hr(t)),Lr=e=>me(e,"__esModule",{value:!0});var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Or=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},Nr=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $r(t))!tt.call(e,n)&&n!=="default"&&me(e,n,{get:()=>t[n],enumerable:!(r=vr(t,n))||r.enumerable});return e},X=e=>Nr(Lr(me(e!=null?wr(kr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var $e=K(te=>{"use strict";te.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;te.find=(e,t)=>e.nodes.find(r=>r.type===t);te.exceedsLimit=(e,t,r=1,n)=>n===!1||!te.isInteger(e)||!te.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;te.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};te.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0==0?(e.invalid=!0,!0):!1;te.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0==0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;te.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;te.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);te.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s{"use strict";var it=$e();at.exports=(e,t={})=>{let r=(n,s={})=>{let a=t.escapeInvalid&&it.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o="";if(n.value)return(a||i)&&it.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let h of n.nodes)o+=r(h);return o};return r(e)}});var ct=K((os,ot)=>{"use strict";ot.exports=function(e){return typeof e=="number"?e-e==0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var At=K((cs,ut)=>{"use strict";var lt=ct(),pe=(e,t,r)=>{if(lt(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(lt(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n=B({relaxZeros:!0},r);typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),a=String(n.shorthand),i=String(n.capture),o=String(n.wrap),h=e+":"+t+"="+s+a+i+o;if(pe.cache.hasOwnProperty(h))return pe.cache[h].result;let g=Math.min(e,t),f=Math.max(e,t);if(Math.abs(g-f)===1){let R=e+"|"+t;return n.capture?`(${R})`:n.wrap===!1?R:`(?:${R})`}let A=ft(e)||ft(t),p={min:e,max:t,a:g,b:f},k=[],y=[];if(A&&(p.isPadded=A,p.maxLen=String(p.max).length),g<0){let R=f<0?Math.abs(f):1;y=pt(R,Math.abs(g),p,n),g=p.a=0}return f>=0&&(k=pt(g,f,p,n)),p.negatives=y,p.positives=k,p.result=Ir(y,k,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&k.length+y.length>1&&(p.result=`(?:${p.result})`),pe.cache[h]=p,p.result};function Ir(e,t,r){let n=Pe(e,t,"-",!1,r)||[],s=Pe(t,e,"",!1,r)||[],a=Pe(e,t,"-?",!0,r)||[];return n.concat(a).concat(s).join("|")}function Mr(e,t){let r=1,n=1,s=ht(e,r),a=new Set([t]);for(;e<=s&&s<=t;)a.add(s),r+=1,s=ht(e,r);for(s=dt(t+1,n)-1;e1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+gt(o.count),i=g+1;continue}r.isPadded&&(A=Gr(g,r,n)),f.string=A+f.pattern+gt(f.count),a.push(f),i=g+1,o=f}return a}function Pe(e,t,r,n,s){let a=[];for(let i of e){let{string:o}=i;!n&&!mt(t,"string",o)&&a.push(r+o),n&&mt(t,"string",o)&&a.push(r+o)}return a}function Pr(e,t){let r=[];for(let n=0;nt?1:t>e?-1:0}function mt(e,t,r){return e.some(n=>n[t]===r)}function ht(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function dt(e,t){return e-e%Math.pow(10,t)}function gt(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Dr(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function ft(e){return/^-?(0+)\d/.test(e)}function Gr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}pe.cache={};pe.clearCache=()=>pe.cache={};ut.exports=pe});var Ge=K((us,Rt)=>{"use strict";var qr=require("util"),yt=At(),bt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Kr=e=>t=>e===!0?Number(t):String(t),De=e=>typeof e=="number"||typeof e=="string"&&e!=="",Re=e=>Number.isInteger(+e),Ue=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Wr=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,jr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_t=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length{e.negatives.sort((i,o)=>io?1:0),e.positives.sort((i,o)=>io?1:0);let r=t.capture?"":"?:",n="",s="",a;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n&&s?a=`${n}|${s}`:a=n||s,t.wrap?`(${r}${a})`:a},Et=(e,t,r,n)=>{if(r)return yt(e,t,B({wrap:!1},n));let s=String.fromCharCode(e);if(e===t)return s;let a=String.fromCharCode(t);return`[${s}-${a}]`},xt=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return yt(e,t,r)},Ct=(...e)=>new RangeError("Invalid range arguments: "+qr.inspect(...e)),wt=(e,t,r)=>{if(r.strictRanges===!0)throw Ct([e,t]);return[]},Qr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Xr=(e,t,r=1,n={})=>{let s=Number(e),a=Number(t);if(!Number.isInteger(s)||!Number.isInteger(a)){if(n.strictRanges===!0)throw Ct([e,t]);return[]}s===0&&(s=0),a===0&&(a=0);let i=s>a,o=String(e),h=String(t),g=String(r);r=Math.max(Math.abs(r),1);let f=Ue(o)||Ue(h)||Ue(g),A=f?Math.max(o.length,h.length,g.length):0,p=f===!1&&Wr(e,t,n)===!1,k=n.transform||Kr(p);if(n.toRegex&&r===1)return Et(_t(e,A),_t(t,A),!0,n);let y={negatives:[],positives:[]},R=T=>y[T<0?"negatives":"positives"].push(Math.abs(T)),_=[],x=0;for(;i?s>=a:s<=a;)n.toRegex===!0&&r>1?R(s):_.push(jr(k(s,x),A,p)),s=i?s-r:s+r,x++;return n.toRegex===!0?r>1?Fr(y,n):xt(_,null,B({wrap:!1},n)):_},Zr=(e,t,r=1,n={})=>{if(!Re(e)&&e.length>1||!Re(t)&&t.length>1)return wt(e,t,n);let s=n.transform||(p=>String.fromCharCode(p)),a=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),o=a>i,h=Math.min(a,i),g=Math.max(a,i);if(n.toRegex&&r===1)return Et(h,g,!1,n);let f=[],A=0;for(;o?a>=i:a<=i;)f.push(s(a,A)),a=o?a-r:a+r,A++;return n.toRegex===!0?xt(f,null,{wrap:!1,options:n}):f},Te=(e,t,r,n={})=>{if(t==null&&De(e))return[e];if(!De(e)||!De(t))return wt(e,t,n);if(typeof r=="function")return Te(e,t,1,{transform:r});if(bt(r))return Te(e,t,0,r);let s=B({},n);return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,Re(r)?Re(e)&&Re(t)?Xr(e,t,r,s):Zr(e,t,Math.max(Math.abs(r),1),s):r!=null&&!bt(r)?Qr(r,s):Te(e,t,1,r)};Rt.exports=Te});var Ht=K((ls,St)=>{"use strict";var Yr=Ge(),vt=$e(),zr=(e,t={})=>{let r=(n,s={})=>{let a=vt.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o=a===!0||i===!0,h=t.escapeInvalid===!0?"\\":"",g="";if(n.isOpen===!0||n.isClose===!0)return h+n.value;if(n.type==="open")return o?h+n.value:"(";if(n.type==="close")return o?h+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":o?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let f=vt.reduce(n.nodes),A=Yr(...f,Q(B({},t),{wrap:!1,toRegex:!0}));if(A.length!==0)return f.length>1&&A.length>1?`(${A})`:A}if(n.nodes)for(let f of n.nodes)g+=r(f,n);return g};return r(e)};St.exports=zr});var Tt=K((ps,$t)=>{"use strict";var Vr=Ge(),kt=ke(),he=$e(),fe=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?he.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let a of s)n.push(fe(a,t,r));else for(let a of t)r===!0&&typeof a=="string"&&(a=`{${a}}`),n.push(Array.isArray(a)?fe(s,a,r):s+a);return he.flatten(n)},Jr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,a={})=>{s.queue=[];let i=a,o=a.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,o=i.queue;if(s.invalid||s.dollar){o.push(fe(o.pop(),kt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){o.push(fe(o.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let A=he.reduce(s.nodes);if(he.exceedsLimit(...A,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=Vr(...A,t);p.length===0&&(p=kt(s,t)),o.push(fe(o.pop(),p)),s.nodes=[];return}let h=he.encloseBrace(s),g=s.queue,f=s;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,g=f.queue;for(let A=0;A{"use strict";Lt.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Pt=K((hs,Nt)=>{"use strict";var en=ke(),{MAX_LENGTH:It,CHAR_BACKSLASH:qe,CHAR_BACKTICK:tn,CHAR_COMMA:rn,CHAR_DOT:nn,CHAR_LEFT_PARENTHESES:sn,CHAR_RIGHT_PARENTHESES:an,CHAR_LEFT_CURLY_BRACE:on,CHAR_RIGHT_CURLY_BRACE:cn,CHAR_LEFT_SQUARE_BRACKET:Bt,CHAR_RIGHT_SQUARE_BRACKET:Mt,CHAR_DOUBLE_QUOTE:un,CHAR_SINGLE_QUOTE:ln,CHAR_NO_BREAK_SPACE:pn,CHAR_ZERO_WIDTH_NOBREAK_SPACE:fn}=Ot(),hn=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(It,r.maxLength):It;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},a=[s],i=s,o=s,h=0,g=e.length,f=0,A=0,p,k={},y=()=>e[f++],R=_=>{if(_.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&_.type==="text"){o.value+=_.value;return}return i.nodes.push(_),_.parent=i,_.prev=o,o=_,_};for(R({type:"bos"});f0){if(i.ranges>0){i.ranges=0;let _=i.nodes.shift();i.nodes=[_,{type:"text",value:en(i)}]}R({type:"comma",value:p}),i.commas++;continue}if(p===nn&&A>0&&i.commas===0){let _=i.nodes;if(A===0||_.length===0){R({type:"text",value:p});continue}if(o.type==="dot"){if(i.range=[],o.value+=p,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){_.pop();let x=_[_.length-1];x.value+=o.value+p,o=x,i.ranges--;continue}R({type:"dot",value:p});continue}R({type:"text",value:p})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let _=a[a.length-1],x=_.nodes.indexOf(i);_.nodes.splice(x,1,...i.nodes)}while(a.length>0);return R({type:"eos"}),s};Nt.exports=hn});var Gt=K((ds,Dt)=>{"use strict";var Ut=ke(),dn=Ht(),gn=Tt(),mn=Pt(),V=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=V.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(V.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};V.parse=(e,t={})=>mn(e,t);V.stringify=(e,t={})=>typeof e=="string"?Ut(V.parse(e,t),t):Ut(e,t);V.compile=(e,t={})=>(typeof e=="string"&&(e=V.parse(e,t)),dn(e,t));V.expand=(e,t={})=>{typeof e=="string"&&(e=V.parse(e,t));let r=gn(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};V.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?V.compile(e,t):V.expand(e,t);Dt.exports=V});var ye=K((gs,qt)=>{"use strict";var An=require("path"),ie="\\\\/",Kt=`[^${ie}]`,ce="\\.",Rn="\\+",yn="\\?",Le="\\/",bn="(?=.)",Wt="[^/]",Ke=`(?:${Le}|$)`,jt=`(?:^|${Le})`,We=`${ce}{1,2}${Ke}`,_n=`(?!${ce})`,En=`(?!${jt}${We})`,xn=`(?!${ce}{0,1}${Ke})`,Cn=`(?!${We})`,wn=`[^.${Le}]`,Sn=`${Wt}*?`,Ft={DOT_LITERAL:ce,PLUS_LITERAL:Rn,QMARK_LITERAL:yn,SLASH_LITERAL:Le,ONE_CHAR:bn,QMARK:Wt,END_ANCHOR:Ke,DOTS_SLASH:We,NO_DOT:_n,NO_DOTS:En,NO_DOT_SLASH:xn,NO_DOTS_SLASH:Cn,QMARK_NO_DOT:wn,STAR:Sn,START_ANCHOR:jt},vn=Q(B({},Ft),{SLASH_LITERAL:`[${ie}]`,QMARK:Kt,STAR:`${Kt}*?`,DOTS_SLASH:`${ce}{1,2}(?:[${ie}]|$)`,NO_DOT:`(?!${ce})`,NO_DOTS:`(?!(?:^|[${ie}])${ce}{1,2}(?:[${ie}]|$))`,NO_DOT_SLASH:`(?!${ce}{0,1}(?:[${ie}]|$))`,NO_DOTS_SLASH:`(?!${ce}{1,2}(?:[${ie}]|$))`,QMARK_NO_DOT:`[^.${ie}]`,START_ANCHOR:`(?:^|[${ie}])`,END_ANCHOR:`(?:[${ie}]|$)`}),Hn={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};qt.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Hn,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:An.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?vn:Ft}}});var be=K(Z=>{"use strict";var $n=require("path"),kn=process.platform==="win32",{REGEX_BACKSLASH:Tn,REGEX_REMOVE_BACKSLASH:Ln,REGEX_SPECIAL_CHARS:On,REGEX_SPECIAL_CHARS_GLOBAL:Nn}=ye();Z.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Z.hasRegexChars=e=>On.test(e);Z.isRegexChar=e=>e.length===1&&Z.hasRegexChars(e);Z.escapeRegex=e=>e.replace(Nn,"\\$1");Z.toPosixSlashes=e=>e.replace(Tn,"/");Z.removeBackslashes=e=>e.replace(Ln,t=>t==="\\"?"":t);Z.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Z.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:kn===!0||$n.sep==="\\";Z.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Z.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Z.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Z.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",a=`${n}(?:${e})${s}`;return t.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}});var er=K((As,Qt)=>{"use strict";var Xt=be(),{CHAR_ASTERISK:je,CHAR_AT:In,CHAR_BACKWARD_SLASH:_e,CHAR_COMMA:Bn,CHAR_DOT:Fe,CHAR_EXCLAMATION_MARK:Qe,CHAR_FORWARD_SLASH:Zt,CHAR_LEFT_CURLY_BRACE:Xe,CHAR_LEFT_PARENTHESES:Ze,CHAR_LEFT_SQUARE_BRACKET:Mn,CHAR_PLUS:Pn,CHAR_QUESTION_MARK:Yt,CHAR_RIGHT_CURLY_BRACE:Dn,CHAR_RIGHT_PARENTHESES:zt,CHAR_RIGHT_SQUARE_BRACKET:Un}=ye(),Vt=e=>e===Zt||e===_e,Jt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?Infinity:1)},Gn=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,a=[],i=[],o=[],h=e,g=-1,f=0,A=0,p=!1,k=!1,y=!1,R=!1,_=!1,x=!1,T=!1,O=!1,W=!1,G=!1,ne=0,E,b,C={value:"",depth:0,isGlob:!1},M=()=>g>=n,l=()=>h.charCodeAt(g+1),H=()=>(E=b,h.charCodeAt(++g));for(;g0&&(j=h.slice(0,f),h=h.slice(f),A-=f),w&&y===!0&&A>0?(w=h.slice(0,A),c=h.slice(A)):y===!0?(w="",c=h):w=h,w&&w!==""&&w!=="/"&&w!==h&&Vt(w.charCodeAt(w.length-1))&&(w=w.slice(0,-1)),r.unescape===!0&&(c&&(c=Xt.removeBackslashes(c)),w&&T===!0&&(w=Xt.removeBackslashes(w)));let u={prefix:j,input:e,start:f,base:w,glob:c,isBrace:p,isBracket:k,isGlob:y,isExtglob:R,isGlobstar:_,negated:O,negatedExtglob:W};if(r.tokens===!0&&(u.maxDepth=0,Vt(b)||i.push(C),u.tokens=i),r.parts===!0||r.tokens===!0){let I;for(let $=0;${"use strict";var Oe=ye(),J=be(),{MAX_LENGTH:Ne,POSIX_REGEX_SOURCE:qn,REGEX_NON_SPECIAL_CHARS:Kn,REGEX_SPECIAL_CHARS_BACKREF:Wn,REPLACEMENTS:rr}=Oe,jn=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(s=>J.escapeRegex(s)).join("..")}return r},de=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,nr=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rr[e]||e;let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let a={type:"bos",value:"",output:r.prepend||""},i=[a],o=r.capture?"":"?:",h=J.isWindows(t),g=Oe.globChars(h),f=Oe.extglobChars(g),{DOT_LITERAL:A,PLUS_LITERAL:p,SLASH_LITERAL:k,ONE_CHAR:y,DOTS_SLASH:R,NO_DOT:_,NO_DOT_SLASH:x,NO_DOTS_SLASH:T,QMARK:O,QMARK_NO_DOT:W,STAR:G,START_ANCHOR:ne}=g,E=m=>`(${o}(?:(?!${ne}${m.dot?R:A}).)*?)`,b=r.dot?"":_,C=r.dot?O:W,M=r.bash===!0?E(r):G;r.capture&&(M=`(${M})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let l={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=J.removePrefix(e,l),s=e.length;let H=[],w=[],j=[],c=a,u,I=()=>l.index===s-1,$=l.peek=(m=1)=>e[l.index+m],ee=l.advance=()=>e[++l.index]||"",se=()=>e.slice(l.index+1),z=(m="",L=0)=>{l.consumed+=m,l.index+=L},Ce=m=>{l.output+=m.output!=null?m.output:m.value,z(m.value)},xr=()=>{let m=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)ee(),l.start++,m++;return m%2==0?!1:(l.negated=!0,l.start++,!0)},we=m=>{l[m]++,j.push(m)},ue=m=>{l[m]--,j.pop()},v=m=>{if(c.type==="globstar"){let L=l.braces>0&&(m.type==="comma"||m.type==="brace"),d=m.extglob===!0||H.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!L&&!d&&(l.output=l.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=M,l.output+=c.output)}if(H.length&&m.type!=="paren"&&(H[H.length-1].inner+=m.value),(m.value||m.output)&&Ce(m),c&&c.type==="text"&&m.type==="text"){c.value+=m.value,c.output=(c.output||"")+m.value;return}m.prev=c,i.push(m),c=m},Se=(m,L)=>{let d=Q(B({},f[L]),{conditions:1,inner:""});d.prev=c,d.parens=l.parens,d.output=l.output;let S=(r.capture?"(":"")+d.open;we("parens"),v({type:m,value:L,output:l.output?"":y}),v({type:"paren",extglob:!0,value:ee(),output:S}),H.push(d)},Cr=m=>{let L=m.close+(r.capture?")":""),d;if(m.type==="negate"){let S=M;m.inner&&m.inner.length>1&&m.inner.includes("/")&&(S=E(r)),(S!==M||I()||/^\)+$/.test(se()))&&(L=m.close=`)$))${S}`),m.inner.includes("*")&&(d=se())&&/^\.[^\\/.]+$/.test(d)&&(L=m.close=`)${d})${S})`),m.prev.type==="bos"&&(l.negatedExtglob=!0)}v({type:"paren",extglob:!0,value:u,output:L}),ue("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let m=!1,L=e.replace(Wn,(d,S,P,F,q,Me)=>F==="\\"?(m=!0,d):F==="?"?S?S+F+(q?O.repeat(q.length):""):Me===0?C+(q?O.repeat(q.length):""):O.repeat(P.length):F==="."?A.repeat(P.length):F==="*"?S?S+F+(q?M:""):M:S?d:`\\${d}`);return m===!0&&(r.unescape===!0?L=L.replace(/\\/g,""):L=L.replace(/\\+/g,d=>d.length%2==0?"\\\\":d?"\\":"")),L===e&&r.contains===!0?(l.output=e,l):(l.output=J.wrapOutput(L,l,t),l)}for(;!I();){if(u=ee(),u==="\0")continue;if(u==="\\"){let d=$();if(d==="/"&&r.bash!==!0||d==="."||d===";")continue;if(!d){u+="\\",v({type:"text",value:u});continue}let S=/^\\+/.exec(se()),P=0;if(S&&S[0].length>2&&(P=S[0].length,l.index+=P,P%2!=0&&(u+="\\")),r.unescape===!0?u=ee():u+=ee(),l.brackets===0){v({type:"text",value:u});continue}}if(l.brackets>0&&(u!=="]"||c.value==="["||c.value==="[^")){if(r.posix!==!1&&u===":"){let d=c.value.slice(1);if(d.includes("[")&&(c.posix=!0,d.includes(":"))){let S=c.value.lastIndexOf("["),P=c.value.slice(0,S),F=c.value.slice(S+2),q=qn[F];if(q){c.value=P+q,l.backtrack=!0,ee(),!a.output&&i.indexOf(c)===1&&(a.output=y);continue}}}(u==="["&&$()!==":"||u==="-"&&$()==="]")&&(u=`\\${u}`),u==="]"&&(c.value==="["||c.value==="[^")&&(u=`\\${u}`),r.posix===!0&&u==="!"&&c.value==="["&&(u="^"),c.value+=u,Ce({value:u});continue}if(l.quotes===1&&u!=='"'){u=J.escapeRegex(u),c.value+=u,Ce({value:u});continue}if(u==='"'){l.quotes=l.quotes===1?0:1,r.keepQuotes===!0&&v({type:"text",value:u});continue}if(u==="("){we("parens"),v({type:"paren",value:u});continue}if(u===")"){if(l.parens===0&&r.strictBrackets===!0)throw new SyntaxError(de("opening","("));let d=H[H.length-1];if(d&&l.parens===d.parens+1){Cr(H.pop());continue}v({type:"paren",value:u,output:l.parens?")":"\\)"}),ue("parens");continue}if(u==="["){if(r.nobracket===!0||!se().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));u=`\\${u}`}else we("brackets");v({type:"bracket",value:u});continue}if(u==="]"){if(r.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){v({type:"text",value:u,output:`\\${u}`});continue}if(l.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(de("opening","["));v({type:"text",value:u,output:`\\${u}`});continue}ue("brackets");let d=c.value.slice(1);if(c.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(u=`/${u}`),c.value+=u,Ce({value:u}),r.literalBrackets===!1||J.hasRegexChars(d))continue;let S=J.escapeRegex(c.value);if(l.output=l.output.slice(0,-c.value.length),r.literalBrackets===!0){l.output+=S,c.value=S;continue}c.value=`(${o}${S}|${c.value})`,l.output+=c.value;continue}if(u==="{"&&r.nobrace!==!0){we("braces");let d={type:"brace",value:u,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};w.push(d),v(d);continue}if(u==="}"){let d=w[w.length-1];if(r.nobrace===!0||!d){v({type:"text",value:u,output:u});continue}let S=")";if(d.dots===!0){let P=i.slice(),F=[];for(let q=P.length-1;q>=0&&(i.pop(),P[q].type!=="brace");q--)P[q].type!=="dots"&&F.unshift(P[q].value);S=jn(F,r),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){let P=l.output.slice(0,d.outputIndex),F=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",u=S="\\}",l.output=P;for(let q of F)l.output+=q.output||q.value}v({type:"brace",value:u,output:S}),ue("braces"),w.pop();continue}if(u==="|"){H.length>0&&H[H.length-1].conditions++,v({type:"text",value:u});continue}if(u===","){let d=u,S=w[w.length-1];S&&j[j.length-1]==="braces"&&(S.comma=!0,d="|"),v({type:"comma",value:u,output:d});continue}if(u==="/"){if(c.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",i.pop(),c=a;continue}v({type:"slash",value:u,output:k});continue}if(u==="."){if(l.braces>0&&c.type==="dot"){c.value==="."&&(c.output=A);let d=w[w.length-1];c.type="dots",c.output+=u,c.value+=u,d.dots=!0;continue}if(l.braces+l.parens===0&&c.type!=="bos"&&c.type!=="slash"){v({type:"text",value:u,output:A});continue}v({type:"dot",value:u,output:A});continue}if(u==="?"){if(!(c&&c.value==="(")&&r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("qmark",u);continue}if(c&&c.type==="paren"){let S=$(),P=u;if(S==="<"&&!J.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(c.value==="("&&!/[!=<:]/.test(S)||S==="<"&&!/<([!=]|\w+>)/.test(se()))&&(P=`\\${u}`),v({type:"text",value:u,output:P});continue}if(r.dot!==!0&&(c.type==="slash"||c.type==="bos")){v({type:"qmark",value:u,output:W});continue}v({type:"qmark",value:u,output:O});continue}if(u==="!"){if(r.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){Se("negate",u);continue}if(r.nonegate!==!0&&l.index===0){xr();continue}}if(u==="+"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("plus",u);continue}if(c&&c.value==="("||r.regex===!1){v({type:"plus",value:u,output:p});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||l.parens>0){v({type:"plus",value:u});continue}v({type:"plus",value:p});continue}if(u==="@"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){v({type:"at",extglob:!0,value:u,output:""});continue}v({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);let d=Kn.exec(se());d&&(u+=d[0],l.index+=d[0].length),v({type:"text",value:u});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=u,c.output=M,l.backtrack=!0,l.globstar=!0,z(u);continue}let m=se();if(r.noextglob!==!0&&/^\([^?]/.test(m)){Se("star",u);continue}if(c.type==="star"){if(r.noglobstar===!0){z(u);continue}let d=c.prev,S=d.prev,P=d.type==="slash"||d.type==="bos",F=S&&(S.type==="star"||S.type==="globstar");if(r.bash===!0&&(!P||m[0]&&m[0]!=="/")){v({type:"star",value:u,output:""});continue}let q=l.braces>0&&(d.type==="comma"||d.type==="brace"),Me=H.length&&(d.type==="pipe"||d.type==="paren");if(!P&&d.type!=="paren"&&!q&&!Me){v({type:"star",value:u,output:""});continue}for(;m.slice(0,3)==="/**";){let ve=e[l.index+4];if(ve&&ve!=="/")break;m=m.slice(3),z("/**",3)}if(d.type==="bos"&&I()){c.type="globstar",c.value+=u,c.output=E(r),l.output=c.output,l.globstar=!0,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!F&&I()){l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=E(r)+(r.strictSlashes?")":"|$)"),c.value+=u,l.globstar=!0,l.output+=d.output+c.output,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&m[0]==="/"){let ve=m[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=`${E(r)}${k}|${k}${ve})`,c.value+=u,l.output+=d.output+c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&m[0]==="/"){c.type="globstar",c.value+=u,c.output=`(?:^|${k}|${E(r)}${k})`,l.output=c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-c.output.length),c.type="globstar",c.output=E(r),c.value+=u,l.output+=c.output,l.globstar=!0,z(u);continue}let L={type:"star",value:u,output:M};if(r.bash===!0){L.output=".*?",(c.type==="bos"||c.type==="slash")&&(L.output=b+L.output),v(L);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&r.regex===!0){L.output=u,v(L);continue}(l.index===l.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(l.output+=x,c.output+=x):r.dot===!0?(l.output+=T,c.output+=T):(l.output+=b,c.output+=b),$()!=="*"&&(l.output+=y,c.output+=y)),v(L)}for(;l.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));l.output=J.escapeLast(l.output,"["),ue("brackets")}for(;l.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing",")"));l.output=J.escapeLast(l.output,"("),ue("parens")}for(;l.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","}"));l.output=J.escapeLast(l.output,"{"),ue("braces")}if(r.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&v({type:"maybe_slash",value:"",output:`${k}?`}),l.backtrack===!0){l.output="";for(let m of l.tokens)l.output+=m.output!=null?m.output:m.value,m.suffix&&(l.output+=m.suffix)}return l};nr.fastpaths=(e,t)=>{let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=rr[e]||e;let a=J.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:f,NO_DOTS:A,NO_DOTS_SLASH:p,STAR:k,START_ANCHOR:y}=Oe.globChars(a),R=r.dot?A:f,_=r.dot?p:f,x=r.capture?"":"?:",T={negated:!1,prefix:""},O=r.bash===!0?".*?":k;r.capture&&(O=`(${O})`);let W=b=>b.noglobstar===!0?O:`(${x}(?:(?!${y}${b.dot?g:i}).)*?)`,G=b=>{switch(b){case"*":return`${R}${h}${O}`;case".*":return`${i}${h}${O}`;case"*.*":return`${R}${O}${i}${h}${O}`;case"*/*":return`${R}${O}${o}${h}${_}${O}`;case"**":return R+W(r);case"**/*":return`(?:${R}${W(r)}${o})?${_}${h}${O}`;case"**/*.*":return`(?:${R}${W(r)}${o})?${_}${O}${i}${h}${O}`;case"**/.*":return`(?:${R}${W(r)}${o})?${i}${h}${O}`;default:{let C=/^(.*?)\.(\w+)$/.exec(b);if(!C)return;let M=G(C[1]);return M?M+i+C[2]:void 0}}},ne=J.removePrefix(e,T),E=G(ne);return E&&r.strictSlashes!==!0&&(E+=`${o}?`),E};tr.exports=nr});var ir=K((ys,ar)=>{"use strict";var Fn=require("path"),Qn=er(),Ye=sr(),ze=be(),Xn=ye(),Zn=e=>e&&typeof e=="object"&&!Array.isArray(e),D=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(p=>D(p,t,r));return p=>{for(let k of f){let y=k(p);if(y)return y}return!1}}let n=Zn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},a=ze.isWindows(t),i=n?D.compileRe(e,t):D.makeRe(e,t,!1,!0),o=i.state;delete i.state;let h=()=>!1;if(s.ignore){let f=Q(B({},t),{ignore:null,onMatch:null,onResult:null});h=D(s.ignore,f,r)}let g=(f,A=!1)=>{let{isMatch:p,match:k,output:y}=D.test(f,i,t,{glob:e,posix:a}),R={glob:e,state:o,regex:i,posix:a,input:f,output:y,match:k,isMatch:p};return typeof s.onResult=="function"&&s.onResult(R),p===!1?(R.isMatch=!1,A?R:!1):h(f)?(typeof s.onIgnore=="function"&&s.onIgnore(R),R.isMatch=!1,A?R:!1):(typeof s.onMatch=="function"&&s.onMatch(R),A?R:!0)};return r&&(g.state=o),g};D.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let a=r||{},i=a.format||(s?ze.toPosixSlashes:null),o=e===n,h=o&&i?i(e):e;return o===!1&&(h=i?i(e):e,o=h===n),(o===!1||a.capture===!0)&&(a.matchBase===!0||a.basename===!0?o=D.matchBase(e,t,r,s):o=t.exec(h)),{isMatch:Boolean(o),match:o,output:h}};D.matchBase=(e,t,r,n=ze.isWindows(r))=>(t instanceof RegExp?t:D.makeRe(t,r)).test(Fn.basename(e));D.isMatch=(e,t,r)=>D(t,r)(e);D.parse=(e,t)=>Array.isArray(e)?e.map(r=>D.parse(r,t)):Ye(e,Q(B({},t),{fastpaths:!1}));D.scan=(e,t)=>Qn(e,t);D.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},a=s.contains?"":"^",i=s.contains?"":"$",o=`${a}(?:${e.output})${i}`;e&&e.negated===!0&&(o=`^(?!${o}).*$`);let h=D.toRegex(o,t);return n===!0&&(h.state=e),h};D.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ye.fastpaths(e,t)),s.output||(s=Ye(e,t)),D.compileRe(s,t,r,n)};D.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};D.constants=Xn;ar.exports=D});var cr=K((bs,or)=>{"use strict";or.exports=ir()});var hr=K((_s,ur)=>{"use strict";var lr=require("util"),pr=Gt(),oe=cr(),Ve=be(),fr=e=>e===""||e==="./",N=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,s=new Set,a=new Set,i=0,o=f=>{a.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f!n.has(f));if(r&&g.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(f=>f.replace(/\\/g,"")):t}return g};N.match=N;N.matcher=(e,t)=>oe(e,t);N.isMatch=(e,t,r)=>oe(t,r)(e);N.any=N.isMatch;N.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,s=[],a=o=>{r.onResult&&r.onResult(o),s.push(o.output)},i=N(e,t,Q(B({},r),{onResult:a}));for(let o of s)i.includes(o)||n.add(o);return[...n]};N.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>N.contains(e,n,r));if(typeof t=="string"){if(fr(e)||fr(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return N.isMatch(e,t,Q(B({},r),{contains:!0}))};N.matchKeys=(e,t,r)=>{if(!Ve.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=N(Object.keys(e),t,r),s={};for(let a of n)s[a]=e[a];return s};N.some=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(n.some(i=>a(i)))return!0}return!1};N.every=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(!n.every(i=>a(i)))return!1}return!0};N.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);return[].concat(t).every(n=>oe(n,r)(e))};N.capture=(e,t,r)=>{let n=Ve.isWindows(r),a=oe.makeRe(String(e),Q(B({},r),{capture:!0})).exec(n?Ve.toPosixSlashes(t):t);if(a)return a.slice(1).map(i=>i===void 0?"":i)};N.makeRe=(...e)=>oe.makeRe(...e);N.scan=(...e)=>oe.scan(...e);N.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let s of pr(String(n),t))r.push(oe.parse(s,t));return r};N.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:pr(e,t)};N.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return N.braces(e,Q(B({},t),{expand:!0}))};ur.exports=N});var gr=K((Es,dr)=>{"use strict";dr.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var Ar=K((xs,Je)=>{"use strict";var Yn=gr(),mr=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,n=()=>{r--,t.length>0&&t.shift()()},s=(o,h,...g)=>{r++;let f=Yn(o,...g);h(f),f.then(n,n)},a=(o,h,...g)=>{rnew Promise(g=>a(o,g,...h));return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),i};Je.exports=mr;Je.exports.default=mr});var Vn={};Or(Vn,{default:()=>es});var He=X(require("@yarnpkg/cli")),ae=X(require("@yarnpkg/core")),nt=X(require("@yarnpkg/core")),le=X(require("clipanion")),Ae=class extends He.BaseCommand{constructor(){super(...arguments);this.json=le.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=le.Option.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=le.Option.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=le.Option.Rest()}async execute(){let t=await ae.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ae.Project.find(t,this.context.cwd),s=await ae.Cache.find(t);await r.restoreInstallState({restoreResolutions:!1});let a;if(this.all)a=new Set(r.workspaces);else if(this.workspaces.length===0){if(!n)throw new He.WorkspaceRequiredError(r.cwd,this.context.cwd);a=new Set([n])}else a=new Set(this.workspaces.map(o=>r.getWorkspaceByIdent(nt.structUtils.parseIdent(o))));for(let o of a)for(let h of this.production?["dependencies"]:ae.Manifest.hardDependencies)for(let g of o.manifest.getForScope(h).values()){let f=r.tryWorkspaceByDescriptor(g);f!==null&&a.add(f)}for(let o of r.workspaces)a.has(o)?this.production&&o.manifest.devDependencies.clear():(o.manifest.installConfig=o.manifest.installConfig||{},o.manifest.installConfig.selfReferences=!1,o.manifest.dependencies.clear(),o.manifest.devDependencies.clear(),o.manifest.peerDependencies.clear(),o.manifest.scripts.clear());return(await ae.StreamReport.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!0},async o=>{await r.install({cache:s,report:o,persistProject:!1})})).exitCode()}};Ae.paths=[["workspaces","focus"]],Ae.usage=le.Command.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});var st=Ae;var Ie=X(require("@yarnpkg/cli")),ge=X(require("@yarnpkg/core")),Ee=X(require("@yarnpkg/core")),Y=X(require("@yarnpkg/core")),Rr=X(require("@yarnpkg/plugin-git")),U=X(require("clipanion")),Be=X(hr()),yr=X(require("os")),br=X(Ar()),re=X(require("typanion")),xe=class extends Ie.BaseCommand{constructor(){super(...arguments);this.recursive=U.Option.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=U.Option.Array("--from",[],{description:"An array of glob pattern idents from which to base any recursion"});this.all=U.Option.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=U.Option.Boolean("-v,--verbose",!1,{description:"Prefix each output line with the name of the originating workspace"});this.parallel=U.Option.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=U.Option.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=U.Option.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:re.isOneOf([re.isEnum(["unlimited"]),re.applyCascade(re.isNumber(),[re.isInteger(),re.isAtLeast(1)])])});this.topological=U.Option.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=U.Option.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=U.Option.Array("--include",[],{description:"An array of glob pattern idents; only matching workspaces will be traversed"});this.exclude=U.Option.Array("--exclude",[],{description:"An array of glob pattern idents; matching workspaces won't be traversed"});this.publicOnly=U.Option.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=U.Option.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=U.Option.String();this.args=U.Option.Proxy()}async execute(){let t=await ge.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ge.Project.find(t,this.context.cwd);if(!this.all&&!n)throw new Ie.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState();let s=this.cli.process([this.commandName,...this.args]),a=s.path.length===1&&s.path[0]==="run"&&typeof s.scriptName!="undefined"?s.scriptName:null;if(s.path.length===0)throw new U.UsageError("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let i=this.all?r.topLevelWorkspace:n,o=this.since?Array.from(await Rr.gitUtils.fetchChangedWorkspaces({ref:this.since,project:r})):[i,...this.from.length>0?i.getRecursiveWorkspaceChildren():[]],h=E=>Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.from),g=this.from.length>0?o.filter(h):o,f=new Set([...g,...g.map(E=>[...this.recursive?this.since?E.getRecursiveWorkspaceDependents():E.getRecursiveWorkspaceDependencies():E.getRecursiveWorkspaceChildren()]).flat()]),A=[],p=!1;if(a==null?void 0:a.includes(":")){for(let E of r.workspaces)if(E.manifest.scripts.has(a)&&(p=!p,p===!1))break}for(let E of f)a&&!E.manifest.scripts.has(a)&&!p&&!(await ge.scriptUtils.getWorkspaceAccessibleBinaries(E)).has(a)||a===process.env.npm_lifecycle_event&&E.cwd===n.cwd||this.include.length>0&&!Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.include)||this.exclude.length>0&&Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.exclude)||this.publicOnly&&E.manifest.private===!0||A.push(E);let k=this.parallel?this.jobs==="unlimited"?Infinity:Number(this.jobs)||Math.max(1,(0,yr.cpus)().length/2):1,y=k===1?!1:this.parallel,R=y?this.interlaced:!0,_=(0,br.default)(k),x=new Map,T=new Set,O=0,W=null,G=!1,ne=await Ee.StreamReport.start({configuration:t,stdout:this.context.stdout},async E=>{let b=async(C,{commandIndex:M})=>{if(G)return-1;!y&&this.verbose&&M>1&&E.reportSeparator();let l=zn(C,{configuration:t,verbose:this.verbose,commandIndex:M}),[H,w]=_r(E,{prefix:l,interlaced:R}),[j,c]=_r(E,{prefix:l,interlaced:R});try{this.verbose&&E.reportInfo(null,`${l} Process started`);let u=Date.now(),I=await this.cli.run([this.commandName,...this.args],{cwd:C.cwd,stdout:H,stderr:j})||0;H.end(),j.end(),await w,await c;let $=Date.now();if(this.verbose){let ee=t.get("enableTimers")?`, completed in ${Y.formatUtils.pretty(t,$-u,Y.formatUtils.Type.DURATION)}`:"";E.reportInfo(null,`${l} Process exited (exit code ${I})${ee}`)}return I===130&&(G=!0,W=I),I}catch(u){throw H.end(),j.end(),await w,await c,u}};for(let C of A)x.set(C.anchoredLocator.locatorHash,C);for(;x.size>0&&!E.hasErrors();){let C=[];for(let[H,w]of x){if(T.has(w.anchoredDescriptor.descriptorHash))continue;let j=!0;if(this.topological||this.topologicalDev){let c=this.topologicalDev?new Map([...w.manifest.dependencies,...w.manifest.devDependencies]):w.manifest.dependencies;for(let u of c.values()){let I=r.tryWorkspaceByDescriptor(u);if(j=I===null||!x.has(I.anchoredLocator.locatorHash),!j)break}}if(!!j&&(T.add(w.anchoredDescriptor.descriptorHash),C.push(_(async()=>{let c=await b(w,{commandIndex:++O});return x.delete(H),T.delete(w.anchoredDescriptor.descriptorHash),c})),!y))break}if(C.length===0){let H=Array.from(x.values()).map(w=>Y.structUtils.prettyLocator(t,w.anchoredLocator)).join(", ");E.reportError(Ee.MessageName.CYCLIC_DEPENDENCIES,`Dependency cycle detected (${H})`);return}let l=(await Promise.all(C)).find(H=>H!==0);W===null&&(W=typeof l!="undefined"?1:W),(this.topological||this.topologicalDev)&&typeof l!="undefined"&&E.reportError(Ee.MessageName.UNNAMED,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return W!==null?W:ne.exitCode()}};xe.paths=[["workspaces","foreach"]],xe.usage=U.Command.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. By default yarn runs the command only on current and all its descendant workspaces.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});var Er=xe;function _r(e,{prefix:t,interlaced:r}){let n=e.createStreamReporter(t),s=new Y.miscUtils.DefaultStream;s.pipe(n,{end:!1}),s.on("finish",()=>{n.end()});let a=new Promise(o=>{n.on("finish",()=>{o(s.active)})});if(r)return[s,a];let i=new Y.miscUtils.BufferStream;return i.pipe(s,{end:!1}),i.on("finish",()=>{s.end()}),[i,a]}function zn(e,{configuration:t,commandIndex:r,verbose:n}){if(!n)return null;let s=Y.structUtils.convertToIdent(e.locator),i=`[${Y.structUtils.stringifyIdent(s)}]:`,o=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],h=o[r%o.length];return Y.formatUtils.pretty(t,i,h)}var Jn={commands:[st,Er]},es=Jn;return Vn;})(); +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ +return plugin; +} +}; diff --git a/.yarnrc.yml b/.yarnrc.yml index dc3538cb..21234d70 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -13,5 +13,7 @@ plugins: spec: "@yarnpkg/plugin-typescript" - path: .yarn/plugins/@yarnpkg/plugin-version.cjs spec: "@yarnpkg/plugin-version" + - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs + spec: "@yarnpkg/plugin-workspace-tools" yarnPath: .yarn/releases/yarn-3.2.4.cjs diff --git a/e2e/blobs/acala-runtime-2101.txt b/blobs/acala-runtime-2101.txt similarity index 100% rename from e2e/blobs/acala-runtime-2101.txt rename to blobs/acala-runtime-2101.txt diff --git a/chopsticks.js b/chopsticks.js deleted file mode 100755 index 38ebf037..00000000 --- a/chopsticks.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('./dist/cli.js') diff --git a/e2e/.eslintignore b/e2e/.eslintignore new file mode 100644 index 00000000..5dffb2ed --- /dev/null +++ b/e2e/.eslintignore @@ -0,0 +1,2 @@ +vitest.config.ts +node_modules/ diff --git a/e2e/.gitignore b/e2e/.gitignore new file mode 100644 index 00000000..2a794d7b --- /dev/null +++ b/e2e/.gitignore @@ -0,0 +1 @@ +substrate-api-sidecar \ No newline at end of file diff --git a/e2e/package.json b/e2e/package.json new file mode 100644 index 00000000..aadc2570 --- /dev/null +++ b/e2e/package.json @@ -0,0 +1,38 @@ +{ + "name": "@acala-network/chopsticks-e2e", + "author": "Bryan Chen ", + "license": "Apache-2.0", + "scripts": { + "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", + "fix": "eslint . --ext .js,.ts --fix && prettier -w .", + "test": "vitest --silent", + "sidecar": "sh ./scripts/sidecar-chopsticks.sh" + }, + "engines": { + "node": ">=v14" + }, + "dependencies": { + "@acala-network/chopsticks": "workspace:*", + "@polkadot/api": "^9.12.1" + }, + "devDependencies": { + "@types/prettier": "^2", + "@typescript-eslint/eslint-plugin": "^5.50.0", + "@typescript-eslint/parser": "^5.50.0", + "eslint": "^8.32.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", + "prettier": "^2.8.4", + "vitest": "^0.28.3" + }, + "prettier": { + "tabWidth": 2, + "semi": false, + "singleQuote": true + }, + "lint-staged": { + "*.{js,ts}": "eslint --cache --fix", + "*.{js,ts,css,md}": "prettier --write" + } +} diff --git a/e2e/scripts/sidecar-chopsticks.sh b/e2e/scripts/sidecar-chopsticks.sh new file mode 100644 index 00000000..01fdff09 --- /dev/null +++ b/e2e/scripts/sidecar-chopsticks.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -xe + +rm -rf substrate-api-sidecar + +# clone sidecard +git clone https://github.com/paritytech/substrate-api-sidecar.git + +# run chopsticks node +yarn workspace @acala-network/chopsticks run start dev --endpoint wss://rpc.polkadot.io --port 8011 & POLKADOT_PID=$! +yarn workspace @acala-network/chopsticks run start dev --endpoint wss://statemint-rpc.polkadot.io --port 8012 & STATEMINT_PID=$! + +# run tests +(cd substrate-api-sidecar && \ +yarn && \ +yarn test:latest-e2e-tests --local ws://localhost:8011 --chain polkadot && \ +yarn test:latest-e2e-tests --local ws://localhost:8012 --chain statemint) + +# cleanup +rm -rf substrate-api-sidecar +kill $POLKADOT_PID +kill $STATEMINT_PID diff --git a/e2e/scripts/sidecard-chopsticks.sh b/e2e/scripts/sidecard-chopsticks.sh deleted file mode 100644 index 200c9050..00000000 --- a/e2e/scripts/sidecard-chopsticks.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -xe - -# clone sidecard -git clone https://github.com/paritytech/substrate-api-sidecar.git - -# start chopsticks node -yarn start dev --endpoint wss://rpc.polkadot.io --port 8000 & POLKADOT_PID=$! -yarn start dev --endpoint wss://statemint-rpc.polkadot.io --port 8001 & STATEMINT_PID=$! - -# run tests -(cd substrate-api-sidecar && \ -yarn && \ -yarn test:latest-e2e-tests --local ws://localhost:8000 --chain polkadot && \ -yarn test:latest-e2e-tests --local ws://localhost:8001 --chain statemint) - -#cleanup -rm -rf substrate-api-sidecar -kill $POLKADOT_PID -kill $STATEMINT_PID diff --git a/e2e/__snapshots__/author.test.ts.snap b/e2e/src/__snapshots__/author.test.ts.snap similarity index 100% rename from e2e/__snapshots__/author.test.ts.snap rename to e2e/src/__snapshots__/author.test.ts.snap diff --git a/e2e/__snapshots__/chain.test.ts.snap b/e2e/src/__snapshots__/chain.test.ts.snap similarity index 100% rename from e2e/__snapshots__/chain.test.ts.snap rename to e2e/src/__snapshots__/chain.test.ts.snap diff --git a/e2e/__snapshots__/decoder.test.ts.snap b/e2e/src/__snapshots__/decoder.test.ts.snap similarity index 100% rename from e2e/__snapshots__/decoder.test.ts.snap rename to e2e/src/__snapshots__/decoder.test.ts.snap diff --git a/e2e/__snapshots__/dev.test.ts.snap b/e2e/src/__snapshots__/dev.test.ts.snap similarity index 100% rename from e2e/__snapshots__/dev.test.ts.snap rename to e2e/src/__snapshots__/dev.test.ts.snap diff --git a/e2e/__snapshots__/dry-run-extrinsic.test.ts.snap b/e2e/src/__snapshots__/dry-run-extrinsic.test.ts.snap similarity index 100% rename from e2e/__snapshots__/dry-run-extrinsic.test.ts.snap rename to e2e/src/__snapshots__/dry-run-extrinsic.test.ts.snap diff --git a/e2e/__snapshots__/genesis-provider.test.ts.snap b/e2e/src/__snapshots__/genesis-provider.test.ts.snap similarity index 100% rename from e2e/__snapshots__/genesis-provider.test.ts.snap rename to e2e/src/__snapshots__/genesis-provider.test.ts.snap diff --git a/e2e/__snapshots__/state.test.ts.snap b/e2e/src/__snapshots__/state.test.ts.snap similarity index 100% rename from e2e/__snapshots__/state.test.ts.snap rename to e2e/src/__snapshots__/state.test.ts.snap diff --git a/e2e/__snapshots__/storage.test.ts.snap b/e2e/src/__snapshots__/storage.test.ts.snap similarity index 100% rename from e2e/__snapshots__/storage.test.ts.snap rename to e2e/src/__snapshots__/storage.test.ts.snap diff --git a/e2e/__snapshots__/upgrade.test.ts.snap b/e2e/src/__snapshots__/upgrade.test.ts.snap similarity index 100% rename from e2e/__snapshots__/upgrade.test.ts.snap rename to e2e/src/__snapshots__/upgrade.test.ts.snap diff --git a/e2e/__snapshots__/xcm.test.ts.snap b/e2e/src/__snapshots__/xcm.test.ts.snap similarity index 100% rename from e2e/__snapshots__/xcm.test.ts.snap rename to e2e/src/__snapshots__/xcm.test.ts.snap diff --git a/e2e/author.test.ts b/e2e/src/author.test.ts similarity index 100% rename from e2e/author.test.ts rename to e2e/src/author.test.ts diff --git a/e2e/block.test.ts b/e2e/src/block.test.ts similarity index 100% rename from e2e/block.test.ts rename to e2e/src/block.test.ts diff --git a/e2e/build-block.test.ts b/e2e/src/build-block.test.ts similarity index 100% rename from e2e/build-block.test.ts rename to e2e/src/build-block.test.ts diff --git a/e2e/chain.test.ts b/e2e/src/chain.test.ts similarity index 100% rename from e2e/chain.test.ts rename to e2e/src/chain.test.ts diff --git a/e2e/decoder.test.ts b/e2e/src/decoder.test.ts similarity index 95% rename from e2e/decoder.test.ts rename to e2e/src/decoder.test.ts index 670859cc..b49e0f82 100644 --- a/e2e/decoder.test.ts +++ b/e2e/src/decoder.test.ts @@ -1,5 +1,5 @@ import { chain, setupAll, setupApi } from './helper' -import { decodeKey, decodeKeyValue } from '../src/utils/decoder' +import { decodeKey, decodeKeyValue } from '@acala-network/chopsticks/src/utils/decoder' import { describe, expect, it } from 'vitest' setupApi({ diff --git a/e2e/dev.test.ts b/e2e/src/dev.test.ts similarity index 100% rename from e2e/dev.test.ts rename to e2e/src/dev.test.ts diff --git a/e2e/dry-run-extrinsic.test.ts b/e2e/src/dry-run-extrinsic.test.ts similarity index 100% rename from e2e/dry-run-extrinsic.test.ts rename to e2e/src/dry-run-extrinsic.test.ts diff --git a/e2e/genesis-provider.test.ts b/e2e/src/genesis-provider.test.ts similarity index 100% rename from e2e/genesis-provider.test.ts rename to e2e/src/genesis-provider.test.ts diff --git a/e2e/helper.ts b/e2e/src/helper.ts similarity index 90% rename from e2e/helper.ts rename to e2e/src/helper.ts index 1d4955f7..79be377d 100644 --- a/e2e/helper.ts +++ b/e2e/src/helper.ts @@ -4,10 +4,10 @@ import { HexString } from '@polkadot/util/types' import { Keyring } from '@polkadot/keyring' import { beforeAll, beforeEach, expect, vi } from 'vitest' -import { Api } from '../src/api' -import { Blockchain } from '../src/blockchain' -import { BuildBlockMode } from '../src/blockchain/txpool' -import { GenesisProvider } from '../src/genesis-provider' +import { Api } from '@acala-network/chopsticks/src/api' +import { Blockchain } from '@acala-network/chopsticks/src/blockchain' +import { BuildBlockMode } from '@acala-network/chopsticks/src/blockchain/txpool' +import { GenesisProvider } from '@acala-network/chopsticks/src/genesis-provider' import { InherentProviders, ParaInherentEnter, @@ -15,10 +15,10 @@ import { SetNimbusAuthorInherent, SetTimestamp, SetValidationData, -} from '../src/blockchain/inherent' -import { StorageValues } from '../src/utils/set-storage' -import { createServer } from '../src/server' -import { handler } from '../src/rpc' +} from '@acala-network/chopsticks/src/blockchain/inherent' +import { StorageValues } from '@acala-network/chopsticks/src/utils/set-storage' +import { createServer } from '@acala-network/chopsticks/src/server' +import { handler } from '@acala-network/chopsticks/src/rpc' export type SetupOption = { endpoint?: string diff --git a/e2e/import-storage/index.test.ts b/e2e/src/import-storage/index.test.ts similarity index 93% rename from e2e/import-storage/index.test.ts rename to e2e/src/import-storage/index.test.ts index 850456c0..dd54bc8b 100644 --- a/e2e/import-storage/index.test.ts +++ b/e2e/src/import-storage/index.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import path from 'path' import { api, chain, setupApi } from '../helper' -import { importStorage, overrideWasm } from '../../src/utils/import-storage' +import { importStorage, overrideWasm } from '@acala-network/chopsticks/src/utils/import-storage' setupApi({ endpoint: 'wss://acala-rpc-1.aca-api.network', @@ -36,7 +36,7 @@ describe('import-storage', () => { it('wasm override works', async () => { expect(await chain.head.runtimeVersion).toContain({ specVersion: 2096 }) const oldWasm = await chain.head.wasm - await overrideWasm(chain, path.join(__dirname, '../blobs/acala-runtime-2101.txt')) + await overrideWasm(chain, path.join(__dirname, '../../../blobs/acala-runtime-2101.txt')) expect(await chain.head.wasm).not.eq(oldWasm) expect(await chain.head.runtimeVersion).toContain({ specVersion: 2101 }) const blockNumber = chain.head.number diff --git a/e2e/import-storage/storage.error.pallet.yml b/e2e/src/import-storage/storage.error.pallet.yml similarity index 100% rename from e2e/import-storage/storage.error.pallet.yml rename to e2e/src/import-storage/storage.error.pallet.yml diff --git a/e2e/import-storage/storage.error.storage.yml b/e2e/src/import-storage/storage.error.storage.yml similarity index 100% rename from e2e/import-storage/storage.error.storage.yml rename to e2e/src/import-storage/storage.error.storage.yml diff --git a/e2e/import-storage/storage.ok.yml b/e2e/src/import-storage/storage.ok.yml similarity index 91% rename from e2e/import-storage/storage.ok.yml rename to e2e/src/import-storage/storage.ok.yml index d670a4f8..71e81d87 100644 --- a/e2e/import-storage/storage.ok.yml +++ b/e2e/src/import-storage/storage.ok.yml @@ -12,8 +12,7 @@ Tokens: - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY - Token: ACA # value - - free: - 1000000000000000 + - free: 1000000000000000 - # 2nd record # keys - [5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY, Token: AUSD] diff --git a/e2e/metadata.test.ts b/e2e/src/metadata.test.ts similarity index 100% rename from e2e/metadata.test.ts rename to e2e/src/metadata.test.ts diff --git a/e2e/mock-signature.test.ts b/e2e/src/mock-signature.test.ts similarity index 100% rename from e2e/mock-signature.test.ts rename to e2e/src/mock-signature.test.ts diff --git a/e2e/relaychain.test.ts b/e2e/src/relaychain.test.ts similarity index 100% rename from e2e/relaychain.test.ts rename to e2e/src/relaychain.test.ts diff --git a/e2e/state.test.ts b/e2e/src/state.test.ts similarity index 100% rename from e2e/state.test.ts rename to e2e/src/state.test.ts diff --git a/e2e/storage.test.ts b/e2e/src/storage.test.ts similarity index 100% rename from e2e/storage.test.ts rename to e2e/src/storage.test.ts diff --git a/e2e/system.test.ts b/e2e/src/system.test.ts similarity index 100% rename from e2e/system.test.ts rename to e2e/src/system.test.ts diff --git a/e2e/time-travel.test.ts b/e2e/src/time-travel.test.ts similarity index 95% rename from e2e/time-travel.test.ts rename to e2e/src/time-travel.test.ts index df930c00..404dcc2d 100644 --- a/e2e/time-travel.test.ts +++ b/e2e/src/time-travel.test.ts @@ -1,7 +1,7 @@ import { HexString } from '@polkadot/util/types' import { chain, setupApi, ws } from './helper' import { describe, expect, it } from 'vitest' -import { getCurrentTimestamp, getSlotDuration, timeTravel } from '../src/utils/time-travel' +import { getCurrentTimestamp, getSlotDuration, timeTravel } from '@acala-network/chopsticks/src/utils/time-travel' describe.each([ { diff --git a/e2e/upgrade.test.ts b/e2e/src/upgrade.test.ts similarity index 93% rename from e2e/upgrade.test.ts rename to e2e/src/upgrade.test.ts index 92117ba8..ecb513dd 100644 --- a/e2e/upgrade.test.ts +++ b/e2e/src/upgrade.test.ts @@ -22,7 +22,7 @@ describe('upgrade', () => { }, }) - const runtime = String(readFileSync(path.join(__dirname, './blobs/acala-runtime-2101.txt'))).trim() + const runtime = String(readFileSync(path.join(__dirname, '../../blobs/acala-runtime-2101.txt'))).trim() expect(await chain.head.runtimeVersion).toContain({ specVersion: 2096 }) await api.tx.sudo.sudo(api.tx.parachainSystem.authorizeUpgrade(blake2AsHex(runtime))).signAndSend(alice) diff --git a/e2e/xcm.test.ts b/e2e/src/xcm.test.ts similarity index 93% rename from e2e/xcm.test.ts rename to e2e/src/xcm.test.ts index 1731bc8a..322aaa82 100644 --- a/e2e/xcm.test.ts +++ b/e2e/src/xcm.test.ts @@ -1,10 +1,10 @@ import { afterAll, describe, it } from 'vitest' -import { DownwardMessage, HorizontalMessage } from '../src/blockchain/txpool' -import { connectDownward } from '../src/xcm/downward' -import { connectUpward } from '../src/xcm/upward' +import { DownwardMessage, HorizontalMessage } from '@acala-network/chopsticks/src/blockchain/txpool' +import { connectDownward } from '@acala-network/chopsticks/src/xcm/downward' +import { connectUpward } from '@acala-network/chopsticks/src/xcm/upward' import { matchSnapshot, setupAll, testingPairs } from './helper' -import { setStorage } from '../src/utils/set-storage' +import { setStorage } from '@acala-network/chopsticks/src/utils/set-storage' const downwardMessages: DownwardMessage[] = [ { diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json new file mode 100644 index 00000000..43f66c79 --- /dev/null +++ b/e2e/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../tsconfig.base.json" +} diff --git a/vitest.config.ts b/e2e/vitest.config.ts similarity index 100% rename from vitest.config.ts rename to e2e/vitest.config.ts diff --git a/package.json b/package.json index 74bc4f27..e341994c 100644 --- a/package.json +++ b/package.json @@ -1,81 +1,28 @@ { - "name": "@acala-network/chopsticks", - "version": "0.3.12", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", "author": "Bryan Chen ", "license": "Apache-2.0", "packageManager": "yarn@3.2.4", "workspaces": [ - ".", - "executor/pkg" + "packages/*", + "executor/pkg", + "e2e" ], - "bin": "./chopsticks.js", "scripts": { - "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", - "fix": "eslint . --ext .js,.ts --fix && prettier -w .", + "lint": "yarn workspaces foreach run lint", + "fix": "yarn workspaces foreach run fix", "prepare": "husky install", - "start": "ts-node --transpile-only src/cli.ts", - "build": "rm -rf dist && tsc -p tsconfig.prod.json", + "build": "yarn workspaces foreach run build", "build-wasm": "wasm-pack build executor --target nodejs --scope acala-network", "build-wasm-logging": "yarn build-wasm --features=logging", "check": "cd executor && cargo check --locked", - "test": "vitest --silent", - "test:dev": "LOG_LEVEL=trace vitest --inspect", - "dev": "LOG_LEVEL=trace ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/dev.yml", - "dev:karura": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/karura.yml", - "dev:acala": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/acala.yml", - "dev:moonriver": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/moonriver.yml", - "dev:moonbeam": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=configs/moonbeam.yml" + "test": "yarn workspaces foreach run test", + "start": "yarn workspace @acala-network/chopsticks run start", + "dev": "yarn workspace @acala-network/chopsticks run dev", + "dev:karura": "yarn workspace @acala-network/chopsticks run dev:karura", + "dev:acala": "yarn workspace @acala-network/chopsticks run dev:acala", + "dev:moonriver": "yarn workspace @acala-network/chopsticks run dev:moonriver", + "dev:moonbeam": "yarn workspace @acala-network/chopsticks run dev:moonbeam" }, - "dependencies": { - "@acala-network/chopsticks-executor": "workspace:*", - "@polkadot/api": "^9.12.1", - "@polkadot/rpc-provider": "^9.12.1", - "@polkadot/types": "^9.12.1", - "@polkadot/types-codec": "^9.12.1", - "@polkadot/types-known": "^9.12.1", - "@polkadot/util": "^10.2.6", - "@polkadot/util-crypto": "^10.2.6", - "axios": "^1.2.5", - "js-yaml": "^4.1.0", - "jsondiffpatch": "^0.4.1", - "lodash": "^4.17.21", - "pino": "^8.8.0", - "pino-pretty": "^9.1.1", - "reflect-metadata": "^0.1.13", - "sqlite3": "^5.1.4", - "typeorm": "^0.3.11", - "typescript": "^4.9.4", - "ws": "^8.12.0", - "yargs": "^17.6.2", - "zod": "^3.20.2" - }, - "devDependencies": { - "@types/js-yaml": "^4.0.5", - "@types/lodash": "^4.14.191", - "@types/node": "^18.11.18", - "@types/ws": "^8.5.4", - "@types/yargs": "^17.0.20", - "@typescript-eslint/eslint-plugin": "^5.50.0", - "@typescript-eslint/parser": "^5.50.0", - "eslint": "^8.32.0", - "eslint-config-prettier": "^8.6.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", - "husky": "^8.0.3", - "lint-staged": "^13.1.0", - "prettier": "^2.8.3", - "ts-node": "^10.9.1", - "ts-node-dev": "^2.0.0", - "vitest": "^0.28.3", - "wasm-pack": "^0.10.3" - }, - "files": [ - "dist", - "bin", - "template" - ], "engines": { "node": ">=v14" }, @@ -87,5 +34,9 @@ "lint-staged": { "*.{js,ts}": "eslint --cache --fix", "*.{js,ts,css,md}": "prettier --write" + }, + "devDependencies": { + "husky": "^8.0.3", + "wasm-pack": "^0.10.3" } } diff --git a/.eslintignore b/packages/chopsticks/.eslintignore similarity index 59% rename from .eslintignore rename to packages/chopsticks/.eslintignore index 330d6946..5733ce02 100644 --- a/.eslintignore +++ b/packages/chopsticks/.eslintignore @@ -1,8 +1,5 @@ vitest.config.ts -.eslintrc.js node_modules/ -executor/ -vendor/ -dist/ +lib/ preview/ chopsticks.js diff --git a/packages/chopsticks/.prettierignore b/packages/chopsticks/.prettierignore new file mode 100644 index 00000000..662723fa --- /dev/null +++ b/packages/chopsticks/.prettierignore @@ -0,0 +1,2 @@ +lib/ +preview/ diff --git a/packages/chopsticks/chopsticks.js b/packages/chopsticks/chopsticks.js new file mode 100755 index 00000000..19bbfa61 --- /dev/null +++ b/packages/chopsticks/chopsticks.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./lib/cli.js') diff --git a/packages/chopsticks/package.json b/packages/chopsticks/package.json new file mode 100644 index 00000000..18ced27d --- /dev/null +++ b/packages/chopsticks/package.json @@ -0,0 +1,68 @@ +{ + "name": "@acala-network/chopsticks", + "version": "0.3.12", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "author": "Bryan Chen ", + "license": "Apache-2.0", + "bin": "./chopsticks.js", + "scripts": { + "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", + "fix": "eslint . --ext .js,.ts --fix && prettier -w .", + "build": "rm -rf lib && tsc -p ./tsconfig.json", + "test": "vitest --silent", + "test:dev": "LOG_LEVEL=trace vitest --inspect", + "start": "ts-node --transpile-only src/cli.ts", + "dev": "LOG_LEVEL=trace ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/dev.yml", + "dev:karura": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/karura.yml", + "dev:acala": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/acala.yml", + "dev:moonriver": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/moonriver.yml", + "dev:moonbeam": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/moonbeam.yml" + }, + "dependencies": { + "@acala-network/chopsticks-executor": "workspace:*", + "@polkadot/api": "^9.12.1", + "@polkadot/rpc-provider": "^9.12.1", + "@polkadot/types": "^9.12.1", + "@polkadot/types-codec": "^9.12.1", + "@polkadot/types-known": "^9.12.1", + "@polkadot/util": "^10.2.6", + "@polkadot/util-crypto": "^10.2.6", + "axios": "^1.2.5", + "js-yaml": "^4.1.0", + "jsondiffpatch": "^0.4.1", + "lodash": "^4.17.21", + "pino": "^8.8.0", + "pino-pretty": "^9.1.1", + "reflect-metadata": "^0.1.13", + "sqlite3": "^5.1.4", + "typeorm": "^0.3.11", + "ws": "^8.12.0", + "yargs": "^17.6.2", + "zod": "^3.20.2" + }, + "devDependencies": { + "@types/js-yaml": "^4.0.5", + "@types/lodash": "^4.14.191", + "@types/node": "^18.11.18", + "@types/prettier": "^2", + "@types/ws": "^8.5.4", + "@types/yargs": "^17.0.20", + "@typescript-eslint/eslint-plugin": "^5.50.0", + "@typescript-eslint/parser": "^5.50.0", + "eslint": "^8.32.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", + "prettier": "^2.8.4", + "ts-node": "^10.9.1", + "ts-node-dev": "^2.0.0", + "typescript": "^4.9.4", + "vitest": "^0.28.3" + }, + "files": [ + "lib", + "template", + "chopsticks.js" + ] +} diff --git a/src/__snapshots__/executor.test.ts.snap b/packages/chopsticks/src/__snapshots__/executor.test.ts.snap similarity index 100% rename from src/__snapshots__/executor.test.ts.snap rename to packages/chopsticks/src/__snapshots__/executor.test.ts.snap diff --git a/src/api.ts b/packages/chopsticks/src/api.ts similarity index 100% rename from src/api.ts rename to packages/chopsticks/src/api.ts diff --git a/src/blockchain/block-builder.ts b/packages/chopsticks/src/blockchain/block-builder.ts similarity index 100% rename from src/blockchain/block-builder.ts rename to packages/chopsticks/src/blockchain/block-builder.ts diff --git a/src/blockchain/block.ts b/packages/chopsticks/src/blockchain/block.ts similarity index 100% rename from src/blockchain/block.ts rename to packages/chopsticks/src/blockchain/block.ts diff --git a/src/blockchain/head-state.ts b/packages/chopsticks/src/blockchain/head-state.ts similarity index 100% rename from src/blockchain/head-state.ts rename to packages/chopsticks/src/blockchain/head-state.ts diff --git a/src/blockchain/index.ts b/packages/chopsticks/src/blockchain/index.ts similarity index 100% rename from src/blockchain/index.ts rename to packages/chopsticks/src/blockchain/index.ts diff --git a/src/blockchain/inherent/index.ts b/packages/chopsticks/src/blockchain/inherent/index.ts similarity index 100% rename from src/blockchain/inherent/index.ts rename to packages/chopsticks/src/blockchain/inherent/index.ts diff --git a/src/blockchain/inherent/para-enter.ts b/packages/chopsticks/src/blockchain/inherent/para-enter.ts similarity index 100% rename from src/blockchain/inherent/para-enter.ts rename to packages/chopsticks/src/blockchain/inherent/para-enter.ts diff --git a/src/blockchain/inherent/parachain/babe-randomness.ts b/packages/chopsticks/src/blockchain/inherent/parachain/babe-randomness.ts similarity index 92% rename from src/blockchain/inherent/parachain/babe-randomness.ts rename to packages/chopsticks/src/blockchain/inherent/parachain/babe-randomness.ts index da7dff9d..27704ec2 100644 --- a/src/blockchain/inherent/parachain/babe-randomness.ts +++ b/packages/chopsticks/src/blockchain/inherent/parachain/babe-randomness.ts @@ -1,7 +1,7 @@ import { GenericExtrinsic } from '@polkadot/types' import { HexString } from '@polkadot/util/types' -import { Block } from '../../../blockchain/block' +import { Block } from '../../block' import { BuildBlockParams } from '../../txpool' import { CreateInherents } from '..' diff --git a/src/blockchain/inherent/parachain/nimbus-author-inherent.ts b/packages/chopsticks/src/blockchain/inherent/parachain/nimbus-author-inherent.ts similarity index 92% rename from src/blockchain/inherent/parachain/nimbus-author-inherent.ts rename to packages/chopsticks/src/blockchain/inherent/parachain/nimbus-author-inherent.ts index 77f7f888..edc06acc 100644 --- a/src/blockchain/inherent/parachain/nimbus-author-inherent.ts +++ b/packages/chopsticks/src/blockchain/inherent/parachain/nimbus-author-inherent.ts @@ -1,7 +1,7 @@ import { GenericExtrinsic } from '@polkadot/types' import { HexString } from '@polkadot/util/types' -import { Block } from '../../../blockchain/block' +import { Block } from '../../block' import { BuildBlockParams } from '../../txpool' import { CreateInherents } from '..' diff --git a/src/blockchain/inherent/parachain/validation-data.ts b/packages/chopsticks/src/blockchain/inherent/parachain/validation-data.ts similarity index 99% rename from src/blockchain/inherent/parachain/validation-data.ts rename to packages/chopsticks/src/blockchain/inherent/parachain/validation-data.ts index c3fc1be7..21d96627 100644 --- a/src/blockchain/inherent/parachain/validation-data.ts +++ b/packages/chopsticks/src/blockchain/inherent/parachain/validation-data.ts @@ -3,7 +3,7 @@ import { GenericExtrinsic } from '@polkadot/types' import { HexString } from '@polkadot/util/types' import { hexToU8a, u8aConcat } from '@polkadot/util' -import { Block } from '../../../blockchain/block' +import { Block } from '../../block' import { BuildBlockParams } from '../../txpool' import { CreateInherents } from '..' import { blake2AsHex, blake2AsU8a } from '@polkadot/util-crypto' diff --git a/src/blockchain/storage-layer.ts b/packages/chopsticks/src/blockchain/storage-layer.ts similarity index 100% rename from src/blockchain/storage-layer.ts rename to packages/chopsticks/src/blockchain/storage-layer.ts diff --git a/src/blockchain/txpool.ts b/packages/chopsticks/src/blockchain/txpool.ts similarity index 100% rename from src/blockchain/txpool.ts rename to packages/chopsticks/src/blockchain/txpool.ts diff --git a/src/cli.ts b/packages/chopsticks/src/cli.ts similarity index 100% rename from src/cli.ts rename to packages/chopsticks/src/cli.ts diff --git a/src/db/entities.ts b/packages/chopsticks/src/db/entities.ts similarity index 100% rename from src/db/entities.ts rename to packages/chopsticks/src/db/entities.ts diff --git a/src/db/index.ts b/packages/chopsticks/src/db/index.ts similarity index 100% rename from src/db/index.ts rename to packages/chopsticks/src/db/index.ts diff --git a/src/dry-run-preimage.ts b/packages/chopsticks/src/dry-run-preimage.ts similarity index 100% rename from src/dry-run-preimage.ts rename to packages/chopsticks/src/dry-run-preimage.ts diff --git a/src/dry-run.ts b/packages/chopsticks/src/dry-run.ts similarity index 100% rename from src/dry-run.ts rename to packages/chopsticks/src/dry-run.ts diff --git a/src/executor.test.ts b/packages/chopsticks/src/executor.test.ts similarity index 99% rename from src/executor.test.ts rename to packages/chopsticks/src/executor.test.ts index 850ab1d4..ae3e1a74 100644 --- a/src/executor.test.ts +++ b/packages/chopsticks/src/executor.test.ts @@ -14,7 +14,7 @@ import { import { calculateStateRoot, createProof, decodeProof, getAuraSlotDuration, getRuntimeVersion } from './executor' const getCode = () => { - const code = String(readFileSync(path.join(__dirname, '../e2e/blobs/acala-runtime-2101.txt'))).trim() + const code = String(readFileSync(path.join(__dirname, '../../../blobs/acala-runtime-2101.txt'))).trim() expect(code.length).toBeGreaterThan(2) return code as HexString } diff --git a/src/executor.ts b/packages/chopsticks/src/executor.ts similarity index 100% rename from src/executor.ts rename to packages/chopsticks/src/executor.ts diff --git a/src/genesis-provider.ts b/packages/chopsticks/src/genesis-provider.ts similarity index 100% rename from src/genesis-provider.ts rename to packages/chopsticks/src/genesis-provider.ts diff --git a/src/index.ts b/packages/chopsticks/src/index.ts similarity index 100% rename from src/index.ts rename to packages/chopsticks/src/index.ts diff --git a/src/logger.ts b/packages/chopsticks/src/logger.ts similarity index 100% rename from src/logger.ts rename to packages/chopsticks/src/logger.ts diff --git a/src/rpc/dev.ts b/packages/chopsticks/src/rpc/dev.ts similarity index 100% rename from src/rpc/dev.ts rename to packages/chopsticks/src/rpc/dev.ts diff --git a/src/rpc/index.ts b/packages/chopsticks/src/rpc/index.ts similarity index 100% rename from src/rpc/index.ts rename to packages/chopsticks/src/rpc/index.ts diff --git a/src/rpc/shared.ts b/packages/chopsticks/src/rpc/shared.ts similarity index 100% rename from src/rpc/shared.ts rename to packages/chopsticks/src/rpc/shared.ts diff --git a/src/rpc/substrate/author.ts b/packages/chopsticks/src/rpc/substrate/author.ts similarity index 97% rename from src/rpc/substrate/author.ts rename to packages/chopsticks/src/rpc/substrate/author.ts index c72b95c4..926ee771 100644 --- a/src/rpc/substrate/author.ts +++ b/packages/chopsticks/src/rpc/substrate/author.ts @@ -1,6 +1,6 @@ import { APPLY_EXTRINSIC_ERROR } from '../../blockchain/txpool' import { Block } from '../../blockchain/block' -import { Handlers, ResponseError } from '../../rpc/shared' +import { Handlers, ResponseError } from '../shared' import { TransactionValidityError } from '@polkadot/types/interfaces' import { defaultLogger } from '../../logger' diff --git a/src/rpc/substrate/chain.ts b/packages/chopsticks/src/rpc/substrate/chain.ts similarity index 100% rename from src/rpc/substrate/chain.ts rename to packages/chopsticks/src/rpc/substrate/chain.ts diff --git a/src/rpc/substrate/index.ts b/packages/chopsticks/src/rpc/substrate/index.ts similarity index 100% rename from src/rpc/substrate/index.ts rename to packages/chopsticks/src/rpc/substrate/index.ts diff --git a/src/rpc/substrate/payment.ts b/packages/chopsticks/src/rpc/substrate/payment.ts similarity index 100% rename from src/rpc/substrate/payment.ts rename to packages/chopsticks/src/rpc/substrate/payment.ts diff --git a/src/rpc/substrate/state.ts b/packages/chopsticks/src/rpc/substrate/state.ts similarity index 100% rename from src/rpc/substrate/state.ts rename to packages/chopsticks/src/rpc/substrate/state.ts diff --git a/src/rpc/substrate/system.ts b/packages/chopsticks/src/rpc/substrate/system.ts similarity index 100% rename from src/rpc/substrate/system.ts rename to packages/chopsticks/src/rpc/substrate/system.ts diff --git a/src/run-block.ts b/packages/chopsticks/src/run-block.ts similarity index 100% rename from src/run-block.ts rename to packages/chopsticks/src/run-block.ts diff --git a/src/schema/index.ts b/packages/chopsticks/src/schema/index.ts similarity index 100% rename from src/schema/index.ts rename to packages/chopsticks/src/schema/index.ts diff --git a/src/server.ts b/packages/chopsticks/src/server.ts similarity index 100% rename from src/server.ts rename to packages/chopsticks/src/server.ts diff --git a/src/setup-with-server.ts b/packages/chopsticks/src/setup-with-server.ts similarity index 100% rename from src/setup-with-server.ts rename to packages/chopsticks/src/setup-with-server.ts diff --git a/src/setup.ts b/packages/chopsticks/src/setup.ts similarity index 100% rename from src/setup.ts rename to packages/chopsticks/src/setup.ts diff --git a/src/utils/decoder.ts b/packages/chopsticks/src/utils/decoder.ts similarity index 100% rename from src/utils/decoder.ts rename to packages/chopsticks/src/utils/decoder.ts diff --git a/src/utils/generate-html-diff.ts b/packages/chopsticks/src/utils/generate-html-diff.ts similarity index 100% rename from src/utils/generate-html-diff.ts rename to packages/chopsticks/src/utils/generate-html-diff.ts diff --git a/src/utils/import-storage.ts b/packages/chopsticks/src/utils/import-storage.ts similarity index 100% rename from src/utils/import-storage.ts rename to packages/chopsticks/src/utils/import-storage.ts diff --git a/src/utils/index.ts b/packages/chopsticks/src/utils/index.ts similarity index 100% rename from src/utils/index.ts rename to packages/chopsticks/src/utils/index.ts diff --git a/src/utils/open-html.ts b/packages/chopsticks/src/utils/open-html.ts similarity index 100% rename from src/utils/open-html.ts rename to packages/chopsticks/src/utils/open-html.ts diff --git a/src/utils/proof.ts b/packages/chopsticks/src/utils/proof.ts similarity index 100% rename from src/utils/proof.ts rename to packages/chopsticks/src/utils/proof.ts diff --git a/src/utils/set-storage.ts b/packages/chopsticks/src/utils/set-storage.ts similarity index 100% rename from src/utils/set-storage.ts rename to packages/chopsticks/src/utils/set-storage.ts diff --git a/src/utils/time-travel.ts b/packages/chopsticks/src/utils/time-travel.ts similarity index 100% rename from src/utils/time-travel.ts rename to packages/chopsticks/src/utils/time-travel.ts diff --git a/src/xcm/downward.ts b/packages/chopsticks/src/xcm/downward.ts similarity index 100% rename from src/xcm/downward.ts rename to packages/chopsticks/src/xcm/downward.ts diff --git a/src/xcm/horizontal.ts b/packages/chopsticks/src/xcm/horizontal.ts similarity index 100% rename from src/xcm/horizontal.ts rename to packages/chopsticks/src/xcm/horizontal.ts diff --git a/src/xcm/index.ts b/packages/chopsticks/src/xcm/index.ts similarity index 100% rename from src/xcm/index.ts rename to packages/chopsticks/src/xcm/index.ts diff --git a/src/xcm/upward.ts b/packages/chopsticks/src/xcm/upward.ts similarity index 100% rename from src/xcm/upward.ts rename to packages/chopsticks/src/xcm/upward.ts diff --git a/template/diff.html b/packages/chopsticks/template/diff.html similarity index 100% rename from template/diff.html rename to packages/chopsticks/template/diff.html diff --git a/packages/chopsticks/tsconfig.json b/packages/chopsticks/tsconfig.json new file mode 100644 index 00000000..c86da46b --- /dev/null +++ b/packages/chopsticks/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib", + "rootDir": "./src" + }, + "exclude": ["node_modules", "src/**/*.test.ts", "vitest.config.ts"] +} diff --git a/packages/chopsticks/vitest.config.ts b/packages/chopsticks/vitest.config.ts new file mode 100644 index 00000000..cde75c09 --- /dev/null +++ b/packages/chopsticks/vitest.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + hookTimeout: 30000, + testTimeout: 120000, + }, +}) diff --git a/packages/core/.eslintignore b/packages/core/.eslintignore new file mode 100644 index 00000000..015ef599 --- /dev/null +++ b/packages/core/.eslintignore @@ -0,0 +1,3 @@ +vitest.config.ts +node_modules/ +lib/ diff --git a/packages/core/.prettierignore b/packages/core/.prettierignore new file mode 100644 index 00000000..c3af8579 --- /dev/null +++ b/packages/core/.prettierignore @@ -0,0 +1 @@ +lib/ diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 00000000..4043d715 --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,29 @@ +{ + "name": "@acala-network/chopsticks-core", + "version": "0.3.12", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "author": "Bryan Chen ", + "license": "Apache-2.0", + "scripts": { + "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", + "fix": "eslint . --ext .js,.ts --fix && prettier -w .", + "build": "rm -rf lib && tsc -p ./tsconfig.json", + "test": "vitest --silent", + "test:dev": "LOG_LEVEL=trace vitest --inspect" + }, + "devDependencies": { + "@types/prettier": "^2", + "@typescript-eslint/eslint-plugin": "^5.50.0", + "@typescript-eslint/parser": "^5.50.0", + "eslint": "^8.32.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", + "prettier": "^2.8.4", + "vitest": "^0.28.3" + }, + "files": [ + "lib" + ] +} diff --git a/packages/core/src/index.test.ts b/packages/core/src/index.test.ts new file mode 100644 index 00000000..72245a25 --- /dev/null +++ b/packages/core/src/index.test.ts @@ -0,0 +1,8 @@ +import { describe, expect, it } from 'vitest' +import core from './index' + +describe('@acala-network/chopsticks-core', () => { + it('@acala-network/chopsticks-core', () => { + expect(core).toBe('@acala-network/chopsticks-core') + }) +}) diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 00000000..28aae1cc --- /dev/null +++ b/packages/core/src/index.ts @@ -0,0 +1 @@ +export default '@acala-network/chopsticks-core' diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 00000000..c86da46b --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib", + "rootDir": "./src" + }, + "exclude": ["node_modules", "src/**/*.test.ts", "vitest.config.ts"] +} diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts new file mode 100644 index 00000000..cde75c09 --- /dev/null +++ b/packages/core/vitest.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + hookTimeout: 30000, + testTimeout: 120000, + }, +}) diff --git a/tsconfig.json b/tsconfig.base.json similarity index 71% rename from tsconfig.json rename to tsconfig.base.json index e4f103d7..d2389406 100644 --- a/tsconfig.json +++ b/tsconfig.base.json @@ -2,13 +2,14 @@ "compilerOptions": { "allowSyntheticDefaultImports": true, "esModuleInterop": true, - "lib": ["esnext"], + "lib": [ + "esnext" + ], "module": "CommonJS", "moduleResolution": "node", "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitAny": false, - "outDir": "dist", "target": "esnext", "skipLibCheck": true, "strict": true, @@ -16,7 +17,10 @@ "experimentalDecorators": true, "declaration": true, "resolveJsonModule": true, - "types": ["node", "@polkadot/types-known", "@polkadot/types-codec"] - }, - "exclude": ["node_modules", "vendor", "executor"] + "types": [ + "node", + "@polkadot/types-known", + "@polkadot/types-codec" + ] + } } diff --git a/tsconfig.prod.json b/tsconfig.prod.json deleted file mode 100644 index a74317bb..00000000 --- a/tsconfig.prod.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["node_modules", "vendor", "executor", "e2e", "vitest.config.ts"] -} diff --git a/yarn.lock b/yarn.lock index 45021080..bbf78e3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,15 +5,49 @@ __metadata: version: 6 cacheKey: 8 +"@acala-network/chopsticks-core@workspace:packages/core": + version: 0.0.0-use.local + resolution: "@acala-network/chopsticks-core@workspace:packages/core" + dependencies: + "@types/prettier": ^2 + "@typescript-eslint/eslint-plugin": ^5.50.0 + "@typescript-eslint/parser": ^5.50.0 + eslint: ^8.32.0 + eslint-config-prettier: ^8.6.0 + eslint-plugin-import: ^2.27.5 + eslint-plugin-sort-imports-es6-autofix: ^0.6.0 + prettier: ^2.8.4 + vitest: ^0.28.3 + languageName: unknown + linkType: soft + +"@acala-network/chopsticks-e2e@workspace:e2e": + version: 0.0.0-use.local + resolution: "@acala-network/chopsticks-e2e@workspace:e2e" + dependencies: + "@acala-network/chopsticks": "workspace:*" + "@polkadot/api": ^9.12.1 + "@types/prettier": ^2 + "@typescript-eslint/eslint-plugin": ^5.50.0 + "@typescript-eslint/parser": ^5.50.0 + eslint: ^8.32.0 + eslint-config-prettier: ^8.6.0 + eslint-plugin-import: ^2.27.5 + eslint-plugin-sort-imports-es6-autofix: ^0.6.0 + prettier: ^2.8.4 + vitest: ^0.28.3 + languageName: unknown + linkType: soft + "@acala-network/chopsticks-executor@workspace:*, @acala-network/chopsticks-executor@workspace:executor/pkg": version: 0.0.0-use.local resolution: "@acala-network/chopsticks-executor@workspace:executor/pkg" languageName: unknown linkType: soft -"@acala-network/chopsticks@workspace:.": +"@acala-network/chopsticks@workspace:*, @acala-network/chopsticks@workspace:packages/chopsticks": version: 0.0.0-use.local - resolution: "@acala-network/chopsticks@workspace:." + resolution: "@acala-network/chopsticks@workspace:packages/chopsticks" dependencies: "@acala-network/chopsticks-executor": "workspace:*" "@polkadot/api": ^9.12.1 @@ -26,6 +60,7 @@ __metadata: "@types/js-yaml": ^4.0.5 "@types/lodash": ^4.14.191 "@types/node": ^18.11.18 + "@types/prettier": ^2 "@types/ws": ^8.5.4 "@types/yargs": ^17.0.20 "@typescript-eslint/eslint-plugin": ^5.50.0 @@ -35,14 +70,12 @@ __metadata: eslint-config-prettier: ^8.6.0 eslint-plugin-import: ^2.27.5 eslint-plugin-sort-imports-es6-autofix: ^0.6.0 - husky: ^8.0.3 js-yaml: ^4.1.0 jsondiffpatch: ^0.4.1 - lint-staged: ^13.1.0 lodash: ^4.17.21 pino: ^8.8.0 pino-pretty: ^9.1.1 - prettier: ^2.8.3 + prettier: ^2.8.4 reflect-metadata: ^0.1.13 sqlite3: ^5.1.4 ts-node: ^10.9.1 @@ -50,7 +83,6 @@ __metadata: typeorm: ^0.3.11 typescript: ^4.9.4 vitest: ^0.28.3 - wasm-pack: ^0.10.3 ws: ^8.12.0 yargs: ^17.6.2 zod: ^3.20.2 @@ -982,6 +1014,13 @@ __metadata: languageName: node linkType: hard +"@types/prettier@npm:^2": + version: 2.7.2 + resolution: "@types/prettier@npm:2.7.2" + checksum: b47d76a5252265f8d25dd2fe2a5a61dc43ba0e6a96ffdd00c594cb4fd74c1982c2e346497e3472805d97915407a09423804cc2110a0b8e1b22cffcab246479b7 + languageName: node + linkType: hard + "@types/semver@npm:^7.3.12": version: 7.3.12 resolution: "@types/semver@npm:7.3.12" @@ -1158,47 +1197,47 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:0.28.3": - version: 0.28.3 - resolution: "@vitest/expect@npm:0.28.3" +"@vitest/expect@npm:0.28.5": + version: 0.28.5 + resolution: "@vitest/expect@npm:0.28.5" dependencies: - "@vitest/spy": 0.28.3 - "@vitest/utils": 0.28.3 + "@vitest/spy": 0.28.5 + "@vitest/utils": 0.28.5 chai: ^4.3.7 - checksum: 8c16543818c4482721185ff307d0ee541167a75f35fe34cdc9bfdf6e394374f1b37cf5624f9c3b6478ecdaa72970545953fb8a3bf1b59c32dcbbc52b6b7e09c8 + checksum: d51325957ce21937d41f6c8665f00c5d447892383c65eac68313bd89b540621d4da8a08b3f478d9e0512760ed66e7cdbadea7e46b0fb83252ad7deff1f9206d7 languageName: node linkType: hard -"@vitest/runner@npm:0.28.3": - version: 0.28.3 - resolution: "@vitest/runner@npm:0.28.3" +"@vitest/runner@npm:0.28.5": + version: 0.28.5 + resolution: "@vitest/runner@npm:0.28.5" dependencies: - "@vitest/utils": 0.28.3 + "@vitest/utils": 0.28.5 p-limit: ^4.0.0 pathe: ^1.1.0 - checksum: 45ab3cf2621182160575e8e9af50170251118afbaee10f9f72d60db9a279a01da46a8d72a8628a905995ab65abe3b974baeacadc792c137ac3be25e5e9f6c72d + checksum: 1b7bb6fa8df40181582a52a332230154f65d049dc154b342642e0c2f2323ae74b301a7ec20a3c2963cf20925a3d63d9dff05f57183bc0e5d705331795316a1dd languageName: node linkType: hard -"@vitest/spy@npm:0.28.3": - version: 0.28.3 - resolution: "@vitest/spy@npm:0.28.3" +"@vitest/spy@npm:0.28.5": + version: 0.28.5 + resolution: "@vitest/spy@npm:0.28.5" dependencies: tinyspy: ^1.0.2 - checksum: 34d960d9867b027507d51acaf471c4e6640fdd59ec7b23c3190e7a2f842437bccc3f88f395edf302f96906d41de1d5801e7a1739a5e3778d34d8d064c77ad3a9 + checksum: 169621f420bec4ea7e14c54b3626811a6de70c13b5882e808ef3c4cda56cca8ce9ad611ca0d7cc200ef81c19965a27236af6f1067a5464c8ccfd3d4eee41074e languageName: node linkType: hard -"@vitest/utils@npm:0.28.3": - version: 0.28.3 - resolution: "@vitest/utils@npm:0.28.3" +"@vitest/utils@npm:0.28.5": + version: 0.28.5 + resolution: "@vitest/utils@npm:0.28.5" dependencies: cli-truncate: ^3.1.0 diff: ^5.1.0 loupe: ^2.3.6 picocolors: ^1.0.0 pretty-format: ^27.5.1 - checksum: 10375b0d0c95c3e57cfcac83189261eab3512884d6caecc68e378c221cce473f2694fdd8cde217f6fae384d29c03bd399aae8aa6aa581872b7429020a05e111e + checksum: 23dcfe63e16df2267fa3f1d38c9f2ea670b68479ae3fa3815556fed6889f43a0033c1bcfb39d5f162e8935193e5c3340fc64bc948b8b612c962668f598981dec languageName: node linkType: hard @@ -1234,7 +1273,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1, acorn@npm:^8.8.0, acorn@npm:^8.8.1": +"acorn@npm:^8.4.1, acorn@npm:^8.8.0": version: 8.8.1 resolution: "acorn@npm:8.8.1" bin: @@ -1243,6 +1282,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.8.1, acorn@npm:^8.8.2": + version: 8.8.2 + resolution: "acorn@npm:8.8.2" + bin: + acorn: bin/acorn + checksum: f790b99a1bf63ef160c967e23c46feea7787e531292bb827126334612c234ed489a0dc2c7ba33156416f0ffa8d25bf2b0fdb7f35c2ba60eb3e960572bece4001 + languageName: node + linkType: hard + "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -1285,15 +1333,6 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.3.0": - version: 4.3.2 - resolution: "ansi-escapes@npm:4.3.2" - dependencies: - type-fest: ^0.21.3 - checksum: 93111c42189c0a6bed9cdb4d7f2829548e943827ee8479c74d6e0b22ee127b2a21d3f8b5ca57723b8ef78ce011fbfc2784350eb2bde3ccfccf2f575fa8489815 - languageName: node - linkType: hard - "ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" @@ -1456,13 +1495,6 @@ __metadata: languageName: node linkType: hard -"astral-regex@npm:^2.0.0": - version: 2.0.0 - resolution: "astral-regex@npm:2.0.0" - checksum: 876231688c66400473ba505731df37ea436e574dd524520294cc3bbc54ea40334865e01fa0d074d74d036ee874ee7e62f486ea38bc421ee8e6a871c06f011766 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -1750,15 +1782,6 @@ __metadata: languageName: node linkType: hard -"cli-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-cursor@npm:3.1.0" - dependencies: - restore-cursor: ^3.1.0 - checksum: 2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 - languageName: node - linkType: hard - "cli-highlight@npm:^2.1.11": version: 2.1.11 resolution: "cli-highlight@npm:2.1.11" @@ -1775,16 +1798,6 @@ __metadata: languageName: node linkType: hard -"cli-truncate@npm:^2.1.0": - version: 2.1.0 - resolution: "cli-truncate@npm:2.1.0" - dependencies: - slice-ansi: ^3.0.0 - string-width: ^4.2.0 - checksum: bf1e4e6195392dc718bf9cd71f317b6300dc4a9191d052f31046b8773230ece4fa09458813bf0e3455a5e68c0690d2ea2c197d14a8b85a7b5e01c97f4b5feb5d - languageName: node - linkType: hard - "cli-truncate@npm:^3.1.0": version: 3.1.0 resolution: "cli-truncate@npm:3.1.0" @@ -1858,7 +1871,7 @@ __metadata: languageName: node linkType: hard -"colorette@npm:^2.0.19, colorette@npm:^2.0.7": +"colorette@npm:^2.0.7": version: 2.0.19 resolution: "colorette@npm:2.0.19" checksum: 888cf5493f781e5fcf54ce4d49e9d7d698f96ea2b2ef67906834bb319a392c667f9ec69f4a10e268d2946d13a9503d2d19b3abaaaf174e3451bfe91fb9d82427 @@ -1874,13 +1887,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^9.4.1": - version: 9.4.1 - resolution: "commander@npm:9.4.1" - checksum: bfb18e325a5bdf772763c2213d5c7d9e77144d944124e988bcd8e5e65fb6d45d5d4e86b09155d0f2556c9a59c31e428720e57968bcd050b2306e910a0bf3cf13 - languageName: node - linkType: hard - "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -1902,7 +1908,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.2": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -2258,7 +2264,7 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.16.3": +"esbuild@npm:^0.16.14": version: 0.16.17 resolution: "esbuild@npm:0.16.17" dependencies: @@ -2589,23 +2595,6 @@ __metadata: languageName: node linkType: hard -"execa@npm:^6.1.0": - version: 6.1.0 - resolution: "execa@npm:6.1.0" - dependencies: - cross-spawn: ^7.0.3 - get-stream: ^6.0.1 - human-signals: ^3.0.1 - is-stream: ^3.0.0 - merge-stream: ^2.0.0 - npm-run-path: ^5.1.0 - onetime: ^6.0.0 - signal-exit: ^3.0.7 - strip-final-newline: ^3.0.0 - checksum: 1a4af799839134f5c72eb63d525b87304c1114a63aa71676c91d57ccef2e26f2f53e14c11384ab11c4ec479be1efa83d11c8190e00040355c2c5c3364327fa8e - languageName: node - linkType: hard - "ext@npm:^1.1.2": version: 1.7.0 resolution: "ext@npm:1.7.0" @@ -2903,13 +2892,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^6.0.1": - version: 6.0.1 - resolution: "get-stream@npm:6.0.1" - checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad - languageName: node - linkType: hard - "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -3145,13 +3127,6 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^3.0.1": - version: 3.0.1 - resolution: "human-signals@npm:3.0.1" - checksum: f252a7769c8094a5c9dc6772816bdb417b188820b04c8b42d0fc468e03a0ba905b1dd07afabe9385cc83504af1ccc2b985cd1e4aeeeb8e0029896c5af2e6f354 - languageName: node - linkType: hard - "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -3409,13 +3384,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "is-stream@npm:3.0.0" - checksum: 172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 - languageName: node - linkType: hard - "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -3556,61 +3524,10 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:2.0.6": - version: 2.0.6 - resolution: "lilconfig@npm:2.0.6" - checksum: 40a3cd72f103b1be5975f2ac1850810b61d4053e20ab09be8d3aeddfe042187e1ba70b4651a7e70f95efa1642e7dc8b2ae395b317b7d7753b241b43cef7c0f7d - languageName: node - linkType: hard - -"lint-staged@npm:^13.1.0": - version: 13.1.0 - resolution: "lint-staged@npm:13.1.0" - dependencies: - cli-truncate: ^3.1.0 - colorette: ^2.0.19 - commander: ^9.4.1 - debug: ^4.3.4 - execa: ^6.1.0 - lilconfig: 2.0.6 - listr2: ^5.0.5 - micromatch: ^4.0.5 - normalize-path: ^3.0.0 - object-inspect: ^1.12.2 - pidtree: ^0.6.0 - string-argv: ^0.3.1 - yaml: ^2.1.3 - bin: - lint-staged: bin/lint-staged.js - checksum: adf20c4ca9285c4a93b06598b970d71b04cfe58a1a4c9006f753b83e02c1c622d1866c32a4f1e7e29a98091c501eac3345f7678af247b4f97d5be88b3d8727c1 - languageName: node - linkType: hard - -"listr2@npm:^5.0.5": - version: 5.0.6 - resolution: "listr2@npm:5.0.6" - dependencies: - cli-truncate: ^2.1.0 - colorette: ^2.0.19 - log-update: ^4.0.0 - p-map: ^4.0.0 - rfdc: ^1.3.0 - rxjs: ^7.5.7 - through: ^2.3.8 - wrap-ansi: ^7.0.0 - peerDependencies: - enquirer: ">= 2.3.0 < 3" - peerDependenciesMeta: - enquirer: - optional: true - checksum: 18975d690988aa2cce18fea9bacfc12c2607948ff9f7b7fd5b3e2b64d059b6e1961f8d06b4e1400d4c6bc18af84c7c145c2d22a1d392464fdb197c53b062e3d5 - languageName: node - linkType: hard - "local-pkg@npm:^0.4.2": - version: 0.4.2 - resolution: "local-pkg@npm:0.4.2" - checksum: 22be451353c25c4411b552bf01880ebc9e995b93574b2facc7757968d888356df59199cacada14162ab53bbc9da055bb692c907b4171f008dbce45a2afc777c1 + version: 0.4.3 + resolution: "local-pkg@npm:0.4.3" + checksum: 7825aca531dd6afa3a3712a0208697aa4a5cd009065f32e3fb732aafcc42ed11f277b5ac67229222e96f4def55197171cdf3d5522d0381b489d2e5547b407d55 languageName: node linkType: hard @@ -3637,28 +3554,7 @@ __metadata: languageName: node linkType: hard -"log-update@npm:^4.0.0": - version: 4.0.0 - resolution: "log-update@npm:4.0.0" - dependencies: - ansi-escapes: ^4.3.0 - cli-cursor: ^3.1.0 - slice-ansi: ^4.0.0 - wrap-ansi: ^6.2.0 - checksum: ae2f85bbabc1906034154fb7d4c4477c79b3e703d22d78adee8b3862fa913942772e7fa11713e3d96fb46de4e3cabefbf5d0a544344f03b58d3c4bff52aa9eb2 - languageName: node - linkType: hard - -"loupe@npm:^2.3.1": - version: 2.3.4 - resolution: "loupe@npm:2.3.4" - dependencies: - get-func-name: ^2.0.0 - checksum: 5af91db61aa18530f1749a64735ee194ac263e65e9f4d1562bf3036c591f1baa948289c193e0e34c7b5e2c1b75d3c1dc4fce87f5edb3cee10b0c0df46bc9ffb3 - languageName: node - linkType: hard - -"loupe@npm:^2.3.6": +"loupe@npm:^2.3.1, loupe@npm:^2.3.6": version: 2.3.6 resolution: "loupe@npm:2.3.6" dependencies: @@ -3747,13 +3643,6 @@ __metadata: languageName: node linkType: hard -"merge-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "merge-stream@npm:2.0.0" - checksum: 6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 - languageName: node - linkType: hard - "merge2@npm:^1.3.0, merge2@npm:^1.4.1": version: 1.4.1 resolution: "merge2@npm:1.4.1" @@ -3761,7 +3650,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": +"micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" dependencies: @@ -3787,20 +3676,6 @@ __metadata: languageName: node linkType: hard -"mimic-fn@npm:^2.1.0": - version: 2.1.0 - resolution: "mimic-fn@npm:2.1.0" - checksum: d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a - languageName: node - linkType: hard - -"mimic-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-fn@npm:4.0.0" - checksum: 995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 - languageName: node - linkType: hard - "minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -3920,15 +3795,15 @@ __metadata: languageName: node linkType: hard -"mlly@npm:^1.0.0, mlly@npm:^1.1.0": - version: 1.1.0 - resolution: "mlly@npm:1.1.0" +"mlly@npm:^1.1.0, mlly@npm:^1.1.1": + version: 1.1.1 + resolution: "mlly@npm:1.1.1" dependencies: - acorn: ^8.8.1 - pathe: ^1.0.0 + acorn: ^8.8.2 + pathe: ^1.1.0 pkg-types: ^1.0.1 - ufo: ^1.0.1 - checksum: d53147a2f5f83499589c47a00e00df30cbae2e630dfcfdfdeee2b70b49aff6612f2fa13195a1c6268b8f8ecd6064cb9a35febbdf895b2cbfeacdf9a9b3e31493 + ufo: ^1.1.0 + checksum: 6bc4ffe0f4d061c7f6bd6bfe80c675eece0814ec3ac8efecbde2ecf337f31ddd78a8b35836ffcf66f37f17404a7cc094ab694122121b50f337bf435697f4ab9c languageName: node linkType: hard @@ -4141,15 +4016,6 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^5.1.0": - version: 5.1.0 - resolution: "npm-run-path@npm:5.1.0" - dependencies: - path-key: ^4.0.0 - checksum: dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 - languageName: node - linkType: hard - "npmlog@npm:^5.0.1": version: 5.0.1 resolution: "npmlog@npm:5.0.1" @@ -4234,24 +4100,6 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^5.1.0": - version: 5.1.2 - resolution: "onetime@npm:5.1.2" - dependencies: - mimic-fn: ^2.1.0 - checksum: 2478859ef817fc5d4e9c2f9e5728512ddd1dbc9fb7829ad263765bb6d3b91ce699d6e2332eef6b7dff183c2f490bd3349f1666427eaba4469fba0ac38dfd0d34 - languageName: node - linkType: hard - -"onetime@npm:^6.0.0": - version: 6.0.0 - resolution: "onetime@npm:6.0.0" - dependencies: - mimic-fn: ^4.0.0 - checksum: 0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 - languageName: node - linkType: hard - "optionator@npm:^0.9.1": version: 0.9.1 resolution: "optionator@npm:0.9.1" @@ -4362,13 +4210,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^4.0.0": - version: 4.0.0 - resolution: "path-key@npm:4.0.0" - checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 - languageName: node - linkType: hard - "path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -4383,13 +4224,6 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^1.0.0": - version: 1.0.0 - resolution: "pathe@npm:1.0.0" - checksum: 7b71a4930a5b46111c92149632f74b0e87bade3eabe6c9168dcc4846857a4e124eacc0c2bf044fe0d2a8b7f87ae62b9b2cb11938c61899d485cc36dd1a243a23 - languageName: node - linkType: hard - "pathe@npm:^1.1.0": version: 1.1.0 resolution: "pathe@npm:1.1.0" @@ -4418,15 +4252,6 @@ __metadata: languageName: node linkType: hard -"pidtree@npm:^0.6.0": - version: 0.6.0 - resolution: "pidtree@npm:0.6.0" - bin: - pidtree: bin/pidtree.js - checksum: 8fbc073ede9209dd15e80d616e65eb674986c93be49f42d9ddde8dbbd141bb53d628a7ca4e58ab5c370bb00383f67d75df59a9a226dede8fa801267a7030c27a - languageName: node - linkType: hard - "pino-abstract-transport@npm:^1.0.0, pino-abstract-transport@npm:v1.0.0": version: 1.0.0 resolution: "pino-abstract-transport@npm:1.0.0" @@ -4490,17 +4315,17 @@ __metadata: linkType: hard "pkg-types@npm:^1.0.1": - version: 1.0.1 - resolution: "pkg-types@npm:1.0.1" + version: 1.0.2 + resolution: "pkg-types@npm:1.0.2" dependencies: jsonc-parser: ^3.2.0 - mlly: ^1.0.0 - pathe: ^1.0.0 - checksum: fe73cc22fb72ddb09227e2837a7b2ed1e0706a18e69a58a6ce13cde2b7eab122cb98de44d5c54fca5715d203ef3d2eb004b3ec84a3c05decb11e7c49a80fe2f9 + mlly: ^1.1.1 + pathe: ^1.1.0 + checksum: 2d0a70c1721c2ebbe075b912531a4f43136e6658fdcc59dc76c39966201ab5ddf265868d1211943183406d4b70d373c17e3b176487bc2020ea737d030b0fd080 languageName: node linkType: hard -"postcss@npm:^8.4.20": +"postcss@npm:^8.4.21": version: 8.4.21 resolution: "postcss@npm:8.4.21" dependencies: @@ -4518,12 +4343,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.8.3": - version: 2.8.3 - resolution: "prettier@npm:2.8.3" +"prettier@npm:^2.8.4": + version: 2.8.4 + resolution: "prettier@npm:2.8.4" bin: prettier: bin-prettier.js - checksum: 92f2ceb522d454370e02082aa74ad27388672f7cee8975028b59517c069fe643bdc73e322675c8faf2ff173d7a626d1a6389f26b474000308e793aa25fff46e5 + checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e languageName: node linkType: hard @@ -4732,16 +4557,6 @@ __metadata: languageName: node linkType: hard -"restore-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "restore-cursor@npm:3.1.0" - dependencies: - onetime: ^5.1.0 - signal-exit: ^3.0.2 - checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -4756,13 +4571,6 @@ __metadata: languageName: node linkType: hard -"rfdc@npm:^1.3.0": - version: 1.3.0 - resolution: "rfdc@npm:1.3.0" - checksum: fb2ba8512e43519983b4c61bd3fa77c0f410eff6bae68b08614437bc3f35f91362215f7b4a73cbda6f67330b5746ce07db5dd9850ad3edc91271ad6deea0df32 - languageName: node - linkType: hard - "rimraf@npm:^2.6.1": version: 2.7.1 resolution: "rimraf@npm:2.7.1" @@ -4785,9 +4593,9 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^3.7.0": - version: 3.10.0 - resolution: "rollup@npm:3.10.0" +"rollup@npm:^3.10.0": + version: 3.15.0 + resolution: "rollup@npm:3.15.0" dependencies: fsevents: ~2.3.2 dependenciesMeta: @@ -4795,10 +4603,19 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 31a882689c58d084ac36362aeaf2422dc4b80d671bd88c856693c37d63a26ddac9b9819dfba7f79c2d50d5207868b0e3d75f728fe551bbc347cf5dedf8ece18e + checksum: 1a75b09503f705b594dcfebf65b9e1ca4536e3facdf5716e10d4272697b4bb7e6bd8ab35be1b3fe1271f864d4c4a75d012bd77cbe7a55579d5138258b9e85c23 languageName: node linkType: hard +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + dependencies: + husky: ^8.0.3 + wasm-pack: ^0.10.3 + languageName: unknown + linkType: soft + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -4808,7 +4625,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.5.7, rxjs@npm:^7.8.0": +"rxjs@npm:^7.8.0": version: 7.8.0 resolution: "rxjs@npm:7.8.0" dependencies: @@ -4936,7 +4753,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 @@ -4950,28 +4767,6 @@ __metadata: languageName: node linkType: hard -"slice-ansi@npm:^3.0.0": - version: 3.0.0 - resolution: "slice-ansi@npm:3.0.0" - dependencies: - ansi-styles: ^4.0.0 - astral-regex: ^2.0.0 - is-fullwidth-code-point: ^3.0.0 - checksum: 5ec6d022d12e016347e9e3e98a7eb2a592213a43a65f1b61b74d2c78288da0aded781f665807a9f3876b9daa9ad94f64f77d7633a0458876c3a4fdc4eb223f24 - languageName: node - linkType: hard - -"slice-ansi@npm:^4.0.0": - version: 4.0.0 - resolution: "slice-ansi@npm:4.0.0" - dependencies: - ansi-styles: ^4.0.0 - astral-regex: ^2.0.0 - is-fullwidth-code-point: ^3.0.0 - checksum: 4a82d7f085b0e1b070e004941ada3c40d3818563ac44766cca4ceadd2080427d337554f9f99a13aaeb3b4a94d9964d9466c807b3d7b7541d1ec37ee32d308756 - languageName: node - linkType: hard - "slice-ansi@npm:^5.0.0": version: 5.0.0 resolution: "slice-ansi@npm:5.0.0" @@ -5107,16 +4902,9 @@ __metadata: linkType: hard "std-env@npm:^3.3.1": - version: 3.3.1 - resolution: "std-env@npm:3.3.1" - checksum: c4f59ecd2cb52041ce1785776d28a1aa56d346b6c4efcb8473e7e801eed1ac7612332dcee242d0b35948f35f745cceb6e226b5e825b59e588b262dca6be2b8aa - languageName: node - linkType: hard - -"string-argv@npm:^0.3.1": - version: 0.3.1 - resolution: "string-argv@npm:0.3.1" - checksum: efbd0289b599bee808ce80820dfe49c9635610715429c6b7cc50750f0437e3c2f697c81e5c390208c13b5d5d12d904a1546172a88579f6ee5cbaaaa4dc9ec5cf + version: 3.3.2 + resolution: "std-env@npm:3.3.2" + checksum: c02256bb041ba1870d23f8360bc7e47a9cf1fabcd02c8b7c4246d48f2c6bb47b4f45c70964348844e6d36521df84c4a9d09d468654b51e0eb5c600e3392b4570 languageName: node linkType: hard @@ -5198,13 +4986,6 @@ __metadata: languageName: node linkType: hard -"strip-final-newline@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-final-newline@npm:3.0.0" - checksum: 23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 - languageName: node - linkType: hard - "strip-json-comments@npm:^2.0.0": version: 2.0.1 resolution: "strip-json-comments@npm:2.0.1" @@ -5220,11 +5001,11 @@ __metadata: linkType: hard "strip-literal@npm:^1.0.0": - version: 1.0.0 - resolution: "strip-literal@npm:1.0.0" + version: 1.0.1 + resolution: "strip-literal@npm:1.0.1" dependencies: - acorn: ^8.8.1 - checksum: ada9b60f322ce3e3fd167b65a186ab77a8c76b8f9074dcdbad4c1a810b46f21c9dca30d4d807e98af580cbe99bfbccd6d8176f69183a454ae2868d8ddd6d4f88 + acorn: ^8.8.2 + checksum: ab40496820f02220390d95cdd620a997168efb69d5bd7d180bc4ef83ca562a95447843d8c7c88b8284879a29cf4eedc89d8001d1e098c1a1e23d12a9c755dff4 languageName: node linkType: hard @@ -5301,13 +5082,6 @@ __metadata: languageName: node linkType: hard -"through@npm:^2.3.8": - version: 2.3.8 - resolution: "through@npm:2.3.8" - checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd - languageName: node - linkType: hard - "tinybench@npm:^2.3.1": version: 2.3.1 resolution: "tinybench@npm:2.3.1" @@ -5323,9 +5097,9 @@ __metadata: linkType: hard "tinyspy@npm:^1.0.2": - version: 1.0.2 - resolution: "tinyspy@npm:1.0.2" - checksum: 32096121aa8d52bb625ad62c9314b3e4daba4ab9ac428217b12b1e1dfe9860e3c94d54a7affa279cc70dc6f10d88c6ba46b51de68896b318a06d02f05e87dcc3 + version: 1.1.1 + resolution: "tinyspy@npm:1.1.1" + checksum: 4ea908fdfddb92044c4454193ec543f5980ced0bd25c5b3d240a94c1511e47e765ad39cd13ae6d3370fb730f62038eedc357f55e4e239416e126bc418f0eee79 languageName: node linkType: hard @@ -5498,13 +5272,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.21.3": - version: 0.21.3 - resolution: "type-fest@npm:0.21.3" - checksum: e6b32a3b3877f04339bae01c193b273c62ba7bfc9e325b8703c4ee1b32dc8fe4ef5dfa54bf78265e069f7667d058e360ae0f37be5af9f153b22382cd55a9afe0 - languageName: node - linkType: hard - "type@npm:^1.0.1": version: 1.2.0 resolution: "type@npm:1.2.0" @@ -5641,10 +5408,10 @@ __metadata: languageName: node linkType: hard -"ufo@npm:^1.0.1": - version: 1.0.1 - resolution: "ufo@npm:1.0.1" - checksum: 63024876f21b7cc44267255a8043062046d3215e09212bd682787a13ccf1e0c5d23f7686a7f1bc7ac9f34c7e8a88100af234f42b509db50f17ce638af6ac87cc +"ufo@npm:^1.1.0": + version: 1.1.0 + resolution: "ufo@npm:1.1.0" + checksum: f4098df457526be8bb1a466f05a2f72075b91580519215e0c219a4ff7dca4327b59964a053012f8547da77501b61cdebffbf8e16ef4d0509a7561efffe8e74ea languageName: node linkType: hard @@ -5738,9 +5505,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:0.28.3": - version: 0.28.3 - resolution: "vite-node@npm:0.28.3" +"vite-node@npm:0.28.5": + version: 0.28.5 + resolution: "vite-node@npm:0.28.5" dependencies: cac: ^6.7.14 debug: ^4.3.4 @@ -5752,19 +5519,19 @@ __metadata: vite: ^3.0.0 || ^4.0.0 bin: vite-node: vite-node.mjs - checksum: 9a4d756388fc556314a98510308c3c26499fadaf5f99b76b65b6bb7404da74f6565b377e843e8d4f40f23aef13c52c8c0924ed63f866a42d674016e16eb936d6 + checksum: b3813b784f551613e561bf85e64ceb8e869d760d34f135dc3351b093618c6fc3c64f23839ac530ddc49724beb83c3f70ee6392e62676c78141ed04c7ab1e0aa0 languageName: node linkType: hard "vite@npm:^3.0.0 || ^4.0.0": - version: 4.0.4 - resolution: "vite@npm:4.0.4" + version: 4.1.1 + resolution: "vite@npm:4.1.1" dependencies: - esbuild: ^0.16.3 + esbuild: ^0.16.14 fsevents: ~2.3.2 - postcss: ^8.4.20 + postcss: ^8.4.21 resolve: ^1.22.1 - rollup: ^3.7.0 + rollup: ^3.10.0 peerDependencies: "@types/node": ">= 14" less: "*" @@ -5790,21 +5557,21 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: eb86c8cdfe8dcb6644005486b31cb60bc596f2aa683cb194abb5c0afca7c2a5dfdb02bbc7f83f419ad170227ac9c3b898f4406a6d1433105fb61d79d78e47d52 + checksum: aad14b660b69068f6596ab7e760dd71642862996328e404a4d265e090ae0d06c7064cf8415ffb135cd8b79d5157dc1dcb48b56386caaa96a474fb53bdd8cac3d languageName: node linkType: hard "vitest@npm:^0.28.3": - version: 0.28.3 - resolution: "vitest@npm:0.28.3" + version: 0.28.5 + resolution: "vitest@npm:0.28.5" dependencies: "@types/chai": ^4.3.4 "@types/chai-subset": ^1.3.3 "@types/node": "*" - "@vitest/expect": 0.28.3 - "@vitest/runner": 0.28.3 - "@vitest/spy": 0.28.3 - "@vitest/utils": 0.28.3 + "@vitest/expect": 0.28.5 + "@vitest/runner": 0.28.5 + "@vitest/spy": 0.28.5 + "@vitest/utils": 0.28.5 acorn: ^8.8.1 acorn-walk: ^8.2.0 cac: ^6.7.14 @@ -5820,7 +5587,7 @@ __metadata: tinypool: ^0.3.1 tinyspy: ^1.0.2 vite: ^3.0.0 || ^4.0.0 - vite-node: 0.28.3 + vite-node: 0.28.5 why-is-node-running: ^2.2.2 peerDependencies: "@edge-runtime/vm": "*" @@ -5841,7 +5608,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 13ee3d8b7554cbe46516a1cc46082eb11443532d11b263c1ed2ad3187339bb71ec705669e9d3d59653a8bd230c21488e1f5caa69b2aa20acabd3ee2b283b805c + checksum: 5360278bfe592e929718ce98b0c3979e132c80028d2ea4879f6c902dba7c66116684ad16578818d506853d4a6ca6ff8a42c737f302f864721fd0b5582f9ee4d1 languageName: node linkType: hard @@ -5960,17 +5727,6 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": - version: 6.2.0 - resolution: "wrap-ansi@npm:6.2.0" - dependencies: - ansi-styles: ^4.0.0 - string-width: ^4.1.0 - strip-ansi: ^6.0.0 - checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a - languageName: node - linkType: hard - "wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" @@ -6049,13 +5805,6 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.1.3": - version: 2.1.3 - resolution: "yaml@npm:2.1.3" - checksum: 91316062324a93f9cb547469092392e7d004ff8f70c40fecb420f042a4870b2181557350da56c92f07bd44b8f7a252b0be26e6ade1f548e1f4351bdd01c9d3c7 - languageName: node - linkType: hard - "yargs-parser@npm:^20.2.2": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9"