diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 541214e85..843652beb 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -67,7 +67,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: yarn --immutable - - run: yarn workspace ${{ matrix.package-name }} lint:changelog + - run: yarn workspace ${{ matrix.package-name }} changelog:validate - name: Require clean working directory shell: bash run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd78f2861..b79dced58 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: needs: lint-build-test uses: ./.github/workflows/sonar-cloud.yml secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} is-release: name: Determine whether this is a release merge commit @@ -44,7 +44,7 @@ jobs: - id: is-release uses: MetaMask/action-is-release@v1 with: - commit-starts-with: 'Release [version]' + commit-starts-with: 'Release [version],Release v[version],Release/[version],Release/v[version],Release `[version]`' publish-release: name: Publish release @@ -79,4 +79,4 @@ jobs: passed="${{ needs.all-jobs-complete.outputs.passed }}" if [[ $passed != "true" ]]; then exit 1 - fi \ No newline at end of file + fi diff --git a/.gitignore b/.gitignore index 8763af884..aa4d25551 100644 --- a/.gitignore +++ b/.gitignore @@ -105,11 +105,11 @@ packages/examples/test1/ios/test1.xcworkspace/xcshareddata/IDEWorkspaceChecks.pl # See: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored **/.pnp.* **/.yarn/* -**/!.yarn/patches -**/!.yarn/plugins -**/!.yarn/releases -**/!.yarn/sdks -**/!.yarn/versions +!**/.yarn/patches +!**/.yarn/plugins +!**/.yarn/releases +!**/.yarn/sdks +!**/.yarn/versions packages/devnext/next.webpack.config.json packages/devreact/webpack.config.json .tool-versions diff --git a/.yarn/plugins/@yarnpkg/plugin-constraints.cjs b/.yarn/plugins/@yarnpkg/plugin-constraints.cjs new file mode 100644 index 000000000..54a0e9e4d --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-constraints.cjs @@ -0,0 +1,52 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-constraints", +factory: function (require) { +var plugin=(()=>{var Wi=Object.create,Je=Object.defineProperty;var Hi=Object.getOwnPropertyDescriptor;var Gi=Object.getOwnPropertyNames;var Yi=Object.getPrototypeOf,Ui=Object.prototype.hasOwnProperty;var Zi=r=>Je(r,"__esModule",{value:!0});var I=(r,u)=>()=>(u||r((u={exports:{}}).exports,u),u.exports),Qi=(r,u)=>{for(var p in u)Je(r,p,{get:u[p],enumerable:!0})},Ji=(r,u,p)=>{if(u&&typeof u=="object"||typeof u=="function")for(let c of Gi(u))!Ui.call(r,c)&&c!=="default"&&Je(r,c,{get:()=>u[c],enumerable:!(p=Hi(u,c))||p.enumerable});return r},G=r=>Ji(Zi(Je(r!=null?Wi(Yi(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var Xr=I((Nu,_r)=>{var Ki;(function(r){var u=function(){return{"append/2":[new r.type.Rule(new r.type.Term("append",[new r.type.Var("X"),new r.type.Var("L")]),new r.type.Term("foldl",[new r.type.Term("append",[]),new r.type.Var("X"),new r.type.Term("[]",[]),new r.type.Var("L")]))],"append/3":[new r.type.Rule(new r.type.Term("append",[new r.type.Term("[]",[]),new r.type.Var("X"),new r.type.Var("X")]),null),new r.type.Rule(new r.type.Term("append",[new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("T")]),new r.type.Var("X"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("S")])]),new r.type.Term("append",[new r.type.Var("T"),new r.type.Var("X"),new r.type.Var("S")]))],"member/2":[new r.type.Rule(new r.type.Term("member",[new r.type.Var("X"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("_")])]),null),new r.type.Rule(new r.type.Term("member",[new r.type.Var("X"),new r.type.Term(".",[new r.type.Var("_"),new r.type.Var("Xs")])]),new r.type.Term("member",[new r.type.Var("X"),new r.type.Var("Xs")]))],"permutation/2":[new r.type.Rule(new r.type.Term("permutation",[new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("permutation",[new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("T")]),new r.type.Var("S")]),new r.type.Term(",",[new r.type.Term("permutation",[new r.type.Var("T"),new r.type.Var("P")]),new r.type.Term(",",[new r.type.Term("append",[new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("P")]),new r.type.Term("append",[new r.type.Var("X"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("Y")]),new r.type.Var("S")])])]))],"maplist/2":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("X")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("Xs")])]))],"maplist/3":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("A"),new r.type.Var("As")]),new r.type.Term(".",[new r.type.Var("B"),new r.type.Var("Bs")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("A"),new r.type.Var("B")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("As"),new r.type.Var("Bs")])]))],"maplist/4":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("A"),new r.type.Var("As")]),new r.type.Term(".",[new r.type.Var("B"),new r.type.Var("Bs")]),new r.type.Term(".",[new r.type.Var("C"),new r.type.Var("Cs")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("A"),new r.type.Var("B"),new r.type.Var("C")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("As"),new r.type.Var("Bs"),new r.type.Var("Cs")])]))],"maplist/5":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("A"),new r.type.Var("As")]),new r.type.Term(".",[new r.type.Var("B"),new r.type.Var("Bs")]),new r.type.Term(".",[new r.type.Var("C"),new r.type.Var("Cs")]),new r.type.Term(".",[new r.type.Var("D"),new r.type.Var("Ds")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("A"),new r.type.Var("B"),new r.type.Var("C"),new r.type.Var("D")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("As"),new r.type.Var("Bs"),new r.type.Var("Cs"),new r.type.Var("Ds")])]))],"maplist/6":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("A"),new r.type.Var("As")]),new r.type.Term(".",[new r.type.Var("B"),new r.type.Var("Bs")]),new r.type.Term(".",[new r.type.Var("C"),new r.type.Var("Cs")]),new r.type.Term(".",[new r.type.Var("D"),new r.type.Var("Ds")]),new r.type.Term(".",[new r.type.Var("E"),new r.type.Var("Es")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("A"),new r.type.Var("B"),new r.type.Var("C"),new r.type.Var("D"),new r.type.Var("E")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("As"),new r.type.Var("Bs"),new r.type.Var("Cs"),new r.type.Var("Ds"),new r.type.Var("Es")])]))],"maplist/7":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("A"),new r.type.Var("As")]),new r.type.Term(".",[new r.type.Var("B"),new r.type.Var("Bs")]),new r.type.Term(".",[new r.type.Var("C"),new r.type.Var("Cs")]),new r.type.Term(".",[new r.type.Var("D"),new r.type.Var("Ds")]),new r.type.Term(".",[new r.type.Var("E"),new r.type.Var("Es")]),new r.type.Term(".",[new r.type.Var("F"),new r.type.Var("Fs")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("A"),new r.type.Var("B"),new r.type.Var("C"),new r.type.Var("D"),new r.type.Var("E"),new r.type.Var("F")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("As"),new r.type.Var("Bs"),new r.type.Var("Cs"),new r.type.Var("Ds"),new r.type.Var("Es"),new r.type.Var("Fs")])]))],"maplist/8":[new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("A"),new r.type.Var("As")]),new r.type.Term(".",[new r.type.Var("B"),new r.type.Var("Bs")]),new r.type.Term(".",[new r.type.Var("C"),new r.type.Var("Cs")]),new r.type.Term(".",[new r.type.Var("D"),new r.type.Var("Ds")]),new r.type.Term(".",[new r.type.Var("E"),new r.type.Var("Es")]),new r.type.Term(".",[new r.type.Var("F"),new r.type.Var("Fs")]),new r.type.Term(".",[new r.type.Var("G"),new r.type.Var("Gs")])]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P"),new r.type.Var("A"),new r.type.Var("B"),new r.type.Var("C"),new r.type.Var("D"),new r.type.Var("E"),new r.type.Var("F"),new r.type.Var("G")]),new r.type.Term("maplist",[new r.type.Var("P"),new r.type.Var("As"),new r.type.Var("Bs"),new r.type.Var("Cs"),new r.type.Var("Ds"),new r.type.Var("Es"),new r.type.Var("Fs"),new r.type.Var("Gs")])]))],"include/3":[new r.type.Rule(new r.type.Term("include",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("include",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("T")]),new r.type.Var("L")]),new r.type.Term(",",[new r.type.Term("=..",[new r.type.Var("P"),new r.type.Var("A")]),new r.type.Term(",",[new r.type.Term("append",[new r.type.Var("A"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Term("[]",[])]),new r.type.Var("B")]),new r.type.Term(",",[new r.type.Term("=..",[new r.type.Var("F"),new r.type.Var("B")]),new r.type.Term(",",[new r.type.Term(";",[new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("F")]),new r.type.Term(",",[new r.type.Term("=",[new r.type.Var("L"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("S")])]),new r.type.Term("!",[])])]),new r.type.Term("=",[new r.type.Var("L"),new r.type.Var("S")])]),new r.type.Term("include",[new r.type.Var("P"),new r.type.Var("T"),new r.type.Var("S")])])])])]))],"exclude/3":[new r.type.Rule(new r.type.Term("exclude",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Term("[]",[])]),null),new r.type.Rule(new r.type.Term("exclude",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("T")]),new r.type.Var("S")]),new r.type.Term(",",[new r.type.Term("exclude",[new r.type.Var("P"),new r.type.Var("T"),new r.type.Var("E")]),new r.type.Term(",",[new r.type.Term("=..",[new r.type.Var("P"),new r.type.Var("L")]),new r.type.Term(",",[new r.type.Term("append",[new r.type.Var("L"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Term("[]",[])]),new r.type.Var("Q")]),new r.type.Term(",",[new r.type.Term("=..",[new r.type.Var("R"),new r.type.Var("Q")]),new r.type.Term(";",[new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("R")]),new r.type.Term(",",[new r.type.Term("!",[]),new r.type.Term("=",[new r.type.Var("S"),new r.type.Var("E")])])]),new r.type.Term("=",[new r.type.Var("S"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("E")])])])])])])]))],"foldl/4":[new r.type.Rule(new r.type.Term("foldl",[new r.type.Var("_"),new r.type.Term("[]",[]),new r.type.Var("I"),new r.type.Var("I")]),null),new r.type.Rule(new r.type.Term("foldl",[new r.type.Var("P"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Var("T")]),new r.type.Var("I"),new r.type.Var("R")]),new r.type.Term(",",[new r.type.Term("=..",[new r.type.Var("P"),new r.type.Var("L")]),new r.type.Term(",",[new r.type.Term("append",[new r.type.Var("L"),new r.type.Term(".",[new r.type.Var("I"),new r.type.Term(".",[new r.type.Var("H"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Term("[]",[])])])]),new r.type.Var("L2")]),new r.type.Term(",",[new r.type.Term("=..",[new r.type.Var("P2"),new r.type.Var("L2")]),new r.type.Term(",",[new r.type.Term("call",[new r.type.Var("P2")]),new r.type.Term("foldl",[new r.type.Var("P"),new r.type.Var("T"),new r.type.Var("X"),new r.type.Var("R")])])])])]))],"select/3":[new r.type.Rule(new r.type.Term("select",[new r.type.Var("E"),new r.type.Term(".",[new r.type.Var("E"),new r.type.Var("Xs")]),new r.type.Var("Xs")]),null),new r.type.Rule(new r.type.Term("select",[new r.type.Var("E"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Ys")])]),new r.type.Term("select",[new r.type.Var("E"),new r.type.Var("Xs"),new r.type.Var("Ys")]))],"sum_list/2":[new r.type.Rule(new r.type.Term("sum_list",[new r.type.Term("[]",[]),new r.type.Num(0,!1)]),null),new r.type.Rule(new r.type.Term("sum_list",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Var("S")]),new r.type.Term(",",[new r.type.Term("sum_list",[new r.type.Var("Xs"),new r.type.Var("Y")]),new r.type.Term("is",[new r.type.Var("S"),new r.type.Term("+",[new r.type.Var("X"),new r.type.Var("Y")])])]))],"max_list/2":[new r.type.Rule(new r.type.Term("max_list",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Term("[]",[])]),new r.type.Var("X")]),null),new r.type.Rule(new r.type.Term("max_list",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Var("S")]),new r.type.Term(",",[new r.type.Term("max_list",[new r.type.Var("Xs"),new r.type.Var("Y")]),new r.type.Term(";",[new r.type.Term(",",[new r.type.Term(">=",[new r.type.Var("X"),new r.type.Var("Y")]),new r.type.Term(",",[new r.type.Term("=",[new r.type.Var("S"),new r.type.Var("X")]),new r.type.Term("!",[])])]),new r.type.Term("=",[new r.type.Var("S"),new r.type.Var("Y")])])]))],"min_list/2":[new r.type.Rule(new r.type.Term("min_list",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Term("[]",[])]),new r.type.Var("X")]),null),new r.type.Rule(new r.type.Term("min_list",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Var("S")]),new r.type.Term(",",[new r.type.Term("min_list",[new r.type.Var("Xs"),new r.type.Var("Y")]),new r.type.Term(";",[new r.type.Term(",",[new r.type.Term("=<",[new r.type.Var("X"),new r.type.Var("Y")]),new r.type.Term(",",[new r.type.Term("=",[new r.type.Var("S"),new r.type.Var("X")]),new r.type.Term("!",[])])]),new r.type.Term("=",[new r.type.Var("S"),new r.type.Var("Y")])])]))],"prod_list/2":[new r.type.Rule(new r.type.Term("prod_list",[new r.type.Term("[]",[]),new r.type.Num(1,!1)]),null),new r.type.Rule(new r.type.Term("prod_list",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Var("S")]),new r.type.Term(",",[new r.type.Term("prod_list",[new r.type.Var("Xs"),new r.type.Var("Y")]),new r.type.Term("is",[new r.type.Var("S"),new r.type.Term("*",[new r.type.Var("X"),new r.type.Var("Y")])])]))],"last/2":[new r.type.Rule(new r.type.Term("last",[new r.type.Term(".",[new r.type.Var("X"),new r.type.Term("[]",[])]),new r.type.Var("X")]),null),new r.type.Rule(new r.type.Term("last",[new r.type.Term(".",[new r.type.Var("_"),new r.type.Var("Xs")]),new r.type.Var("X")]),new r.type.Term("last",[new r.type.Var("Xs"),new r.type.Var("X")]))],"prefix/2":[new r.type.Rule(new r.type.Term("prefix",[new r.type.Var("Part"),new r.type.Var("Whole")]),new r.type.Term("append",[new r.type.Var("Part"),new r.type.Var("_"),new r.type.Var("Whole")]))],"nth0/3":[new r.type.Rule(new r.type.Term("nth0",[new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z")]),new r.type.Term(";",[new r.type.Term("->",[new r.type.Term("var",[new r.type.Var("X")]),new r.type.Term("nth",[new r.type.Num(0,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("_")])]),new r.type.Term(",",[new r.type.Term(">=",[new r.type.Var("X"),new r.type.Num(0,!1)]),new r.type.Term(",",[new r.type.Term("nth",[new r.type.Num(0,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("_")]),new r.type.Term("!",[])])])]))],"nth1/3":[new r.type.Rule(new r.type.Term("nth1",[new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z")]),new r.type.Term(";",[new r.type.Term("->",[new r.type.Term("var",[new r.type.Var("X")]),new r.type.Term("nth",[new r.type.Num(1,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("_")])]),new r.type.Term(",",[new r.type.Term(">",[new r.type.Var("X"),new r.type.Num(0,!1)]),new r.type.Term(",",[new r.type.Term("nth",[new r.type.Num(1,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("_")]),new r.type.Term("!",[])])])]))],"nth0/4":[new r.type.Rule(new r.type.Term("nth0",[new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("W")]),new r.type.Term(";",[new r.type.Term("->",[new r.type.Term("var",[new r.type.Var("X")]),new r.type.Term("nth",[new r.type.Num(0,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("W")])]),new r.type.Term(",",[new r.type.Term(">=",[new r.type.Var("X"),new r.type.Num(0,!1)]),new r.type.Term(",",[new r.type.Term("nth",[new r.type.Num(0,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("W")]),new r.type.Term("!",[])])])]))],"nth1/4":[new r.type.Rule(new r.type.Term("nth1",[new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("W")]),new r.type.Term(";",[new r.type.Term("->",[new r.type.Term("var",[new r.type.Var("X")]),new r.type.Term("nth",[new r.type.Num(1,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("W")])]),new r.type.Term(",",[new r.type.Term(">",[new r.type.Var("X"),new r.type.Num(0,!1)]),new r.type.Term(",",[new r.type.Term("nth",[new r.type.Num(1,!1),new r.type.Var("X"),new r.type.Var("Y"),new r.type.Var("Z"),new r.type.Var("W")]),new r.type.Term("!",[])])])]))],"nth/5":[new r.type.Rule(new r.type.Term("nth",[new r.type.Var("N"),new r.type.Var("N"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Var("X"),new r.type.Var("Xs")]),null),new r.type.Rule(new r.type.Term("nth",[new r.type.Var("N"),new r.type.Var("O"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Xs")]),new r.type.Var("Y"),new r.type.Term(".",[new r.type.Var("X"),new r.type.Var("Ys")])]),new r.type.Term(",",[new r.type.Term("is",[new r.type.Var("M"),new r.type.Term("+",[new r.type.Var("N"),new r.type.Num(1,!1)])]),new r.type.Term("nth",[new r.type.Var("M"),new r.type.Var("O"),new r.type.Var("Xs"),new r.type.Var("Y"),new r.type.Var("Ys")])]))],"length/2":function(c,w,_){var v=_.args[0],g=_.args[1];if(!r.type.is_variable(g)&&!r.type.is_integer(g))c.throw_error(r.error.type("integer",g,_.indicator));else if(r.type.is_integer(g)&&g.value<0)c.throw_error(r.error.domain("not_less_than_zero",g,_.indicator));else{var h=new r.type.Term("length",[v,new r.type.Num(0,!1),g]);r.type.is_integer(g)&&(h=new r.type.Term(",",[h,new r.type.Term("!",[])])),c.prepend([new r.type.State(w.goal.replace(h),w.substitution,w)])}},"length/3":[new r.type.Rule(new r.type.Term("length",[new r.type.Term("[]",[]),new r.type.Var("N"),new r.type.Var("N")]),null),new r.type.Rule(new r.type.Term("length",[new r.type.Term(".",[new r.type.Var("_"),new r.type.Var("X")]),new r.type.Var("A"),new r.type.Var("N")]),new r.type.Term(",",[new r.type.Term("succ",[new r.type.Var("A"),new r.type.Var("B")]),new r.type.Term("length",[new r.type.Var("X"),new r.type.Var("B"),new r.type.Var("N")])]))],"replicate/3":function(c,w,_){var v=_.args[0],g=_.args[1],h=_.args[2];if(r.type.is_variable(g))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_integer(g))c.throw_error(r.error.type("integer",g,_.indicator));else if(g.value<0)c.throw_error(r.error.domain("not_less_than_zero",g,_.indicator));else if(!r.type.is_variable(h)&&!r.type.is_list(h))c.throw_error(r.error.type("list",h,_.indicator));else{for(var x=new r.type.Term("[]"),T=0;T0;b--)T[b].equals(T[b-1])&&T.splice(b,1);for(var C=new r.type.Term("[]"),b=T.length-1;b>=0;b--)C=new r.type.Term(".",[T[b],C]);c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[C,g])),w.substitution,w)])}}},"msort/2":function(c,w,_){var v=_.args[0],g=_.args[1];if(r.type.is_variable(v))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_variable(g)&&!r.type.is_fully_list(g))c.throw_error(r.error.type("list",g,_.indicator));else{for(var h=[],x=v;x.indicator==="./2";)h.push(x.args[0]),x=x.args[1];if(r.type.is_variable(x))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_empty_list(x))c.throw_error(r.error.type("list",v,_.indicator));else{for(var T=h.sort(r.compare),b=new r.type.Term("[]"),C=T.length-1;C>=0;C--)b=new r.type.Term(".",[T[C],b]);c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[b,g])),w.substitution,w)])}}},"keysort/2":function(c,w,_){var v=_.args[0],g=_.args[1];if(r.type.is_variable(v))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_variable(g)&&!r.type.is_fully_list(g))c.throw_error(r.error.type("list",g,_.indicator));else{for(var h=[],x,T=v;T.indicator==="./2";){if(x=T.args[0],r.type.is_variable(x)){c.throw_error(r.error.instantiation(_.indicator));return}else if(!r.type.is_term(x)||x.indicator!=="-/2"){c.throw_error(r.error.type("pair",x,_.indicator));return}x.args[0].pair=x.args[1],h.push(x.args[0]),T=T.args[1]}if(r.type.is_variable(T))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_empty_list(T))c.throw_error(r.error.type("list",v,_.indicator));else{for(var b=h.sort(r.compare),C=new r.type.Term("[]"),N=b.length-1;N>=0;N--)C=new r.type.Term(".",[new r.type.Term("-",[b[N],b[N].pair]),C]),delete b[N].pair;c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[C,g])),w.substitution,w)])}}},"take/3":function(c,w,_){var v=_.args[0],g=_.args[1],h=_.args[2];if(r.type.is_variable(g)||r.type.is_variable(v))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_list(g))c.throw_error(r.error.type("list",g,_.indicator));else if(!r.type.is_integer(v))c.throw_error(r.error.type("integer",v,_.indicator));else if(!r.type.is_variable(h)&&!r.type.is_list(h))c.throw_error(r.error.type("list",h,_.indicator));else{for(var x=v.value,T=[],b=g;x>0&&b.indicator==="./2";)T.push(b.args[0]),b=b.args[1],x--;if(x===0){for(var C=new r.type.Term("[]"),x=T.length-1;x>=0;x--)C=new r.type.Term(".",[T[x],C]);c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[C,h])),w.substitution,w)])}}},"drop/3":function(c,w,_){var v=_.args[0],g=_.args[1],h=_.args[2];if(r.type.is_variable(g)||r.type.is_variable(v))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_list(g))c.throw_error(r.error.type("list",g,_.indicator));else if(!r.type.is_integer(v))c.throw_error(r.error.type("integer",v,_.indicator));else if(!r.type.is_variable(h)&&!r.type.is_list(h))c.throw_error(r.error.type("list",h,_.indicator));else{for(var x=v.value,T=[],b=g;x>0&&b.indicator==="./2";)T.push(b.args[0]),b=b.args[1],x--;x===0&&c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[b,h])),w.substitution,w)])}},"reverse/2":function(c,w,_){var v=_.args[0],g=_.args[1],h=r.type.is_instantiated_list(v),x=r.type.is_instantiated_list(g);if(r.type.is_variable(v)&&r.type.is_variable(g))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_variable(v)&&!r.type.is_fully_list(v))c.throw_error(r.error.type("list",v,_.indicator));else if(!r.type.is_variable(g)&&!r.type.is_fully_list(g))c.throw_error(r.error.type("list",g,_.indicator));else if(!h&&!x)c.throw_error(r.error.instantiation(_.indicator));else{for(var T=h?v:g,b=new r.type.Term("[]",[]);T.indicator==="./2";)b=new r.type.Term(".",[T.args[0],b]),T=T.args[1];c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[b,h?g:v])),w.substitution,w)])}},"list_to_set/2":function(c,w,_){var v=_.args[0],g=_.args[1];if(r.type.is_variable(v))c.throw_error(r.error.instantiation(_.indicator));else{for(var h=v,x=[];h.indicator==="./2";)x.push(h.args[0]),h=h.args[1];if(r.type.is_variable(h))c.throw_error(r.error.instantiation(_.indicator));else if(!r.type.is_term(h)||h.indicator!=="[]/0")c.throw_error(r.error.type("list",v,_.indicator));else{for(var T=[],b=new r.type.Term("[]",[]),C,N=0;N=0;N--)b=new r.type.Term(".",[T[N],b]);c.prepend([new r.type.State(w.goal.replace(new r.type.Term("=",[g,b])),w.substitution,w)])}}}}},p=["append/2","append/3","member/2","permutation/2","maplist/2","maplist/3","maplist/4","maplist/5","maplist/6","maplist/7","maplist/8","include/3","exclude/3","foldl/4","sum_list/2","max_list/2","min_list/2","prod_list/2","last/2","prefix/2","nth0/3","nth1/3","nth0/4","nth1/4","length/2","replicate/3","select/3","sort/2","msort/2","keysort/2","take/3","drop/3","reverse/2","list_to_set/2"];typeof _r!="undefined"?_r.exports=function(c){r=c,new r.type.Module("lists",u(),p)}:new r.type.Module("lists",u(),p)})(Ki)});var et=I(M=>{"use strict";var Ve=process.platform==="win32",wr="aes-256-cbc",ji="sha256",Br="The current environment doesn't support interactive reading from TTY.",z=require("fs"),Fr=process.binding("tty_wrap").TTY,gr=require("child_process"),_e=require("path"),dr={prompt:"> ",hideEchoBack:!1,mask:"*",limit:[],limitMessage:"Input another, please.$<( [)limit(])>",defaultInput:"",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:"utf8",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},fe="none",ue,Ce,zr=!1,we,Ke,vr,es=0,hr="",Se=[],je,Lr=!1,mr=!1,$e=!1;function Wr(r){function u(p){return p.replace(/[^\w\u0080-\uFFFF]/g,function(c){return"#"+c.charCodeAt(0)+";"})}return Ke.concat(function(p){var c=[];return Object.keys(p).forEach(function(w){p[w]==="boolean"?r[w]&&c.push("--"+w):p[w]==="string"&&r[w]&&c.push("--"+w,u(r[w]))}),c}({display:"string",displayOnly:"boolean",keyIn:"boolean",hideEchoBack:"boolean",mask:"string",limit:"string",caseSensitive:"boolean"}))}function rs(r,u){function p(j){var U,Ue="",Ze;for(vr=vr||require("os").tmpdir();;){U=_e.join(vr,j+Ue);try{Ze=z.openSync(U,"wx")}catch(Qe){if(Qe.code==="EEXIST"){Ue++;continue}else throw Qe}z.closeSync(Ze);break}return U}var c,w,_,v={},g,h,x=p("readline-sync.stdout"),T=p("readline-sync.stderr"),b=p("readline-sync.exit"),C=p("readline-sync.done"),N=require("crypto"),L,ee,te;L=N.createHash(ji),L.update(""+process.pid+es+++Math.random()),te=L.digest("hex"),ee=N.createDecipher(wr,te),c=Wr(r),Ve?(w=process.env.ComSpec||"cmd.exe",process.env.Q='"',_=["/V:ON","/S","/C","(%Q%"+w+"%Q% /V:ON /S /C %Q%%Q%"+we+"%Q%"+c.map(function(j){return" %Q%"+j+"%Q%"}).join("")+" & (echo !ERRORLEVEL!)>%Q%"+b+"%Q%%Q%) 2>%Q%"+T+"%Q% |%Q%"+process.execPath+"%Q% %Q%"+__dirname+"\\encrypt.js%Q% %Q%"+wr+"%Q% %Q%"+te+"%Q% >%Q%"+x+"%Q% & (echo 1)>%Q%"+C+"%Q%"]):(w="/bin/sh",_=["-c",'("'+we+'"'+c.map(function(j){return" '"+j.replace(/'/g,"'\\''")+"'"}).join("")+'; echo $?>"'+b+'") 2>"'+T+'" |"'+process.execPath+'" "'+__dirname+'/encrypt.js" "'+wr+'" "'+te+'" >"'+x+'"; echo 1 >"'+C+'"']),$e&&$e("_execFileSync",c);try{gr.spawn(w,_,u)}catch(j){v.error=new Error(j.message),v.error.method="_execFileSync - spawn",v.error.program=w,v.error.args=_}for(;z.readFileSync(C,{encoding:r.encoding}).trim()!=="1";);return(g=z.readFileSync(b,{encoding:r.encoding}).trim())==="0"?v.input=ee.update(z.readFileSync(x,{encoding:"binary"}),"hex",r.encoding)+ee.final(r.encoding):(h=z.readFileSync(T,{encoding:r.encoding}).trim(),v.error=new Error(Br+(h?` +`+h:"")),v.error.method="_execFileSync",v.error.program=w,v.error.args=_,v.error.extMessage=h,v.error.exitCode=+g),z.unlinkSync(x),z.unlinkSync(T),z.unlinkSync(b),z.unlinkSync(C),v}function ts(r){var u,p={},c,w={env:process.env,encoding:r.encoding};if(we||(Ve?process.env.PSModulePath?(we="powershell.exe",Ke=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(we="cscript.exe",Ke=["//nologo",__dirname+"\\read.cs.js"]):(we="/bin/sh",Ke=[__dirname+"/read.sh"])),Ve&&!process.env.PSModulePath&&(w.stdio=[process.stdin]),gr.execFileSync){u=Wr(r),$e&&$e("execFileSync",u);try{p.input=gr.execFileSync(we,u,w)}catch(_){c=_.stderr?(_.stderr+"").trim():"",p.error=new Error(Br+(c?` +`+c:"")),p.error.method="execFileSync",p.error.program=we,p.error.args=u,p.error.extMessage=c,p.error.exitCode=_.status,p.error.code=_.code,p.error.signal=_.signal}}else p=rs(r,w);return p.error||(p.input=p.input.replace(/^\s*'|'\s*$/g,""),r.display=""),p}function br(r){var u="",p=r.display,c=!r.display&&r.keyIn&&r.hideEchoBack&&!r.mask;function w(){var _=ts(r);if(_.error)throw _.error;return _.input}return mr&&mr(r),function(){var _,v,g;function h(){return _||(_=process.binding("fs"),v=process.binding("constants")),_}if(typeof fe=="string")if(fe=null,Ve){if(g=function(x){var T=x.replace(/^\D+/,"").split("."),b=0;return(T[0]=+T[0])&&(b+=T[0]*1e4),(T[1]=+T[1])&&(b+=T[1]*100),(T[2]=+T[2])&&(b+=T[2]),b}(process.version),!(g>=20302&&g<40204||g>=5e4&&g<50100||g>=50600&&g<60200)&&process.stdin.isTTY)process.stdin.pause(),fe=process.stdin.fd,Ce=process.stdin._handle;else try{fe=h().open("CONIN$",v.O_RDWR,parseInt("0666",8)),Ce=new Fr(fe,!0)}catch(x){}if(process.stdout.isTTY)ue=process.stdout.fd;else{try{ue=z.openSync("\\\\.\\CON","w")}catch(x){}if(typeof ue!="number")try{ue=h().open("CONOUT$",v.O_RDWR,parseInt("0666",8))}catch(x){}}}else{if(process.stdin.isTTY){process.stdin.pause();try{fe=z.openSync("/dev/tty","r"),Ce=process.stdin._handle}catch(x){}}else try{fe=z.openSync("/dev/tty","r"),Ce=new Fr(fe,!1)}catch(x){}if(process.stdout.isTTY)ue=process.stdout.fd;else try{ue=z.openSync("/dev/tty","w")}catch(x){}}}(),function(){var _,v,g=!r.hideEchoBack&&!r.keyIn,h,x,T,b,C;je="";function N(L){return L===zr?!0:Ce.setRawMode(L)!==0?!1:(zr=L,!0)}if(Lr||!Ce||typeof ue!="number"&&(r.display||!g)){u=w();return}if(r.display&&(z.writeSync(ue,r.display),r.display=""),!r.displayOnly){if(!N(!g)){u=w();return}for(x=r.keyIn?1:r.bufferSize,h=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(x):new Buffer(x),r.keyIn&&r.limit&&(v=new RegExp("[^"+r.limit+"]","g"+(r.caseSensitive?"":"i")));;){T=0;try{T=z.readSync(fe,h,0,x)}catch(L){if(L.code!=="EOF"){N(!1),u+=w();return}}if(T>0?(b=h.toString(r.encoding,0,T),je+=b):(b=` +`,je+=String.fromCharCode(0)),b&&typeof(C=(b.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(b=C,_=!0),b&&(b=b.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),b&&v&&(b=b.replace(v,"")),b&&(g||(r.hideEchoBack?r.mask&&z.writeSync(ue,new Array(b.length+1).join(r.mask)):z.writeSync(ue,b)),u+=b),!r.keyIn&&_||r.keyIn&&u.length>=x)break}!g&&!c&&z.writeSync(ue,` +`),N(!1)}}(),r.print&&!c&&r.print(p+(r.displayOnly?"":(r.hideEchoBack?new Array(u.length+1).join(r.mask):u)+` +`),r.encoding),r.displayOnly?"":hr=r.keepWhitespace||r.keyIn?u:u.trim()}function ns(r,u){var p=[];function c(w){w!=null&&(Array.isArray(w)?w.forEach(c):(!u||u(w))&&p.push(w))}return c(r),p}function Tr(r){return r.replace(/[\x00-\x7f]/g,function(u){return"\\x"+("00"+u.charCodeAt().toString(16)).substr(-2)})}function Z(){var r=Array.prototype.slice.call(arguments),u,p;return r.length&&typeof r[0]=="boolean"&&(p=r.shift(),p&&(u=Object.keys(dr),r.unshift(dr))),r.reduce(function(c,w){return w==null||(w.hasOwnProperty("noEchoBack")&&!w.hasOwnProperty("hideEchoBack")&&(w.hideEchoBack=w.noEchoBack,delete w.noEchoBack),w.hasOwnProperty("noTrim")&&!w.hasOwnProperty("keepWhitespace")&&(w.keepWhitespace=w.noTrim,delete w.noTrim),p||(u=Object.keys(w)),u.forEach(function(_){var v;if(!!w.hasOwnProperty(_))switch(v=w[_],_){case"mask":case"limitMessage":case"defaultInput":case"encoding":v=v!=null?v+"":"",v&&_!=="limitMessage"&&(v=v.replace(/[\r\n]/g,"")),c[_]=v;break;case"bufferSize":!isNaN(v=parseInt(v,10))&&typeof v=="number"&&(c[_]=v);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":c[_]=!!v;break;case"limit":case"trueValue":case"falseValue":c[_]=ns(v,function(g){var h=typeof g;return h==="string"||h==="number"||h==="function"||g instanceof RegExp}).map(function(g){return typeof g=="string"?g.replace(/[\r\n]/g,""):g});break;case"print":case"phContent":case"preCheck":c[_]=typeof v=="function"?v:void 0;break;case"prompt":case"display":c[_]=v!=null?v:"";break}})),c},{})}function xr(r,u,p){return u.some(function(c){var w=typeof c;return w==="string"?p?r===c:r.toLowerCase()===c.toLowerCase():w==="number"?parseFloat(r)===c:w==="function"?c(r):c instanceof RegExp?c.test(r):!1})}function Vr(r,u){var p=_e.normalize(Ve?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return r=_e.normalize(r),u?r.replace(/^~(?=\/|\\|$)/,p):r.replace(new RegExp("^"+Tr(p)+"(?=\\/|\\\\|$)",Ve?"i":""),"~")}function Oe(r,u){var p="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",c=new RegExp("(\\$)?(\\$<"+p+">)","g"),w=new RegExp("(\\$)?(\\$\\{"+p+"\\})","g");function _(v,g,h,x,T,b){var C;return g||typeof(C=u(T))!="string"?h:C?(x||"")+C+(b||""):""}return r.replace(c,_).replace(w,_)}function Hr(r,u,p){var c,w=[],_=-1,v=0,g="",h;function x(T,b){return b.length>3?(T.push(b[0]+"..."+b[b.length-1]),h=!0):b.length&&(T=T.concat(b)),T}return c=r.reduce(function(T,b){return T.concat((b+"").split(""))},[]).reduce(function(T,b){var C,N;return u||(b=b.toLowerCase()),C=/^\d$/.test(b)?1:/^[A-Z]$/.test(b)?2:/^[a-z]$/.test(b)?3:0,p&&C===0?g+=b:(N=b.charCodeAt(0),C&&C===_&&N===v+1?w.push(b):(T=x(T,w),w=[b],_=C),v=N),T},[]),c=x(c,w),g&&(c.push(g),h=!0),{values:c,suppressed:h}}function Gr(r,u){return r.join(r.length>2?", ":u?" / ":"/")}function Yr(r,u){var p,c,w={},_;if(u.phContent&&(p=u.phContent(r,u)),typeof p!="string")switch(r){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":p=u.hasOwnProperty(r)?typeof u[r]=="boolean"?u[r]?"on":"off":u[r]+"":"";break;case"limit":case"trueValue":case"falseValue":c=u[u.hasOwnProperty(r+"Src")?r+"Src":r],u.keyIn?(w=Hr(c,u.caseSensitive),c=w.values):c=c.filter(function(v){var g=typeof v;return g==="string"||g==="number"}),p=Gr(c,w.suppressed);break;case"limitCount":case"limitCountNotZero":p=u[u.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,p=p||r!=="limitCountNotZero"?p+"":"";break;case"lastInput":p=hr;break;case"cwd":case"CWD":case"cwdHome":p=process.cwd(),r==="CWD"?p=_e.basename(p):r==="cwdHome"&&(p=Vr(p));break;case"date":case"time":case"localeDate":case"localeTime":p=new Date()["to"+r.replace(/^./,function(v){return v.toUpperCase()})+"String"]();break;default:typeof(_=(r.match(/^history_m(\d+)$/)||[])[1])=="string"&&(p=Se[Se.length-_]||"")}return p}function Ur(r){var u=/^(.)-(.)$/.exec(r),p="",c,w,_,v;if(!u)return null;for(c=u[1].charCodeAt(0),w=u[2].charCodeAt(0),v=c +And the length must be: $`,trueValue:null,falseValue:null,caseSensitive:!0},u,{history:!1,cd:!1,phContent:function(N){return N==="charlist"?p.text:N==="length"?c+"..."+w:null}}),v,g,h,x,T,b,C;for(u=u||{},v=Oe(u.charlist?u.charlist+"":"$",Ur),(isNaN(c=parseInt(u.min,10))||typeof c!="number")&&(c=12),(isNaN(w=parseInt(u.max,10))||typeof w!="number")&&(w=24),x=new RegExp("^["+Tr(v)+"]{"+c+","+w+"}$"),p=Hr([v],_.caseSensitive,!0),p.text=Gr(p.values,p.suppressed),g=u.confirmMessage!=null?u.confirmMessage:"Reinput a same one to confirm it: ",h=u.unmatchMessage!=null?u.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",r==null&&(r="Input new password: "),T=_.limitMessage;!C;)_.limit=x,_.limitMessage=T,b=M.question(r,_),_.limit=[b,""],_.limitMessage=h,C=M.question(g,_);return b};function Jr(r,u,p){var c;function w(_){return c=p(_),!isNaN(c)&&typeof c=="number"}return M.question(r,Z({limitMessage:"Input valid number, please."},u,{limit:w,cd:!1})),c}M.questionInt=function(r,u){return Jr(r,u,function(p){return parseInt(p,10)})};M.questionFloat=function(r,u){return Jr(r,u,parseFloat)};M.questionPath=function(r,u){var p,c="",w=Z({hideEchoBack:!1,limitMessage:`$Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},u,{keepWhitespace:!1,limit:function(_){var v,g,h;_=Vr(_,!0),c="";function x(T){T.split(/\/|\\/).reduce(function(b,C){var N=_e.resolve(b+=C+_e.sep);if(!z.existsSync(N))z.mkdirSync(N);else if(!z.statSync(N).isDirectory())throw new Error("Non directory already exists: "+N);return b},"")}try{if(v=z.existsSync(_),p=v?z.realpathSync(_):_e.resolve(_),!u.hasOwnProperty("exists")&&!v||typeof u.exists=="boolean"&&u.exists!==v)return c=(v?"Already exists":"No such file or directory")+": "+p,!1;if(!v&&u.create&&(u.isDirectory?x(p):(x(_e.dirname(p)),z.closeSync(z.openSync(p,"w"))),p=z.realpathSync(p)),v&&(u.min||u.max||u.isFile||u.isDirectory)){if(g=z.statSync(p),u.isFile&&!g.isFile())return c="Not file: "+p,!1;if(u.isDirectory&&!g.isDirectory())return c="Not directory: "+p,!1;if(u.min&&g.size<+u.min||u.max&&g.size>+u.max)return c="Size "+g.size+" is out of range: "+p,!1}if(typeof u.validate=="function"&&(h=u.validate(p))!==!0)return typeof h=="string"&&(c=h),!1}catch(T){return c=T+"",!1}return!0},phContent:function(_){return _==="error"?c:_!=="min"&&_!=="max"?null:u.hasOwnProperty(_)?u[_]+"":""}});return u=u||{},r==null&&(r='Input path (you can "cd" and "pwd"): '),M.question(r,w),p};function Kr(r,u){var p={},c={};return typeof r=="object"?(Object.keys(r).forEach(function(w){typeof r[w]=="function"&&(c[u.caseSensitive?w:w.toLowerCase()]=r[w])}),p.preCheck=function(w){var _;return p.args=Sr(w),_=p.args[0]||"",u.caseSensitive||(_=_.toLowerCase()),p.hRes=_!=="_"&&c.hasOwnProperty(_)?c[_].apply(w,p.args.slice(1)):c.hasOwnProperty("_")?c._.apply(w,p.args):null,{res:w,forceNext:!1}},c.hasOwnProperty("_")||(p.limit=function(){var w=p.args[0]||"";return u.caseSensitive||(w=w.toLowerCase()),c.hasOwnProperty(w)})):p.preCheck=function(w){return p.args=Sr(w),p.hRes=typeof r=="function"?r.apply(w,p.args):!0,{res:w,forceNext:!1}},p}M.promptCL=function(r,u){var p=Z({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},u),c=Kr(r,p);return p.limit=c.limit,p.preCheck=c.preCheck,M.prompt(p),c.args};M.promptLoop=function(r,u){for(var p=Z({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},u);!r(M.prompt(p)););};M.promptCLLoop=function(r,u){var p=Z({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},u),c=Kr(r,p);for(p.limit=c.limit,p.preCheck=c.preCheck;M.prompt(p),!c.hRes;);};M.promptSimShell=function(r){return M.prompt(Z({hideEchoBack:!1,history:!0},r,{prompt:function(){return Ve?"$>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$$ "}()}))};function jr(r,u,p){var c;return r==null&&(r="Are you sure? "),(!u||u.guide!==!1)&&(r+="")&&(r=r.replace(/\s*:?\s*$/,"")+" [y/n]: "),c=M.keyIn(r,Z(u,{hideEchoBack:!1,limit:p,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof c=="boolean"?c:""}M.keyInYN=function(r,u){return jr(r,u)};M.keyInYNStrict=function(r,u){return jr(r,u,"yn")};M.keyInPause=function(r,u){r==null&&(r="Continue..."),(!u||u.guide!==!1)&&(r+="")&&(r=r.replace(/\s+$/,"")+" (Hit any key)"),M.keyIn(r,Z({limit:null},u,{hideEchoBack:!0,mask:""}))};M.keyInSelect=function(r,u,p){var c=Z({hideEchoBack:!1},p,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(h){return h==="itemsCount"?r.length+"":h==="firstItem"?(r[0]+"").trim():h==="lastItem"?(r[r.length-1]+"").trim():null}}),w="",_={},v=49,g=` +`;if(!Array.isArray(r)||!r.length||r.length>35)throw"`items` must be Array (max length: 35).";return r.forEach(function(h,x){var T=String.fromCharCode(v);w+=T,_[T]=x,g+="["+T+"] "+(h+"").trim()+` +`,v=v===57?97:v+1}),(!p||p.cancel!==!1)&&(w+="0",_["0"]=-1,g+="[0] "+(p&&p.cancel!=null&&typeof p.cancel!="boolean"?(p.cancel+"").trim():"CANCEL")+` +`),c.limit=w,g+=` +`,u==null&&(u="Choose one from list: "),(u+="")&&((!p||p.guide!==!1)&&(u=u.replace(/\s*:?\s*$/,"")+" [$]: "),g+=u),_[M.keyIn(g,c).toLowerCase()]};M.getRawInput=function(){return je};function De(r,u){var p;return u.length&&(p={},p[r]=u[0]),M.setDefaultOptions(p)[r]}M.setPrint=function(){return De("print",arguments)};M.setPrompt=function(){return De("prompt",arguments)};M.setEncoding=function(){return De("encoding",arguments)};M.setMask=function(){return De("mask",arguments)};M.setBufferSize=function(){return De("bufferSize",arguments)}});var kr=I((Mu,ie)=>{(function(){var r={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(e,n,t){var s=tau_file_system.files[e];if(!s){if(t==="read")return null;s={path:e,text:"",type:n,get:function(a,l){return l===this.text.length||l>this.text.length?"end_of_file":this.text.substring(l,l+a)},put:function(a,l){return l==="end_of_file"?(this.text+=a,!0):l==="past_end_of_file"?null:(this.text=this.text.substring(0,l)+a+this.text.substring(l+a.length),!0)},get_byte:function(a){if(a==="end_of_stream")return-1;var l=Math.floor(a/2);if(this.text.length<=l)return-1;var f=_(this.text[Math.floor(a/2)],0);return a%2==0?f&255:f/256>>>0},put_byte:function(a,l){var f=l==="end_of_stream"?this.text.length:Math.floor(l/2);if(this.text.length>>0,y=(y&255)<<8|a&255):(y=y&255,y=(a&255)<<8|y&255),this.text.length===f?this.text+=v(y):this.text=this.text.substring(0,f)+v(y)+this.text.substring(f+1),!0},flush:function(){return!0},close:function(){var a=tau_file_system.files[this.path];return a?!0:null}},tau_file_system.files[e]=s}return t==="write"&&(s.text=""),s}},tau_user_input={buffer:"",get:function(e,n){for(var t;tau_user_input.buffer.length\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function te(e,n){return e.get_flag("char_conversion").id==="on"?n.replace(/./g,function(t){return e.get_char_conversion(t)}):n}function j(e){this.thread=e,this.text="",this.tokens=[]}j.prototype.set_last_tokens=function(e){return this.tokens=e},j.prototype.new_text=function(e){this.text=e,this.tokens=[]},j.prototype.get_tokens=function(e){var n,t=0,s=0,a=0,l=[],f=!1;if(e){var y=this.tokens[e-1];t=y.len,n=te(this.thread,this.text.substr(y.len)),s=y.line,a=y.start}else n=this.text;if(/^\s*$/.test(n))return null;for(;n!=="";){var d=[],m=!1;if(/^\n/.exec(n)!==null){s++,a=0,t++,n=n.replace(/\n/,""),f=!0;continue}for(var S in ee)if(ee.hasOwnProperty(S)){var P=ee[S].exec(n);P&&d.push({value:P[0],name:S,matches:P})}if(!d.length)return this.set_last_tokens([{value:n,matches:[],name:"lexical",line:s,start:a}]);var y=p(d,function(B,q){return B.value.length>=q.value.length?B:q});switch(y.start=a,y.line=s,n=n.replace(y.value,""),a+=y.value.length,t+=y.value.length,y.name){case"atom":y.raw=y.value,y.value.charAt(0)==="'"&&(y.value=C(y.value.substr(1,y.value.length-2),"'"),y.value===null&&(y.name="lexical",y.value="unknown escape sequence"));break;case"number":y.float=y.value.substring(0,2)!=="0x"&&y.value.match(/[.eE]/)!==null&&y.value!=="0'.",y.value=L(y.value),y.blank=m;break;case"string":var A=y.value.charAt(0);y.value=C(y.value.substr(1,y.value.length-2),A),y.value===null&&(y.name="lexical",y.value="unknown escape sequence");break;case"whitespace":var R=l[l.length-1];R&&(R.space=!0),m=!0;continue;case"r_bracket":l.length>0&&l[l.length-1].name==="l_bracket"&&(y=l.pop(),y.name="atom",y.value="{}",y.raw="{}",y.space=!1);break;case"r_brace":l.length>0&&l[l.length-1].name==="l_brace"&&(y=l.pop(),y.name="atom",y.value="[]",y.raw="[]",y.space=!1);break}y.len=t,l.push(y),m=!1}var k=this.set_last_tokens(l);return k.length===0?null:k};function U(e,n,t,s,a){if(!n[t])return{type:g,value:i.error.syntax(n[t-1],"expression expected",!0)};var l;if(s==="0"){var f=n[t];switch(f.name){case"number":return{type:h,len:t+1,value:new i.type.Num(f.value,f.float)};case"variable":return{type:h,len:t+1,value:new i.type.Var(f.value)};case"string":var y;switch(e.get_flag("double_quotes").id){case"atom":y=new o(f.value,[]);break;case"codes":y=new o("[]",[]);for(var d=f.value.length-1;d>=0;d--)y=new o(".",[new i.type.Num(_(f.value,d),!1),y]);break;case"chars":y=new o("[]",[]);for(var d=f.value.length-1;d>=0;d--)y=new o(".",[new i.type.Term(f.value.charAt(d),[]),y]);break}return{type:h,len:t+1,value:y};case"l_paren":var k=U(e,n,t+1,e.__get_max_priority(),!0);return k.type!==h?k:n[k.len]&&n[k.len].name==="r_paren"?(k.len++,k):{type:g,derived:!0,value:i.error.syntax(n[k.len]?n[k.len]:n[k.len-1],") or operator expected",!n[k.len])};case"l_bracket":var k=U(e,n,t+1,e.__get_max_priority(),!0);return k.type!==h?k:n[k.len]&&n[k.len].name==="r_bracket"?(k.len++,k.value=new o("{}",[k.value]),k):{type:g,derived:!0,value:i.error.syntax(n[k.len]?n[k.len]:n[k.len-1],"} or operator expected",!n[k.len])}}var m=Ue(e,n,t,a);return m.type===h||m.derived||(m=Ze(e,n,t),m.type===h||m.derived)?m:{type:g,derived:!1,value:i.error.syntax(n[t],"unexpected token")}}var S=e.__get_max_priority(),P=e.__get_next_priority(s),A=t;if(n[t].name==="atom"&&n[t+1]&&(n[t].space||n[t+1].name!=="l_paren")){var f=n[t++],R=e.__lookup_operator_classes(s,f.value);if(R&&R.indexOf("fy")>-1){var k=U(e,n,t,s,a);if(k.type!==g)return f.value==="-"&&!f.space&&i.type.is_number(k.value)?{value:new i.type.Num(-k.value.value,k.value.is_float),len:k.len,type:h}:{value:new i.type.Term(f.value,[k.value]),len:k.len,type:h};l=k}else if(R&&R.indexOf("fx")>-1){var k=U(e,n,t,P,a);if(k.type!==g)return{value:new i.type.Term(f.value,[k.value]),len:k.len,type:h};l=k}}t=A;var k=U(e,n,t,P,a);if(k.type===h){t=k.len;var f=n[t];if(n[t]&&(n[t].name==="atom"&&e.__lookup_operator_classes(s,f.value)||n[t].name==="bar"&&e.__lookup_operator_classes(s,"|"))){var W=P,B=s,R=e.__lookup_operator_classes(s,f.value);if(R.indexOf("xf")>-1)return{value:new i.type.Term(f.value,[k.value]),len:++k.len,type:h};if(R.indexOf("xfx")>-1){var q=U(e,n,t+1,W,a);return q.type===h?{value:new i.type.Term(f.value,[k.value,q.value]),len:q.len,type:h}:(q.derived=!0,q)}else if(R.indexOf("xfy")>-1){var q=U(e,n,t+1,B,a);return q.type===h?{value:new i.type.Term(f.value,[k.value,q.value]),len:q.len,type:h}:(q.derived=!0,q)}else if(k.type!==g)for(;;){t=k.len;var f=n[t];if(f&&f.name==="atom"&&e.__lookup_operator_classes(s,f.value)){var R=e.__lookup_operator_classes(s,f.value);if(R.indexOf("yf")>-1)k={value:new i.type.Term(f.value,[k.value]),len:++t,type:h};else if(R.indexOf("yfx")>-1){var q=U(e,n,++t,W,a);if(q.type===g)return q.derived=!0,q;t=q.len,k={value:new i.type.Term(f.value,[k.value,q.value]),len:t,type:h}}else break}else break}}else l={type:g,value:i.error.syntax(n[k.len-1],"operator expected")};return k}return k}function Ue(e,n,t,s){if(!n[t]||n[t].name==="atom"&&n[t].raw==="."&&!s&&(n[t].space||!n[t+1]||n[t+1].name!=="l_paren"))return{type:g,derived:!1,value:i.error.syntax(n[t-1],"unfounded token")};var a=n[t],l=[];if(n[t].name==="atom"&&n[t].raw!==","){if(t++,n[t-1].space)return{type:h,len:t,value:new i.type.Term(a.value,l)};if(n[t]&&n[t].name==="l_paren"){if(n[t+1]&&n[t+1].name==="r_paren")return{type:g,derived:!0,value:i.error.syntax(n[t+1],"argument expected")};var f=U(e,n,++t,"999",!0);if(f.type===g)return f.derived?f:{type:g,derived:!0,value:i.error.syntax(n[t]?n[t]:n[t-1],"argument expected",!n[t])};for(l.push(f.value),t=f.len;n[t]&&n[t].name==="atom"&&n[t].value===",";){if(f=U(e,n,t+1,"999",!0),f.type===g)return f.derived?f:{type:g,derived:!0,value:i.error.syntax(n[t+1]?n[t+1]:n[t],"argument expected",!n[t+1])};l.push(f.value),t=f.len}if(n[t]&&n[t].name==="r_paren")t++;else return{type:g,derived:!0,value:i.error.syntax(n[t]?n[t]:n[t-1],", or ) expected",!n[t])}}return{type:h,len:t,value:new i.type.Term(a.value,l)}}return{type:g,derived:!1,value:i.error.syntax(n[t],"term expected")}}function Ze(e,n,t){if(!n[t])return{type:g,derived:!1,value:i.error.syntax(n[t-1],"[ expected")};if(n[t]&&n[t].name==="l_brace"){var s=U(e,n,++t,"999",!0),a=[s.value],l=void 0;if(s.type===g)return n[t]&&n[t].name==="r_brace"?{type:h,len:t+1,value:new i.type.Term("[]",[])}:{type:g,derived:!0,value:i.error.syntax(n[t],"] expected")};for(t=s.len;n[t]&&n[t].name==="atom"&&n[t].value===",";){if(s=U(e,n,t+1,"999",!0),s.type===g)return s.derived?s:{type:g,derived:!0,value:i.error.syntax(n[t+1]?n[t+1]:n[t],"argument expected",!n[t+1])};a.push(s.value),t=s.len}var f=!1;if(n[t]&&n[t].name==="bar"){if(f=!0,s=U(e,n,t+1,"999",!0),s.type===g)return s.derived?s:{type:g,derived:!0,value:i.error.syntax(n[t+1]?n[t+1]:n[t],"argument expected",!n[t+1])};l=s.value,t=s.len}return n[t]&&n[t].name==="r_brace"?{type:h,len:t+1,value:he(a,l)}:{type:g,derived:!0,value:i.error.syntax(n[t]?n[t]:n[t-1],f?"] expected":", or | or ] expected",!n[t])}}return{type:g,derived:!1,value:i.error.syntax(n[t],"list expected")}}function Qe(e,n,t){var s=n[t].line,a=U(e,n,t,e.__get_max_priority(),!1),l=null,f;if(a.type!==g)if(t=a.len,n[t]&&n[t].name==="atom"&&n[t].raw===".")if(t++,i.type.is_term(a.value)){if(a.value.indicator===":-/2"?(l=new i.type.Rule(a.value.args[0],ve(a.value.args[1])),f={value:l,len:t,type:h}):a.value.indicator==="-->/2"?(l=Bi(new i.type.Rule(a.value.args[0],a.value.args[1]),e),l.body=ve(l.body),f={value:l,len:t,type:i.type.is_rule(l)?h:g}):(l=new i.type.Rule(a.value,null),f={value:l,len:t,type:h}),l){var y=l.singleton_variables();y.length>0&&e.throw_warning(i.warning.singleton(y,l.head.indicator,s))}return f}else return{type:g,value:i.error.syntax(n[t],"callable expected")};else return{type:g,value:i.error.syntax(n[t]?n[t]:n[t-1],". or operator expected")};return a}function Di(e,n,t){t=t||{},t.from=t.from?t.from:"$tau-js",t.reconsult=t.reconsult!==void 0?t.reconsult:!0;var s=new j(e),a={},l;s.new_text(n);var f=0,y=s.get_tokens(f);do{if(y===null||!y[f])break;var d=Qe(e,y,f);if(d.type===g)return new o("throw",[d.value]);if(d.value.body===null&&d.value.head.indicator==="?-/1"){var m=new X(e.session);m.add_goal(d.value.head.args[0]),m.answer(function(P){i.type.is_error(P)?e.throw_warning(P.args[0]):(P===!1||P===null)&&e.throw_warning(i.warning.failed_goal(d.value.head.args[0],d.len))}),f=d.len;var S=!0}else if(d.value.body===null&&d.value.head.indicator===":-/1"){var S=e.run_directive(d.value.head.args[0]);f=d.len,d.value.head.args[0].indicator==="char_conversion/2"&&(y=s.get_tokens(f),f=0)}else{l=d.value.head.indicator,t.reconsult!==!1&&a[l]!==!0&&!e.is_multifile_predicate(l)&&(e.session.rules[l]=w(e.session.rules[l]||[],function(A){return A.dynamic}),a[l]=!0);var S=e.add_rule(d.value,t);f=d.len}if(!S)return S}while(!0);return!0}function Xi(e,n){var t=new j(e);t.new_text(n);var s=0;do{var a=t.get_tokens(s);if(a===null)break;var l=U(e,a,0,e.__get_max_priority(),!1);if(l.type!==g){var f=l.len,y=f;if(a[f]&&a[f].name==="atom"&&a[f].raw===".")e.add_goal(ve(l.value));else{var d=a[f];return new o("throw",[i.error.syntax(d||a[f-1],". or operator expected",!d)])}s=l.len+1}else return new o("throw",[l.value])}while(!0);return!0}function Bi(e,n){e=e.rename(n);var t=n.next_free_variable(),s=pr(e.body,t,n);return s.error?s.value:(e.body=s.value,e.head.args=e.head.args.concat([t,s.variable]),e.head=new o(e.head.id,e.head.args),e)}function pr(e,n,t){var s;if(i.type.is_term(e)&&e.indicator==="!/0")return{value:e,variable:n,error:!1};if(i.type.is_term(e)&&e.indicator===",/2"){var a=pr(e.args[0],n,t);if(a.error)return a;var l=pr(e.args[1],a.variable,t);return l.error?l:{value:new o(",",[a.value,l.value]),variable:l.variable,error:!1}}else{if(i.type.is_term(e)&&e.indicator==="{}/1")return{value:e.args[0],variable:n,error:!1};if(i.type.is_empty_list(e))return{value:new o("true",[]),variable:n,error:!1};if(i.type.is_list(e)){s=t.next_free_variable();for(var f=e,y;f.indicator==="./2";)y=f,f=f.args[1];return i.type.is_variable(f)?{value:i.error.instantiation("DCG"),variable:n,error:!0}:i.type.is_empty_list(f)?(y.args[1]=s,{value:new o("=",[n,e]),variable:s,error:!1}):{value:i.error.type("list",e,"DCG"),variable:n,error:!0}}else return i.type.is_callable(e)?(s=t.next_free_variable(),e.args=e.args.concat([n,s]),e=new o(e.id,e.args),{value:e,variable:s,error:!1}):{value:i.error.type("callable",e,"DCG"),variable:n,error:!0}}}function ve(e){return i.type.is_variable(e)?new o("call",[e]):i.type.is_term(e)&&[",/2",";/2","->/2"].indexOf(e.indicator)!==-1?new o(e.id,[ve(e.args[0]),ve(e.args[1])]):e}function he(e,n){for(var t=n||new i.type.Term("[]",[]),s=e.length-1;s>=0;s--)t=new i.type.Term(".",[e[s],t]);return t}function Fi(e,n){for(var t=e.length-1;t>=0;t--)e[t]===n&&e.splice(t,1)}function yr(e){for(var n={},t=[],s=0;s=0;n--)if(e.charAt(n)==="/")return new o("/",[new o(e.substring(0,n)),new E(parseInt(e.substring(n+1)),!1)])}function O(e){this.id=e}function E(e,n){this.is_float=n!==void 0?n:parseInt(e)!==e,this.value=this.is_float?e:parseInt(e)}var $r=0;function o(e,n,t){this.ref=t||++$r,this.id=e,this.args=n||[],this.indicator=e+"/"+this.args.length}var Li=0;function ne(e,n,t,s,a,l){this.id=Li++,this.stream=e,this.mode=n,this.alias=t,this.type=s!==void 0?s:"text",this.reposition=a!==void 0?a:!0,this.eof_action=l!==void 0?l:"eof_code",this.position=this.mode==="append"?"end_of_stream":0,this.output=this.mode==="write"||this.mode==="append",this.input=this.mode==="read"}function Y(e){e=e||{},this.links=e}function V(e,n,t){n=n||new Y,t=t||null,this.goal=e,this.substitution=n,this.parent=t}function Q(e,n,t){this.head=e,this.body=n,this.dynamic=t||!1}function D(e){e=e===void 0||e<=0?1e3:e,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new X(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=e,this.streams={user_input:new ne(typeof ie!="undefined"&&ie.exports?nodejs_user_input:tau_user_input,"read","user_input","text",!1,"reset"),user_output:new ne(typeof ie!="undefined"&&ie.exports?nodejs_user_output:tau_user_output,"write","user_output","text",!1,"eof_code")},this.file_system=typeof ie!="undefined"&&ie.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(n){return n.substitution},this.format_error=function(n){return n.goal},this.flag={bounded:i.flag.bounded.value,max_integer:i.flag.max_integer.value,min_integer:i.flag.min_integer.value,integer_rounding_function:i.flag.integer_rounding_function.value,char_conversion:i.flag.char_conversion.value,debug:i.flag.debug.value,max_arity:i.flag.max_arity.value,unknown:i.flag.unknown.value,double_quotes:i.flag.double_quotes.value,occurs_check:i.flag.occurs_check.value,dialect:i.flag.dialect.value,version_data:i.flag.version_data.value,nodejs:i.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{":-":["fx","xfx"],"-->":["xfx"],"?-":["fx"]},1100:{";":["xfy"]},1050:{"->":["xfy"]},1e3:{",":["xfy"]},900:{"\\+":["fy"]},700:{"=":["xfx"],"\\=":["xfx"],"==":["xfx"],"\\==":["xfx"],"@<":["xfx"],"@=<":["xfx"],"@>":["xfx"],"@>=":["xfx"],"=..":["xfx"],is:["xfx"],"=:=":["xfx"],"=\\=":["xfx"],"<":["xfx"],"=<":["xfx"],">":["xfx"],">=":["xfx"]},600:{":":["xfy"]},500:{"+":["yfx"],"-":["yfx"],"/\\":["yfx"],"\\/":["yfx"]},400:{"*":["yfx"],"/":["yfx"],"//":["yfx"],rem:["yfx"],mod:["yfx"],"<<":["yfx"],">>":["yfx"]},200:{"**":["xfx"],"^":["xfy"],"-":["fy"],"+":["fy"],"\\":["fy"]}}}function X(e){this.epoch=Date.now(),this.session=e,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level="top_level/0",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function Dr(e,n,t){this.id=e,this.rules=n,this.exports=t,i.module[e]=this}Dr.prototype.exports_predicate=function(e){return this.exports.indexOf(e)!==-1},O.prototype.unify=function(e,n){if(n&&u(e.variables(),this.id)!==-1&&!i.type.is_variable(e))return null;var t={};return t[this.id]=e,new Y(t)},E.prototype.unify=function(e,n){return i.type.is_number(e)&&this.value===e.value&&this.is_float===e.is_float?new Y:null},o.prototype.unify=function(e,n){if(i.type.is_term(e)&&this.indicator===e.indicator){for(var t=new Y,s=0;s=0){var s=this.args[0].value,a=Math.floor(s/26),l=s%26;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[l]+(a!==0?a:"")}switch(this.indicator){case"[]/0":case"{}/0":case"!/0":return this.id;case"{}/1":return"{"+this.args[0].toString(e)+"}";case"./2":for(var f="["+this.args[0].toString(e),y=this.args[1];y.indicator==="./2";)f+=", "+y.args[0].toString(e),y=y.args[1];return y.indicator!=="[]/0"&&(f+="|"+y.toString(e)),f+="]",f;case",/2":return"("+this.args[0].toString(e)+", "+this.args[1].toString(e)+")";default:var d=this.id,m=e.session?e.session.lookup_operator(this.id,this.args.length):null;if(e.session===void 0||e.ignore_ops||m===null)return e.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(d)&&d!=="{}"&&d!=="[]"&&(d="'"+N(d)+"'"),d+(this.args.length?"("+c(this.args,function(R){return R.toString(e)}).join(", ")+")":"");var S=m.priority>n.priority||m.priority===n.priority&&(m.class==="xfy"&&this.indicator!==n.indicator||m.class==="yfx"&&this.indicator!==n.indicator||this.indicator===n.indicator&&m.class==="yfx"&&t==="right"||this.indicator===n.indicator&&m.class==="xfy"&&t==="left");m.indicator=this.indicator;var P=S?"(":"",A=S?")":"";return this.args.length===0?"("+this.id+")":["fy","fx"].indexOf(m.class)!==-1?P+d+" "+this.args[0].toString(e,m)+A:["yf","xf"].indexOf(m.class)!==-1?P+this.args[0].toString(e,m)+" "+d+A:P+this.args[0].toString(e,m,"left")+" "+this.id+" "+this.args[1].toString(e,m,"right")+A}},ne.prototype.toString=function(e){return"("+this.id+")"},Y.prototype.toString=function(e){var n="{";for(var t in this.links)!this.links.hasOwnProperty(t)||(n!=="{"&&(n+=", "),n+=t+"/"+this.links[t].toString(e));return n+="}",n},V.prototype.toString=function(e){return this.goal===null?"<"+this.substitution.toString(e)+">":"<"+this.goal.toString(e)+", "+this.substitution.toString(e)+">"},Q.prototype.toString=function(e){return this.body?this.head.toString(e)+" :- "+this.body.toString(e)+".":this.head.toString(e)+"."},D.prototype.toString=function(e){for(var n="",t=0;t=0;a--)s=new o(".",[n[a],s]);return s}return new o(this.id,c(this.args,function(l){return l.apply(e)}),this.ref)},ne.prototype.apply=function(e){return this},Q.prototype.apply=function(e){return new Q(this.head.apply(e),this.body!==null?this.body.apply(e):null)},Y.prototype.apply=function(e){var n,t={};for(n in this.links)!this.links.hasOwnProperty(n)||(t[n]=this.links[n].apply(e));return new Y(t)},o.prototype.select=function(){for(var e=this;e.indicator===",/2";)e=e.args[0];return e},o.prototype.replace=function(e){return this.indicator===",/2"?this.args[0].indicator===",/2"?new o(",",[this.args[0].replace(e),this.args[1]]):e===null?this.args[1]:new o(",",[e,this.args[1]]):e},o.prototype.search=function(e){if(i.type.is_term(e)&&e.ref!==void 0&&this.ref===e.ref)return!0;for(var n=0;nn&&s0&&(n=this.head_point().substitution.domain());u(n,i.format_variable(this.session.rename))!==-1;)this.session.rename++;if(e.id==="_")return new O(i.format_variable(this.session.rename));this.session.renamed_variables[e.id]=i.format_variable(this.session.rename)}return new O(this.session.renamed_variables[e.id])},D.prototype.next_free_variable=function(){return this.thread.next_free_variable()},X.prototype.next_free_variable=function(){this.session.rename++;var e=[];for(this.points.length>0&&(e=this.head_point().substitution.domain());u(e,i.format_variable(this.session.rename))!==-1;)this.session.rename++;return new O(i.format_variable(this.session.rename))},D.prototype.is_public_predicate=function(e){return!this.public_predicates.hasOwnProperty(e)||this.public_predicates[e]===!0},X.prototype.is_public_predicate=function(e){return this.session.is_public_predicate(e)},D.prototype.is_multifile_predicate=function(e){return this.multifile_predicates.hasOwnProperty(e)&&this.multifile_predicates[e]===!0},X.prototype.is_multifile_predicate=function(e){return this.session.is_multifile_predicate(e)},D.prototype.prepend=function(e){return this.thread.prepend(e)},X.prototype.prepend=function(e){for(var n=e.length-1;n>=0;n--)this.points.push(e[n])},D.prototype.success=function(e,n){return this.thread.success(e,n)},X.prototype.success=function(e,n){var n=typeof n=="undefined"?e:n;this.prepend([new V(e.goal.replace(null),e.substitution,n)])},D.prototype.throw_error=function(e){return this.thread.throw_error(e)},X.prototype.throw_error=function(e){this.prepend([new V(new o("throw",[e]),new Y,null,null)])},D.prototype.step_rule=function(e,n){return this.thread.step_rule(e,n)},X.prototype.step_rule=function(e,n){var t=n.indicator;if(e==="user"&&(e=null),e===null&&this.session.rules.hasOwnProperty(t))return this.session.rules[t];for(var s=e===null?this.session.modules:u(this.session.modules,e)===-1?[]:[e],a=0;a1)&&this.again()},D.prototype.answers=function(e,n,t){return this.thread.answers(e,n,t)},X.prototype.answers=function(e,n,t){var s=n||1e3,a=this;if(n<=0){t&&t();return}this.answer(function(l){e(l),l!==!1?setTimeout(function(){a.answers(e,n-1,t)},1):t&&t()})},D.prototype.again=function(e){return this.thread.again(e)},X.prototype.again=function(e){for(var n,t=Date.now();this.__calls.length>0;){for(this.warnings=[],e!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!i.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var s=Date.now();this.cpu_time_last=s-t,this.cpu_time+=this.cpu_time_last;var a=this.__calls.shift();this.current_limit<=0?a(null):this.points.length===0?a(!1):i.type.is_error(this.head_point().goal)?(n=this.session.format_error(this.points.pop()),this.points=[],a(n)):(this.debugger&&this.debugger_states.push(this.head_point()),n=this.session.format_success(this.points.pop()),a(n))}},D.prototype.unfold=function(e){if(e.body===null)return!1;var n=e.head,t=e.body,s=t.select(),a=new X(this),l=[];a.add_goal(s),a.step();for(var f=a.points.length-1;f>=0;f--){var y=a.points[f],d=n.apply(y.substitution),m=t.replace(y.goal);m!==null&&(m=m.apply(y.substitution)),l.push(new Q(d,m))}var S=this.rules[n.indicator],P=u(S,e);return l.length>0&&P!==-1?(S.splice.apply(S,[P,1].concat(l)),!0):!1},X.prototype.unfold=function(e){return this.session.unfold(e)},O.prototype.interpret=function(e){return i.error.instantiation(e.level)},E.prototype.interpret=function(e){return this},o.prototype.interpret=function(e){return i.type.is_unitary_list(this)?this.args[0].interpret(e):i.operate(e,this)},O.prototype.compare=function(e){return this.ide.id?1:0},E.prototype.compare=function(e){if(this.value===e.value&&this.is_float===e.is_float)return 0;if(this.valuee.value)return 1},o.prototype.compare=function(e){if(this.args.lengthe.args.length||this.args.length===e.args.length&&this.id>e.id)return 1;for(var n=0;ns)return 1;if(e.constructor===E){if(e.is_float&&n.is_float)return 0;if(e.is_float)return-1;if(n.is_float)return 1}return 0},is_substitution:function(e){return e instanceof Y},is_state:function(e){return e instanceof V},is_rule:function(e){return e instanceof Q},is_variable:function(e){return e instanceof O},is_stream:function(e){return e instanceof ne},is_anonymous_var:function(e){return e instanceof O&&e.id==="_"},is_callable:function(e){return e instanceof o},is_number:function(e){return e instanceof E},is_integer:function(e){return e instanceof E&&!e.is_float},is_float:function(e){return e instanceof E&&e.is_float},is_term:function(e){return e instanceof o},is_atom:function(e){return e instanceof o&&e.args.length===0},is_ground:function(e){if(e instanceof O)return!1;if(e instanceof o){for(var n=0;n0},is_list:function(e){return e instanceof o&&(e.indicator==="[]/0"||e.indicator==="./2")},is_empty_list:function(e){return e instanceof o&&e.indicator==="[]/0"},is_non_empty_list:function(e){return e instanceof o&&e.indicator==="./2"},is_fully_list:function(e){for(;e instanceof o&&e.indicator==="./2";)e=e.args[1];return e instanceof O||e instanceof o&&e.indicator==="[]/0"},is_instantiated_list:function(e){for(;e instanceof o&&e.indicator==="./2";)e=e.args[1];return e instanceof o&&e.indicator==="[]/0"},is_unitary_list:function(e){return e instanceof o&&e.indicator==="./2"&&e.args[1]instanceof o&&e.args[1].indicator==="[]/0"},is_character:function(e){return e instanceof o&&(e.id.length===1||e.id.length>0&&e.id.length<=2&&_(e.id,0)>=65536)},is_character_code:function(e){return e instanceof E&&!e.is_float&&e.value>=0&&e.value<=1114111},is_byte:function(e){return e instanceof E&&!e.is_float&&e.value>=0&&e.value<=255},is_operator:function(e){return e instanceof o&&i.arithmetic.evaluation[e.indicator]},is_directive:function(e){return e instanceof o&&i.directive[e.indicator]!==void 0},is_builtin:function(e){return e instanceof o&&i.predicate[e.indicator]!==void 0},is_error:function(e){return e instanceof o&&e.indicator==="throw/1"},is_predicate_indicator:function(e){return e instanceof o&&e.indicator==="//2"&&e.args[0]instanceof o&&e.args[0].args.length===0&&e.args[1]instanceof E&&e.args[1].is_float===!1},is_flag:function(e){return e instanceof o&&e.args.length===0&&i.flag[e.id]!==void 0},is_value_flag:function(e,n){if(!i.type.is_flag(e))return!1;for(var t in i.flag[e.id].allowed)if(!!i.flag[e.id].allowed.hasOwnProperty(t)&&i.flag[e.id].allowed[t].equals(n))return!0;return!1},is_io_mode:function(e){return i.type.is_atom(e)&&["read","write","append"].indexOf(e.id)!==-1},is_stream_option:function(e){return i.type.is_term(e)&&(e.indicator==="alias/1"&&i.type.is_atom(e.args[0])||e.indicator==="reposition/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="true"||e.args[0].id==="false")||e.indicator==="type/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="text"||e.args[0].id==="binary")||e.indicator==="eof_action/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="error"||e.args[0].id==="eof_code"||e.args[0].id==="reset"))},is_stream_position:function(e){return i.type.is_integer(e)&&e.value>=0||i.type.is_atom(e)&&(e.id==="end_of_stream"||e.id==="past_end_of_stream")},is_stream_property:function(e){return i.type.is_term(e)&&(e.indicator==="input/0"||e.indicator==="output/0"||e.indicator==="alias/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0]))||e.indicator==="file_name/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0]))||e.indicator==="position/1"&&(i.type.is_variable(e.args[0])||i.type.is_stream_position(e.args[0]))||e.indicator==="reposition/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0])&&(e.args[0].id==="true"||e.args[0].id==="false"))||e.indicator==="type/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0])&&(e.args[0].id==="text"||e.args[0].id==="binary"))||e.indicator==="mode/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0])&&(e.args[0].id==="read"||e.args[0].id==="write"||e.args[0].id==="append"))||e.indicator==="eof_action/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0])&&(e.args[0].id==="error"||e.args[0].id==="eof_code"||e.args[0].id==="reset"))||e.indicator==="end_of_stream/1"&&(i.type.is_variable(e.args[0])||i.type.is_atom(e.args[0])&&(e.args[0].id==="at"||e.args[0].id==="past"||e.args[0].id==="not")))},is_streamable:function(e){return e.__proto__.stream!==void 0},is_read_option:function(e){return i.type.is_term(e)&&["variables/1","variable_names/1","singletons/1"].indexOf(e.indicator)!==-1},is_write_option:function(e){return i.type.is_term(e)&&(e.indicator==="quoted/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="true"||e.args[0].id==="false")||e.indicator==="ignore_ops/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="true"||e.args[0].id==="false")||e.indicator==="numbervars/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="true"||e.args[0].id==="false"))},is_close_option:function(e){return i.type.is_term(e)&&e.indicator==="force/1"&&i.type.is_atom(e.args[0])&&(e.args[0].id==="true"||e.args[0].id==="false")},is_modifiable_flag:function(e){return i.type.is_flag(e)&&i.flag[e.id].changeable},is_module:function(e){return e instanceof o&&e.indicator==="library/1"&&e.args[0]instanceof o&&e.args[0].args.length===0&&i.module[e.args[0].id]!==void 0}},arithmetic:{evaluation:{"e/0":{type_args:null,type_result:!0,fn:function(e){return Math.E}},"pi/0":{type_args:null,type_result:!0,fn:function(e){return Math.PI}},"tau/0":{type_args:null,type_result:!0,fn:function(e){return 2*Math.PI}},"epsilon/0":{type_args:null,type_result:!0,fn:function(e){return Number.EPSILON}},"+/1":{type_args:null,type_result:null,fn:function(e,n){return e}},"-/1":{type_args:null,type_result:null,fn:function(e,n){return-e}},"\\/1":{type_args:!1,type_result:!1,fn:function(e,n){return~e}},"abs/1":{type_args:null,type_result:null,fn:function(e,n){return Math.abs(e)}},"sign/1":{type_args:null,type_result:null,fn:function(e,n){return Math.sign(e)}},"float_integer_part/1":{type_args:!0,type_result:!1,fn:function(e,n){return parseInt(e)}},"float_fractional_part/1":{type_args:!0,type_result:!0,fn:function(e,n){return e-parseInt(e)}},"float/1":{type_args:null,type_result:!0,fn:function(e,n){return parseFloat(e)}},"floor/1":{type_args:!0,type_result:!1,fn:function(e,n){return Math.floor(e)}},"truncate/1":{type_args:!0,type_result:!1,fn:function(e,n){return parseInt(e)}},"round/1":{type_args:!0,type_result:!1,fn:function(e,n){return Math.round(e)}},"ceiling/1":{type_args:!0,type_result:!1,fn:function(e,n){return Math.ceil(e)}},"sin/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.sin(e)}},"cos/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.cos(e)}},"tan/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.tan(e)}},"asin/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.asin(e)}},"acos/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.acos(e)}},"atan/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.atan(e)}},"atan2/2":{type_args:null,type_result:!0,fn:function(e,n,t){return Math.atan2(e,n)}},"exp/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.exp(e)}},"sqrt/1":{type_args:null,type_result:!0,fn:function(e,n){return Math.sqrt(e)}},"log/1":{type_args:null,type_result:!0,fn:function(e,n){return e>0?Math.log(e):i.error.evaluation("undefined",n.__call_indicator)}},"+/2":{type_args:null,type_result:null,fn:function(e,n,t){return e+n}},"-/2":{type_args:null,type_result:null,fn:function(e,n,t){return e-n}},"*/2":{type_args:null,type_result:null,fn:function(e,n,t){return e*n}},"//2":{type_args:null,type_result:!0,fn:function(e,n,t){return n?e/n:i.error.evaluation("zero_division",t.__call_indicator)}},"///2":{type_args:!1,type_result:!1,fn:function(e,n,t){return n?parseInt(e/n):i.error.evaluation("zero_division",t.__call_indicator)}},"**/2":{type_args:null,type_result:!0,fn:function(e,n,t){return Math.pow(e,n)}},"^/2":{type_args:null,type_result:null,fn:function(e,n,t){return Math.pow(e,n)}},"<>/2":{type_args:!1,type_result:!1,fn:function(e,n,t){return e>>n}},"/\\/2":{type_args:!1,type_result:!1,fn:function(e,n,t){return e&n}},"\\//2":{type_args:!1,type_result:!1,fn:function(e,n,t){return e|n}},"xor/2":{type_args:!1,type_result:!1,fn:function(e,n,t){return e^n}},"rem/2":{type_args:!1,type_result:!1,fn:function(e,n,t){return n?e%n:i.error.evaluation("zero_division",t.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(e,n,t){return n?e-parseInt(e/n)*n:i.error.evaluation("zero_division",t.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(e,n,t){return Math.max(e,n)}},"min/2":{type_args:null,type_result:null,fn:function(e,n,t){return Math.min(e,n)}}}},directive:{"dynamic/1":function(e,n){var t=n.args[0];if(i.type.is_variable(t))e.throw_error(i.error.instantiation(n.indicator));else if(!i.type.is_compound(t)||t.indicator!=="//2")e.throw_error(i.error.type("predicate_indicator",t,n.indicator));else if(i.type.is_variable(t.args[0])||i.type.is_variable(t.args[1]))e.throw_error(i.error.instantiation(n.indicator));else if(!i.type.is_atom(t.args[0]))e.throw_error(i.error.type("atom",t.args[0],n.indicator));else if(!i.type.is_integer(t.args[1]))e.throw_error(i.error.type("integer",t.args[1],n.indicator));else{var s=n.args[0].args[0].id+"/"+n.args[0].args[1].value;e.session.public_predicates[s]=!0,e.session.rules[s]||(e.session.rules[s]=[])}},"multifile/1":function(e,n){var t=n.args[0];i.type.is_variable(t)?e.throw_error(i.error.instantiation(n.indicator)):!i.type.is_compound(t)||t.indicator!=="//2"?e.throw_error(i.error.type("predicate_indicator",t,n.indicator)):i.type.is_variable(t.args[0])||i.type.is_variable(t.args[1])?e.throw_error(i.error.instantiation(n.indicator)):i.type.is_atom(t.args[0])?i.type.is_integer(t.args[1])?e.session.multifile_predicates[n.args[0].args[0].id+"/"+n.args[0].args[1].value]=!0:e.throw_error(i.error.type("integer",t.args[1],n.indicator)):e.throw_error(i.error.type("atom",t.args[0],n.indicator))},"set_prolog_flag/2":function(e,n){var t=n.args[0],s=n.args[1];i.type.is_variable(t)||i.type.is_variable(s)?e.throw_error(i.error.instantiation(n.indicator)):i.type.is_atom(t)?i.type.is_flag(t)?i.type.is_value_flag(t,s)?i.type.is_modifiable_flag(t)?e.session.flag[t.id]=s:e.throw_error(i.error.permission("modify","flag",t)):e.throw_error(i.error.domain("flag_value",new o("+",[t,s]),n.indicator)):e.throw_error(i.error.domain("prolog_flag",t,n.indicator)):e.throw_error(i.error.type("atom",t,n.indicator))},"use_module/1":function(e,n){var t=n.args[0];if(i.type.is_variable(t))e.throw_error(i.error.instantiation(n.indicator));else if(!i.type.is_term(t))e.throw_error(i.error.type("term",t,n.indicator));else if(i.type.is_module(t)){var s=t.args[0].id;u(e.session.modules,s)===-1&&e.session.modules.push(s)}},"char_conversion/2":function(e,n){var t=n.args[0],s=n.args[1];i.type.is_variable(t)||i.type.is_variable(s)?e.throw_error(i.error.instantiation(n.indicator)):i.type.is_character(t)?i.type.is_character(s)?t.id===s.id?delete e.session.__char_conversion[t.id]:e.session.__char_conversion[t.id]=s.id:e.throw_error(i.error.type("character",s,n.indicator)):e.throw_error(i.error.type("character",t,n.indicator))},"op/3":function(e,n){var t=n.args[0],s=n.args[1],a=n.args[2];if(i.type.is_variable(t)||i.type.is_variable(s)||i.type.is_variable(a))e.throw_error(i.error.instantiation(n.indicator));else if(!i.type.is_integer(t))e.throw_error(i.error.type("integer",t,n.indicator));else if(!i.type.is_atom(s))e.throw_error(i.error.type("atom",s,n.indicator));else if(!i.type.is_atom(a))e.throw_error(i.error.type("atom",a,n.indicator));else if(t.value<0||t.value>1200)e.throw_error(i.error.domain("operator_priority",t,n.indicator));else if(a.id===",")e.throw_error(i.error.permission("modify","operator",a,n.indicator));else if(a.id==="|"&&(t.value<1001||s.id.length!==3))e.throw_error(i.error.permission("modify","operator",a,n.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(s.id)===-1)e.throw_error(i.error.domain("operator_specifier",s,n.indicator));else{var l={prefix:null,infix:null,postfix:null};for(var f in e.session.__operators)if(!!e.session.__operators.hasOwnProperty(f)){var y=e.session.__operators[f][a.id];y&&(u(y,"fx")!==-1&&(l.prefix={priority:f,type:"fx"}),u(y,"fy")!==-1&&(l.prefix={priority:f,type:"fy"}),u(y,"xf")!==-1&&(l.postfix={priority:f,type:"xf"}),u(y,"yf")!==-1&&(l.postfix={priority:f,type:"yf"}),u(y,"xfx")!==-1&&(l.infix={priority:f,type:"xfx"}),u(y,"xfy")!==-1&&(l.infix={priority:f,type:"xfy"}),u(y,"yfx")!==-1&&(l.infix={priority:f,type:"yfx"}))}var d;switch(s.id){case"fy":case"fx":d="prefix";break;case"yf":case"xf":d="postfix";break;default:d="infix";break}if(((l.prefix&&d==="prefix"||l.postfix&&d==="postfix"||l.infix&&d==="infix")&&l[d].type!==s.id||l.infix&&d==="postfix"||l.postfix&&d==="infix")&&t.value!==0)e.throw_error(i.error.permission("create","operator",a,n.indicator));else return l[d]&&(Fi(e.session.__operators[l[d].priority][a.id],s.id),e.session.__operators[l[d].priority][a.id].length===0&&delete e.session.__operators[l[d].priority][a.id]),t.value>0&&(e.session.__operators[t.value]||(e.session.__operators[t.value.toString()]={}),e.session.__operators[t.value][a.id]||(e.session.__operators[t.value][a.id]=[]),e.session.__operators[t.value][a.id].push(s.id)),!0}}},predicate:{"op/3":function(e,n,t){i.directive["op/3"](e,t)&&e.success(n)},"current_op/3":function(e,n,t){var s=t.args[0],a=t.args[1],l=t.args[2],f=[];for(var y in e.session.__operators)for(var d in e.session.__operators[y])for(var m=0;m/2"){var s=e.points,a=e.session.format_success,l=e.session.format_error;e.session.format_success=function(m){return m.substitution},e.session.format_error=function(m){return m.goal},e.points=[new V(t.args[0].args[0],n.substitution,n)];var f=function(m){e.points=s,e.session.format_success=a,e.session.format_error=l,m===!1?e.prepend([new V(n.goal.replace(t.args[1]),n.substitution,n)]):i.type.is_error(m)?e.throw_error(m.args[0]):m===null?(e.prepend([n]),e.__calls.shift()(null)):e.prepend([new V(n.goal.replace(t.args[0].args[1]).apply(m),n.substitution.apply(m),n)])};e.__calls.unshift(f)}else{var y=new V(n.goal.replace(t.args[0]),n.substitution,n),d=new V(n.goal.replace(t.args[1]),n.substitution,n);e.prepend([y,d])}},"!/0":function(e,n,t){var s,a,l=[];for(s=n,a=null;s.parent!==null&&s.parent.goal.search(t);)if(a=s,s=s.parent,s.goal!==null){var f=s.goal.select();if(f&&f.id==="call"&&f.search(t)){s=a;break}}for(var y=e.points.length-1;y>=0;y--){for(var d=e.points[y],m=d.parent;m!==null&&m!==s.parent;)m=m.parent;m===null&&m!==s.parent&&l.push(d)}e.points=l.reverse(),e.success(n)},"\\+/1":function(e,n,t){var s=t.args[0];i.type.is_variable(s)?e.throw_error(i.error.instantiation(e.level)):i.type.is_callable(s)?e.prepend([new V(n.goal.replace(new o(",",[new o(",",[new o("call",[s]),new o("!",[])]),new o("fail",[])])),n.substitution,n),new V(n.goal.replace(null),n.substitution,n)]):e.throw_error(i.error.type("callable",s,e.level))},"->/2":function(e,n,t){var s=n.goal.replace(new o(",",[t.args[0],new o(",",[new o("!"),t.args[1]])]));e.prepend([new V(s,n.substitution,n)])},"fail/0":function(e,n,t){},"false/0":function(e,n,t){},"true/0":function(e,n,t){e.success(n)},"call/1":ye(1),"call/2":ye(2),"call/3":ye(3),"call/4":ye(4),"call/5":ye(5),"call/6":ye(6),"call/7":ye(7),"call/8":ye(8),"once/1":function(e,n,t){var s=t.args[0];e.prepend([new V(n.goal.replace(new o(",",[new o("call",[s]),new o("!",[])])),n.substitution,n)])},"forall/2":function(e,n,t){var s=t.args[0],a=t.args[1];e.prepend([new V(n.goal.replace(new o("\\+",[new o(",",[new o("call",[s]),new o("\\+",[new o("call",[a])])])])),n.substitution,n)])},"repeat/0":function(e,n,t){e.prepend([new V(n.goal.replace(null),n.substitution,n),n])},"throw/1":function(e,n,t){i.type.is_variable(t.args[0])?e.throw_error(i.error.instantiation(e.level)):e.throw_error(t.args[0])},"catch/3":function(e,n,t){var s=e.points;e.points=[],e.prepend([new V(t.args[0],n.substitution,n)]);var a=e.session.format_success,l=e.session.format_error;e.session.format_success=function(y){return y.substitution},e.session.format_error=function(y){return y.goal};var f=function(y){var d=e.points;if(e.points=s,e.session.format_success=a,e.session.format_error=l,i.type.is_error(y)){for(var m=[],S=e.points.length-1;S>=0;S--){for(var R=e.points[S],P=R.parent;P!==null&&P!==n.parent;)P=P.parent;P===null&&P!==n.parent&&m.push(R)}e.points=m;var A=e.get_flag("occurs_check").indicator==="true/0",R=new V,k=i.unify(y.args[0],t.args[1],A);k!==null?(R.substitution=n.substitution.apply(k),R.goal=n.goal.replace(t.args[2]).apply(k),R.parent=n,e.prepend([R])):e.throw_error(y.args[0])}else if(y!==!1){for(var W=y===null?[]:[new V(n.goal.apply(y).replace(null),n.substitution.apply(y),n)],B=[],S=d.length-1;S>=0;S--){B.push(d[S]);var q=d[S].goal!==null?d[S].goal.select():null;if(i.type.is_term(q)&&q.indicator==="!/0")break}var F=c(B,function(H){return H.goal===null&&(H.goal=new o("true",[])),H=new V(n.goal.replace(new o("catch",[H.goal,t.args[1],t.args[2]])),n.substitution.apply(H.substitution),H.parent),H.exclude=t.args[0].variables(),H}).reverse();e.prepend(F),e.prepend(W),y===null&&(this.current_limit=0,e.__calls.shift()(null))}};e.__calls.unshift(f)},"=/2":function(e,n,t){var s=e.get_flag("occurs_check").indicator==="true/0",a=new V,l=i.unify(t.args[0],t.args[1],s);l!==null&&(a.goal=n.goal.apply(l).replace(null),a.substitution=n.substitution.apply(l),a.parent=n,e.prepend([a]))},"unify_with_occurs_check/2":function(e,n,t){var s=new V,a=i.unify(t.args[0],t.args[1],!0);a!==null&&(s.goal=n.goal.apply(a).replace(null),s.substitution=n.substitution.apply(a),s.parent=n,e.prepend([s]))},"\\=/2":function(e,n,t){var s=e.get_flag("occurs_check").indicator==="true/0",a=i.unify(t.args[0],t.args[1],s);a===null&&e.success(n)},"subsumes_term/2":function(e,n,t){var s=e.get_flag("occurs_check").indicator==="true/0",a=i.unify(t.args[1],t.args[0],s);a!==null&&t.args[1].apply(a).equals(t.args[1])&&e.success(n)},"findall/3":function(e,n,t){var s=t.args[0],a=t.args[1],l=t.args[2];if(i.type.is_variable(a))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(a))e.throw_error(i.error.type("callable",a,t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_list(l))e.throw_error(i.error.type("list",l,t.indicator));else{var f=e.next_free_variable(),y=new o(",",[a,new o("=",[f,s])]),d=e.points,m=e.session.limit,S=e.session.format_success;e.session.format_success=function(R){return R.substitution},e.add_goal(y,!0,n);var P=[],A=function(R){if(R!==!1&&R!==null&&!i.type.is_error(R))e.__calls.unshift(A),P.push(R.links[f.id]),e.session.limit=e.current_limit;else if(e.points=d,e.session.limit=m,e.session.format_success=S,i.type.is_error(R))e.throw_error(R.args[0]);else if(e.current_limit>0){for(var k=new o("[]"),W=P.length-1;W>=0;W--)k=new o(".",[P[W],k]);e.prepend([new V(n.goal.replace(new o("=",[l,k])),n.substitution,n)])}};e.__calls.unshift(A)}},"bagof/3":function(e,n,t){var s,a=t.args[0],l=t.args[1],f=t.args[2];if(i.type.is_variable(l))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(l))e.throw_error(i.error.type("callable",l,t.indicator));else if(!i.type.is_variable(f)&&!i.type.is_list(f))e.throw_error(i.error.type("list",f,t.indicator));else{var y=e.next_free_variable(),d;l.indicator==="^/2"?(d=l.args[0].variables(),l=l.args[1]):d=[],d=d.concat(a.variables());for(var m=l.variables().filter(function(F){return u(d,F)===-1}),S=new o("[]"),P=m.length-1;P>=0;P--)S=new o(".",[new O(m[P]),S]);var A=new o(",",[l,new o("=",[y,new o(",",[S,a])])]),R=e.points,k=e.session.limit,W=e.session.format_success;e.session.format_success=function(F){return F.substitution},e.add_goal(A,!0,n);var B=[],q=function(F){if(F!==!1&&F!==null&&!i.type.is_error(F)){e.__calls.unshift(q);var H=!1,J=F.links[y.id].args[0],me=F.links[y.id].args[1];for(var be in B)if(!!B.hasOwnProperty(be)){var Me=B[be];if(Me.variables.equals(J)){Me.answers.push(me),H=!0;break}}H||B.push({variables:J,answers:[me]}),e.session.limit=e.current_limit}else if(e.points=R,e.session.limit=k,e.session.format_success=W,i.type.is_error(F))e.throw_error(F.args[0]);else if(e.current_limit>0){for(var qe=[],ce=0;ce=0;xe--)Te=new o(".",[F[xe],Te]);qe.push(new V(n.goal.replace(new o(",",[new o("=",[S,B[ce].variables]),new o("=",[f,Te])])),n.substitution,n))}e.prepend(qe)}};e.__calls.unshift(q)}},"setof/3":function(e,n,t){var s,a=t.args[0],l=t.args[1],f=t.args[2];if(i.type.is_variable(l))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(l))e.throw_error(i.error.type("callable",l,t.indicator));else if(!i.type.is_variable(f)&&!i.type.is_list(f))e.throw_error(i.error.type("list",f,t.indicator));else{var y=e.next_free_variable(),d;l.indicator==="^/2"?(d=l.args[0].variables(),l=l.args[1]):d=[],d=d.concat(a.variables());for(var m=l.variables().filter(function(F){return u(d,F)===-1}),S=new o("[]"),P=m.length-1;P>=0;P--)S=new o(".",[new O(m[P]),S]);var A=new o(",",[l,new o("=",[y,new o(",",[S,a])])]),R=e.points,k=e.session.limit,W=e.session.format_success;e.session.format_success=function(F){return F.substitution},e.add_goal(A,!0,n);var B=[],q=function(F){if(F!==!1&&F!==null&&!i.type.is_error(F)){e.__calls.unshift(q);var H=!1,J=F.links[y.id].args[0],me=F.links[y.id].args[1];for(var be in B)if(!!B.hasOwnProperty(be)){var Me=B[be];if(Me.variables.equals(J)){Me.answers.push(me),H=!0;break}}H||B.push({variables:J,answers:[me]}),e.session.limit=e.current_limit}else if(e.points=R,e.session.limit=k,e.session.format_success=W,i.type.is_error(F))e.throw_error(F.args[0]);else if(e.current_limit>0){for(var qe=[],ce=0;ce=0;xe--)Te=new o(".",[F[xe],Te]);qe.push(new V(n.goal.replace(new o(",",[new o("=",[S,B[ce].variables]),new o("=",[f,Te])])),n.substitution,n))}e.prepend(qe)}};e.__calls.unshift(q)}},"functor/3":function(e,n,t){var s,a=t.args[0],l=t.args[1],f=t.args[2];if(i.type.is_variable(a)&&(i.type.is_variable(l)||i.type.is_variable(f)))e.throw_error(i.error.instantiation("functor/3"));else if(!i.type.is_variable(f)&&!i.type.is_integer(f))e.throw_error(i.error.type("integer",t.args[2],"functor/3"));else if(!i.type.is_variable(l)&&!i.type.is_atomic(l))e.throw_error(i.error.type("atomic",t.args[1],"functor/3"));else if(i.type.is_integer(l)&&i.type.is_integer(f)&&f.value!==0)e.throw_error(i.error.type("atom",t.args[1],"functor/3"));else if(i.type.is_variable(a)){if(t.args[2].value>=0){for(var y=[],d=0;d0&&s<=t.args[1].args.length){var a=new o("=",[t.args[1].args[s-1],t.args[2]]);e.prepend([new V(n.goal.replace(a),n.substitution,n)])}}},"=../2":function(e,n,t){var s;if(i.type.is_variable(t.args[0])&&(i.type.is_variable(t.args[1])||i.type.is_non_empty_list(t.args[1])&&i.type.is_variable(t.args[1].args[0])))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_fully_list(t.args[1]))e.throw_error(i.error.type("list",t.args[1],t.indicator));else if(i.type.is_variable(t.args[0])){if(!i.type.is_variable(t.args[1])){var l=[];for(s=t.args[1].args[1];s.indicator==="./2";)l.push(s.args[0]),s=s.args[1];i.type.is_variable(t.args[0])&&i.type.is_variable(s)?e.throw_error(i.error.instantiation(t.indicator)):l.length===0&&i.type.is_compound(t.args[1].args[0])?e.throw_error(i.error.type("atomic",t.args[1].args[0],t.indicator)):l.length>0&&(i.type.is_compound(t.args[1].args[0])||i.type.is_number(t.args[1].args[0]))?e.throw_error(i.error.type("atom",t.args[1].args[0],t.indicator)):l.length===0?e.prepend([new V(n.goal.replace(new o("=",[t.args[1].args[0],t.args[0]],n)),n.substitution,n)]):e.prepend([new V(n.goal.replace(new o("=",[new o(t.args[1].args[0].id,l),t.args[0]])),n.substitution,n)])}}else{if(i.type.is_atomic(t.args[0]))s=new o(".",[t.args[0],new o("[]")]);else{s=new o("[]");for(var a=t.args[0].args.length-1;a>=0;a--)s=new o(".",[t.args[0].args[a],s]);s=new o(".",[new o(t.args[0].id),s])}e.prepend([new V(n.goal.replace(new o("=",[s,t.args[1]])),n.substitution,n)])}},"copy_term/2":function(e,n,t){var s=t.args[0].rename(e);e.prepend([new V(n.goal.replace(new o("=",[s,t.args[1]])),n.substitution,n.parent)])},"term_variables/2":function(e,n,t){var s=t.args[0],a=t.args[1];if(!i.type.is_fully_list(a))e.throw_error(i.error.type("list",a,t.indicator));else{var l=he(c(yr(s.variables()),function(f){return new O(f)}));e.prepend([new V(n.goal.replace(new o("=",[a,l])),n.substitution,n)])}},"clause/2":function(e,n,t){if(i.type.is_variable(t.args[0]))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(t.args[0]))e.throw_error(i.error.type("callable",t.args[0],t.indicator));else if(!i.type.is_variable(t.args[1])&&!i.type.is_callable(t.args[1]))e.throw_error(i.error.type("callable",t.args[1],t.indicator));else if(e.session.rules[t.args[0].indicator]!==void 0)if(e.is_public_predicate(t.args[0].indicator)){var s=[];for(var a in e.session.rules[t.args[0].indicator])if(!!e.session.rules[t.args[0].indicator].hasOwnProperty(a)){var l=e.session.rules[t.args[0].indicator][a];e.session.renamed_variables={},l=l.rename(e),l.body===null&&(l.body=new o("true"));var f=new o(",",[new o("=",[l.head,t.args[0]]),new o("=",[l.body,t.args[1]])]);s.push(new V(n.goal.replace(f),n.substitution,n))}e.prepend(s)}else e.throw_error(i.error.permission("access","private_procedure",t.args[0].indicator,t.indicator))},"current_predicate/1":function(e,n,t){var s=t.args[0];if(!i.type.is_variable(s)&&(!i.type.is_compound(s)||s.indicator!=="//2"))e.throw_error(i.error.type("predicate_indicator",s,t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_variable(s.args[0])&&!i.type.is_atom(s.args[0]))e.throw_error(i.error.type("atom",s.args[0],t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_variable(s.args[1])&&!i.type.is_integer(s.args[1]))e.throw_error(i.error.type("integer",s.args[1],t.indicator));else{var a=[];for(var l in e.session.rules)if(!!e.session.rules.hasOwnProperty(l)){var f=l.lastIndexOf("/"),y=l.substr(0,f),d=parseInt(l.substr(f+1,l.length-(f+1))),m=new o("/",[new o(y),new E(d,!1)]),S=new o("=",[m,s]);a.push(new V(n.goal.replace(S),n.substitution,n))}e.prepend(a)}},"asserta/1":function(e,n,t){if(i.type.is_variable(t.args[0]))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(t.args[0]))e.throw_error(i.error.type("callable",t.args[0],t.indicator));else{var s,a;t.args[0].indicator===":-/2"?(s=t.args[0].args[0],a=ve(t.args[0].args[1])):(s=t.args[0],a=null),i.type.is_callable(s)?a!==null&&!i.type.is_callable(a)?e.throw_error(i.error.type("callable",a,t.indicator)):e.is_public_predicate(s.indicator)?(e.session.rules[s.indicator]===void 0&&(e.session.rules[s.indicator]=[]),e.session.public_predicates[s.indicator]=!0,e.session.rules[s.indicator]=[new Q(s,a,!0)].concat(e.session.rules[s.indicator]),e.success(n)):e.throw_error(i.error.permission("modify","static_procedure",s.indicator,t.indicator)):e.throw_error(i.error.type("callable",s,t.indicator))}},"assertz/1":function(e,n,t){if(i.type.is_variable(t.args[0]))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(t.args[0]))e.throw_error(i.error.type("callable",t.args[0],t.indicator));else{var s,a;t.args[0].indicator===":-/2"?(s=t.args[0].args[0],a=ve(t.args[0].args[1])):(s=t.args[0],a=null),i.type.is_callable(s)?a!==null&&!i.type.is_callable(a)?e.throw_error(i.error.type("callable",a,t.indicator)):e.is_public_predicate(s.indicator)?(e.session.rules[s.indicator]===void 0&&(e.session.rules[s.indicator]=[]),e.session.public_predicates[s.indicator]=!0,e.session.rules[s.indicator].push(new Q(s,a,!0)),e.success(n)):e.throw_error(i.error.permission("modify","static_procedure",s.indicator,t.indicator)):e.throw_error(i.error.type("callable",s,t.indicator))}},"retract/1":function(e,n,t){if(i.type.is_variable(t.args[0]))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_callable(t.args[0]))e.throw_error(i.error.type("callable",t.args[0],t.indicator));else{var s,a;if(t.args[0].indicator===":-/2"?(s=t.args[0].args[0],a=t.args[0].args[1]):(s=t.args[0],a=new o("true")),typeof n.retract=="undefined")if(e.is_public_predicate(s.indicator)){if(e.session.rules[s.indicator]!==void 0){for(var l=[],f=0;fe.get_flag("max_arity").value)e.throw_error(i.error.representation("max_arity",t.indicator));else{var s=t.args[0].args[0].id+"/"+t.args[0].args[1].value;e.is_public_predicate(s)?(delete e.session.rules[s],e.success(n)):e.throw_error(i.error.permission("modify","static_procedure",s,t.indicator))}},"atom_length/2":function(e,n,t){if(i.type.is_variable(t.args[0]))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_atom(t.args[0]))e.throw_error(i.error.type("atom",t.args[0],t.indicator));else if(!i.type.is_variable(t.args[1])&&!i.type.is_integer(t.args[1]))e.throw_error(i.error.type("integer",t.args[1],t.indicator));else if(i.type.is_integer(t.args[1])&&t.args[1].value<0)e.throw_error(i.error.domain("not_less_than_zero",t.args[1],t.indicator));else{var s=new E(t.args[0].id.length,!1);e.prepend([new V(n.goal.replace(new o("=",[s,t.args[1]])),n.substitution,n)])}},"atom_concat/3":function(e,n,t){var s,a,l=t.args[0],f=t.args[1],y=t.args[2];if(i.type.is_variable(y)&&(i.type.is_variable(l)||i.type.is_variable(f)))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_atom(l))e.throw_error(i.error.type("atom",l,t.indicator));else if(!i.type.is_variable(f)&&!i.type.is_atom(f))e.throw_error(i.error.type("atom",f,t.indicator));else if(!i.type.is_variable(y)&&!i.type.is_atom(y))e.throw_error(i.error.type("atom",y,t.indicator));else{var d=i.type.is_variable(l),m=i.type.is_variable(f);if(!d&&!m)a=new o("=",[y,new o(l.id+f.id)]),e.prepend([new V(n.goal.replace(a),n.substitution,n)]);else if(d&&!m)s=y.id.substr(0,y.id.length-f.id.length),s+f.id===y.id&&(a=new o("=",[l,new o(s)]),e.prepend([new V(n.goal.replace(a),n.substitution,n)]));else if(m&&!d)s=y.id.substr(l.id.length),l.id+s===y.id&&(a=new o("=",[f,new o(s)]),e.prepend([new V(n.goal.replace(a),n.substitution,n)]));else{for(var S=[],P=0;P<=y.id.length;P++){var A=new o(y.id.substr(0,P)),R=new o(y.id.substr(P));a=new o(",",[new o("=",[A,l]),new o("=",[R,f])]),S.push(new V(n.goal.replace(a),n.substitution,n))}e.prepend(S)}}},"sub_atom/5":function(e,n,t){var s,a=t.args[0],l=t.args[1],f=t.args[2],y=t.args[3],d=t.args[4];if(i.type.is_variable(a))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_integer(l))e.throw_error(i.error.type("integer",l,t.indicator));else if(!i.type.is_variable(f)&&!i.type.is_integer(f))e.throw_error(i.error.type("integer",f,t.indicator));else if(!i.type.is_variable(y)&&!i.type.is_integer(y))e.throw_error(i.error.type("integer",y,t.indicator));else if(i.type.is_integer(l)&&l.value<0)e.throw_error(i.error.domain("not_less_than_zero",l,t.indicator));else if(i.type.is_integer(f)&&f.value<0)e.throw_error(i.error.domain("not_less_than_zero",f,t.indicator));else if(i.type.is_integer(y)&&y.value<0)e.throw_error(i.error.domain("not_less_than_zero",y,t.indicator));else{var m=[],S=[],P=[];if(i.type.is_variable(l))for(s=0;s<=a.id.length;s++)m.push(s);else m.push(l.value);if(i.type.is_variable(f))for(s=0;s<=a.id.length;s++)S.push(s);else S.push(f.value);if(i.type.is_variable(y))for(s=0;s<=a.id.length;s++)P.push(s);else P.push(y.value);var A=[];for(var R in m)if(!!m.hasOwnProperty(R)){s=m[R];for(var k in S)if(!!S.hasOwnProperty(k)){var W=S[k],B=a.id.length-s-W;if(u(P,B)!==-1&&s+W+B===a.id.length){var q=a.id.substr(s,W);if(a.id===a.id.substr(0,s)+q+a.id.substr(s+W,B)){var F=new o("=",[new o(q),d]),H=new o("=",[l,new E(s)]),J=new o("=",[f,new E(W)]),me=new o("=",[y,new E(B)]),be=new o(",",[new o(",",[new o(",",[H,J]),me]),F]);A.push(new V(n.goal.replace(be),n.substitution,n))}}}}e.prepend(A)}},"atom_chars/2":function(e,n,t){var s=t.args[0],a=t.args[1];if(i.type.is_variable(s)&&i.type.is_variable(a))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_atom(s))e.throw_error(i.error.type("atom",s,t.indicator));else if(i.type.is_variable(s)){for(var y=a,d=i.type.is_variable(s),m="";y.indicator==="./2";){if(i.type.is_character(y.args[0]))m+=y.args[0].id;else if(i.type.is_variable(y.args[0])&&d){e.throw_error(i.error.instantiation(t.indicator));return}else if(!i.type.is_variable(y.args[0])){e.throw_error(i.error.type("character",y.args[0],t.indicator));return}y=y.args[1]}i.type.is_variable(y)&&d?e.throw_error(i.error.instantiation(t.indicator)):!i.type.is_empty_list(y)&&!i.type.is_variable(y)?e.throw_error(i.error.type("list",a,t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[new o(m),s])),n.substitution,n)])}else{for(var l=new o("[]"),f=s.id.length-1;f>=0;f--)l=new o(".",[new o(s.id.charAt(f)),l]);e.prepend([new V(n.goal.replace(new o("=",[a,l])),n.substitution,n)])}},"atom_codes/2":function(e,n,t){var s=t.args[0],a=t.args[1];if(i.type.is_variable(s)&&i.type.is_variable(a))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_atom(s))e.throw_error(i.error.type("atom",s,t.indicator));else if(i.type.is_variable(s)){for(var y=a,d=i.type.is_variable(s),m="";y.indicator==="./2";){if(i.type.is_character_code(y.args[0]))m+=v(y.args[0].value);else if(i.type.is_variable(y.args[0])&&d){e.throw_error(i.error.instantiation(t.indicator));return}else if(!i.type.is_variable(y.args[0])){e.throw_error(i.error.representation("character_code",t.indicator));return}y=y.args[1]}i.type.is_variable(y)&&d?e.throw_error(i.error.instantiation(t.indicator)):!i.type.is_empty_list(y)&&!i.type.is_variable(y)?e.throw_error(i.error.type("list",a,t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[new o(m),s])),n.substitution,n)])}else{for(var l=new o("[]"),f=s.id.length-1;f>=0;f--)l=new o(".",[new E(_(s.id,f),!1),l]);e.prepend([new V(n.goal.replace(new o("=",[a,l])),n.substitution,n)])}},"char_code/2":function(e,n,t){var s=t.args[0],a=t.args[1];if(i.type.is_variable(s)&&i.type.is_variable(a))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_character(s))e.throw_error(i.error.type("character",s,t.indicator));else if(!i.type.is_variable(a)&&!i.type.is_integer(a))e.throw_error(i.error.type("integer",a,t.indicator));else if(!i.type.is_variable(a)&&!i.type.is_character_code(a))e.throw_error(i.error.representation("character_code",t.indicator));else if(i.type.is_variable(a)){var l=new E(_(s.id,0),!1);e.prepend([new V(n.goal.replace(new o("=",[l,a])),n.substitution,n)])}else{var f=new o(v(a.value));e.prepend([new V(n.goal.replace(new o("=",[f,s])),n.substitution,n)])}},"number_chars/2":function(e,n,t){var s,a=t.args[0],l=t.args[1];if(i.type.is_variable(a)&&i.type.is_variable(l))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(a)&&!i.type.is_number(a))e.throw_error(i.error.type("number",a,t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_list(l))e.throw_error(i.error.type("list",l,t.indicator));else{var f=i.type.is_variable(a);if(!i.type.is_variable(l)){var y=l,d=!0;for(s="";y.indicator==="./2";){if(i.type.is_character(y.args[0]))s+=y.args[0].id;else if(i.type.is_variable(y.args[0]))d=!1;else if(!i.type.is_variable(y.args[0])){e.throw_error(i.error.type("character",y.args[0],t.indicator));return}y=y.args[1]}if(d=d&&i.type.is_empty_list(y),!i.type.is_empty_list(y)&&!i.type.is_variable(y)){e.throw_error(i.error.type("list",l,t.indicator));return}if(!d&&f){e.throw_error(i.error.instantiation(t.indicator));return}else if(d)if(i.type.is_variable(y)&&f){e.throw_error(i.error.instantiation(t.indicator));return}else{var m=e.parse(s),S=m.value;!i.type.is_number(S)||m.tokens[m.tokens.length-1].space?e.throw_error(i.error.syntax_by_predicate("parseable_number",t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[a,S])),n.substitution,n)]);return}}if(!f){s=a.toString();for(var P=new o("[]"),A=s.length-1;A>=0;A--)P=new o(".",[new o(s.charAt(A)),P]);e.prepend([new V(n.goal.replace(new o("=",[l,P])),n.substitution,n)])}}},"number_codes/2":function(e,n,t){var s,a=t.args[0],l=t.args[1];if(i.type.is_variable(a)&&i.type.is_variable(l))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(a)&&!i.type.is_number(a))e.throw_error(i.error.type("number",a,t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_list(l))e.throw_error(i.error.type("list",l,t.indicator));else{var f=i.type.is_variable(a);if(!i.type.is_variable(l)){var y=l,d=!0;for(s="";y.indicator==="./2";){if(i.type.is_character_code(y.args[0]))s+=v(y.args[0].value);else if(i.type.is_variable(y.args[0]))d=!1;else if(!i.type.is_variable(y.args[0])){e.throw_error(i.error.type("character_code",y.args[0],t.indicator));return}y=y.args[1]}if(d=d&&i.type.is_empty_list(y),!i.type.is_empty_list(y)&&!i.type.is_variable(y)){e.throw_error(i.error.type("list",l,t.indicator));return}if(!d&&f){e.throw_error(i.error.instantiation(t.indicator));return}else if(d)if(i.type.is_variable(y)&&f){e.throw_error(i.error.instantiation(t.indicator));return}else{var m=e.parse(s),S=m.value;!i.type.is_number(S)||m.tokens[m.tokens.length-1].space?e.throw_error(i.error.syntax_by_predicate("parseable_number",t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[a,S])),n.substitution,n)]);return}}if(!f){s=a.toString();for(var P=new o("[]"),A=s.length-1;A>=0;A--)P=new o(".",[new E(_(s,A),!1),P]);e.prepend([new V(n.goal.replace(new o("=",[l,P])),n.substitution,n)])}}},"upcase_atom/2":function(e,n,t){var s=t.args[0],a=t.args[1];i.type.is_variable(s)?e.throw_error(i.error.instantiation(t.indicator)):i.type.is_atom(s)?!i.type.is_variable(a)&&!i.type.is_atom(a)?e.throw_error(i.error.type("atom",a,t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[a,new o(s.id.toUpperCase(),[])])),n.substitution,n)]):e.throw_error(i.error.type("atom",s,t.indicator))},"downcase_atom/2":function(e,n,t){var s=t.args[0],a=t.args[1];i.type.is_variable(s)?e.throw_error(i.error.instantiation(t.indicator)):i.type.is_atom(s)?!i.type.is_variable(a)&&!i.type.is_atom(a)?e.throw_error(i.error.type("atom",a,t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[a,new o(s.id.toLowerCase(),[])])),n.substitution,n)]):e.throw_error(i.error.type("atom",s,t.indicator))},"atomic_list_concat/2":function(e,n,t){var s=t.args[0],a=t.args[1];e.prepend([new V(n.goal.replace(new o("atomic_list_concat",[s,new o("",[]),a])),n.substitution,n)])},"atomic_list_concat/3":function(e,n,t){var s=t.args[0],a=t.args[1],l=t.args[2];if(i.type.is_variable(a)||i.type.is_variable(s)&&i.type.is_variable(l))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_list(s))e.throw_error(i.error.type("list",s,t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_atom(l))e.throw_error(i.error.type("atom",l,t.indicator));else if(i.type.is_variable(l)){for(var y="",d=s;i.type.is_term(d)&&d.indicator==="./2";){if(!i.type.is_atom(d.args[0])&&!i.type.is_number(d.args[0])){e.throw_error(i.error.type("atomic",d.args[0],t.indicator));return}y!==""&&(y+=a.id),i.type.is_atom(d.args[0])?y+=d.args[0].id:y+=""+d.args[0].value,d=d.args[1]}y=new o(y,[]),i.type.is_variable(d)?e.throw_error(i.error.instantiation(t.indicator)):!i.type.is_term(d)||d.indicator!=="[]/0"?e.throw_error(i.error.type("list",s,t.indicator)):e.prepend([new V(n.goal.replace(new o("=",[y,l])),n.substitution,n)])}else{var f=he(c(l.id.split(a.id),function(m){return new o(m,[])}));e.prepend([new V(n.goal.replace(new o("=",[f,s])),n.substitution,n)])}},"@=/2":function(e,n,t){i.compare(t.args[0],t.args[1])>0&&e.success(n)},"@>=/2":function(e,n,t){i.compare(t.args[0],t.args[1])>=0&&e.success(n)},"compare/3":function(e,n,t){var s=t.args[0],a=t.args[1],l=t.args[2];if(!i.type.is_variable(s)&&!i.type.is_atom(s))e.throw_error(i.error.type("atom",s,t.indicator));else if(i.type.is_atom(s)&&["<",">","="].indexOf(s.id)===-1)e.throw_error(i.type.domain("order",s,t.indicator));else{var f=i.compare(a,l);f=f===0?"=":f===-1?"<":">",e.prepend([new V(n.goal.replace(new o("=",[s,new o(f,[])])),n.substitution,n)])}},"is/2":function(e,n,t){var s=t.args[1].interpret(e);i.type.is_number(s)?e.prepend([new V(n.goal.replace(new o("=",[t.args[0],s],e.level)),n.substitution,n)]):e.throw_error(s)},"between/3":function(e,n,t){var s=t.args[0],a=t.args[1],l=t.args[2];if(i.type.is_variable(s)||i.type.is_variable(a))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_integer(s))e.throw_error(i.error.type("integer",s,t.indicator));else if(!i.type.is_integer(a))e.throw_error(i.error.type("integer",a,t.indicator));else if(!i.type.is_variable(l)&&!i.type.is_integer(l))e.throw_error(i.error.type("integer",l,t.indicator));else if(i.type.is_variable(l)){var f=[new V(n.goal.replace(new o("=",[l,s])),n.substitution,n)];s.value=l.value&&e.success(n)},"succ/2":function(e,n,t){var s=t.args[0],a=t.args[1];i.type.is_variable(s)&&i.type.is_variable(a)?e.throw_error(i.error.instantiation(t.indicator)):!i.type.is_variable(s)&&!i.type.is_integer(s)?e.throw_error(i.error.type("integer",s,t.indicator)):!i.type.is_variable(a)&&!i.type.is_integer(a)?e.throw_error(i.error.type("integer",a,t.indicator)):!i.type.is_variable(s)&&s.value<0?e.throw_error(i.error.domain("not_less_than_zero",s,t.indicator)):!i.type.is_variable(a)&&a.value<0?e.throw_error(i.error.domain("not_less_than_zero",a,t.indicator)):(i.type.is_variable(a)||a.value>0)&&(i.type.is_variable(s)?e.prepend([new V(n.goal.replace(new o("=",[s,new E(a.value-1,!1)])),n.substitution,n)]):e.prepend([new V(n.goal.replace(new o("=",[a,new E(s.value+1,!1)])),n.substitution,n)]))},"=:=/2":function(e,n,t){var s=i.arithmetic_compare(e,t.args[0],t.args[1]);i.type.is_term(s)?e.throw_error(s):s===0&&e.success(n)},"=\\=/2":function(e,n,t){var s=i.arithmetic_compare(e,t.args[0],t.args[1]);i.type.is_term(s)?e.throw_error(s):s!==0&&e.success(n)},"/2":function(e,n,t){var s=i.arithmetic_compare(e,t.args[0],t.args[1]);i.type.is_term(s)?e.throw_error(s):s>0&&e.success(n)},">=/2":function(e,n,t){var s=i.arithmetic_compare(e,t.args[0],t.args[1]);i.type.is_term(s)?e.throw_error(s):s>=0&&e.success(n)},"var/1":function(e,n,t){i.type.is_variable(t.args[0])&&e.success(n)},"atom/1":function(e,n,t){i.type.is_atom(t.args[0])&&e.success(n)},"atomic/1":function(e,n,t){i.type.is_atomic(t.args[0])&&e.success(n)},"compound/1":function(e,n,t){i.type.is_compound(t.args[0])&&e.success(n)},"integer/1":function(e,n,t){i.type.is_integer(t.args[0])&&e.success(n)},"float/1":function(e,n,t){i.type.is_float(t.args[0])&&e.success(n)},"number/1":function(e,n,t){i.type.is_number(t.args[0])&&e.success(n)},"nonvar/1":function(e,n,t){i.type.is_variable(t.args[0])||e.success(n)},"ground/1":function(e,n,t){t.variables().length===0&&e.success(n)},"acyclic_term/1":function(e,n,t){for(var s=n.substitution.apply(n.substitution),a=t.args[0].variables(),l=0;l0?k[k.length-1]:null,k!==null&&(A=U(e,k,0,e.__get_max_priority(),!1))}if(A.type===h&&A.len===k.length-1&&W.value==="."){A=A.value.rename(e);var B=new o("=",[a,A]);if(y.variables){var q=he(c(yr(A.variables()),function(F){return new O(F)}));B=new o(",",[B,new o("=",[y.variables,q])])}if(y.variable_names){var q=he(c(yr(A.variables()),function(H){var J;for(J in e.session.renamed_variables)if(e.session.renamed_variables.hasOwnProperty(J)&&e.session.renamed_variables[J]===H)break;return new o("=",[new o(J,[]),new O(H)])}));B=new o(",",[B,new o("=",[y.variable_names,q])])}if(y.singletons){var q=he(c(new Q(A,null).singleton_variables(),function(H){var J;for(J in e.session.renamed_variables)if(e.session.renamed_variables.hasOwnProperty(J)&&e.session.renamed_variables[J]===H)break;return new o("=",[new o(J,[]),new O(H)])}));B=new o(",",[B,new o("=",[y.singletons,q])])}e.prepend([new V(n.goal.replace(B),n.substitution,n)])}else A.type===h?e.throw_error(i.error.syntax(k[A.len],"unexpected token",!1)):e.throw_error(A.value)}}},"write/1":function(e,n,t){var s=t.args[0];e.prepend([new V(n.goal.replace(new o(",",[new o("current_output",[new O("S")]),new o("write",[new O("S"),s])])),n.substitution,n)])},"write/2":function(e,n,t){var s=t.args[0],a=t.args[1];e.prepend([new V(n.goal.replace(new o("write_term",[s,a,new o(".",[new o("quoted",[new o("false",[])]),new o(".",[new o("ignore_ops",[new o("false")]),new o(".",[new o("numbervars",[new o("true")]),new o("[]",[])])])])])),n.substitution,n)])},"writeq/1":function(e,n,t){var s=t.args[0];e.prepend([new V(n.goal.replace(new o(",",[new o("current_output",[new O("S")]),new o("writeq",[new O("S"),s])])),n.substitution,n)])},"writeq/2":function(e,n,t){var s=t.args[0],a=t.args[1];e.prepend([new V(n.goal.replace(new o("write_term",[s,a,new o(".",[new o("quoted",[new o("true",[])]),new o(".",[new o("ignore_ops",[new o("false")]),new o(".",[new o("numbervars",[new o("true")]),new o("[]",[])])])])])),n.substitution,n)])},"write_canonical/1":function(e,n,t){var s=t.args[0];e.prepend([new V(n.goal.replace(new o(",",[new o("current_output",[new O("S")]),new o("write_canonical",[new O("S"),s])])),n.substitution,n)])},"write_canonical/2":function(e,n,t){var s=t.args[0],a=t.args[1];e.prepend([new V(n.goal.replace(new o("write_term",[s,a,new o(".",[new o("quoted",[new o("true",[])]),new o(".",[new o("ignore_ops",[new o("true")]),new o(".",[new o("numbervars",[new o("false")]),new o("[]",[])])])])])),n.substitution,n)])},"write_term/2":function(e,n,t){var s=t.args[0],a=t.args[1];e.prepend([new V(n.goal.replace(new o(",",[new o("current_output",[new O("S")]),new o("write_term",[new O("S"),s,a])])),n.substitution,n)])},"write_term/3":function(e,n,t){var s=t.args[0],a=t.args[1],l=t.args[2],f=i.type.is_stream(s)?s:e.get_stream_by_alias(s.id);if(i.type.is_variable(s)||i.type.is_variable(l))e.throw_error(i.error.instantiation(t.indicator));else if(!i.type.is_list(l))e.throw_error(i.error.type("list",l,t.indicator));else if(!i.type.is_stream(s)&&!i.type.is_atom(s))e.throw_error(i.error.domain("stream_or_alias",s,t.indicator));else if(!i.type.is_stream(f)||f.stream===null)e.throw_error(i.error.existence("stream",s,t.indicator));else if(f.input)e.throw_error(i.error.permission("output","stream",s,t.indicator));else if(f.type==="binary")e.throw_error(i.error.permission("output","binary_stream",s,t.indicator));else if(f.position==="past_end_of_stream"&&f.eof_action==="error")e.throw_error(i.error.permission("output","past_end_of_stream",s,t.indicator));else{for(var y={},d=l,m;i.type.is_term(d)&&d.indicator==="./2";){if(m=d.args[0],i.type.is_variable(m)){e.throw_error(i.error.instantiation(t.indicator));return}else if(!i.type.is_write_option(m)){e.throw_error(i.error.domain("write_option",m,t.indicator));return}y[m.id]=m.args[0].id==="true",d=d.args[1]}if(d.indicator!=="[]/0"){i.type.is_variable(d)?e.throw_error(i.error.instantiation(t.indicator)):e.throw_error(i.error.type("list",l,t.indicator));return}else{y.session=e.session;var S=a.toString(y);f.stream.put(S,f.position),typeof f.position=="number"&&(f.position+=S.length),e.success(n)}}},"halt/0":function(e,n,t){e.points=[]},"halt/1":function(e,n,t){var s=t.args[0];i.type.is_variable(s)?e.throw_error(i.error.instantiation(t.indicator)):i.type.is_integer(s)?e.points=[]:e.throw_error(i.error.type("integer",s,t.indicator))},"current_prolog_flag/2":function(e,n,t){var s=t.args[0],a=t.args[1];if(!i.type.is_variable(s)&&!i.type.is_atom(s))e.throw_error(i.error.type("atom",s,t.indicator));else if(!i.type.is_variable(s)&&!i.type.is_flag(s))e.throw_error(i.error.domain("prolog_flag",s,t.indicator));else{var l=[];for(var f in i.flag)if(!!i.flag.hasOwnProperty(f)){var y=new o(",",[new o("=",[new o(f),s]),new o("=",[e.get_flag(f),a])]);l.push(new V(n.goal.replace(y),n.substitution,n))}e.prepend(l)}},"set_prolog_flag/2":function(e,n,t){var s=t.args[0],a=t.args[1];i.type.is_variable(s)||i.type.is_variable(a)?e.throw_error(i.error.instantiation(t.indicator)):i.type.is_atom(s)?i.type.is_flag(s)?i.type.is_value_flag(s,a)?i.type.is_modifiable_flag(s)?(e.session.flag[s.id]=a,e.success(n)):e.throw_error(i.error.permission("modify","flag",s)):e.throw_error(i.error.domain("flag_value",new o("+",[s,a]),t.indicator)):e.throw_error(i.error.domain("prolog_flag",s,t.indicator)):e.throw_error(i.error.type("atom",s,t.indicator))}},flag:{bounded:{allowed:[new o("true"),new o("false")],value:new o("true"),changeable:!1},max_integer:{allowed:[new E(Number.MAX_SAFE_INTEGER)],value:new E(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new E(Number.MIN_SAFE_INTEGER)],value:new E(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new o("down"),new o("toward_zero")],value:new o("toward_zero"),changeable:!1},char_conversion:{allowed:[new o("on"),new o("off")],value:new o("on"),changeable:!0},debug:{allowed:[new o("on"),new o("off")],value:new o("off"),changeable:!0},max_arity:{allowed:[new o("unbounded")],value:new o("unbounded"),changeable:!1},unknown:{allowed:[new o("error"),new o("fail"),new o("warning")],value:new o("error"),changeable:!0},double_quotes:{allowed:[new o("chars"),new o("codes"),new o("atom")],value:new o("codes"),changeable:!0},occurs_check:{allowed:[new o("false"),new o("true")],value:new o("false"),changeable:!0},dialect:{allowed:[new o("tau")],value:new o("tau"),changeable:!1},version_data:{allowed:[new o("tau",[new E(r.major,!1),new E(r.minor,!1),new E(r.patch,!1),new o(r.status)])],value:new o("tau",[new E(r.major,!1),new E(r.minor,!1),new E(r.patch,!1),new o(r.status)]),changeable:!1},nodejs:{allowed:[new o("yes"),new o("no")],value:new o(typeof ie!="undefined"&&ie.exports?"yes":"no"),changeable:!1}},unify:function(e,n,t){t=t===void 0?!1:t;for(var s=[{left:e,right:n}],a={};s.length!==0;){var l=s.pop();if(e=l.left,n=l.right,i.type.is_term(e)&&i.type.is_term(n)){if(e.indicator!==n.indicator)return null;for(var f=0;fa.value?1:0:a}else return s},operate:function(e,n){if(i.type.is_operator(n)){for(var t=i.type.is_operator(n),s=[],a,l=!1,f=0;fe.get_flag("max_integer").value||a0?e.start+e.matches[0].length:e.start,a=t?new o("token_not_found"):new o("found",[new o(e.value.toString())]),l=new o(".",[new o("line",[new E(e.line+1)]),new o(".",[new o("column",[new E(s+1)]),new o(".",[a,new o("[]",[])])])]);return new o("error",[new o("syntax_error",[new o(n)]),l])},syntax_by_predicate:function(e,n){return new o("error",[new o("syntax_error",[new o(e)]),oe(n)])}},warning:{singleton:function(e,n,t){for(var s=new o("[]"),a=e.length-1;a>=0;a--)s=new o(".",[new O(e[a]),s]);return new o("warning",[new o("singleton_variables",[s,oe(n)]),new o(".",[new o("line",[new E(t,!1)]),new o("[]")])])},failed_goal:function(e,n){return new o("warning",[new o("failed_goal",[e]),new o(".",[new o("line",[new E(n,!1)]),new o("[]")])])}},format_variable:function(e){return"_"+e},format_answer:function(e,n,t){n instanceof D&&(n=n.thread);var t=t||{};if(t.session=n?n.session:void 0,i.type.is_error(e))return"uncaught exception: "+e.args[0].toString();if(e===!1)return"false.";if(e===null)return"limit exceeded ;";var s=0,a="";if(i.type.is_substitution(e)){var l=e.domain(!0);e=e.filter(function(d,m){return!i.type.is_variable(m)||l.indexOf(m.id)!==-1&&d!==m.id})}for(var f in e.links)!e.links.hasOwnProperty(f)||(s++,a!==""&&(a+=", "),a+=f.toString(t)+" = "+e.links[f].toString(t));var y=typeof n=="undefined"||n.points.length>0?" ;":".";return s===0?"true"+y:a+y},flatten_error:function(e){if(!i.type.is_error(e))return null;e=e.args[0];var n={};return n.type=e.args[0].id,n.thrown=n.type==="syntax_error"?null:e.args[1].id,n.expected=null,n.found=null,n.representation=null,n.existence=null,n.existence_type=null,n.line=null,n.column=null,n.permission_operation=null,n.permission_type=null,n.evaluation_type=null,n.type==="type_error"||n.type==="domain_error"?(n.expected=e.args[0].args[0].id,n.found=e.args[0].args[1].toString()):n.type==="syntax_error"?e.args[1].indicator==="./2"?(n.expected=e.args[0].args[0].id,n.found=e.args[1].args[1].args[1].args[0],n.found=n.found.id==="token_not_found"?n.found.id:n.found.args[0].id,n.line=e.args[1].args[0].args[0].value,n.column=e.args[1].args[1].args[0].args[0].value):n.thrown=e.args[1].id:n.type==="permission_error"?(n.found=e.args[0].args[2].toString(),n.permission_operation=e.args[0].args[0].id,n.permission_type=e.args[0].args[1].id):n.type==="evaluation_error"?n.evaluation_type=e.args[0].args[0].id:n.type==="representation_error"?n.representation=e.args[0].args[0].id:n.type==="existence_error"&&(n.existence=e.args[0].args[1].toString(),n.existence_type=e.args[0].args[0].id),n},create:function(e){return new i.type.Session(e)}};typeof ie!="undefined"?ie.exports=i:window.pl=i})()});var er=I((qu,rt)=>{var is=Array.isArray;rt.exports=is});var nt=I(($u,tt)=>{var ss=typeof global=="object"&&global&&global.Object===Object&&global;tt.exports=ss});var rr=I((Du,it)=>{var as=nt(),os=typeof self=="object"&&self&&self.Object===Object&&self,us=as||os||Function("return this")();it.exports=us});var tr=I((Xu,st)=>{var ls=rr(),cs=ls.Symbol;st.exports=cs});var lt=I((Bu,at)=>{var ot=tr(),ut=Object.prototype,fs=ut.hasOwnProperty,ps=ut.toString,Xe=ot?ot.toStringTag:void 0;function ys(r){var u=fs.call(r,Xe),p=r[Xe];try{r[Xe]=void 0;var c=!0}catch(_){}var w=ps.call(r);return c&&(u?r[Xe]=p:delete r[Xe]),w}at.exports=ys});var ft=I((Fu,ct)=>{var _s=Object.prototype,ws=_s.toString;function gs(r){return ws.call(r)}ct.exports=gs});var Pr=I((zu,pt)=>{var yt=tr(),ds=lt(),vs=ft(),hs="[object Null]",ms="[object Undefined]",_t=yt?yt.toStringTag:void 0;function bs(r){return r==null?r===void 0?ms:hs:_t&&_t in Object(r)?ds(r):vs(r)}pt.exports=bs});var gt=I((Lu,wt)=>{function Ts(r){return r!=null&&typeof r=="object"}wt.exports=Ts});var nr=I((Wu,dt)=>{var xs=Pr(),Vs=gt(),Ss="[object Symbol]";function ks(r){return typeof r=="symbol"||Vs(r)&&xs(r)==Ss}dt.exports=ks});var ht=I((Hu,vt)=>{var Ps=er(),Cs=nr(),Os=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Is=/^\w*$/;function Es(r,u){if(Ps(r))return!1;var p=typeof r;return p=="number"||p=="symbol"||p=="boolean"||r==null||Cs(r)?!0:Is.test(r)||!Os.test(r)||u!=null&&r in Object(u)}vt.exports=Es});var ir=I((Gu,mt)=>{function As(r){var u=typeof r;return r!=null&&(u=="object"||u=="function")}mt.exports=As});var Tt=I((Yu,bt)=>{var Ns=Pr(),Rs=ir(),Ms="[object AsyncFunction]",qs="[object Function]",$s="[object GeneratorFunction]",Ds="[object Proxy]";function Xs(r){if(!Rs(r))return!1;var u=Ns(r);return u==qs||u==$s||u==Ms||u==Ds}bt.exports=Xs});var Vt=I((Uu,xt)=>{var Bs=rr(),Fs=Bs["__core-js_shared__"];xt.exports=Fs});var Pt=I((Zu,St)=>{var Cr=Vt(),kt=function(){var r=/[^.]+$/.exec(Cr&&Cr.keys&&Cr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function zs(r){return!!kt&&kt in r}St.exports=zs});var Ot=I((Qu,Ct)=>{var Ls=Function.prototype,Ws=Ls.toString;function Hs(r){if(r!=null){try{return Ws.call(r)}catch(u){}try{return r+""}catch(u){}}return""}Ct.exports=Hs});var Et=I((Ju,It)=>{var Gs=Tt(),Ys=Pt(),Us=ir(),Zs=Ot(),Qs=/[\\^$.*+?()[\]{}|]/g,Js=/^\[object .+?Constructor\]$/,Ks=Function.prototype,js=Object.prototype,ea=Ks.toString,ra=js.hasOwnProperty,ta=RegExp("^"+ea.call(ra).replace(Qs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function na(r){if(!Us(r)||Ys(r))return!1;var u=Gs(r)?ta:Js;return u.test(Zs(r))}It.exports=na});var Nt=I((Ku,At)=>{function ia(r,u){return r==null?void 0:r[u]}At.exports=ia});var sr=I((ju,Rt)=>{var sa=Et(),aa=Nt();function oa(r,u){var p=aa(r,u);return sa(p)?p:void 0}Rt.exports=oa});var Be=I((el,Mt)=>{var ua=sr(),la=ua(Object,"create");Mt.exports=la});var Dt=I((rl,qt)=>{var $t=Be();function ca(){this.__data__=$t?$t(null):{},this.size=0}qt.exports=ca});var Bt=I((tl,Xt)=>{function fa(r){var u=this.has(r)&&delete this.__data__[r];return this.size-=u?1:0,u}Xt.exports=fa});var zt=I((nl,Ft)=>{var pa=Be(),ya="__lodash_hash_undefined__",_a=Object.prototype,wa=_a.hasOwnProperty;function ga(r){var u=this.__data__;if(pa){var p=u[r];return p===ya?void 0:p}return wa.call(u,r)?u[r]:void 0}Ft.exports=ga});var Wt=I((il,Lt)=>{var da=Be(),va=Object.prototype,ha=va.hasOwnProperty;function ma(r){var u=this.__data__;return da?u[r]!==void 0:ha.call(u,r)}Lt.exports=ma});var Gt=I((sl,Ht)=>{var ba=Be(),Ta="__lodash_hash_undefined__";function xa(r,u){var p=this.__data__;return this.size+=this.has(r)?0:1,p[r]=ba&&u===void 0?Ta:u,this}Ht.exports=xa});var Ut=I((al,Yt)=>{var Va=Dt(),Sa=Bt(),ka=zt(),Pa=Wt(),Ca=Gt();function Ie(r){var u=-1,p=r==null?0:r.length;for(this.clear();++u{function Oa(){this.__data__=[],this.size=0}Zt.exports=Oa});var Or=I((ul,Jt)=>{function Ia(r,u){return r===u||r!==r&&u!==u}Jt.exports=Ia});var Fe=I((ll,Kt)=>{var Ea=Or();function Aa(r,u){for(var p=r.length;p--;)if(Ea(r[p][0],u))return p;return-1}Kt.exports=Aa});var en=I((cl,jt)=>{var Na=Fe(),Ra=Array.prototype,Ma=Ra.splice;function qa(r){var u=this.__data__,p=Na(u,r);if(p<0)return!1;var c=u.length-1;return p==c?u.pop():Ma.call(u,p,1),--this.size,!0}jt.exports=qa});var tn=I((fl,rn)=>{var $a=Fe();function Da(r){var u=this.__data__,p=$a(u,r);return p<0?void 0:u[p][1]}rn.exports=Da});var sn=I((pl,nn)=>{var Xa=Fe();function Ba(r){return Xa(this.__data__,r)>-1}nn.exports=Ba});var on=I((yl,an)=>{var Fa=Fe();function za(r,u){var p=this.__data__,c=Fa(p,r);return c<0?(++this.size,p.push([r,u])):p[c][1]=u,this}an.exports=za});var ln=I((_l,un)=>{var La=Qt(),Wa=en(),Ha=tn(),Ga=sn(),Ya=on();function Ee(r){var u=-1,p=r==null?0:r.length;for(this.clear();++u{var Ua=sr(),Za=rr(),Qa=Ua(Za,"Map");cn.exports=Qa});var _n=I((gl,pn)=>{var yn=Ut(),Ja=ln(),Ka=fn();function ja(){this.size=0,this.__data__={hash:new yn,map:new(Ka||Ja),string:new yn}}pn.exports=ja});var gn=I((dl,wn)=>{function eo(r){var u=typeof r;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?r!=="__proto__":r===null}wn.exports=eo});var ze=I((vl,dn)=>{var ro=gn();function to(r,u){var p=r.__data__;return ro(u)?p[typeof u=="string"?"string":"hash"]:p.map}dn.exports=to});var hn=I((hl,vn)=>{var no=ze();function io(r){var u=no(this,r).delete(r);return this.size-=u?1:0,u}vn.exports=io});var bn=I((ml,mn)=>{var so=ze();function ao(r){return so(this,r).get(r)}mn.exports=ao});var xn=I((bl,Tn)=>{var oo=ze();function uo(r){return oo(this,r).has(r)}Tn.exports=uo});var Sn=I((Tl,Vn)=>{var lo=ze();function co(r,u){var p=lo(this,r),c=p.size;return p.set(r,u),this.size+=p.size==c?0:1,this}Vn.exports=co});var Pn=I((xl,kn)=>{var fo=_n(),po=hn(),yo=bn(),_o=xn(),wo=Sn();function Ae(r){var u=-1,p=r==null?0:r.length;for(this.clear();++u{var On=Pn(),go="Expected a function";function Ir(r,u){if(typeof r!="function"||u!=null&&typeof u!="function")throw new TypeError(go);var p=function(){var c=arguments,w=u?u.apply(this,c):c[0],_=p.cache;if(_.has(w))return _.get(w);var v=r.apply(this,c);return p.cache=_.set(w,v)||_,v};return p.cache=new(Ir.Cache||On),p}Ir.Cache=On;Cn.exports=Ir});var An=I((Sl,En)=>{var vo=In(),ho=500;function mo(r){var u=vo(r,function(c){return p.size===ho&&p.clear(),c}),p=u.cache;return u}En.exports=mo});var Rn=I((kl,Nn)=>{var bo=An(),To=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xo=/\\(\\)?/g,Vo=bo(function(r){var u=[];return r.charCodeAt(0)===46&&u.push(""),r.replace(To,function(p,c,w,_){u.push(w?_.replace(xo,"$1"):c||p)}),u});Nn.exports=Vo});var qn=I((Pl,Mn)=>{function So(r,u){for(var p=-1,c=r==null?0:r.length,w=Array(c);++p{var Dn=tr(),ko=qn(),Po=er(),Co=nr(),Oo=1/0,Xn=Dn?Dn.prototype:void 0,Bn=Xn?Xn.toString:void 0;function Fn(r){if(typeof r=="string")return r;if(Po(r))return ko(r,Fn)+"";if(Co(r))return Bn?Bn.call(r):"";var u=r+"";return u=="0"&&1/r==-Oo?"-0":u}$n.exports=Fn});var Wn=I((Ol,Ln)=>{var Io=zn();function Eo(r){return r==null?"":Io(r)}Ln.exports=Eo});var ar=I((Il,Hn)=>{var Ao=er(),No=ht(),Ro=Rn(),Mo=Wn();function qo(r,u){return Ao(r)?r:No(r,u)?[r]:Ro(Mo(r))}Hn.exports=qo});var or=I((El,Gn)=>{var $o=nr(),Do=1/0;function Xo(r){if(typeof r=="string"||$o(r))return r;var u=r+"";return u=="0"&&1/r==-Do?"-0":u}Gn.exports=Xo});var Er=I((Al,Yn)=>{var Bo=ar(),Fo=or();function zo(r,u){u=Bo(u,r);for(var p=0,c=u.length;r!=null&&p{var Lo=Er();function Wo(r,u,p){var c=r==null?void 0:Lo(r,u);return c===void 0?p:c}Un.exports=Wo});var li=I((Ul,ui)=>{var Jo=sr(),Ko=function(){try{var r=Jo(Object,"defineProperty");return r({},"",{}),r}catch(u){}}();ui.exports=Ko});var pi=I((Zl,ci)=>{var fi=li();function jo(r,u,p){u=="__proto__"&&fi?fi(r,u,{configurable:!0,enumerable:!0,value:p,writable:!0}):r[u]=p}ci.exports=jo});var _i=I((Ql,yi)=>{var eu=pi(),ru=Or(),tu=Object.prototype,nu=tu.hasOwnProperty;function iu(r,u,p){var c=r[u];(!(nu.call(r,u)&&ru(c,p))||p===void 0&&!(u in r))&&eu(r,u,p)}yi.exports=iu});var gi=I((Jl,wi)=>{var su=9007199254740991,au=/^(?:0|[1-9]\d*)$/;function ou(r,u){var p=typeof r;return u=u==null?su:u,!!u&&(p=="number"||p!="symbol"&&au.test(r))&&r>-1&&r%1==0&&r{var uu=_i(),lu=ar(),cu=gi(),vi=ir(),fu=or();function pu(r,u,p,c){if(!vi(r))return r;u=lu(u,r);for(var w=-1,_=u.length,v=_-1,g=r;g!=null&&++w<_;){var h=fu(u[w]),x=p;if(h==="__proto__"||h==="constructor"||h==="prototype")return r;if(w!=v){var T=g[h];x=c?c(T,h,g):void 0,x===void 0&&(x=vi(T)?T:cu(u[w+1])?[]:{})}uu(g,h,x),g=g[h]}return r}di.exports=pu});var bi=I((jl,mi)=>{var yu=hi();function _u(r,u,p){return r==null?r:yu(r,u,p)}mi.exports=_u});var xi=I((ec,Ti)=>{function wu(r){var u=r==null?0:r.length;return u?r[u-1]:void 0}Ti.exports=wu});var Si=I((rc,Vi)=>{function gu(r,u,p){var c=-1,w=r.length;u<0&&(u=-u>w?0:w+u),p=p>w?w:p,p<0&&(p+=w),w=u>p?0:p-u>>>0,u>>>=0;for(var _=Array(w);++c{var du=Er(),vu=Si();function hu(r,u){return u.length<2?r:du(r,vu(u,0,-1))}ki.exports=hu});var Oi=I((nc,Ci)=>{var mu=ar(),bu=xi(),Tu=Pi(),xu=or();function Vu(r,u){return u=mu(u,r),r=Tu(r,u),r==null||delete r[xu(bu(u))]}Ci.exports=Vu});var Ei=I((ic,Ii)=>{var Su=Oi();function ku(r,u){return r==null?!0:Su(r,u)}Ii.exports=ku});var Ou={};Qi(Ou,{default:()=>Eu});var $i=G(require("@yarnpkg/core"));var ni=G(require("@yarnpkg/cli")),ur=G(require("@yarnpkg/core")),ii=G(require("@yarnpkg/core")),We=G(require("clipanion"));var ae=G(require("@yarnpkg/core")),le=G(require("@yarnpkg/core")),Ne=G(require("@yarnpkg/fslib")),jn=G(Xr()),Re=G(kr());var Nr=G(require("@yarnpkg/core")),Rr=G(Ar()),re=G(kr()),Zn=G(require("vm")),{is_atom:ge,is_variable:Ho,is_instantiated_list:Go}=re.default.type;function Qn(r,u,p){r.prepend(p.map(c=>new re.default.type.State(u.goal.replace(c),u.substitution,u)))}var Jn=new WeakMap;function Mr(r){let u=Jn.get(r.session);if(u==null)throw new Error("Assertion failed: A project should have been registered for the active session");return u}var Yo=new re.default.type.Module("constraints",{["project_workspaces_by_descriptor/3"]:(r,u,p)=>{let[c,w,_]=p.args;if(!ge(c)||!ge(w)){r.throw_error(re.default.error.instantiation(p.indicator));return}let v=Nr.structUtils.parseIdent(c.id),g=Nr.structUtils.makeDescriptor(v,w.id),x=Mr(r).tryWorkspaceByDescriptor(g);Ho(_)&&x!==null&&Qn(r,u,[new re.default.type.Term("=",[_,new re.default.type.Term(String(x.relativeCwd))])]),ge(_)&&x!==null&&x.relativeCwd===_.id&&r.success(u)},["workspace_field/3"]:(r,u,p)=>{let[c,w,_]=p.args;if(!ge(c)||!ge(w)){r.throw_error(re.default.error.instantiation(p.indicator));return}let g=Mr(r).tryWorkspaceByCwd(c.id);if(g==null)return;let h=(0,Rr.default)(g.manifest.raw,w.id);typeof h!="undefined"&&Qn(r,u,[new re.default.type.Term("=",[_,new re.default.type.Term(typeof h=="object"?JSON.stringify(h):h)])])},["workspace_field_test/3"]:(r,u,p)=>{let[c,w,_]=p.args;r.prepend([new re.default.type.State(u.goal.replace(new re.default.type.Term("workspace_field_test",[c,w,_,new re.default.type.Term("[]",[])])),u.substitution,u)])},["workspace_field_test/4"]:(r,u,p)=>{let[c,w,_,v]=p.args;if(!ge(c)||!ge(w)||!ge(_)||!Go(v)){r.throw_error(re.default.error.instantiation(p.indicator));return}let h=Mr(r).tryWorkspaceByCwd(c.id);if(h==null)return;let x=(0,Rr.default)(h.manifest.raw,w.id);if(typeof x=="undefined")return;let T={$$:x};for(let[C,N]of v.toJavaScript().entries())T[`$${C}`]=N;Zn.default.runInNewContext(_.id,T)&&r.success(u)}},["project_workspaces_by_descriptor/3","workspace_field/3","workspace_field_test/3","workspace_field_test/4"]);function Kn(r,u){Jn.set(r,u),r.consult(`:- use_module(library(${Yo.id})).`)}(0,jn.default)(Re.default);var Le;(function(c){c.Dependencies="dependencies",c.DevDependencies="devDependencies",c.PeerDependencies="peerDependencies"})(Le||(Le={}));var ei=[Le.Dependencies,Le.DevDependencies,Le.PeerDependencies];function K(r){if(r instanceof Re.default.type.Num)return r.value;if(r instanceof Re.default.type.Term)switch(r.indicator){case"throw/1":return K(r.args[0]);case"error/1":return K(r.args[0]);case"error/2":if(r.args[0]instanceof Re.default.type.Term&&r.args[0].indicator==="syntax_error/1")return Object.assign(K(r.args[0]),...K(r.args[1]));{let u=K(r.args[0]);return u.message+=` (in ${K(r.args[1])})`,u}case"syntax_error/1":return new ae.ReportError(ae.MessageName.PROLOG_SYNTAX_ERROR,`Syntax error: ${K(r.args[0])}`);case"existence_error/2":return new ae.ReportError(ae.MessageName.PROLOG_EXISTENCE_ERROR,`Existence error: ${K(r.args[0])} ${K(r.args[1])} not found`);case"instantiation_error/0":return new ae.ReportError(ae.MessageName.PROLOG_INSTANTIATION_ERROR,"Instantiation error: an argument is variable when an instantiated argument was expected");case"line/1":return{line:K(r.args[0])};case"column/1":return{column:K(r.args[0])};case"found/1":return{found:K(r.args[0])};case"./2":return[K(r.args[0])].concat(K(r.args[1]));case"//2":return`${K(r.args[0])}/${K(r.args[1])}`;default:return r.id}throw`couldn't pretty print because of unsupported node ${r}`}function ri(r){let u;try{u=K(r)}catch(p){throw typeof p=="string"?new ae.ReportError(ae.MessageName.PROLOG_UNKNOWN_ERROR,`Unknown error: ${r} (note: ${p})`):p}return typeof u.line!="undefined"&&typeof u.column!="undefined"&&(u.message+=` at line ${u.line}, column ${u.column}`),u}var ti=class{constructor(u,p){let c=1e3*u.workspaces.length;this.session=Re.default.create(c),Kn(this.session,u),this.session.consult(":- use_module(library(lists))."),this.session.consult(p)}fetchNextAnswer(){return new Promise(u=>{this.session.answer(p=>{u(p)})})}async*makeQuery(u){let p=this.session.query(u);if(p!==!0)throw ri(p);for(;;){let c=await this.fetchNextAnswer();if(c===null)throw new ae.ReportError(ae.MessageName.PROLOG_LIMIT_EXCEEDED,"Resolution limit exceeded");if(!c)break;if(c.id==="throw")throw ri(c);yield c}}};function ke(r){return r.id==="null"?null:`${r.toJavaScript()}`}function Uo(r){if(r.id==="null")return null;{let u=r.toJavaScript();if(typeof u!="string")return JSON.stringify(u);try{return JSON.stringify(JSON.parse(u))}catch{return JSON.stringify(u)}}}var pe=class{constructor(u){this.source="";this.project=u;let p=u.configuration.get("constraintsPath");Ne.xfs.existsSync(p)&&(this.source=Ne.xfs.readFileSync(p,"utf8"))}static async find(u){return new pe(u)}getProjectDatabase(){let u="";for(let p of ei)u+=`dependency_type(${p}). +`;for(let p of this.project.workspacesByCwd.values()){let c=p.relativeCwd;u+=`workspace(${de(c)}). +`,u+=`workspace_ident(${de(c)}, ${de(le.structUtils.stringifyIdent(p.locator))}). +`,u+=`workspace_version(${de(c)}, ${de(p.manifest.version)}). +`;for(let w of ei)for(let _ of p.manifest[w].values())u+=`workspace_has_dependency(${de(c)}, ${de(le.structUtils.stringifyIdent(_))}, ${de(_.range)}, ${w}). +`}return u+=`workspace(_) :- false. +`,u+=`workspace_ident(_, _) :- false. +`,u+=`workspace_version(_, _) :- false. +`,u+=`workspace_has_dependency(_, _, _, _) :- false. +`,u}getDeclarations(){let u="";return u+=`gen_enforced_dependency(_, _, _, _) :- false. +`,u+=`gen_enforced_field(_, _, _) :- false. +`,u}get fullSource(){return`${this.getProjectDatabase()} +${this.source} +${this.getDeclarations()}`}createSession(){return new ti(this.project,this.fullSource)}async process(){let u=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(u),enforcedFields:await this.genEnforcedFields(u)}}async genEnforcedDependencies(u){let p=[];for await(let c of u.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let w=Ne.ppath.resolve(this.project.cwd,ke(c.links.WorkspaceCwd)),_=ke(c.links.DependencyIdent),v=ke(c.links.DependencyRange),g=ke(c.links.DependencyType);if(w===null||_===null)throw new Error("Invalid rule");let h=this.project.getWorkspaceByCwd(w),x=le.structUtils.parseIdent(_);p.push({workspace:h,dependencyIdent:x,dependencyRange:v,dependencyType:g})}return le.miscUtils.sortMap(p,[({dependencyRange:c})=>c!==null?"0":"1",({workspace:c})=>le.structUtils.stringifyIdent(c.locator),({dependencyIdent:c})=>le.structUtils.stringifyIdent(c)])}async genEnforcedFields(u){let p=[];for await(let c of u.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let w=Ne.ppath.resolve(this.project.cwd,ke(c.links.WorkspaceCwd)),_=ke(c.links.FieldPath),v=Uo(c.links.FieldValue);if(w===null||_===null)throw new Error("Invalid rule");let g=this.project.getWorkspaceByCwd(w);p.push({workspace:g,fieldPath:_,fieldValue:v})}return le.miscUtils.sortMap(p,[({workspace:c})=>le.structUtils.stringifyIdent(c.locator),({fieldPath:c})=>c])}async*query(u){let p=this.createSession();for await(let c of p.makeQuery(u)){let w={};for(let[_,v]of Object.entries(c.links))_!=="_"&&(w[_]=ke(v));yield w}}};function de(r){return typeof r=="string"?`'${r}'`:"[]"}var He=class extends ni.BaseCommand{constructor(){super(...arguments);this.json=We.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.query=We.Option.String()}async execute(){let u=await ur.Configuration.find(this.context.cwd,this.context.plugins),{project:p}=await ur.Project.find(u,this.context.cwd),c=await pe.find(p),w=this.query;return w.endsWith(".")||(w=`${w}.`),(await ii.StreamReport.start({configuration:u,json:this.json,stdout:this.context.stdout},async v=>{for await(let g of c.query(w)){let h=Array.from(Object.entries(g)),x=h.length,T=h.reduce((b,[C])=>Math.max(b,C.length),0);for(let b=0;b{let v=new Set,g=[];for(let h=0,x=this.fix?10:1;h{await h.persistManifest()}));for(let[h,x]of g)_.reportError(h,x)});return w.hasErrors()?w.exitCode():0}};Ye.paths=[["constraints"]],Ye.usage=fr.Command.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:` + This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code. + + If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution. + + For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints. + `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});var qi=Ye;async function Pu(r,u,p,{configuration:c,fix:w}){let _=new Map,v=new Map;for(let{workspace:g,dependencyIdent:h,dependencyRange:x,dependencyType:T}of p){let b=v.get(g);typeof b=="undefined"&&v.set(g,b=new Map);let C=b.get(h.identHash);typeof C=="undefined"&&b.set(h.identHash,C=new Map);let N=C.get(T);typeof N=="undefined"&&C.set(T,N=new Set),_.set(h.identHash,h),N.add(x)}for(let[g,h]of v)for(let[x,T]of h){let b=_.get(x);if(typeof b=="undefined")throw new Error("Assertion failed: The ident should have been registered");for(let[C,N]of T){let L=N.has(null)?[null]:[...N];if(L.length>2)u.push([se.MessageName.CONSTRAINTS_AMBIGUITY,`${$.structUtils.prettyWorkspace(c,g)} must depend on ${$.structUtils.prettyIdent(c,b)} via conflicting ranges ${L.slice(0,-1).map(ee=>$.structUtils.prettyRange(c,String(ee))).join(", ")}, and ${$.structUtils.prettyRange(c,String(L[L.length-1]))} (in ${C})`]);else if(L.length>1)u.push([se.MessageName.CONSTRAINTS_AMBIGUITY,`${$.structUtils.prettyWorkspace(c,g)} must depend on ${$.structUtils.prettyIdent(c,b)} via conflicting ranges ${$.structUtils.prettyRange(c,String(L[0]))} and ${$.structUtils.prettyRange(c,String(L[1]))} (in ${C})`]);else{let ee=g.manifest[C].get(b.identHash),[te]=L;te!==null?ee?ee.range!==te&&(w?(g.manifest[C].set(b.identHash,$.structUtils.makeDescriptor(b,te)),r.add(g)):u.push([se.MessageName.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY,`${$.structUtils.prettyWorkspace(c,g)} must depend on ${$.structUtils.prettyIdent(c,b)} via ${$.structUtils.prettyRange(c,te)}, but uses ${$.structUtils.prettyRange(c,ee.range)} instead (in ${C})`])):w?(g.manifest[C].set(b.identHash,$.structUtils.makeDescriptor(b,te)),r.add(g)):u.push([se.MessageName.CONSTRAINTS_MISSING_DEPENDENCY,`${$.structUtils.prettyWorkspace(c,g)} must depend on ${$.structUtils.prettyIdent(c,b)} (via ${$.structUtils.prettyRange(c,te)}), but doesn't (in ${C})`]):ee&&(w?(g.manifest[C].delete(b.identHash),r.add(g)):u.push([se.MessageName.CONSTRAINTS_EXTRANEOUS_DEPENDENCY,`${$.structUtils.prettyWorkspace(c,g)} has an extraneous dependency on ${$.structUtils.prettyIdent(c,b)} (in ${C})`]))}}}}async function Cu(r,u,p,{configuration:c,fix:w}){let _=new Map;for(let{workspace:v,fieldPath:g,fieldValue:h}of p){let x=Pe.miscUtils.getMapWithDefault(_,v);Pe.miscUtils.getSetWithDefault(x,g).add(h)}for(let[v,g]of _)for(let[h,x]of g){let T=[...x];if(T.length>2)u.push([se.MessageName.CONSTRAINTS_AMBIGUITY,`${$.structUtils.prettyWorkspace(c,v)} must have a field ${$.formatUtils.pretty(c,h,"cyan")} set to conflicting values ${T.slice(0,-1).map(b=>$.formatUtils.pretty(c,String(b),"magenta")).join(", ")}, or ${$.formatUtils.pretty(c,String(T[T.length-1]),"magenta")}`]);else if(T.length>1)u.push([se.MessageName.CONSTRAINTS_AMBIGUITY,`${$.structUtils.prettyWorkspace(c,v)} must have a field ${$.formatUtils.pretty(c,h,"cyan")} set to conflicting values ${$.formatUtils.pretty(c,String(T[0]),"magenta")} or ${$.formatUtils.pretty(c,String(T[1]),"magenta")}`]);else{let b=(0,Ni.default)(v.manifest.raw,h),[C]=T;C!==null?b===void 0?w?(await qr(v,h,C),r.add(v)):u.push([se.MessageName.CONSTRAINTS_MISSING_FIELD,`${$.structUtils.prettyWorkspace(c,v)} must have a field ${$.formatUtils.pretty(c,h,"cyan")} set to ${$.formatUtils.pretty(c,String(C),"magenta")}, but doesn't`]):JSON.stringify(b)!==C&&(w?(await qr(v,h,C),r.add(v)):u.push([se.MessageName.CONSTRAINTS_INCOMPATIBLE_FIELD,`${$.structUtils.prettyWorkspace(c,v)} must have a field ${$.formatUtils.pretty(c,h,"cyan")} set to ${$.formatUtils.pretty(c,String(C),"magenta")}, but is set to ${$.formatUtils.pretty(c,JSON.stringify(b),"magenta")} instead`])):b!=null&&(w?(await qr(v,h,null),r.add(v)):u.push([se.MessageName.CONSTRAINTS_EXTRANEOUS_FIELD,`${$.structUtils.prettyWorkspace(c,v)} has an extraneous field ${$.formatUtils.pretty(c,h,"cyan")} set to ${$.formatUtils.pretty(c,JSON.stringify(b),"magenta")}`]))}}}async function qr(r,u,p){p===null?(0,Mi.default)(r.manifest.raw,u):(0,Ri.default)(r.manifest.raw,u,JSON.parse(p))}var Iu={configuration:{constraintsPath:{description:"The path of the constraints file.",type:$i.SettingsType.ABSOLUTE_PATH,default:"./constraints.pro"}},commands:[si,oi,qi]},Eu=Iu;return Ou;})(); +return plugin; +} +}; diff --git a/.yarnrc.yml b/.yarnrc.yml index 39159715e..bdda5ea5e 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -6,14 +6,16 @@ logFilters: - code: YN0004 level: discard -nodeLinker: node-modules - nmHoistingLimits: workspaces +nodeLinker: node-modules + plugins: - path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs spec: "https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js" - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs spec: "@yarnpkg/plugin-workspace-tools" + - path: .yarn/plugins/@yarnpkg/plugin-constraints.cjs + spec: "@yarnpkg/plugin-constraints" yarnPath: .yarn/releases/yarn-3.5.1.cjs diff --git a/commitlint.config.js b/commitlint.config.js index 74ea83178..7584d2a55 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -3,4 +3,8 @@ module.exports = { rules: { 'body-max-line-length': [0, 'always', 100], }, + ignores: [ + // Commits starting with "Release X.Y.Z" are ignored + (commit) => /^(Initialize|Update) Release \d+\.\d+\.\d+/u.test(commit), + ], }; diff --git a/docs/contributing.md b/docs/contributing.md index be9090fc7..e48e35b0a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -140,7 +140,7 @@ This repository relies on Yarn's [workspaces feature](https://yarnpkg.com/featur > **Note** > > - `workspaceName` in the Yarn documentation is the `name` field within a package's `package.json`, e.g., `@metamask/sdk`, not the directory where it is located, e.g., `packages/sdk`. -> - `commandName` in the Yarn documentation is any sub-command that the `yarn` executable would usually take. Pay special attention to the difference between `run` vs `exec`. If you want to run a package script, you would use `run`, e.g., `yarn workspace @metamask/sdk run lint:changelog`; but if you want to run _any_ shell command, you'd use `exec`, e.g. `yarn workspace @metamask/sdk exec cat package.json | jq '.version'`. +> - `commandName` in the Yarn documentation is any sub-command that the `yarn` executable would usually take. Pay special attention to the difference between `run` vs `exec`. If you want to run a package script, you would use `run`, e.g., `yarn workspace @metamask/sdk run changelog:validate`; but if you want to run _any_ shell command, you'd use `exec`, e.g. `yarn workspace @metamask/sdk exec cat package.json | jq '.version'`. ## Releasing @@ -163,7 +163,7 @@ The [`create-release-branch`](https://github.com/MetaMask/create-release-branch) - Reword changelog entries to explain changes in terms that users of the package will understand (e.g., avoid referencing internal variables/concepts). - Consolidate related changes into one change entry if it makes it easier to comprehend. - Run `yarn lint:changelog` to check that all changelogs are correctly formatted. + Run `yarn changelog:validate` to check that all changelogs are correctly formatted. Commit and push the branch. diff --git a/package.json b/package.json index a76c06041..7f044e957 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,15 @@ "light-build": "yarn install && cd packages/sdk-socket-server-next && cd ../.. && yarn workspaces foreach --exclude @metamask/sdk-ui --verbose run build:pre-tsc && yarn workspaces foreach --exclude @metamask/sdk-ui --verbose --topological --parallel --no-private run build && yarn workspaces foreach --exclude @metamask/sdk-ui --verbose run build:post-tsc", "light-build:clean": "yarn clean && yarn light-build", "build:tsc": "tsc --build --force tsconfig.json", + "changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update", + "changelog:validate": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:validate", + "changelog:format": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:format", "clean": "yarn workspaces foreach --no-private run clean", "postinstall": "patch-package", "link-packages": "./scripts/link-packages.sh", "prepare": "husky install", "dev:core": "turbo run dev --parallel --filter=@metamask/sdk-communication-layer --filter=@metamask/sdk --filter=@metamask/sdk-react", "lint": "yarn workspaces foreach --no-private run lint", - "lint:changelogs": "yarn workspaces foreach --no-private run lint:changelog", "lint:eslint": "yarn workspaces foreach --no-private run lint:eslint", "lint:fix": "yarn workspaces foreach --no-private run lint:fix", "lint:misc": "yarn workspaces foreach --no-private run lint:misc", @@ -68,7 +70,7 @@ "@commitlint/config-conventional": "^17.6.7", "@lavamoat/allow-scripts": "^2.3.1", "@metamask/auto-changelog": "^3.4.3", - "@metamask/create-release-branch": "^1.0.1", + "@metamask/create-release-branch": "^4.1.3", "@metamask/eslint-config": "^8.0.0", "@metamask/eslint-config-jest": "^8.0.0", "@metamask/eslint-config-nodejs": "^8.0.0", @@ -89,7 +91,7 @@ "jest": "^29.6.4", "lint-staged": "^13.2.3", "patch-package": "^6.4.7", - "prettier": "^2.3.2", + "prettier": "^3.3.3", "rimraf": "^3.0.2", "serve": "^14.2.1", "ts-jest": "^29.0.3", diff --git a/packages/devnext/package.json b/packages/devnext/package.json index e2c3ef870..6da714add 100644 --- a/packages/devnext/package.json +++ b/packages/devnext/package.json @@ -6,8 +6,10 @@ "dev": "next dev -p 3333", "build": "next build", "start": "next start", + "changelog:update": "../../scripts/update-changelog.sh devnext", + "changelog:validate": "../../scripts/validate-changelog.sh devnext", + "changelog:format": "../../scripts/format-changelog.sh devnext", "lint": "yarn lint:eslint", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk", "lint:eslint": "eslint . --cache --ext js,ts,tsx", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", diff --git a/packages/devsocket/package.json b/packages/devsocket/package.json index 44c3df760..f11357e8e 100644 --- a/packages/devsocket/package.json +++ b/packages/devsocket/package.json @@ -40,7 +40,6 @@ }, "devDependencies": { "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "^2.3.0", "@metamask/eslint-config-jest": "^12.1.0", "@metamask/eslint-config-typescript": "^6.0.0", "@types/analytics-node": "^3.1.13", diff --git a/packages/sdk-analytics/CHANGELOG.md b/packages/sdk-analytics/CHANGELOG.md index 387496a74..1021be42b 100644 --- a/packages/sdk-analytics/CHANGELOG.md +++ b/packages/sdk-analytics/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,27 +8,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.0.5] + ### Fixed + - Updates and Fixes to Analytics ([#1294](https://github.com/MetaMask/metamask-sdk/pull/1294)) ## [0.0.4] + ### Fixed + - Refactor sdk-analytics ([#1288](https://github.com/MetaMask/metamask-sdk/pull/1288)) ## [0.0.3] + ### Fixed + - fix: add publishConfig too release for sdk-analytics package ([#1284](https://github.com/MetaMask/metamask-sdk/pull/1284)) ## [0.0.2] + ### Added + - Add New Analytics Client ([#1270](https://github.com/MetaMask/metamask-sdk/pull/1270)) ### Fixed + - fix: correct sdk analytics lint issued and package scope fix ([#1281](https://github.com/MetaMask/metamask-sdk/pull/1281)) - fix: make the package public ([#1279](https://github.com/MetaMask/metamask-sdk/pull/1279)) ## [0.0.0] + ### Added + - Initial release [Unreleased]: https://github.com/MetaMask/metamask-sdk/compare/@metamask/sdk-analytics@0.0.5...HEAD diff --git a/packages/sdk-analytics/package.json b/packages/sdk-analytics/package.json index 3252f9936..c60533c0d 100644 --- a/packages/sdk-analytics/package.json +++ b/packages/sdk-analytics/package.json @@ -7,15 +7,16 @@ "types": "dist/index.d.ts", "scripts": { "build": "tsup src/index.ts --dts --format esm,cjs", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-analytics", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-analytics", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-analytics", "lint": "eslint src --ext .ts,.tsx --ignore-pattern 'src/schema.ts'", "lint:fix": "eslint src --ext .ts,.tsx --fix --ignore-pattern 'src/schema.ts'", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-analytics", "test": "vitest", "test:ci": "vitest --run", "allow-scripts": "" }, "devDependencies": { - "@metamask/auto-changelog": "^3.4.3", "@metamask/eslint-config": "^14.0.0", "@metamask/eslint-config-typescript": "^14.0.0", "@typescript-eslint/eslint-plugin": "^8.31.0", diff --git a/packages/sdk-communication-layer/CHANGELOG.md b/packages/sdk-communication-layer/CHANGELOG.md index 953616687..1e7ddf89a 100644 --- a/packages/sdk-communication-layer/CHANGELOG.md +++ b/packages/sdk-communication-layer/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,46 +8,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.33.1] + ### Fixed + - chore: pin `debug` package to `4.3.4` due to npm compromise ([#1342](https://github.com/MetaMask/metamask-sdk/pull/1342)) ## [0.33.0] + ### Added + - Add rpc ingore list to analytics ([#1293](https://github.com/MetaMask/metamask-sdk/pull/1293)) - Refactor: backwards compatible originator info ([#1292](https://github.com/MetaMask/metamask-sdk/pull/1292)) - Integrate sdk-analytics with SDK ([#1289](https://github.com/MetaMask/metamask-sdk/pull/1289)) ### Fixed + - Updates and Fixes to Analytics ([#1294](https://github.com/MetaMask/metamask-sdk/pull/1294)) ## [0.32.0] + ### Uncategorized + - fix(rndemos): update metro config to support eciesjs crypto imports ([#1147](https://github.com/MetaMask/metamask-sdk/pull/1147)) - feat: add turborepo for improved monorepo development experience ([#1195](https://github.com/MetaMask/metamask-sdk/pull/1195)) ## [0.31.0] + ### Uncategorized + - chore: improve build tooling and modernize dependencies ([#1128](https://github.com/MetaMask/metamask-sdk/pull/1128)) ## [0.30.2] + ### Added + - fix: potential security issue with secp256k1 ([#1111](https://github.com/MetaMask/metamask-sdk/pull/1111)) ## [0.30.0] + ### Added + - fix: rpc protocol resetting after refresh ([#1079](https://github.com/MetaMask/metamask-sdk/pull/1079)) - Release 97.0.0 ([#1077](https://github.com/MetaMask/metamask-sdk/pull/1077)) ## [0.29.2] + ### Uncategorized + - chore: bump .change files to 0.29.2 ([#1071](https://github.com/MetaMask/metamask-sdk/pull/1071)) ## [0.29.1] + ### Uncategorized + - feat: bump versions for publishing ([#1068](https://github.com/MetaMask/metamask-sdk/pull/1068)) ## [0.29.0] + ### Added + - feat: event alignment with async protocol ([#1054](https://github.com/MetaMask/metamask-sdk/pull/1054)) - feat: auto activate deeplink protocol when wallet supports it ([#1056](https://github.com/MetaMask/metamask-sdk/pull/1056)) - feat: default web url metadata ([#1043](https://github.com/MetaMask/metamask-sdk/pull/1043)) @@ -54,58 +74,82 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: server events and dappid recovery ([#1044](https://github.com/MetaMask/metamask-sdk/pull/1044)) ## [0.29.0-wallet] + ### Added + - feat: async termination of connection (using ack from server) ([#1022](https://github.com/MetaMask/metamask-sdk/pull/1022)) - feat: handle connection reject event ([#1020](https://github.com/MetaMask/metamask-sdk/pull/1020)) ## [0.28.2] + ### Added + - feat: socket reconnection optimization ([#994](https://github.com/MetaMask/metamask-sdk/pull/994)) ## [0.28.1] + ### Added + - feat: full deeplink protocol ([#992](https://github.com/MetaMask/metamask-sdk/pull/992)) ## [0.28.0] + ### Added + - feat: experimental deeplink protocoll ([#990](https://github.com/MetaMask/metamask-sdk/pull/990)) - feat: revert socket server changes ([#985](https://github.com/MetaMask/metamask-sdk/pull/985)) - feat: change the default value for 'dappId' to 'N/A' instead of an empty string ([#972](https://github.com/MetaMask/metamask-sdk/pull/972)) ## [0.27.0] + ### Added + - feat: adds `connector` analytical property ([#947](https://github.com/MetaMask/metamask-sdk/pull/947)) ## [0.26.4] + ### Added + - chore: update SDK dependencies to resolve version conflicts ([#921](https://github.com/MetaMask/metamask-sdk/pull/921)) ## [0.26.2] + ### Added + - feat: cleanup leaking console logs ([#907](https://github.com/MetaMask/metamask-sdk/pull/907)) ## [0.26.0] + ### Added + - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) - feat: update dev rn / expo and empty dappid ([#897](https://github.com/MetaMask/metamask-sdk/pull/897)) - feat: prevent empty dappid ([#891](https://github.com/MetaMask/metamask-sdk/pull/891)) - chore: improve unit tests coverage ([#888](https://github.com/MetaMask/metamask-sdk/pull/888)) ## [0.20.5] + ### Added + - fix: ref crossfetch ([#871](https://github.com/MetaMask/metamask-sdk/pull/871)) ## [0.20.4] + ### Added + - chore: update prepare-preview-builds CI job ([#869](https://github.com/MetaMask/metamask-sdk/pull/869)) - fix: crossfetch version not matching comm layer ([#860](https://github.com/MetaMask/metamask-sdk/pull/860)) ## [0.20.2] + ### Added + - skip version because of publishing issue ## [0.20.1] + ### Added + - feat: trigger new version ([#840](https://github.com/MetaMask/metamask-sdk/pull/840)) - Revert "Release 63.0.0" ([#839](https://github.com/MetaMask/metamask-sdk/pull/839)) - Release 62.0.0 ([#838](https://github.com/MetaMask/metamask-sdk/pull/838)) @@ -113,53 +157,73 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: release 62.0.0 ([#836](https://github.com/MetaMask/metamask-sdk/pull/836)) ## [0.20.0] + ### Added + - feat: align version ([#835](https://github.com/MetaMask/metamask-sdk/pull/835)) ## [0.19.0] + ### Added + - feat: full sdk persistence ([#823](https://github.com/MetaMask/metamask-sdk/pull/823)) - feat: update the 'expo-demo' example dapp ([#824](https://github.com/MetaMask/metamask-sdk/pull/824)) ## [0.18.5] + ### Added + - fix: preferDesktop and onboarding ([#807](https://github.com/MetaMask/metamask-sdk/pull/807)) ## [0.18.4] + ### Added + - fix: prefer desktop ([#800](https://github.com/MetaMask/metamask-sdk/pull/800)) - feat: logging initialization ([#799](https://github.com/MetaMask/metamask-sdk/pull/799)) ## [0.18.2] + ### Added + - feat: sdk done event on dapp side ([#789](https://github.com/MetaMask/metamask-sdk/pull/789)) ## [0.18.1] + ### Added + - fix: add correct param to sdk_rpc_request_received ([#781](https://github.com/MetaMask/metamask-sdk/pull/781)) - feat: add rpc received event ([#780](https://github.com/MetaMask/metamask-sdk/pull/780)) - feat: store account between refresh ([#779](https://github.com/MetaMask/metamask-sdk/pull/779)) ## [0.18.0] + ### Added + - feat: update prod socket server url ([#774](https://github.com/MetaMask/metamask-sdk/pull/774)) ## [0.17.0] + ### Added + - feat: update the "@metamask/providers" package to version 15.0.0 ([#752](https://github.com/MetaMask/metamask-sdk/pull/752)) - feat: restrict rpc method analytics ([#755](https://github.com/MetaMask/metamask-sdk/pull/755)) - feat: rpc event tracking ([#745](https://github.com/MetaMask/metamask-sdk/pull/745)) - chore: disable logs when running unit tests in CI ([#727](https://github.com/MetaMask/metamask-sdk/pull/727)) ## [0.16.0] + ### Added + - feat: activate sourcemap support in all packages and resolve issues ([#730](https://github.com/MetaMask/metamask-sdk/pull/730)) - chore: reduce the bundle size ([#725](https://github.com/MetaMask/metamask-sdk/pull/725)) - feat: sdk bundle size opt methodology ([#722](https://github.com/MetaMask/metamask-sdk/pull/722)) - chore: use the 'debug' package as the new logger ([#716](https://github.com/MetaMask/metamask-sdk/pull/716)) ## [0.15.0] + ### Added + - chore: sourcemaps ([#687](https://github.com/MetaMask/metamask-sdk/pull/687)) - Revert "Release 48.0.0" ([#686](https://github.com/MetaMask/metamask-sdk/pull/686)) - Release 48.0.0 ([#684](https://github.com/MetaMask/metamask-sdk/pull/684)) @@ -167,40 +231,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: permission system flow ([#675](https://github.com/MetaMask/metamask-sdk/pull/675)) ## [0.14.3] + ### Added + - feat: new socket code ([#609](https://github.com/MetaMask/metamask-sdk/pull/609)) ## [0.14.2] + ### Added + - feat: change the 'enableDebug' option to 'enableAnalytics' ([#604](https://github.com/MetaMask/metamask-sdk/pull/604)) ## [0.14.1] + ### Added + - feat: graceful warning instead of throwing keyexchange ([#571](https://github.com/MetaMask/metamask-sdk/pull/571)) ## [0.14.0] + ### Added + - feat: expo keyexchange status and track last rpc id ([#554](https://github.com/MetaMask/metamask-sdk/pull/554)) ## [0.13.0] + ### Added + - Align version with sdk ## [0.12.3] + ### Added + - feat: add the option to add dapp icon in base64 format ([#521](https://github.com/MetaMask/metamask-sdk/pull/521)) ## [0.12.2] + ### Added + - feat: add the option to add iconUrl to the dappMetadata ([#511](https://github.com/MetaMask/metamask-sdk/pull/511)) - feat: optimize rollup builds ([#496](https://github.com/MetaMask/metamask-sdk/pull/496)) ## [0.12.1] + ### Added + - feat: metamask/sdk-ui initial setup ([#487](https://github.com/MetaMask/metamask-sdk/pull/487)) ## [0.12.0] + ### Added + - feat: set minimum required coverage to 50/100 ([#473](https://github.com/MetaMask/metamask-sdk/pull/473)) - feat: socket handling optimization and devnext ui ([#468](https://github.com/MetaMask/metamask-sdk/pull/468)) - feat: expose rpc history tracker ([#462](https://github.com/MetaMask/metamask-sdk/pull/462)) @@ -208,97 +290,137 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: disable favicon in dappmetadata ([#467](https://github.com/MetaMask/metamask-sdk/pull/467)) ## [0.11.1] + ### Added + - build: improve sdk bundle to work with nodejs strictmode ([#457](https://github.com/MetaMask/metamask-sdk/pull/457)) ## [0.11.0] + ### Added + - build: optimize rollup output by env ([#450](https://github.com/MetaMask/metamask-sdk/pull/450)) - fix: socket io event handler not initializing properly ([#446](https://github.com/MetaMask/metamask-sdk/pull/446)) - feat: rename metamask_chainRPCs to metamask_batch and add unit tests ([#440](https://github.com/MetaMask/metamask-sdk/pull/440)) ## [0.10.1] + ### Added + - feat: send sdk_extension_utilized analytics event when extension is selected from cached choice. ([#425](https://github.com/MetaMask/metamask-sdk/pull/425)) ## [0.10.0] + ### Added + - feat: connection recovery edge case ([#411](https://github.com/MetaMask/metamask-sdk/pull/411)) ## [0.9.0] + ### Added + - fix typos ([#401](https://github.com/MetaMask/metamask-sdk/pull/401)) ## [0.8.0] + ### Added + - feat: adds contact form to npm packages ([#382](https://github.com/MetaMask/metamask-sdk/pull/382)) ## [0.7.1] + ### Added + - fix: sdk connection request event ([#364](https://github.com/MetaMask/metamask-sdk/pull/364)) ## [0.7.0] + ### Added + - feat: extend the time we resume the session without showing OTP ([#348](https://github.com/MetaMask/metamask-sdk/pull/348)) - feat: add codecov to CI ([#343](https://github.com/MetaMask/metamask-sdk/pull/343)) ## [0.6.2] + ### Added + - feat: add unit tests to the MetaMaskSDK class ([#319](https://github.com/MetaMask/metamask-sdk/pull/319)) ## [0.6.1] + ### Added + - feat: align versions ([#323](https://github.com/MetaMask/metamask-sdk/pull/323)) ## [0.6.0] + ### Added + - feat: improved event tracking ([#298](https://github.com/MetaMask/metamask-sdk/pull/298)) - feat: add unit tests to the SocketService class ([#294](https://github.com/MetaMask/metamask-sdk/pull/294)) - feat: refactor SocketService class for enhanced modularity and testability ([#292](https://github.com/MetaMask/metamask-sdk/pull/292)) - feat: refactor RemoteCommunication class for enhanced modularity and testability ([#282](https://github.com/MetaMask/metamask-sdk/pull/282)) ## [0.5.3] + ### Added + - feat: remove webrtc references ([#227](https://github.com/MetaMask/metamask-sdk/pull/227)) - refactor: simplify connection flow ([#226](https://github.com/MetaMask/metamask-sdk/pull/226)) - feat: cleanup obsolete walletconnect references ([#223](https://github.com/MetaMask/metamask-sdk/pull/223)) - fix: initial connection promise potentially dangling with browser extension ([#218](https://github.com/MetaMask/metamask-sdk/pull/218)) ## [0.5.2] + ### Added + - feat: optimize paused/resume flow ([#212](https://github.com/MetaMask/metamask-sdk/pull/212)) ## [0.5.0] + ### Added + - feat: improved event tracking for extension and inappbrowser ([#200](https://github.com/MetaMask/metamask-sdk/pull/200)) - feat: export sendanalytics from comm layer ([#198](https://github.com/MetaMask/metamask-sdk/pull/198)) - fix: possible dangling promise on sendMessage (wallet side) ([#194](https://github.com/MetaMask/metamask-sdk/pull/194)) - feat: sdk async init ([#191](https://github.com/MetaMask/metamask-sdk/pull/191)) ## [0.4.2] + ### Added + - feat: add metamask-mobile platform-type for wallet compatibility ([#187](https://github.com/MetaMask/metamask-sdk/pull/187)) ## [0.4.0] + ### Added + - feat: linter improvements ([#175](https://github.com/MetaMask/metamask-sdk/pull/175)) - [FEAT] authorized improvements + typings ([#158](https://github.com/MetaMask/metamask-sdk/pull/158)) ## [0.3.3] + ### Added + - [FEAT] wait for authorized event ([#147](https://github.com/MetaMask/metamask-sdk/pull/147)) - [FEAT] choose between extennsion and mobile wallet ([#146](https://github.com/MetaMask/metamask-sdk/pull/146)) ## [0.3.2] + ### Added + - [FIX] initial eth_requestAccounts ignored when refreshing session ([#139](https://github.com/MetaMask/metamask-sdk/pull/139)) ## [0.3.0] + ### Fixed + - [FIX] reconnection instability ([#109](https://github.com/MetaMask/metamask-sdk/pull/109)) ## [0.2.5] + ### Added + - [FEAT]: improve logging + update examples ([#99](https://github.com/MetaMask/metamask-sdk/pull/99)) [Unreleased]: https://github.com/MetaMask/metamask-sdk/compare/@metamask/sdk-communication-layer@0.33.1...HEAD diff --git a/packages/sdk-communication-layer/package.json b/packages/sdk-communication-layer/package.json index d295a3e90..9b4367040 100644 --- a/packages/sdk-communication-layer/package.json +++ b/packages/sdk-communication-layer/package.json @@ -30,8 +30,10 @@ "build:pre-tsc": "echo 'N/A'", "size": "size-limit", "clean": "rimraf ./dist", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-communication-layer", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-communication-layer", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-communication-layer", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-communication-layer", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -46,7 +48,7 @@ "watch": "rollup -c --bundleConfigAsCjs -w" }, "dependencies": { - "@metamask/sdk-analytics": "workspace:*", + "@metamask/sdk-analytics": "^0.0.5", "bufferutil": "^4.0.8", "date-fns": "^2.29.3", "debug": "4.3.4", @@ -56,7 +58,6 @@ "devDependencies": { "@jest/globals": "^29.3.1", "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "3.1.0", "@metamask/eslint-config": "^6.0.0", "@metamask/eslint-config-nodejs": "^6.0.0", "@metamask/eslint-config-typescript": "^6.0.0", diff --git a/packages/sdk-install-modal-web/CHANGELOG.md b/packages/sdk-install-modal-web/CHANGELOG.md index 391c4103d..2cbbcf210 100644 --- a/packages/sdk-install-modal-web/CHANGELOG.md +++ b/packages/sdk-install-modal-web/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,79 +8,113 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.32.1] + ### Added + - chore: updates assets ([#1220](https://github.com/MetaMask/metamask-sdk/pull/1220)) ## [0.32.0] + ### Added + - feat: setup stencil development environment with component preview ([#1196](https://github.com/MetaMask/metamask-sdk/pull/1196)) ### Fixed + - fix: user rejection bug ([#1202](https://github.com/MetaMask/metamask-sdk/pull/1202)) ## [0.31.5] + ### Added + - chore: add analytics to install modal ([#1189](https://github.com/MetaMask/metamask-sdk/pull/1189)) ### Fixed + - fix: correct event handler binding in modal components ([#1191](https://github.com/MetaMask/metamask-sdk/pull/1191)) - fix: remove console log when render install modal ([#1190](https://github.com/MetaMask/metamask-sdk/pull/1190)) ## [0.31.2] + ### Fixed + - Set initial modal tab based on preferDesktop option ([#1158](https://github.com/MetaMask/metamask-sdk/pull/1158)) ## [0.31.1] + ### Changed + - fix: Tell webpack about dynamic import + fixed polyfills ([#1151](https://github.com/MetaMask/metamask-sdk/pull/1151)) ## [0.31.0] + ### Changed + - refactor(sdk-install-modal-web): migrate from i18next to custom SimpleI18n implementation ([#1141](https://github.com/MetaMask/metamask-sdk/pull/1141)) - refactor(sdk-install-modal-web): migrate to StencilJS + Lazy Loading ([#1139](https://github.com/MetaMask/metamask-sdk/pull/1139)) - style: add inline styles to div elements ([#1138](https://github.com/MetaMask/metamask-sdk/pull/1138)) - refactor: replace qr-code-styling with smaller library ([#1129](https://github.com/MetaMask/metamask-sdk/pull/1129)) ## [0.30.2] + ### Uncategorized + - align version with sdk ## [0.30.0] ## [0.29.2] + ### Added + - chore: bump .change files to 0.29.2 ([#1071](https://github.com/MetaMask/metamask-sdk/pull/1071)) ## [0.29.1] + ### Added + - feat: bump versions for publishing ([#1068](https://github.com/MetaMask/metamask-sdk/pull/1068)) ## [0.28.1] + ### Added + - Release 85.0.0 ([#1006](https://github.com/MetaMask/metamask-sdk/pull/1006)) ## [0.26.5] + ### Added + - chore: update peerDependencies of ‘@metamask/sdk-install-modal-web’ to resolve installation warnings ([#927](https://github.com/MetaMask/metamask-sdk/pull/927)) ## [0.26.4] + ### Added + - chore: update SDK dependencies to resolve version conflicts ([#921](https://github.com/MetaMask/metamask-sdk/pull/921)) ## [0.26.0] + ### Added + - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) ## [0.20.4] + ### Added + - chore: update prepare-preview-builds CI job ([#869](https://github.com/MetaMask/metamask-sdk/pull/869)) ## [0.20.2] + ### Added + - skip version because of publishing issue ## [0.20.1] + ### Added + - feat: trigger new version ([#840](https://github.com/MetaMask/metamask-sdk/pull/840)) - Revert "Release 63.0.0" ([#839](https://github.com/MetaMask/metamask-sdk/pull/839)) - Release 62.0.0 ([#838](https://github.com/MetaMask/metamask-sdk/pull/838)) @@ -87,101 +122,145 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: release 62.0.0 ([#836](https://github.com/MetaMask/metamask-sdk/pull/836)) ## [0.20.0] + ### Added + - feat: align version ([#835](https://github.com/MetaMask/metamask-sdk/pull/835)) ## [0.18.5] + ### Added + - fix: preferDesktop and onboarding ([#807](https://github.com/MetaMask/metamask-sdk/pull/807)) ## [0.17.0] + ### Added + - chore: disable logs when running unit tests in CI ([#727](https://github.com/MetaMask/metamask-sdk/pull/727)) ## [0.16.0] + ### Added + - feat: activate sourcemap support in all packages and resolve issues ([#730](https://github.com/MetaMask/metamask-sdk/pull/730)) - chore: reduce the bundle size ([#725](https://github.com/MetaMask/metamask-sdk/pull/725)) - feat: sdk bundle size opt methodology ([#722](https://github.com/MetaMask/metamask-sdk/pull/722)) ## [0.15.0] + ### Added + - chore: sourcemaps ([#687](https://github.com/MetaMask/metamask-sdk/pull/687)) - Revert "Release 48.0.0" ([#686](https://github.com/MetaMask/metamask-sdk/pull/686)) - Release 48.0.0 ([#684](https://github.com/MetaMask/metamask-sdk/pull/684)) - feat: disable sourcemaps ([#678](https://github.com/MetaMask/metamask-sdk/pull/678)) ## [0.14.1] + ### Added + - Force align package version to sdk ## [0.13.0] + ### Added + - Force align package version to sdk ## [0.12.2] + ### Added + - feat: optimize rollup builds ([#496](https://github.com/MetaMask/metamask-sdk/pull/496)) ## [0.12.1] + ### Added + - Force align package version to sdk ## [0.12.0] + ### Added + - Force align package version to sdk ## [0.11.1] + ### Added + - Force align package version to sdk ## [0.11.0] + ### Added + - feat: rename metamask_chainRPCs to metamask_batch and add unit tests ([#440](https://github.com/MetaMask/metamask-sdk/pull/440)) ## [0.10.0] + ### Added + - Force align package version to sdk ## [0.9.0] + ### Added + - feat: add sdk version and change modal order ([#405](https://github.com/MetaMask/metamask-sdk/pull/405)) - feat: implementing internationalization via i18next package ([#403](https://github.com/MetaMask/metamask-sdk/pull/403)) - fix: modal cleanup and otp selection ([#402](https://github.com/MetaMask/metamask-sdk/pull/402)) ## [0.7.0] + ### Added + - feat: rpc read only calls and infura provider ([#353](https://github.com/MetaMask/metamask-sdk/pull/353)) - feat: extend the time we resume the session without showing OTP ([#348](https://github.com/MetaMask/metamask-sdk/pull/348)) - feat: add codecov to CI ([#343](https://github.com/MetaMask/metamask-sdk/pull/343)) ## [0.6.2] + ### Added + - fix: edge case when modal not fully resetting after termination ([#339](https://github.com/MetaMask/metamask-sdk/pull/339)) ## [0.6.1] + ### Added + - feat: align versions([#323](https://github.com/MetaMask/metamask-sdk/pull/323)) ## [0.6.0] + ### Added + - feat: trigger pipeline detection ([#307](https://github.com/MetaMask/metamask-sdk/pull/307)) ## [0.5.1] + ### Added + - feat: optimize modal rendering and re-use existing node ([#206](https://github.com/MetaMask/metamask-sdk/pull/206)) ## [0.3.3] + ### Added + - [FEAT] choose between extension and mobile wallet ([#146](https://github.com/MetaMask/metamask-sdk/pull/146)) - [fix] #145 missing css color ([#149](https://github.com/MetaMask/metamask-sdk/pull/149)) ## [0.3.2] + ### Added + - [FEAT] add nextjs demo project in examples/ ([#123](https://github.com/MetaMask/metamask-sdk/pull/123)) ## [0.3.0] + ### Added + - feat(sdk-install-modal): add umd support ([#122](https://github.com/MetaMask/metamask-sdk/pull/122)) - fix: invalid types for sdk-install-modal-web ([#117](https://github.com/MetaMask/metamask-sdk/pull/117)) - [FEAT] sdk react toolkits (Part1) ([#116](https://github.com/MetaMask/metamask-sdk/pull/116)) diff --git a/packages/sdk-install-modal-web/package.json b/packages/sdk-install-modal-web/package.json index aa77aeb10..8d74442be 100644 --- a/packages/sdk-install-modal-web/package.json +++ b/packages/sdk-install-modal-web/package.json @@ -34,8 +34,10 @@ "build:pre-tsc": "echo 'N/A'", "build:release": "yarn version && stencil build", "clean": "rimraf ./dist && rimraf ./loader", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-install-modal-web", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-install-modal-web", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-install-modal-web", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-install-modal-web", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -51,7 +53,6 @@ }, "devDependencies": { "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "3.1.0", "@size-limit/preset-big-lib": "^11.0.2", "@stencil/core": "^4.22.2", "@types/i18n": "^0.13.12", diff --git a/packages/sdk-multichain-ui/CHANGELOG.md b/packages/sdk-multichain-ui/CHANGELOG.md index 3cab0227d..d4b5ca4b5 100644 --- a/packages/sdk-multichain-ui/CHANGELOG.md +++ b/packages/sdk-multichain-ui/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), diff --git a/packages/sdk-multichain-ui/package.json b/packages/sdk-multichain-ui/package.json index 1d626c07b..65e96226f 100644 --- a/packages/sdk-multichain-ui/package.json +++ b/packages/sdk-multichain-ui/package.json @@ -34,8 +34,10 @@ "build:pre-tsc": "echo 'N/A'", "build:release": "yarn version && stencil build", "clean": "rimraf ./dist && rimraf ./loader", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-multichain-ui", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-multichain-ui", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-multichain-ui", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-multichain-ui", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -51,7 +53,6 @@ }, "devDependencies": { "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "3.1.0", "@size-limit/preset-big-lib": "^11.0.2", "@stencil/core": "^4.22.2", "@types/i18n": "^0.13.12", diff --git a/packages/sdk-multichain/CHANGELOG.md b/packages/sdk-multichain/CHANGELOG.md index 3cab0227d..d4b5ca4b5 100644 --- a/packages/sdk-multichain/CHANGELOG.md +++ b/packages/sdk-multichain/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), diff --git a/packages/sdk-multichain/package.json b/packages/sdk-multichain/package.json index a18492d98..0b64fb957 100644 --- a/packages/sdk-multichain/package.json +++ b/packages/sdk-multichain/package.json @@ -18,10 +18,12 @@ "build": "yarn clean && npx tsup", "build:post-tsc": "echo 'N/A'", "build:pre-tsc": "echo 'N/A'", + "changelog:update": "../../scripts/update-changelog.sh @metamask/multichain-sdk", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/multichain-sdk", + "changelog:format": "../../scripts/format-changelog.sh @metamask/multichain-sdk", "lint": "yarn biome lint ./src", "lint:ci": "yarn biome ci ./src", "lint:fix": "yarn biome format --write ./src", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/multichain-sdk", "test": "vitest run", "test:unit": "vitest run", "test:watch": "vitest watch", @@ -30,7 +32,6 @@ }, "devDependencies": { "@biomejs/biome": "2.0.0", - "@metamask/auto-changelog": "^3.4.3", "@react-native-async-storage/async-storage": "^1.23.1", "@types/jsdom": "^21.1.7", "@types/pako": "^2.0.4", diff --git a/packages/sdk-react-native/CHANGELOG.md b/packages/sdk-react-native/CHANGELOG.md index 5e33193de..52f6e81ef 100644 --- a/packages/sdk-react-native/CHANGELOG.md +++ b/packages/sdk-react-native/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,70 +8,98 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.3.12] + ### Uncategorized + - feat: bump versions for publishing ([#1068](https://github.com/MetaMask/metamask-sdk/pull/1068)) ## [0.3.11] + ### Uncategorized + - chore: bump ios sdk version ([#1035](https://github.com/MetaMask/metamask-sdk/pull/1035)) ## [0.3.10] + ### Uncategorized + - chore: bump ios sdk version ([#1027](https://github.com/MetaMask/metamask-sdk/pull/1027)) ## [0.3.9] + ### Uncategorized + - chore: add handling of infura api ([#1025](https://github.com/MetaMask/metamask-sdk/pull/1025)) - chore: update connect method to return accounts array ([#1023](https://github.com/MetaMask/metamask-sdk/pull/1023)) - chore: display the right 'rn-sdk' version in the wallet side ([#1015](https://github.com/MetaMask/metamask-sdk/pull/1015)) - Release 85.0.0 ([#1006](https://github.com/MetaMask/metamask-sdk/pull/1006)) ## [0.3.8] + ### Uncategorized + - chore: improve the deeplink handling for MetaMask SDK on iOS ([#1002](https://github.com/MetaMask/metamask-sdk/pull/1002)) ## [0.3.7] + ### Uncategorized + - chore: update native sdk versions ([#997](https://github.com/MetaMask/metamask-sdk/pull/997)) ## [0.3.6] + ### Uncategorized + - chore: filter metamask urls ([#987](https://github.com/MetaMask/metamask-sdk/pull/987)) ## [0.3.5] + ### Added + - feat: update iOS and Android SDKs to latest versions in 'sdk-react-native' ([#966](https://github.com/MetaMask/metamask-sdk/pull/966)) - chore: ensure 'setupDeeplinkHandling' is running only on iOS ([#953](https://github.com/MetaMask/metamask-sdk/pull/953)) -- chore: (sdk-react-native) ensure URL event listener is only added on iOS ([#952](https://github.com/MetaMask/metamask-sdk/pull/952)) +- chore: (sdk-react-native) ensure URL event listener is only added on iOS ([#952](https://github.com/MetaMask/metamask-sdk/pull/952)) ## [0.3.4] + ### Added + - chore: update the 'metamask-ios-sdk' version to '0.7.3' in the 'sdk-react-native' package ([#944](https://github.com/MetaMask/metamask-sdk/pull/944)) ## [0.3.3] + ### Added + - chore: update 'sdk-react-native' the 'android-sdk' to '0.5.8' ([#942](https://github.com/MetaMask/metamask-sdk/pull/942)) ## [0.3.2] + ### Added + - chore: update the 'reactNativeSdkDemo' example to 'sdk-react-native' version 0.3.1 ([#936](https://github.com/MetaMask/metamask-sdk/pull/936)) - chore: update the 'sdk-react-native' package native modules versions ([#935](https://github.com/MetaMask/metamask-sdk/pull/935)) - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) ## [0.3.1] + ### Uncategorized + - chore: update reactNativeSdkDemo with latest sdk-react-native version ([#872](https://github.com/MetaMask/metamask-sdk/pull/872)) ## [0.3.0] + ### Added + - chore: update prepare-preview-builds CI job ([#869](https://github.com/MetaMask/metamask-sdk/pull/869)) - fix: recreate the sdk react native changelog file ([#866](https://github.com/MetaMask/metamask-sdk/pull/866)) -- fix: update CHANGELOG file of the 'sdk-react-native' package ([#865](https://github.com/MetaMask/metamask-sdk/pull/865)) +- fix: update CHANGELOG file of the 'sdk-react-native' package ([#865](https://github.com/MetaMask/metamask-sdk/pull/865)) - feat: update the package.json file of the 'sdk-react-native' package ([#863](https://github.com/MetaMask/metamask-sdk/pull/863)) - feat: create a new SDK for React Native ([#859](https://github.com/MetaMask/metamask-sdk/pull/859)) ## [0.2.0] + ### Added + - Initial release [Unreleased]: https://github.com/MetaMask/metamask-sdk/compare/@metamask/sdk-react-native@0.3.12...HEAD diff --git a/packages/sdk-react-native/package.json b/packages/sdk-react-native/package.json index 238d535e5..f2a5010d9 100644 --- a/packages/sdk-react-native/package.json +++ b/packages/sdk-react-native/package.json @@ -24,8 +24,10 @@ "build:dev": "rm -rf .rollup.cache && yarn build && cd .. && cd examples/reactNativeSdkDemo && rm -rf node_modules && rm -rf .yarn && yarn && cd ios && rm -rf Podfile.lock && pod install --repo-update && cd ..", "clean": "rimraf dist", "dev": "rollup -c -w", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-react-native", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-react-native", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-react-native", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-react-native", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -50,7 +52,6 @@ "readmeFilename": "README.md", "devDependencies": { "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "^3.1.0", "@metamask/eslint-config": "^6.0.0", "@metamask/eslint-config-nodejs": "^6.0.0", "@metamask/eslint-config-typescript": "^6.0.0", diff --git a/packages/sdk-react-ui/CHANGELOG.md b/packages/sdk-react-ui/CHANGELOG.md index 7f9dc1a34..f6ed7d0ad 100644 --- a/packages/sdk-react-ui/CHANGELOG.md +++ b/packages/sdk-react-ui/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,65 +8,93 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.29.2] + ### Added + - feat: default options for pure js and useDeeplink default to true ([#1070](https://github.com/MetaMask/metamask-sdk/pull/1070)) ## [0.29.1] + ### Added + - feat: bump versions for publishing ([#1068](https://github.com/MetaMask/metamask-sdk/pull/1068)) ## [0.28.4] + ### Added + - fix: update the `initializeMobileProvider` function to ensure it returns all connected accounts on mobile ([#1031](https://github.com/MetaMask/metamask-sdk/pull/1031)) ## [0.28.1] + ### Added + - Release 85.0.0 ([#1006](https://github.com/MetaMask/metamask-sdk/pull/1006)) ## [0.27.0] + ### Added + - fix: adds extensionOnly default to true to SDK initialization ([#962](https://github.com/MetaMask/metamask-sdk/pull/962)) - feat: sets extensionOnly default to true ([#956](https://github.com/MetaMask/metamask-sdk/pull/956)) - chore: bump .change files ([#957](https://github.com/MetaMask/metamask-sdk/pull/957)) - feat: improve open deeplink on IOS Chrome ([#948](https://github.com/MetaMask/metamask-sdk/pull/948)) ## [0.26.5] + ### Added + - chore: update the '@metamask/providers' package to version '16.1.0' - chore: update the 'babel' packages ([#939](https://github.com/MetaMask/metamask-sdk/pull/939)) ## [0.26.4] + ### Added + - chore: removes the 'defaultReadOnlyChainId' option from the SDK options ([#919](https://github.com/MetaMask/metamask-sdk/pull/919)) - chore: update SDK dependencies to resolve version conflicts ([#921](https://github.com/MetaMask/metamask-sdk/pull/921)) - chore: update the 'request' method in the 'wrapExtensionProvider' to throw an error when RPC calls fail ([#917](https://github.com/MetaMask/metamask-sdk/pull/917)) ## [0.26.3] + ### Added + - fix: update the 'request' method wrapper logic in 'wrapExtensionProvider' to handle connectAndSign issues ([#913](https://github.com/MetaMask/metamask-sdk/pull/913)) ## [0.26.2] + ### Added + - chore: terminate on 'ACCOUNTS_CHANGED' event when accounts are zero ([#909](https://github.com/MetaMask/metamask-sdk/pull/909)) ## [0.26.0] + ### Added + - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) ## [0.20.4] + ### Added + - feat: create a new SDK for React Native ([#859](https://github.com/MetaMask/metamask-sdk/pull/859)) ## [0.20.3] + ### Added + - feat: force change ([#848](https://github.com/MetaMask/metamask-sdk/pull/848)) ## [0.20.2] + ### Added + - skip version because of publishing issue ## [0.20.1] + ### Added + - feat: trigger new version ([#840](https://github.com/MetaMask/metamask-sdk/pull/840)) - Revert "Release 63.0.0" ([#839](https://github.com/MetaMask/metamask-sdk/pull/839)) - Release 62.0.0 ([#838](https://github.com/MetaMask/metamask-sdk/pull/838)) @@ -73,125 +102,181 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: release 62.0.0 ([#836](https://github.com/MetaMask/metamask-sdk/pull/836)) ## [0.20.0] + ### Added + - feat: align version ([#835](https://github.com/MetaMask/metamask-sdk/pull/835)) ## [0.18.6] + ### Added + - fix: improve the validation of 'dappId' param in the 'setupAnalytics' function ([#817](https://github.com/MetaMask/metamask-sdk/pull/817)) ## [0.18.5] + ### Added + - feat: update 'sdk-react' to be in '0.18.5' ([#810](https://github.com/MetaMask/metamask-sdk/pull/810)) ## [0.18.4] + ### Added + - fix: prefer desktop ([#800](https://github.com/MetaMask/metamask-sdk/pull/800)) - feat: logging initialization ([#799](https://github.com/MetaMask/metamask-sdk/pull/799)) ## [0.18.0] + ### Added + - feat: update the examples apps to the latest sdk version '0.17.2' ([#773](https://github.com/MetaMask/metamask-sdk/pull/773)) ## [0.17.0] + ### Added + - feat: update the "@metamask/providers" package to version 15.0.0 ([#752](https://github.com/MetaMask/metamask-sdk/pull/752)) ## [0.16.0] + ### Added + - feat: activate sourcemap support in all packages and resolve issues ([#730](https://github.com/MetaMask/metamask-sdk/pull/730)) - feat: automated github pages publication ([#599](https://github.com/MetaMask/metamask-sdk/pull/599)) ## [0.15.0] + ### Added + - feat: disable sourcemaps ([#678](https://github.com/MetaMask/metamask-sdk/pull/678)) ## [0.14.3] + ### Added + - fix: 'sdk-react-ui' MetaMaskModal is not showing balance ([#593](https://github.com/MetaMask/metamask-sdk/pull/593)) ## [0.14.2] + ### Added + - update: updates Wagmi dependency on `sdk-react-ui` to 1.4.12 ([#588](https://github.com/MetaMask/metamask-sdk/pull/588)) ## [0.14.1] ## [0.14.0] + ### Added + - fix: balance not updating on metamask button ([#553](https://github.com/MetaMask/metamask-sdk/pull/553)) ## [0.13.0] + ### Added + - feat: add sdk instance to window scope to prevent double init ([#546](https://github.com/MetaMask/metamask-sdk/pull/546)) ## [0.12.4] + ### Added + - feat: build setup for ui and lab ([#537](https://github.com/MetaMask/metamask-sdk/pull/537)) ## [0.12.3] + ### Added + - feat: sdk config context as part of sdk-react ([#529](https://github.com/MetaMask/metamask-sdk/pull/529)) ## [0.12.2] + ### Added + - feat: optimize rollup builds ([#496](https://github.com/MetaMask/metamask-sdk/pull/496)) - fix: linting changelog issue after updating scripts ([#509](https://github.com/MetaMask/metamask-sdk/pull/509)) - fix: invalid changelog linter script ([#506](https://github.com/MetaMask/metamask-sdk/pull/506)) ## [0.12.1] + ### Added + - feat: metamask/sdk-ui initial setup ([#487](https://github.com/MetaMask/metamask-sdk/pull/487)) ## [0.12.0] + ### Added + - align version with sdk ## [0.11.2] + ### Added + - fix: add missing wagmi provider wrapper dependencies ([#459](https://github.com/MetaMask/metamask-sdk/pull/459)) ## [0.11.1] + ### Added + - align version with sdk ## [0.11.0] + ### Added + - feat: enable wagmi config as option ([#447](https://github.com/MetaMask/metamask-sdk/pull/447)) - feat: rename metamask_chainRPCs to metamask_batch and add unit tests ([#440](https://github.com/MetaMask/metamask-sdk/pull/440)) - feat: add 'tw-' prefix to tailwind classes in the sdk-react-ui package ([#437](https://github.com/MetaMask/metamask-sdk/pull/437)) ## [0.10.1] + ### Added + - fix: flightwind css leaking with preflight ([#428](https://github.com/MetaMask/metamask-sdk/pull/428)) ## [0.10.0] + ### Added + - Force align package version to sdk ## [0.9.0] + ### Added + - feat: implementing internationalization via i18next package ([#403](https://github.com/MetaMask/metamask-sdk/pull/403)) ## [0.8.0] + ### Added + - feat: adds contact form to npm packages ([#382](https://github.com/MetaMask/metamask-sdk/pull/382)) ## [0.7.0] + ### Added + - feat: add codecov to CI ([#343](https://github.com/MetaMask/metamask-sdk/pull/343)) ## [0.6.2] + ### Added + - docs: add readme info for sdk-react and sdk-react-ui ([#342](https://github.com/MetaMask/metamask-sdk/pull/342)) - fix: sdk-react-ui doesn't reexport sdk-react hooks ([#341](https://github.com/MetaMask/metamask-sdk/pull/341)) ## [0.6.1] + ### Added + - feat: align versions ([#323](https://github.com/MetaMask/metamask-sdk/pull/323)) -- feat: refactor MetaMaskSDK class for enhanced modularity and testability ([#309](https://github.com/MetaMask/metamask-sdk/pull/309)) +- feat: refactor MetaMaskSDK class for enhanced modularity and testability ([#309](https://github.com/MetaMask/metamask-sdk/pull/309)) ## [0.6.0] + ### Added + - [feat] initial beta released [Unreleased]: https://github.com/MetaMask/metamask-sdk/compare/@metamask/sdk-react-ui@0.29.2...HEAD diff --git a/packages/sdk-react-ui/package.json b/packages/sdk-react-ui/package.json index 3fd4ff665..9d0e392fa 100644 --- a/packages/sdk-react-ui/package.json +++ b/packages/sdk-react-ui/package.json @@ -34,8 +34,10 @@ "build:pre-tsc": "echo 'N/A'", "clean": "rimraf dist", "dev": "rollup -c -w", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-react-ui", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-react-ui", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-react-ui", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-react-ui", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -45,19 +47,18 @@ }, "dependencies": { "@headlessui/react": "^1.6.6", - "@metamask/sdk": "workspace:^", - "@metamask/sdk-react": "workspace:*", + "@metamask/sdk": "0.33.1", + "@metamask/sdk-react": "0.33.1", "ethers": "^5.6.9", "mersenne-twister": "^1.1.0", "react-copy-to-clipboard": "^5.1.0", "react-jazzicon": "^1.0.4", - "viem": "latest", + "viem": "^2.38.0", "wagmi": "1.4.12" }, "devDependencies": { "@babel/core": "^7.23.5", "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "^3.1.0", "@metamask/eslint-config": "^6.0.0", "@metamask/eslint-config-nodejs": "^6.0.0", "@metamask/eslint-config-typescript": "^6.0.0", diff --git a/packages/sdk-react/CHANGELOG.md b/packages/sdk-react/CHANGELOG.md index c528fbf0d..b805d2c9f 100644 --- a/packages/sdk-react/CHANGELOG.md +++ b/packages/sdk-react/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,141 +8,200 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.33.1] + ### Fixed + - chore: pin `debug` package to `4.3.4` due to npm compromise ([#1342](https://github.com/MetaMask/metamask-sdk/pull/1342)) ## [0.33.0] + ### Added + - Add rpc ingore list to analytics ([#1293](https://github.com/MetaMask/metamask-sdk/pull/1293)) - Integrate sdk-analytics with SDK ([#1289](https://github.com/MetaMask/metamask-sdk/pull/1289)) ### Fixed -- Updates and Fixes to Analytics ([#1294](https://github.com/MetaMask/metamask-sdk/pull/1294)) +- Updates and Fixes to Analytics ([#1294](https://github.com/MetaMask/metamask-sdk/pull/1294)) ## [0.32.1] + ### Fixed + - fix: Fix analytics for unwanted events when using extension ([#1219](https://github.com/MetaMask/metamask-sdk/pull/1219)) ## [0.32.0] + ### Uncategorized + - feat: add turborepo for improved monorepo development experience ([#1195](https://github.com/MetaMask/metamask-sdk/pull/1195)) ## [0.31.5] + ### Added + - feat: improves the react connected hook when using extension & emit terminate when using extension ([#1186](https://github.com/MetaMask/metamask-sdk/pull/1186)) ## [0.31.4] + ### Fixed + - refactor(sdk): always send RPC requests via network and deeplink ([#1181](https://github.com/MetaMask/metamask-sdk/pull/1181)) ## [0.31.3] + ### Fixed + - fix(analytics): improve dapp details tracking and SDK RPC request analytics ([#1179](https://github.com/MetaMask/metamask-sdk/pull/1179)) ## [0.31.2] + ### Fixed + - fix: nextjs build fix pr ([#1163](https://github.com/MetaMask/metamask-sdk/pull/1163)) - Set initial modal tab based on preferDesktop option ([#1158](https://github.com/MetaMask/metamask-sdk/pull/1158)) ## [0.31.1] + ### Changed + - fix: Tell webpack about dynamic import + fixed polyfills ([#1151](https://github.com/MetaMask/metamask-sdk/pull/1151)) ## [0.31.0] + ### Changed + - refactor(sdk-install-modal-web): migrate from i18next to custom SimpleI18n implementation ([#1141](https://github.com/MetaMask/metamask-sdk/pull/1141)) ## [0.30.2] + ### Uncategorized + - align version with sdk ## [0.30.0] ## [0.29.2] + ### Added + - feat: default options for pure js and useDeeplink default to true ([#1070](https://github.com/MetaMask/metamask-sdk/pull/1070)) ## [0.29.1] + ### Added + - feat: bump versions for publishing ([#1068](https://github.com/MetaMask/metamask-sdk/pull/1068)) ## [0.29.0] + ### Added + - feat: auto activate deeplink protocol when wallet supports it ([#1056](https://github.com/MetaMask/metamask-sdk/pull/1056)) - feat: handle connection reject event ([#1020](https://github.com/MetaMask/metamask-sdk/pull/1020)) ## [0.28.4] + ### Added + - fix: update the `initializeMobileProvider` function to ensure it returns all connected accounts on mobile ([#1031](https://github.com/MetaMask/metamask-sdk/pull/1031)) ## [0.28.3] + ### Added + - fix: invalid display_uri event emitted ## [0.28.2] + ### Added + - fix: sdk-react for react-native ([#1011](https://github.com/MetaMask/metamask-sdk/pull/1011)) ## [0.28.1] + ### Added -- fix: sdk _selectedAddress not always initialized and rn setup ([#1008](https://github.com/MetaMask/metamask-sdk/pull/1008)) + +- fix: sdk \_selectedAddress not always initialized and rn setup ([#1008](https://github.com/MetaMask/metamask-sdk/pull/1008)) ## [0.28.0] + ### Uncategorized + - feat: revert socket server changes ([#985](https://github.com/MetaMask/metamask-sdk/pull/985)) ## [0.27.0] + ### Added + - fix: adds extensionOnly default to true to SDK initialization ([#962](https://github.com/MetaMask/metamask-sdk/pull/962)) - feat: sets extensionOnly default to true ([#956](https://github.com/MetaMask/metamask-sdk/pull/956)) - chore: bump .change files ([#957](https://github.com/MetaMask/metamask-sdk/pull/957)) - feat: improve open deeplink on IOS Chrome ([#948](https://github.com/MetaMask/metamask-sdk/pull/948)) ## [0.26.5] + ### Added + - chore: update the '@metamask/providers' package to version '16.1.0' - chore: update the 'babel' packages ([#939](https://github.com/MetaMask/metamask-sdk/pull/939)) ## [0.26.4] + ### Added + - chore: removes the 'defaultReadOnlyChainId' option from the SDK options ([#919](https://github.com/MetaMask/metamask-sdk/pull/919)) - chore: update SDK dependencies to resolve version conflicts ([#921](https://github.com/MetaMask/metamask-sdk/pull/921)) - chore: update the 'request' method in the 'wrapExtensionProvider' to throw an error when RPC calls fail ([#917](https://github.com/MetaMask/metamask-sdk/pull/917)) ## [0.26.3] + ### Added + - fix: update the 'request' method wrapper logic in 'wrapExtensionProvider' to handle connectAndSign issues ([#913](https://github.com/MetaMask/metamask-sdk/pull/913)) ## [0.26.2] + ### Added + - chore: terminate on 'ACCOUNTS_CHANGED' event when accounts are zero ([#909](https://github.com/MetaMask/metamask-sdk/pull/909)) ## [0.26.1] ## [0.26.0] + ### Added + - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) ## [0.20.5] + ### Added + - chore: add unit tests to the sdk-react package ([#868](https://github.com/MetaMask/metamask-sdk/pull/868)) ## [0.20.4] + ### Added + - feat: create a new SDK for React Native ([#859](https://github.com/MetaMask/metamask-sdk/pull/859)) ## [0.20.3] + ### Added + - feat: force change ([#848](https://github.com/MetaMask/metamask-sdk/pull/848)) ## [0.20.2] + ### Added -- skip version because of publishing issue +- skip version because of publishing issue ## [0.20.1] + ### Added + - feat: trigger new version ([#840](https://github.com/MetaMask/metamask-sdk/pull/840)) - Revert "Release 63.0.0" ([#839](https://github.com/MetaMask/metamask-sdk/pull/839)) - Release 62.0.0 ([#838](https://github.com/MetaMask/metamask-sdk/pull/838)) @@ -149,47 +209,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: release 62.0.0 ([#836](https://github.com/MetaMask/metamask-sdk/pull/836)) ## [0.20.0] + ### Added + - feat: align version ([#835](https://github.com/MetaMask/metamask-sdk/pull/835)) ## [0.19.0] + ### Added + - feat: full sdk persistence ([#823](https://github.com/MetaMask/metamask-sdk/pull/823)) ## [0.18.6] + ### Added + - fix: improve the validation of 'dappId' param in the 'setupAnalytics' function ([#817](https://github.com/MetaMask/metamask-sdk/pull/817)) ## [0.18.5] + ### Added + - feat: update 'sdk-react' to be in '0.18.5' ([#810](https://github.com/MetaMask/metamask-sdk/pull/810)) ## [0.18.4] + ### Added + - fix: prefer desktop ([#800](https://github.com/MetaMask/metamask-sdk/pull/800)) - feat: logging initialization ([#799](https://github.com/MetaMask/metamask-sdk/pull/799)) ## [0.18.0] + ### Added + - feat: update the examples apps to the latest sdk version '0.17.2' ([#773](https://github.com/MetaMask/metamask-sdk/pull/773)) ## [0.17.2] + ### Added + - fix: normalize uppercase account addresses in SDKProvider, to resolve MaxListenersExceededWarning ([#766](https://github.com/MetaMask/metamask-sdk/pull/766)) ## [0.17.1] + ### Added + - fix: adapt the "devreactnative" DApp for compatibility with new "metaMask/providers" version ([#757](https://github.com/MetaMask/metamask-sdk/pull/757)) ## [0.17.0] + ### Added + - feat: update the "@metamask/providers" package to version 15.0.0 ([#752](https://github.com/MetaMask/metamask-sdk/pull/752)) - feat: restrict rpc method analytics ([#755](https://github.com/MetaMask/metamask-sdk/pull/755)) - feat: rpc event tracking ([#745](https://github.com/MetaMask/metamask-sdk/pull/745)) - chore: disable logs when running unit tests in CI ([#727](https://github.com/MetaMask/metamask-sdk/pull/727)) ## [0.16.0] + ### Added + - feat: activate sourcemap support in all packages and resolve issues ([#730](https://github.com/MetaMask/metamask-sdk/pull/730)) - chore: reduce the bundle size ([#725](https://github.com/MetaMask/metamask-sdk/pull/725)) - chore: use the 'debug' package as the new logger ([#716](https://github.com/MetaMask/metamask-sdk/pull/716)) @@ -198,38 +278,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: automated github pages publication ([#599](https://github.com/MetaMask/metamask-sdk/pull/599)) ## [0.15.0] + ### Added + - feat: disable sourcemaps ([#678](https://github.com/MetaMask/metamask-sdk/pull/678)) ## [0.14.2] + ### Added + - chore: add expo demo app ([#577](https://github.com/MetaMask/metamask-sdk/pull/577)) - feat: change default options with useDeeplinks to false ([#576](https://github.com/MetaMask/metamask-sdk/pull/576)) ## [0.14.1] + ### Added + - align version with sdk ## [0.14.0] + ### Added -- feat: account reset issue on _init event ([#556](https://github.com/MetaMask/metamask-sdk/pull/556)) + +- feat: account reset issue on \_init event ([#556](https://github.com/MetaMask/metamask-sdk/pull/556)) - feat: expose rpc history and keep track of last call ([#555](https://github.com/MetaMask/metamask-sdk/pull/555)) ## [0.13.0] + ### Added + - fix: storage UI and devreact ([#545](https://github.com/MetaMask/metamask-sdk/pull/545)) ## [0.12.4] + ### Added + - feat: build setup for ui and lab ([#537](https://github.com/MetaMask/metamask-sdk/pull/537)) - feat: add debug and rn compatibility to config provider ([#532](https://github.com/MetaMask/metamask-sdk/pull/532)) ## [0.12.3] + ### Added + - feat: sdk config context as part of sdk-react ([#529](https://github.com/MetaMask/metamask-sdk/pull/529)) ## [0.12.2] + ### Added + - feat: add processing state when computing balance ([#519](https://github.com/MetaMask/metamask-sdk/pull/519)) - feat: design system part2 ([#517](https://github.com/MetaMask/metamask-sdk/pull/517)) - feat: optimize rollup builds ([#496](https://github.com/MetaMask/metamask-sdk/pull/496)) @@ -237,25 +333,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix: invalid changelog linter script ([#506](https://github.com/MetaMask/metamask-sdk/pull/506)) ## [0.12.1] + ### Added + - align version with sdk ## [0.12.0] + ### Added + - feat: set minimum required coverage to 50/100 ([#473](https://github.com/MetaMask/metamask-sdk/pull/473)) - feat: socket handling optimization and devnext ui ([#468](https://github.com/MetaMask/metamask-sdk/pull/468)) - feat: expose rpc history tracker ([#462](https://github.com/MetaMask/metamask-sdk/pull/462)) ## [0.11.2] + ### Added + - align version with sdk ## [0.11.1] + ### Added + - align version with sdk ## [0.11.0] + ### Added + - fix: setChainId cause a build error ([#452](https://github.com/MetaMask/metamask-sdk/pull/452)) - fix: chainId is undefined on first connection with extension ([#445](https://github.com/MetaMask/metamask-sdk/pull/445)) - feat: enable wagmi config as option ([#447](https://github.com/MetaMask/metamask-sdk/pull/447)) @@ -263,57 +369,81 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix: account balance not updating when chain changes ([#435](https://github.com/MetaMask/metamask-sdk/pull/435)) ## [0.10.1] + ### Added + - chore: align version number with sdk ## [0.10.0] + ### Added + - fix: balance only display when debug is set ([#408](https://github.com/MetaMask/metamask-sdk/pull/408)) - feat: add unit tests to the sdk-react package ([#369](https://github.com/MetaMask/metamask-sdk/pull/369)) ## [0.9.0] + ### Added + - feat: implementing internationalization via i18next package ([#403](https://github.com/MetaMask/metamask-sdk/pull/403)) - feat: automatically compute account balance and return from sdk-react ([#400](https://github.com/MetaMask/metamask-sdk/pull/400)) ## [0.8.0] + ### Added + - feat: update account and chain values in sdk hook on extension ([#386](https://github.com/MetaMask/metamask-sdk/pull/386)) - feat: add extensionActive info into hook ([#384](https://github.com/MetaMask/metamask-sdk/pull/384)) - feat: adds contact form to npm packages ([#382](https://github.com/MetaMask/metamask-sdk/pull/382)) ## [0.7.0] + ### Added + - feat: rpc read only calls and infura provider ([#353](https://github.com/MetaMask/metamask-sdk/pull/353)) - feat: add codecov to CI ([#343](https://github.com/MetaMask/metamask-sdk/pull/343)) ## [0.6.2] + ### Added + - docs: add readme info for sdk-react and sdk-react-ui ([#342](https://github.com/MetaMask/metamask-sdk/pull/342)) ## [0.6.1] + ### Added + - feat: align versions ([#323](https://github.com/MetaMask/metamask-sdk/pull/323)) ## [0.6.0] + ### Added + - refactor: move wagmi to sdk-react-ui ([#271](https://github.com/MetaMask/metamask-sdk/pull/271)) ## [0.5.6] + ### Added + - feat: react hooks with wagmi ([#246](https://github.com/MetaMask/metamask-sdk/pull/246)) ## [0.5.4] + ### Added + - feat: monorepo examples integration ([#239](https://github.com/MetaMask/metamask-sdk/pull/239)) - fix: sdk hook connector error with strictmode ([#234](https://github.com/MetaMask/metamask-sdk/pull/234)) ## [0.5.3] + ### Added + - Upgrade to latest sdk ## [0.3.1] + ### Added + - Release 3.0.0 - fix types path ([#137](https://github.com/MetaMask/metamask-sdk/pull/137)) - [FEAT] add nextjs demo project in examples/ ([#123](https://github.com/MetaMask/metamask-sdk/pull/123)) diff --git a/packages/sdk-react/package.json b/packages/sdk-react/package.json index d6a8bc35b..be6908fe7 100644 --- a/packages/sdk-react/package.json +++ b/packages/sdk-react/package.json @@ -35,8 +35,10 @@ "build:pre-tsc": "echo 'N/A'", "clean": "rimraf dist", "dev": "rollup -c -w --bundleConfigAsCjs", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-react", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-react", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-react", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-react", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -46,7 +48,7 @@ "test:ci": "jest --coverage --passWithNoTests --setupFilesAfterEnv ./jest-preload.js" }, "dependencies": { - "@metamask/sdk": "workspace:^", + "@metamask/sdk": "0.33.1", "debug": "4.3.4", "eth-rpc-errors": "^4.0.3", "rollup-plugin-node-builtins": "^2.1.2", @@ -58,7 +60,6 @@ "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "^3.1.0", "@metamask/eslint-config": "^6.0.0", "@metamask/eslint-config-nodejs": "^6.0.0", "@metamask/eslint-config-typescript": "^6.0.0", diff --git a/packages/sdk-socket-server-next/package.json b/packages/sdk-socket-server-next/package.json index a405f72dc..a50f8caeb 100644 --- a/packages/sdk-socket-server-next/package.json +++ b/packages/sdk-socket-server-next/package.json @@ -24,8 +24,10 @@ "debug": "nodemon --exec 'NODE_ENV=development ts-node --transpile-only src/index.ts'", "debug:redis": "cross-env NODE_ENV=development ts-node --transpile-only src/redis-check.ts", "docker:debug": "yarn docker:redis && docker compose up appdev", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-socket-server-scale", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-socket-server-scale", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-socket-server-scale", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "yarn auto-changelog validate", "lint:eslint": "eslint .", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -62,7 +64,6 @@ }, "devDependencies": { "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "^2.3.0", "@metamask/eslint-config-jest": "^12.1.0", "@metamask/eslint-config-typescript": "^6.0.0", "@types/analytics-node": "^3.1.13", diff --git a/packages/sdk-ui/CHANGELOG.md b/packages/sdk-ui/CHANGELOG.md index 3f74ab49e..663a21dce 100644 --- a/packages/sdk-ui/CHANGELOG.md +++ b/packages/sdk-ui/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,48 +8,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.30.2] + ### Uncategorized + - chore: force new version detection ([#1121](https://github.com/MetaMask/metamask-sdk/pull/1121)) ## [0.30.0] ## [0.29.1] + ### Uncategorized + - feat: bump versions for publishing ([#1068](https://github.com/MetaMask/metamask-sdk/pull/1068)) ## [0.29.0] + ### Uncategorized + - feat: auto activate deeplink protocol when wallet supports it ([#1056](https://github.com/MetaMask/metamask-sdk/pull/1056)) ## [0.28.0] + ### Uncategorized + - feat: revert socket server changes ([#985](https://github.com/MetaMask/metamask-sdk/pull/985)) ## [0.26.0] + ### Uncategorized + - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) ## [0.20.5] + ### Added + - align version with sdk package - chore: create wagmi demo dapp ([#669](https://github.com/MetaMask/metamask-sdk/pull/669)) ## [0.4.2] + ### Uncategorized + - feat: force change ([#848](https://github.com/MetaMask/metamask-sdk/pull/848)) ## [0.4.1] + ### Added + - fix: prefer desktop ([#800](https://github.com/MetaMask/metamask-sdk/pull/800)) - feat: logging initialization ([#799](https://github.com/MetaMask/metamask-sdk/pull/799)) ## [0.4.0] + ### Added + - feat: allow custom actions in MetaMask floating button ([#768](https://github.com/MetaMask/metamask-sdk/pull/768)) - fix: adapt the "devreactnative" DApp for compatibility with new "metaMask/providers" version ([#757](https://github.com/MetaMask/metamask-sdk/pull/757)) ## [0.3.0] + ### Added + - feat: activate sourcemap support in all packages and resolve issues ([#730](https://github.com/MetaMask/metamask-sdk/pull/730)) - Fix/sdk config provider ([#714](https://github.com/MetaMask/metamask-sdk/pull/714)) - feat: expose channel id via hook + expose wallet status via sdk instance ([#704](https://github.com/MetaMask/metamask-sdk/pull/704)) @@ -56,43 +77,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: automated github pages publication ([#599](https://github.com/MetaMask/metamask-sdk/pull/599)) ## [0.2.0] + ### Added + - Revert "Release 48.0.0" ([#686](https://github.com/MetaMask/metamask-sdk/pull/686)) - Release 48.0.0 ([#684](https://github.com/MetaMask/metamask-sdk/pull/684)) - feat: permission system flow ([#675](https://github.com/MetaMask/metamask-sdk/pull/675)) - consensys.net -> consensys.io ([#605](https://github.com/MetaMask/metamask-sdk/pull/605)) ## [0.1.6] + ### Added + - feat: ui quick swap and new rpc call metamask_open ([#572](https://github.com/MetaMask/metamask-sdk/pull/572)) ## [0.1.5] + ### Added + - feat: more cross functional ui components ([#557](https://github.com/MetaMask/metamask-sdk/pull/557)) ## [0.1.4] + ### Added + - fix: storybook setup ([#547](https://github.com/MetaMask/metamask-sdk/pull/547)) - fix: storage UI and devreact ([#545](https://github.com/MetaMask/metamask-sdk/pull/545)) ## [0.1.3] + ### Added + - feat: build setup for ui and lab ([#537](https://github.com/MetaMask/metamask-sdk/pull/537)) - feat: publish sdk-ui ([#533](https://github.com/MetaMask/metamask-sdk/pull/533)) ## [0.1.2] + ### Uncategorized + - feat: design system part3 ([#527](https://github.com/MetaMask/metamask-sdk/pull/527)) - feat: update examples 0.12.2 ([#526](https://github.com/MetaMask/metamask-sdk/pull/526)) ## [0.1.1] + ### Uncategorized + - chore: trigger release ([#524](https://github.com/MetaMask/metamask-sdk/pull/524)) - chore: trigger release ([#523](https://github.com/MetaMask/metamask-sdk/pull/523)) - Release 39.0.0 ([#522](https://github.com/MetaMask/metamask-sdk/pull/522)) - feat: release 39.0.0 ([#520](https://github.com/MetaMask/metamask-sdk/pull/520)) ### Added + - chore: enable sdk-ui and sdk-lab to v0.1.0 ([#518](https://github.com/MetaMask/metamask-sdk/pull/518)) - feat: design system part2 ([#517](https://github.com/MetaMask/metamask-sdk/pull/517)) - feat: design system integration part1 ([#513](https://github.com/MetaMask/metamask-sdk/pull/513)) diff --git a/packages/sdk-ui/package.json b/packages/sdk-ui/package.json index a1914fe6d..be9dc4d95 100644 --- a/packages/sdk-ui/package.json +++ b/packages/sdk-ui/package.json @@ -29,9 +29,11 @@ "build:storybook": "sb build", "storybook": "storybook dev -p 6226", "deploy-storybook": "gh-pages -d storybook-static", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-ui", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-ui", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-ui", "lint": "echo 'n/a'", "lint:eslint": "eslint . --cache \"src/**/*.{js,ts,tsx}\"", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk-ui", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", "test": "echo 'n/a'", @@ -67,7 +69,6 @@ "@babel/preset-flow": "^7.23.3", "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", - "@metamask/auto-changelog": "^3.4.3", "@react-native-async-storage/async-storage": "^1.19.6", "@react-native-community/eslint-config": "^3.2.0", "@rollup/plugin-babel": "^6.0.4", diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index f4db3a40a..ce311a5af 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), @@ -7,83 +8,114 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [0.33.1] + ### Fixed + - chore: pin `debug` package to `4.3.4` due to npm compromise ([#1342](https://github.com/MetaMask/metamask-sdk/pull/1342)) ## [0.33.0] + ### Added + - Add rpc ingore list to analytics ([#1293](https://github.com/MetaMask/metamask-sdk/pull/1293)) - Integrate sdk-analytics with SDK ([#1289](https://github.com/MetaMask/metamask-sdk/pull/1289)) ### Fixed + - Updates and Fixes to Analytics ([#1294](https://github.com/MetaMask/metamask-sdk/pull/1294)) ## [0.32.1] + ### Fixed + - fix: Fix analytics for unwanted events when using extension ([#1219](https://github.com/MetaMask/metamask-sdk/pull/1219)) ## [0.32.0] + ### Added + - feat(sdk): rollback @metamask/providers to 16.1.0 due to Next.js compatibility issues ([#1207](https://github.com/MetaMask/metamask-sdk/pull/1207)) - feat(sdk): upgrade @metamask/providers to ^18.3.1 ([#1199](https://github.com/MetaMask/metamask-sdk/pull/1199)) - feat: implement message size validation to prevent excessive payloads ([#1197](https://github.com/MetaMask/metamask-sdk/pull/1197)) - feat: add turborepo for improved monorepo development experience ([#1195](https://github.com/MetaMask/metamask-sdk/pull/1195)) ### Fixed + - fix: user rejection bug ([#1202](https://github.com/MetaMask/metamask-sdk/pull/1202)) ## [0.31.5] + ### Added + - feat: improves the react connected hook when using extension & emit terminate when using extension ([#1186](https://github.com/MetaMask/metamask-sdk/pull/1186)) - chore: add analytics to install modal ([#1189](https://github.com/MetaMask/metamask-sdk/pull/1189)) - feat: add MetaMask Flask provider support for EIP-6963 ([#1192](https://github.com/MetaMask/metamask-sdk/pull/1192)) - chore: call getPermissions on accountsChanged when using extension ([#1185](https://github.com/MetaMask/metamask-sdk/pull/1185)) ### Fixed + - Fix nextjs localstorage issue ([#1193](https://github.com/MetaMask/metamask-sdk/pull/1193)) - fix(MetaMaskInstaller): replace delete with assignment to undefined for window.ethereum ([#1162](https://github.com/MetaMask/metamask-sdk/pull/1162)) ## [0.31.4] + ### Fixed + - refactor(sdk): always send RPC requests via network and deeplink ([#1181](https://github.com/MetaMask/metamask-sdk/pull/1181)) ## [0.31.3] + ### Fixed + - fix(analytics): improve dapp details tracking and SDK RPC request analytics ([#1179](https://github.com/MetaMask/metamask-sdk/pull/1179)) ## [0.31.2] + ### Fixed + - fix: nextjs build fix pr ([#1163](https://github.com/MetaMask/metamask-sdk/pull/1163)) - Set initial modal tab based on preferDesktop option ([#1158](https://github.com/MetaMask/metamask-sdk/pull/1158)) ## [0.31.1] + ### Changed + - fix: Tell webpack about dynamic import + fixed polyfills ([#1151](https://github.com/MetaMask/metamask-sdk/pull/1151)) - chore: removes sdk terminate when accountsChanged comes in empty ([#1148](https://github.com/MetaMask/metamask-sdk/pull/1148)) ## [0.31.0] + ### Changed + - refactor(sdk-install-modal-web): migrate from i18next to custom SimpleI18n implementation ([#1141](https://github.com/MetaMask/metamask-sdk/pull/1141)) - refactor(sdk-install-modal-web): migrate to StencilJS + Lazy Loading ([#1139](https://github.com/MetaMask/metamask-sdk/pull/1139)) - refactor: replace qr-code-styling with smaller library ([#1129](https://github.com/MetaMask/metamask-sdk/pull/1129)) ## [0.30.3] + ### Changed + - refactor(sdk): modernize wallet provider detection with EIP-6963 ([#1126](https://github.com/MetaMask/metamask-sdk/pull/1126)) ## [0.30.2] + ### Added + - fix: potential security issue with secp256k1 ([#1111](https://github.com/MetaMask/metamask-sdk/pull/1111)) - chore: remove the alert of 'SDK Connection has been terminated' ([#1095](https://github.com/MetaMask/metamask-sdk/pull/1095)) - fix: chainId for sepolia in infura rpc map ([#1105](https://github.com/MetaMask/metamask-sdk/pull/1105)) ## [0.30.1] + ### Added + - feat: deprecate getUniversalLink in favor or display_uri ([#1089](https://github.com/MetaMask/metamask-sdk/pull/1089)) - feat: cleanup sdk dependencies ([#1088](https://github.com/MetaMask/metamask-sdk/pull/1088)) ## [0.30.0] + ### Added + - feat: wallet_requestpermissions update local provider accounts ([#1081](https://github.com/MetaMask/metamask-sdk/pull/1081)) - fix: connectAndSign send as hexString ([#1082](https://github.com/MetaMask/metamask-sdk/pull/1082)) - feat: sdk integration improvements ([#1080](https://github.com/MetaMask/metamask-sdk/pull/1080)) @@ -91,21 +123,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix: rpc protocol resetting after refresh ([#1079](https://github.com/MetaMask/metamask-sdk/pull/1079)) ## [0.29.3] + ### Added + - fix: display_uri event malformed ([#1076](https://github.com/MetaMask/metamask-sdk/pull/1076)) ## [0.29.2] + ### Added + - feat: default options for pure js and useDeeplink default to true ([#1070](https://github.com/MetaMask/metamask-sdk/pull/1070)) ## [0.29.1] + ### Added + - feat: emit connectWithResponse event ([#1067](https://github.com/MetaMask/metamask-sdk/pull/1067)) - feat: always re-emit display uri event ([#1066](https://github.com/MetaMask/metamask-sdk/pull/1066)) - fix: improper implementation of handleBatchMethod + more robust tests ([#1065](https://github.com/MetaMask/metamask-sdk/pull/1065)) ## [0.29.0] + ### Added + - feat: event alignment with async protocol ([#1054](https://github.com/MetaMask/metamask-sdk/pull/1054)) - feat: auto activate deeplink protocol when wallet supports it ([#1056](https://github.com/MetaMask/metamask-sdk/pull/1056)) - fix: connectWith potnetially returning incorrect response ([#1053](https://github.com/MetaMask/metamask-sdk/pull/1053)) @@ -116,23 +156,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: handle connection reject event ([#1020](https://github.com/MetaMask/metamask-sdk/pull/1020)) ## [0.28.4] + ### Added + - fix: update the `initializeMobileProvider` function to ensure it returns all connected accounts on mobile ([#1031](https://github.com/MetaMask/metamask-sdk/pull/1031)) ## [0.28.3] + ### Added + - fix: invalid display_uri event emitted ## [0.28.2] + ### Added + - fix: sdk-react for react-native ([#1011](https://github.com/MetaMask/metamask-sdk/pull/1011)) ## [0.28.1] + ### Added -- fix: sdk _selectedAddress not always initialized and rn setup ([#1008](https://github.com/MetaMask/metamask-sdk/pull/1008)) + +- fix: sdk \_selectedAddress not always initialized and rn setup ([#1008](https://github.com/MetaMask/metamask-sdk/pull/1008)) ## [0.28.0] + ### Added + - fix: adds a unique id to RPC events for extension ([#996](https://github.com/MetaMask/metamask-sdk/pull/996)) - feat: connectwith working with async key exchange ([#1004](https://github.com/MetaMask/metamask-sdk/pull/1004)) - feat: socket reconnection optimization ([#994](https://github.com/MetaMask/metamask-sdk/pull/994)) @@ -142,114 +192,162 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: change the default value for 'dappId' to 'N/A' instead of an empty string ([#972](https://github.com/MetaMask/metamask-sdk/pull/972)) ## [0.27.0] + ### Added + - fix: adds extensionOnly default to true to SDK initialization ([#962](https://github.com/MetaMask/metamask-sdk/pull/962)) - feat: sets extensionOnly default to true ([#956](https://github.com/MetaMask/metamask-sdk/pull/956)) - chore: bump .change files ([#957](https://github.com/MetaMask/metamask-sdk/pull/957)) - feat: improve open deeplink on IOS Chrome ([#948](https://github.com/MetaMask/metamask-sdk/pull/948)) ## [0.26.5] + ### Added + - chore: update the '@metamask/providers' package to version '16.1.0' ## [0.26.4] + ### Added + - chore: removes the 'defaultReadOnlyChainId' option from the SDK options ([#919](https://github.com/MetaMask/metamask-sdk/pull/919)) - chore: update SDK dependencies to resolve version conflicts ([#921](https://github.com/MetaMask/metamask-sdk/pull/921)) - chore: update the 'request' method in the 'wrapExtensionProvider' to throw an error when RPC calls fail ([#917](https://github.com/MetaMask/metamask-sdk/pull/917)) ## [0.26.3] + ### Added + - fix: update the 'request' method wrapper logic in 'wrapExtensionProvider' to handle connectAndSign issues ([#913](https://github.com/MetaMask/metamask-sdk/pull/913)) ## [0.26.2] + ### Added + - chore: terminate on 'ACCOUNTS_CHANGED' event when accounts are zero ([#909](https://github.com/MetaMask/metamask-sdk/pull/909)) ## [0.26.1] + ### Added -- feat: wallet_revokePermissions on terminate ([#907](https://github.com/MetaMask/metamask-sdk/pull/907)) + +- feat: wallet_revokePermissions on terminate ([#907](https://github.com/MetaMask/metamask-sdk/pull/907)) ## [0.26.0] + ### Added + - feat: add script to align version before publishing ([#902](https://github.com/MetaMask/metamask-sdk/pull/902)) - feat: close modal with error 4001 ([#898](https://github.com/MetaMask/metamask-sdk/pull/898)) - feat: emit url event ([#901](https://github.com/MetaMask/metamask-sdk/pull/901)) - chore: improve unit tests coverage ([#888](https://github.com/MetaMask/metamask-sdk/pull/888)) ## [0.20.5] + ### Added + - fix: extension events ([#877](https://github.com/MetaMask/metamask-sdk/pull/877)) - feat: set default sdk source ([#875](https://github.com/MetaMask/metamask-sdk/pull/875)) ## [0.20.4] + ### Added + - feat: create a new SDK for React Native ([#859](https://github.com/MetaMask/metamask-sdk/pull/859)) ## [0.20.3] + ### Added + - feat: re-enable jscc web ([#845](https://github.com/MetaMask/metamask-sdk/pull/845)) ## [0.20.2] + ### Added + - skip version because of publishing issue ## [0.20.1] + ### Added + - skip version because of publishing issue ## [0.20.0] + ### Added + - feat: track done event on extension analytics ([#834](https://github.com/MetaMask/metamask-sdk/pull/834)) ## [0.19.0] + ### Added -- feat: remove rn dependencies ([#830](https://github.com/MetaMask/metamask-sdk/pull/830)) + +- feat: remove rn dependencies ([#830](https://github.com/MetaMask/metamask-sdk/pull/830)) - feat: storage manager ([#829](https://github.com/MetaMask/metamask-sdk/pull/829)) - feat: full sdk persistence ([#823](https://github.com/MetaMask/metamask-sdk/pull/823)) ## [0.18.6] + ### Added + - fix: improve the validation of 'dappId' param in the 'setupAnalytics' function ([#817](https://github.com/MetaMask/metamask-sdk/pull/817)) ## [0.18.5] + ### Added + - fix: preferDesktop and onboarding ([#807](https://github.com/MetaMask/metamask-sdk/pull/807)) - fix: inpage provider support ([#806](https://github.com/MetaMask/metamask-sdk/pull/806)) ## [0.18.4] + ### Added + - fix: prefer desktop ([#800](https://github.com/MetaMask/metamask-sdk/pull/800)) - feat: logging initialization ([#799](https://github.com/MetaMask/metamask-sdk/pull/799)) ## [0.18.3] + ### Added + - fix: issue preventing opting out of analytics ([#794](https://github.com/MetaMask/metamask-sdk/pull/794)) ## [0.18.2] + ### Added + - fix: update the EIP_6369 provider info ([#788](https://github.com/MetaMask/metamask-sdk/pull/788)) ## [0.18.1] + ### Added + - feat: store account between refresh ([#779](https://github.com/MetaMask/metamask-sdk/pull/779)) ## [0.18.0] + ### Added + - feat: update prod socket server url ([#774](https://github.com/MetaMask/metamask-sdk/pull/774)) ## [0.17.2] + ### Added + - feat: separately handle extension connectWith ([#767](https://github.com/MetaMask/metamask-sdk/pull/767)) - fix: normalize uppercase account addresses in SDKProvider, to resolve MaxListenersExceededWarning ([#766](https://github.com/MetaMask/metamask-sdk/pull/766)) ## [0.17.1] + ### Added + - fix: adapt the "devreactnative" DApp for compatibility with new "metaMask/providers" version ([#757](https://github.com/MetaMask/metamask-sdk/pull/757)) - fix: invalid provider state to undefined instead of null ([#758](https://github.com/MetaMask/metamask-sdk/pull/758)) ## [0.17.0] + ### Added + - feat: update the "@metamask/providers" package to version 15.0.0 ([#752](https://github.com/MetaMask/metamask-sdk/pull/752)) - feat: restrict rpc method analytics ([#755](https://github.com/MetaMask/metamask-sdk/pull/755)) - feat: rpc event tracking ([#745](https://github.com/MetaMask/metamask-sdk/pull/745)) @@ -257,7 +355,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - chore: disable logs when running unit tests in CI ([#727](https://github.com/MetaMask/metamask-sdk/pull/727)) ## [0.16.0] + ### Added + - feat: activate sourcemap support in all packages and resolve issues ([#730](https://github.com/MetaMask/metamask-sdk/pull/730)) - feat: add sdkVersion to analytics ([#726](https://github.com/MetaMask/metamask-sdk/pull/726)) - chore: reduce the bundle size ([#725](https://github.com/MetaMask/metamask-sdk/pull/725)) @@ -268,7 +368,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: automated github pages publication ([#599](https://github.com/MetaMask/metamask-sdk/pull/599)) ## [0.15.0] + ### Added + - chore: sourcemaps ([#687](https://github.com/MetaMask/metamask-sdk/pull/687)) - Revert "Release 48.0.0" ([#686](https://github.com/MetaMask/metamask-sdk/pull/686)) - Release 48.0.0 ([#684](https://github.com/MetaMask/metamask-sdk/pull/684)) @@ -277,53 +379,73 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: permission system flow ([#675](https://github.com/MetaMask/metamask-sdk/pull/675)) ## [0.14.3] + ### Added + - feat: Conditionally Invoke getMobileProvider in setupExtensionPreferences Based on if Mobile Provider is Availabile ([#663](https://github.com/MetaMask/metamask-sdk/pull/663)) - feat: add dAppTitle to Infura Header for Enhanced dApp Identification ([#666](https://github.com/MetaMask/metamask-sdk/pull/666)) ## [0.14.2] + ### Added + - feat: change the 'enableDebug' option to 'enableAnalytics' ([#604](https://github.com/MetaMask/metamask-sdk/pull/604)) - feat: create an auto-translate script for the internationalization files ([#595](https://github.com/MetaMask/metamask-sdk/pull/595)) - chore: add expo demo app ([#577](https://github.com/MetaMask/metamask-sdk/pull/577)) ## [0.14.1] + ### Added + - feat: ui quick swap and new rpc call metamask_open ([#572](https://github.com/MetaMask/metamask-sdk/pull/572)) - fix: connect with not redirecting ([#561](https://github.com/MetaMask/metamask-sdk/pull/561)) ## [0.14.0] + ### Added + - feat: new rpc call metamask_connectwith ([#558](https://github.com/MetaMask/metamask-sdk/pull/558)) - chore: change favicon from base64 format to url ([#550](https://github.com/MetaMask/metamask-sdk/pull/550)) ## [0.13.0] + ### Added + - feat: add sdk instance to window scope to prevent double init ([#546](https://github.com/MetaMask/metamask-sdk/pull/546)) - fix: transfer the extracted favicon to base64 format in setupDappMetadata ([#536](https://github.com/MetaMask/metamask-sdk/pull/536)) ## [0.12.4] + ### Added + - sdk ui release version ## [0.12.3] + ### Added + - fix: regex in setupDappMetadata function ([#528](https://github.com/MetaMask/metamask-sdk/pull/528)) - feat: add the option to add dapp icon in base64 format ([#521](https://github.com/MetaMask/metamask-sdk/pull/521)) ## [0.12.2] + ### Added + - feat: add the option to add iconUrl to the dappMetadata ([#511](https://github.com/MetaMask/metamask-sdk/pull/511)) - feat: optimize rollup builds ([#496](https://github.com/MetaMask/metamask-sdk/pull/496)) ## [0.12.1] + ### Added + - feat: propagate extension events ([#493](https://github.com/MetaMask/metamask-sdk/pull/493)) - feat: metamask/sdk-ui initial setup ([#487](https://github.com/MetaMask/metamask-sdk/pull/487)) - feat: add backward v3 json compatibility on i18n ([#483](https://github.com/MetaMask/metamask-sdk/pull/483)) ## [0.12.0] + ### Added + - feat: update onboard package ([#475](https://github.com/MetaMask/metamask-sdk/pull/475)) - feat: expose sdk version ([#474](https://github.com/MetaMask/metamask-sdk/pull/474)) - feat: set minimum required coverage to 50/100 ([#473](https://github.com/MetaMask/metamask-sdk/pull/473)) @@ -332,18 +454,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: expose rpc history tracker ([#462](https://github.com/MetaMask/metamask-sdk/pull/462)) - refactor: rewrite ios browser version detection for improved readibility ([#465](https://github.com/MetaMask/metamask-sdk/pull/465)) - feat: qrcode deeplinks ([#463](https://github.com/MetaMask/metamask-sdk/pull/463)) -- feat: sdk option openDeepLink with dynamic url ([#464](https://github.com/MetaMask/metamask-sdk/pull/464)) +- feat: sdk option openDeepLink with dynamic url ([#464](https://github.com/MetaMask/metamask-sdk/pull/464)) ## [0.11.2] + ### Added -- align version with sdk-react* packages + +- align version with sdk-react\* packages ## [0.11.1] + ### Added + - build: improve sdk bundle to work with nodejs strictmode ([#457](https://github.com/MetaMask/metamask-sdk/pull/457)) ## [0.11.0] + ### Added + - feat: enable wagmi config as option ([#447](https://github.com/MetaMask/metamask-sdk/pull/447)) - fix: socket io event handler not initializing properly ([#446](https://github.com/MetaMask/metamask-sdk/pull/446)) - feat: detect qrcode origin on wallet ([#443](https://github.com/MetaMask/metamask-sdk/pull/443)) @@ -352,15 +480,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: chaining of rpc calls ([#434](https://github.com/MetaMask/metamask-sdk/pull/434)) ## [0.10.1] + ### Added + - feat: send sdk_extension_utilized analytics event when extension is selected from cached choice. ([#425](https://github.com/MetaMask/metamask-sdk/pull/425)) ## [0.10.0] + ### Added + - feat: connectAndSign feature ([#410](https://github.com/MetaMask/metamask-sdk/pull/410)) ## [0.9.0] + ### Added + - feat: add sdk version and change modal order ([#405](https://github.com/MetaMask/metamask-sdk/pull/405)) - feat: implementing internationalization via i18next package ([#403](https://github.com/MetaMask/metamask-sdk/pull/403)) - feat: alias terminate to disconnect on sdk ([#399](https://github.com/MetaMask/metamask-sdk/pull/399)) @@ -368,7 +502,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix: modal cleanup and otp selection ([#402](https://github.com/MetaMask/metamask-sdk/pull/402)) ## [0.8.0] + ### Added + - feat: remove npm dependency warnings for peers packages - feat: enable infura http headers for analytics ([#387](https://github.com/MetaMask/metamask-sdk/pull/387)) - feat: cache selected account and selected chain ([#385](https://github.com/MetaMask/metamask-sdk/pull/385)) @@ -376,26 +512,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: updates documentation links and platform status ([#378](https://github.com/MetaMask/metamask-sdk/pull/378)) ## [0.7.1] + ### Added + - feat: allow all react-native peer deps ([#366](https://github.com/MetaMask/metamask-sdk/pull/366)) - fix: sdk connection request event ([#364](https://github.com/MetaMask/metamask-sdk/pull/364)) - feat: wrap eth_accounts when disconnected to allow read only / offline calls ([#363](https://github.com/MetaMask/metamask-sdk/pull/363)) ## [0.7.0] + ### Added + - feat: rpc read only calls and infura provider ([#353](https://github.com/MetaMask/metamask-sdk/pull/353)) - feat: extend the time we resume the session without showing OTP ([#348](https://github.com/MetaMask/metamask-sdk/pull/348)) - feat: add codecov to CI ([#343](https://github.com/MetaMask/metamask-sdk/pull/343)) ## [0.6.2] + ### Added + - feat: add unit tests to the RemoteCommunicationPostMessageStream class ([#337](https://github.com/MetaMask/metamask-sdk/pull/337)) - feat: refactor the RemoteCommunicationPostMessage stream class ([#336](https://github.com/MetaMask/metamask-sdk/pull/336)) - feat: add unit tests to the MobilePortStream class ([#335](https://github.com/MetaMask/metamask-sdk/pull/335)) - feat: add unit tests to the PlatformManager class ([#333](https://github.com/MetaMask/metamask-sdk/pull/333)) - feat: refactor the PlatformManager class ([#332](https://github.com/MetaMask/metamask-sdk/pull/332)) - fix: edge case when modal not fully resetting after termination ([#339](https://github.com/MetaMask/metamask-sdk/pull/339)) -- fix: initialize state in _initializeStateAsync to address uninitialized properties issue ([#331](https://github.com/MetaMask/metamask-sdk/pull/331)) +- fix: initialize state in \_initializeStateAsync to address uninitialized properties issue ([#331](https://github.com/MetaMask/metamask-sdk/pull/331)) - feat: add unit tests to the MetaMaskInstaller class ([#326](https://github.com/MetaMask/metamask-sdk/pull/326)) - feat: refactor the MetaMaskInstaller class ([#325](https://github.com/MetaMask/metamask-sdk/pull/325)) - feat: refactor the SDKProvider class for enhanced modularity and testability ([#321](https://github.com/MetaMask/metamask-sdk/pull/321)) @@ -403,30 +545,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: add unit tests to the MetaMaskSDK class ([#319](https://github.com/MetaMask/metamask-sdk/pull/319)) ## [0.6.1] + ### Added -- feat: refactor MetaMaskSDK class for enhanced modularity and testability ([#309](https://github.com/MetaMask/metamask-sdk/pull/309)) + +- feat: refactor MetaMaskSDK class for enhanced modularity and testability ([#309](https://github.com/MetaMask/metamask-sdk/pull/309)) ## [0.6.0] + ### Added + - feat: improved event tracking ([#298](https://github.com/MetaMask/metamask-sdk/pull/298)) - feat: reinitialize sdk on termination ([#296](https://github.com/MetaMask/metamask-sdk/pull/296)) - feat: remove invalid connect event (should contain chainId) ([#287](https://github.com/MetaMask/metamask-sdk/pull/287)) - feat: add sideEffects field to sdk package ([#286](https://github.com/MetaMask/metamask-sdk/pull/286)) - feat: refactor the RemoteConnection class ([#258](https://github.com/MetaMask/metamask-sdk/pull/258)) -- feat: enable commit hooks and video examples ([#252](https://github.com/MetaMask/metamask-sdk/pull/252)) +- feat: enable commit hooks and video examples ([#252](https://github.com/MetaMask/metamask-sdk/pull/252)) - feat: restrict autoconnect desktopweb ([#248](https://github.com/MetaMask/metamask-sdk/pull/248)) ## [0.5.6] + ### Added + - feat: force provider connect state ([#245](https://github.com/MetaMask/metamask-sdk/pull/245)) - feat: optimize provider initialization ([#243](https://github.com/MetaMask/metamask-sdk/pull/243)) ## [0.5.5] + ### Added + - fix: install modal unmount ([#241](https://github.com/MetaMask/metamask-sdk/pull/241)) ## [0.5.4] + ### Added + - feat: monorepo examples integration ([#239](https://github.com/MetaMask/metamask-sdk/pull/239)) - feat: check init before connect (+dynamic platform import) ([#238](https://github.com/MetaMask/metamask-sdk/pull/238)) - fix: sdk hook connector error with strictmode ([#234](https://github.com/MetaMask/metamask-sdk/pull/234)) @@ -434,7 +586,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix: invalid types during build pipeline ([#233](https://github.com/MetaMask/metamask-sdk/pull/233)) ## [0.5.3] + ### Added + - feat: persist extension provider preferences - feat: remove webrtc references ([#227](https://github.com/MetaMask/metamask-sdk/pull/227)) - refactor: simplify connection flow ([#226](https://github.com/MetaMask/metamask-sdk/pull/226)) @@ -443,17 +597,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fix: initial connection promise potentially dangling with browser extension ([#218](https://github.com/MetaMask/metamask-sdk/pull/218)) ## [0.5.2] + ### Added + - fix: invalid modal state ([#213](https://github.com/MetaMask/metamask-sdk/pull/213)) ## [0.5.1] + ### Added + - Revert "Release 12.0.0" ([#210](https://github.com/MetaMask/metamask-sdk/pull/210)) - Release 12.0.0 ([#208](https://github.com/MetaMask/metamask-sdk/pull/208)) - feat: optimize modal rendering and re-use existing node ([#206](https://github.com/MetaMask/metamask-sdk/pull/206)) ## [0.5.0] + ### Added + - feat: improved event tracking for extension and inappbrowser ([#200](https://github.com/MetaMask/metamask-sdk/pull/200)) - feat: autoextract favicon on web platforms ([#196](https://github.com/MetaMask/metamask-sdk/pull/196)) - feat: default to enable session persistence ([#197](https://github.com/MetaMask/metamask-sdk/pull/197)) @@ -461,42 +621,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - feat: switch between extension and mobile provider ([#189](https://github.com/MetaMask/metamask-sdk/pull/189)) ## [0.4.2] + ### Added + - feat: expose sdk provider ([#186](https://github.com/MetaMask/metamask-sdk/pull/186)) ## [0.4.1] + ### Added + - fix: invalid sdk types ([#182](https://github.com/MetaMask/metamask-sdk/pull/182)) ## [0.4.0] + ### Added + - fix: invalid types path ([#173](https://github.com/MetaMask/metamask-sdk/pull/173)) - fix(sdk): react native detection ([#174](https://github.com/MetaMask/metamask-sdk/pull/174)) - feat: linter improvements ([#175](https://github.com/MetaMask/metamask-sdk/pull/175)) - [FEAT] authorized improvements + typings ([#158](https://github.com/MetaMask/metamask-sdk/pull/158)) ## [0.3.3] + ### Added + - [FEAT] choose between extension and mobile wallet ([#146](https://github.com/MetaMask/metamask-sdk/pull/146)) - [fix] #145 missing css color ([#149](https://github.com/MetaMask/metamask-sdk/pull/149)) - [feat] skip suffix check if location does not exist ([#128](https://github.com/MetaMask/metamask-sdk/pull/128)) ## [0.3.2] + ### Added + - [fix] initial eth_requestAccounts ignored when refreshing session ([#139](https://github.com/MetaMask/metamask-sdk/pull/139)) ## [0.3.1] + ### Added + - fix types path ([#137](https://github.com/MetaMask/metamask-sdk/pull/137)) ## [0.3.0] + ### Added -- [fix] shouldInjectProvider ([#118](https://github.com/MetaMask/metamask-sdk/pull/118)) + +- [fix] shouldInjectProvider ([#118](https://github.com/MetaMask/metamask-sdk/pull/118)) - [FIX] reconnection instability ([#109](https://github.com/MetaMask/metamask-sdk/pull/109)) - [FEATURE] make metadata mandatory ([#97](https://github.com/MetaMask/metamask-sdk/pull/97)) ## [0.2.4] + ### Added + - [FEAT] improve logging + update examples ([#99](https://github.com/MetaMask/metamask-sdk/pull/99)) [Unreleased]: https://github.com/MetaMask/metamask-sdk/compare/@metamask/sdk@0.33.1...HEAD diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6e228249e..8b3dc1861 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -30,8 +30,10 @@ "typecheck": "tsc --noEmit", "clean": "rimraf ./dist", "size": "node bundle-size && size-limit", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk", "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/sdk", "lint:eslint": "eslint . --cache --ext js,ts", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", @@ -51,9 +53,9 @@ "@babel/runtime": "^7.26.0", "@metamask/onboarding": "^1.0.1", "@metamask/providers": "16.1.0", - "@metamask/sdk-analytics": "workspace:*", - "@metamask/sdk-communication-layer": "workspace:*", - "@metamask/sdk-install-modal-web": "workspace:*", + "@metamask/sdk-analytics": "^0.0.5", + "@metamask/sdk-communication-layer": "^0.33.1", + "@metamask/sdk-install-modal-web": "^0.32.1", "@paulmillr/qr": "^0.2.1", "bowser": "^2.9.0", "cross-fetch": "^4.0.0", @@ -72,7 +74,6 @@ "devDependencies": { "@jest/globals": "^29.3.1", "@lavamoat/allow-scripts": "^2.3.1", - "@metamask/auto-changelog": "3.1.0", "@metamask/eslint-config": "^6.0.0", "@metamask/eslint-config-nodejs": "^6.0.0", "@metamask/eslint-config-typescript": "^6.0.0", diff --git a/playground/multichain-node/package.json b/playground/multichain-node/package.json index b92b2f8a5..f2aafe2ca 100644 --- a/playground/multichain-node/package.json +++ b/playground/multichain-node/package.json @@ -14,7 +14,8 @@ "allow-scripts": "echo 'n/a'" }, "dependencies": { - "@metamask/multichain-sdk": "workspace:*", + "@metamask/multichain-sdk": "^0.0.0", + "@metamask/sdk": "^0.33.1", "chalk": "^4.1.2", "inquirer": "^8.2.4", "ora": "^5.4.1" diff --git a/playground/multichain-react/package.json b/playground/multichain-react/package.json index 1773e3610..d1ed04c06 100644 --- a/playground/multichain-react/package.json +++ b/playground/multichain-react/package.json @@ -1,104 +1,105 @@ { - "name": "@metamask/sdk-multichain-react", - "publishConfig": { - "access": "restricted", - "registry": "https://registry.npmjs.org/" - }, - "version": "0.15.0", - "description": "A test dapp for multichain api", - "homepage": "https://metamask.github.io/test-dapp-multichain", - "bugs": { - "url": "https://github.com/MetaMask/test-dapp-multichain/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/MetaMask/test-dapp-multichain.git" - }, - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "main": "./index.js", - "files": [ - "build/" - ], - "scripts": { - "build": "DISABLE_ESLINT_PLUGIN=true craco build", - "eject": "react-scripts eject", - "lint": "yarn biome lint ./src", - "lint:ci": "yarn biome ci ./src", - "lint:fix": "yarn biome format --write ./src", - "lint:changelog": "../../scripts/validate-changelog.sh @metamask/multichain-sdk", - "prepack": "./scripts/prepack.sh", - "start": "DISABLE_ESLINT_PLUGIN=true craco start", - "test": "echo 'no tests'", - "test:ci": "echo 'no tests'" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "@biomejs/biome": "2.0.0", - "@craco/craco": "^7.1.0", - "@lavamoat/allow-scripts": "^3.0.4", - "@lavamoat/preinstall-always-fail": "^2.0.0", - "@metamask/api-specs": "^0.14.0", - "@metamask/auto-changelog": "^3.4.3", - "@open-rpc/meta-schema": "^1.14.9", - "@open-rpc/schema-utils-js": "^2.0.5", - "@solana/web3.js": "^1.98.0", - "@testing-library/jest-dom": "^5.17.0", - "@testing-library/react": "^13.4.0", - "@types/chrome": "^0.0.279", - "@types/jest": "^28.1.6", - "@types/node": "^18.18", - "@types/react": "^19.1.8", - "@yarnpkg/types": "^4.0.0-rc.52", - "autoprefixer": "^10.4.21", - "buffer": "^6.0.3", - "depcheck": "^1.4.3", - "jest": "^28.1.3", - "postcss": "^8.5.6", - "prettier": "^2.7.1", - "prettier-plugin-packagejson": "^2.3.0", - "process": "^0.11.10", - "react-scripts": "5.0.1", - "tailwindcss": "^4.1.11", - "ts-node": "^10.7.0", - "typescript": "~4.8.4" - }, - "packageManager": "yarn@4.1.1", - "engines": { - "node": "^18.18 || >=20" - }, - "lavamoat": { - "allowScripts": { - "@lavamoat/preinstall-always-fail": false, - "react-scripts>@pmmmwh/react-refresh-webpack-plugin>core-js-pure": false, - "react-scripts>react-app-polyfill>core-js": false, - "@solana/web3.js>bigint-buffer": false, - "@solana/web3.js>rpc-websockets>bufferutil": false, - "@solana/web3.js>rpc-websockets>utf-8-validate": false, - "@metamask/multichain-sdk>@metamask/mobile-wallet-protocol-dapp-client>@metamask/mobile-wallet-protocol-core>centrifuge>protobufjs": false, - "@metamask/multichain-sdk>@metamask/mobile-wallet-protocol-core>centrifuge>protobufjs": false - } - }, - "dependencies": { - "@metamask/multichain-sdk": "workspace:^", - "@metamask/utils": "^11.8.1", - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "resolutions": { - "@metamask/utils": "^11.8.1" - } + "name": "@metamask/sdk-multichain-react", + "version": "0.15.0", + "description": "A test dapp for multichain api", + "homepage": "https://metamask.github.io/test-dapp-multichain", + "bugs": { + "url": "https://github.com/MetaMask/test-dapp-multichain/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/MetaMask/test-dapp-multichain.git" + }, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "main": "./index.js", + "files": [ + "build/" + ], + "scripts": { + "build": "DISABLE_ESLINT_PLUGIN=true craco build", + "changelog:format": "../../scripts/format-changelog.sh @metamask/sdk-multichain-react", + "changelog:update": "../../scripts/update-changelog.sh @metamask/sdk-multichain-react", + "changelog:validate": "../../scripts/validate-changelog.sh @metamask/sdk-multichain-react", + "eject": "react-scripts eject", + "lint": "yarn biome lint ./src", + "lint:ci": "yarn biome ci ./src", + "lint:fix": "yarn biome format --write ./src", + "prepack": "./scripts/prepack.sh", + "start": "DISABLE_ESLINT_PLUGIN=true craco start", + "test": "echo 'no tests'", + "test:ci": "echo 'no tests'" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "resolutions": { + "@metamask/utils": "^11.8.1" + }, + "dependencies": { + "@metamask/multichain-sdk": "workspace:^", + "@metamask/utils": "^11.8.1", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@biomejs/biome": "2.0.0", + "@craco/craco": "^7.1.0", + "@lavamoat/allow-scripts": "^3.0.4", + "@lavamoat/preinstall-always-fail": "^2.0.0", + "@metamask/api-specs": "^0.14.0", + "@open-rpc/meta-schema": "^1.14.9", + "@open-rpc/schema-utils-js": "^2.0.5", + "@solana/web3.js": "^1.98.0", + "@testing-library/jest-dom": "^5.17.0", + "@testing-library/react": "^13.4.0", + "@types/chrome": "^0.0.279", + "@types/jest": "^28.1.6", + "@types/node": "^18.18", + "@types/react": "^19.1.8", + "@yarnpkg/types": "^4.0.0-rc.52", + "autoprefixer": "^10.4.21", + "buffer": "^6.0.3", + "depcheck": "^1.4.3", + "jest": "^28.1.3", + "postcss": "^8.5.6", + "prettier": "^2.7.1", + "prettier-plugin-packagejson": "^2.3.0", + "process": "^0.11.10", + "react-scripts": "5.0.1", + "tailwindcss": "^4.1.11", + "ts-node": "^10.7.0", + "typescript": "~4.8.4" + }, + "packageManager": "yarn@4.1.1", + "engines": { + "node": "^18.18 || >=20" + }, + "publishConfig": { + "access": "restricted", + "registry": "https://registry.npmjs.org/" + }, + "lavamoat": { + "allowScripts": { + "@lavamoat/preinstall-always-fail": false, + "react-scripts>@pmmmwh/react-refresh-webpack-plugin>core-js-pure": false, + "react-scripts>react-app-polyfill>core-js": false, + "@solana/web3.js>bigint-buffer": false, + "@solana/web3.js>rpc-websockets>bufferutil": false, + "@solana/web3.js>rpc-websockets>utf-8-validate": false, + "@metamask/multichain-sdk>@metamask/mobile-wallet-protocol-dapp-client>@metamask/mobile-wallet-protocol-core>centrifuge>protobufjs": false, + "@metamask/multichain-sdk>@metamask/mobile-wallet-protocol-core>centrifuge>protobufjs": false + } + } } diff --git a/scripts/format-changelog.sh b/scripts/format-changelog.sh new file mode 100755 index 000000000..53a7a50aa --- /dev/null +++ b/scripts/format-changelog.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ $# -eq 0 ]]; then + echo "Missing package name." + exit 1 +fi + +package_name="$1" +shift # remove package name from arguments + +# Get the script directory and find the root node_modules +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" + +# Format/fix the changelog using prettier +if [[ "${GITHUB_REF:-}" =~ '^release/' ]]; then + "${ROOT_DIR}/node_modules/.bin/auto-changelog" update --prettier --tag-prefix "${package_name}@" --rc "$@" +else + "${ROOT_DIR}/node_modules/.bin/auto-changelog" update --prettier --tag-prefix "${package_name}@" "$@" +fi + diff --git a/scripts/update-changelog.sh b/scripts/update-changelog.sh new file mode 100755 index 000000000..4c9082418 --- /dev/null +++ b/scripts/update-changelog.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Get the current package name +if [[ $# -eq 0 ]]; then + echo "Missing package name." + exit 1 +fi + +package_name="$1" +shift # remove package name from arguments + +# Get the script directory and find the root node_modules +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" + +# Get the current git branch +branch=$(git rev-parse --abbrev-ref HEAD) + +if [[ $branch =~ ^release/ ]]; then + "${ROOT_DIR}/node_modules/.bin/auto-changelog" update --prettier --tag-prefix "${package_name}@" --rc "$@" +else + "${ROOT_DIR}/node_modules/.bin/auto-changelog" update --prettier --tag-prefix "${package_name}@" "$@" +fi + diff --git a/scripts/validate-changelog.sh b/scripts/validate-changelog.sh index 7d5f0c11b..d88452e29 100755 --- a/scripts/validate-changelog.sh +++ b/scripts/validate-changelog.sh @@ -8,9 +8,14 @@ if [[ $# -eq 0 ]]; then fi package_name="$1" +shift # remove package name from arguments + +# Get the script directory and find the root node_modules +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" if [[ "${GITHUB_REF:-}" =~ '^release/' ]]; then - yarn auto-changelog validate --tag-prefix "${package_name}@" --rc + "${ROOT_DIR}/node_modules/.bin/auto-changelog" validate --prettier --tag-prefix "${package_name}@" --rc "$@" else - yarn auto-changelog validate --tag-prefix "${package_name}@" + "${ROOT_DIR}/node_modules/.bin/auto-changelog" validate --prettier --tag-prefix "${package_name}@" "$@" fi diff --git a/yarn.lock b/yarn.lock index fd525b269..abd10a100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -57,6 +57,13 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:^1.11.0": + version: 1.11.1 + resolution: "@adraffy/ens-normalize@npm:1.11.1" + checksum: e8b17fcc730ccc45a956e1fbb09edfe42be41c291079512082e9964f8ef4287e67913183cdd02fff71d2e215340d5b98a9bbbd9be32c5d36fad4ba2c1ec33ff2 + languageName: node + linkType: hard + "@adraffy/ens-normalize@npm:^1.8.8": version: 1.9.4 resolution: "@adraffy/ens-normalize@npm:1.9.4" @@ -12275,60 +12282,34 @@ __metadata: languageName: node linkType: hard -"@metamask/auto-changelog@npm:3.1.0": - version: 3.1.0 - resolution: "@metamask/auto-changelog@npm:3.1.0" - dependencies: - diff: ^5.0.0 - execa: ^5.1.1 - semver: ^7.3.5 - yargs: ^17.0.1 - bin: - auto-changelog: dist/cli.js - checksum: cd3c833100c19a80e0b7ae8c174fbbe225700eef5fbabd9b0d6c4b439c8af839792111a17d9ddf2e1939839736413afd7402d2cc08ece373622b5a410da5e9fe - languageName: node - linkType: hard - -"@metamask/auto-changelog@npm:^2.3.0": - version: 2.6.1 - resolution: "@metamask/auto-changelog@npm:2.6.1" - dependencies: - diff: ^5.0.0 - execa: ^5.1.1 - semver: ^7.3.5 - yargs: ^17.0.1 - bin: - auto-changelog: dist/cli.js - checksum: 6ae84de492e4aec710ff2dd793f258b7cc3aba3fdeb416c0d3ab55a156da61b4ccd3272e9a6608f32b71695dc42b527a380ce62566e387240665556c8da26de3 - languageName: node - linkType: hard - -"@metamask/auto-changelog@npm:^3.1.0": - version: 3.2.0 - resolution: "@metamask/auto-changelog@npm:3.2.0" +"@metamask/auto-changelog@npm:^3.4.3": + version: 3.4.3 + resolution: "@metamask/auto-changelog@npm:3.4.3" dependencies: diff: ^5.0.0 execa: ^5.1.1 + prettier: ^2.8.8 semver: ^7.3.5 yargs: ^17.0.1 bin: auto-changelog: dist/cli.js - checksum: 7cd19400bb60d478455fbf9ffe7c295b21df64764a01f90776beda04bfa46242f34751112b862b4bd5955f04a7d28cfa7d6b2e745f3d3baaccda7c493f761658 + checksum: 3405f1f85d02684a95945ab253523619014bdae5da6121fb540140f8b21ddf2dda104683d91a24176c4c67a44fb9446d2e607d94a532a2bbb4f08a08a1e5a605 languageName: node linkType: hard -"@metamask/auto-changelog@npm:^3.4.3": - version: 3.4.3 - resolution: "@metamask/auto-changelog@npm:3.4.3" +"@metamask/auto-changelog@npm:^4.0.0": + version: 4.1.0 + resolution: "@metamask/auto-changelog@npm:4.1.0" dependencies: diff: ^5.0.0 execa: ^5.1.1 - prettier: ^2.8.8 semver: ^7.3.5 yargs: ^17.0.1 + peerDependencies: + prettier: ">=3.0.0" bin: auto-changelog: dist/cli.js - checksum: 3405f1f85d02684a95945ab253523619014bdae5da6121fb540140f8b21ddf2dda104683d91a24176c4c67a44fb9446d2e607d94a532a2bbb4f08a08a1e5a605 + checksum: ddcb6d0f5ac2ce3af0342ccaabc250c197c76b8413a3fd5fa21be631e886d1f5faba476eb0371a5967642f99a9743f0fe46295828c36e2e73b6e4cc37fdf1670 languageName: node linkType: hard @@ -12357,22 +12338,28 @@ __metadata: languageName: node linkType: hard -"@metamask/create-release-branch@npm:^1.0.1": - version: 1.1.0 - resolution: "@metamask/create-release-branch@npm:1.1.0" +"@metamask/create-release-branch@npm:^4.1.3": + version: 4.1.3 + resolution: "@metamask/create-release-branch@npm:4.1.3" dependencies: "@metamask/action-utils": ^1.0.0 - "@metamask/utils": ^5.0.2 + "@metamask/auto-changelog": ^4.0.0 + "@metamask/utils": ^9.0.0 debug: ^4.3.4 - execa: ^5.1.1 + execa: ^8.0.1 + express: ^4.21.2 + open: ^10.1.0 pony-cause: ^2.1.9 - semver: ^7.5.0 + semver: ^7.5.4 + validate-npm-package-name: ^5.0.0 which: ^3.0.0 yaml: ^2.2.2 yargs: ^17.7.1 + peerDependencies: + prettier: ">=3.0.0" bin: create-release-branch: bin/create-release-branch.js - checksum: 04ab235f27768c8977fe998da6b4f09eccd384debb80dcafda6c4a5ea59638c414b2e6a2ebd770471946f050ae6eaf1c2d798d06ff0b38c0585d6dc17a62cab4 + checksum: bbea8d7b120208060e168d5ead56f4732442850f78eb2556db33a81da8af3c0418fead9e6fb51ff1882654dca1003ee5b2d06298ea3b22e6dbcc27d414f95e1d languageName: node linkType: hard @@ -12735,7 +12722,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/multichain-node@workspace:playground/multichain-node" dependencies: - "@metamask/multichain-sdk": "workspace:*" + "@metamask/multichain-sdk": ^0.0.0 + "@metamask/sdk": ^0.33.1 "@types/inquirer": ^8.2.1 "@types/node": ^20.4.1 chalk: ^4.1.2 @@ -12747,12 +12735,11 @@ __metadata: languageName: unknown linkType: soft -"@metamask/multichain-sdk@workspace:*, @metamask/multichain-sdk@workspace:^, @metamask/multichain-sdk@workspace:packages/sdk-multichain": +"@metamask/multichain-sdk@^0.0.0, @metamask/multichain-sdk@workspace:^, @metamask/multichain-sdk@workspace:packages/sdk-multichain": version: 0.0.0-use.local resolution: "@metamask/multichain-sdk@workspace:packages/sdk-multichain" dependencies: "@biomejs/biome": 2.0.0 - "@metamask/auto-changelog": ^3.4.3 "@metamask/mobile-wallet-protocol-core": ^0.3.0 "@metamask/mobile-wallet-protocol-dapp-client": ^0.2.1 "@metamask/multichain-api-client": ^0.8.0 @@ -12930,11 +12917,10 @@ __metadata: languageName: node linkType: hard -"@metamask/sdk-analytics@workspace:*, @metamask/sdk-analytics@workspace:^, @metamask/sdk-analytics@workspace:packages/sdk-analytics": +"@metamask/sdk-analytics@^0.0.5, @metamask/sdk-analytics@workspace:^, @metamask/sdk-analytics@workspace:packages/sdk-analytics": version: 0.0.0-use.local resolution: "@metamask/sdk-analytics@workspace:packages/sdk-analytics" dependencies: - "@metamask/auto-changelog": ^3.4.3 "@metamask/eslint-config": ^14.0.0 "@metamask/eslint-config-typescript": ^14.0.0 "@typescript-eslint/eslint-plugin": ^8.31.0 @@ -12956,50 +12942,16 @@ __metadata: languageName: unknown linkType: soft -"@metamask/sdk-communication-layer@npm:0.11.1": - version: 0.11.1 - resolution: "@metamask/sdk-communication-layer@npm:0.11.1" - dependencies: - cross-fetch: ^3.1.5 - date-fns: ^2.29.3 - eciesjs: ^0.3.16 - eventemitter2: ^6.4.5 - socket.io-client: ^4.5.1 - uuid: ^8.3.2 - checksum: 560150a3b3ad79ef72f5ae9d3dee3447d0cc6590917b9bfe299f27db0393e98112f6fcc86bd07dc370c8f7d2be9cd52b6ef4c882cfbe8f5bd9a3da7d944ef872 - languageName: node - linkType: hard - -"@metamask/sdk-communication-layer@npm:0.27.0": - version: 0.27.0 - resolution: "@metamask/sdk-communication-layer@npm:0.27.0" - dependencies: - bufferutil: ^4.0.8 - date-fns: ^2.29.3 - debug: ^4.3.4 - utf-8-validate: ^5.0.2 - uuid: ^8.3.2 - peerDependencies: - cross-fetch: ^4.0.0 - eciesjs: ^0.3.16 - eventemitter2: ^6.4.7 - readable-stream: ^3.6.2 - socket.io-client: ^4.5.1 - checksum: 19e68c808d36b783e27a6bdc5439a60aedb8a298da66c7496e73c173807abccdf240b614d8bc283b7b7e8e7d438ed846b91b42460fe8212e7f20122501df3e5e - languageName: node - linkType: hard - -"@metamask/sdk-communication-layer@workspace:*, @metamask/sdk-communication-layer@workspace:^, @metamask/sdk-communication-layer@workspace:packages/sdk-communication-layer": +"@metamask/sdk-communication-layer@^0.33.1, @metamask/sdk-communication-layer@workspace:^, @metamask/sdk-communication-layer@workspace:packages/sdk-communication-layer": version: 0.0.0-use.local resolution: "@metamask/sdk-communication-layer@workspace:packages/sdk-communication-layer" dependencies: "@jest/globals": ^29.3.1 "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": 3.1.0 "@metamask/eslint-config": ^6.0.0 "@metamask/eslint-config-nodejs": ^6.0.0 "@metamask/eslint-config-typescript": ^6.0.0 - "@metamask/sdk-analytics": "workspace:*" + "@metamask/sdk-analytics": ^0.0.5 "@rollup/plugin-commonjs": ^25.0.0 "@rollup/plugin-json": ^6.0.0 "@rollup/plugin-node-resolve": ^15.0.2 @@ -13055,48 +13007,44 @@ __metadata: languageName: unknown linkType: soft -"@metamask/sdk-install-modal-web@npm:0.11.1": +"@metamask/sdk-communication-layer@npm:0.11.1": version: 0.11.1 - resolution: "@metamask/sdk-install-modal-web@npm:0.11.1" + resolution: "@metamask/sdk-communication-layer@npm:0.11.1" dependencies: - "@emotion/react": ^11.10.6 - "@emotion/styled": ^11.10.6 - i18next: 22.5.1 - qr-code-styling: ^1.6.0-rc.1 - react: ^18.2.0 - react-dom: ^18.2.0 - react-i18next: ^13.2.2 - checksum: decd4f3ba7f2cc35361564e5e3d9da73f3efd31c75f842aec2c23358607bac28b46f71ee455a3409968ba233a8fbe0f29d0d7b7298b0296a3cb749e09a5ad288 + cross-fetch: ^3.1.5 + date-fns: ^2.29.3 + eciesjs: ^0.3.16 + eventemitter2: ^6.4.5 + socket.io-client: ^4.5.1 + uuid: ^8.3.2 + checksum: 560150a3b3ad79ef72f5ae9d3dee3447d0cc6590917b9bfe299f27db0393e98112f6fcc86bd07dc370c8f7d2be9cd52b6ef4c882cfbe8f5bd9a3da7d944ef872 languageName: node linkType: hard -"@metamask/sdk-install-modal-web@npm:0.26.5": - version: 0.26.5 - resolution: "@metamask/sdk-install-modal-web@npm:0.26.5" +"@metamask/sdk-communication-layer@npm:0.27.0": + version: 0.27.0 + resolution: "@metamask/sdk-communication-layer@npm:0.27.0" dependencies: - qr-code-styling: ^1.6.0-rc.1 + bufferutil: ^4.0.8 + date-fns: ^2.29.3 + debug: ^4.3.4 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 peerDependencies: - i18next: 23.11.5 - react: ^18.2.0 - react-dom: ^18.2.0 - react-native: "*" - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - react-native: - optional: true - checksum: 3aba8d39bac0d320727b7abfcd803d843906962cea28685e946acba3f198b14d0a672ac8dfd6ec97a7d0efd4f92d00dae956af8872ca4cb2e677f91342bc58b0 + cross-fetch: ^4.0.0 + eciesjs: ^0.3.16 + eventemitter2: ^6.4.7 + readable-stream: ^3.6.2 + socket.io-client: ^4.5.1 + checksum: 19e68c808d36b783e27a6bdc5439a60aedb8a298da66c7496e73c173807abccdf240b614d8bc283b7b7e8e7d438ed846b91b42460fe8212e7f20122501df3e5e languageName: node linkType: hard -"@metamask/sdk-install-modal-web@workspace:*, @metamask/sdk-install-modal-web@workspace:packages/sdk-install-modal-web": +"@metamask/sdk-install-modal-web@^0.32.1, @metamask/sdk-install-modal-web@workspace:packages/sdk-install-modal-web": version: 0.0.0-use.local resolution: "@metamask/sdk-install-modal-web@workspace:packages/sdk-install-modal-web" dependencies: "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": 3.1.0 "@paulmillr/qr": ^0.2.1 "@size-limit/preset-big-lib": ^11.0.2 "@stencil/core": ^4.22.2 @@ -13124,6 +13072,42 @@ __metadata: languageName: unknown linkType: soft +"@metamask/sdk-install-modal-web@npm:0.11.1": + version: 0.11.1 + resolution: "@metamask/sdk-install-modal-web@npm:0.11.1" + dependencies: + "@emotion/react": ^11.10.6 + "@emotion/styled": ^11.10.6 + i18next: 22.5.1 + qr-code-styling: ^1.6.0-rc.1 + react: ^18.2.0 + react-dom: ^18.2.0 + react-i18next: ^13.2.2 + checksum: decd4f3ba7f2cc35361564e5e3d9da73f3efd31c75f842aec2c23358607bac28b46f71ee455a3409968ba233a8fbe0f29d0d7b7298b0296a3cb749e09a5ad288 + languageName: node + linkType: hard + +"@metamask/sdk-install-modal-web@npm:0.26.5": + version: 0.26.5 + resolution: "@metamask/sdk-install-modal-web@npm:0.26.5" + dependencies: + qr-code-styling: ^1.6.0-rc.1 + peerDependencies: + i18next: 23.11.5 + react: ^18.2.0 + react-dom: ^18.2.0 + react-native: "*" + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + react-native: + optional: true + checksum: 3aba8d39bac0d320727b7abfcd803d843906962cea28685e946acba3f198b14d0a672ac8dfd6ec97a7d0efd4f92d00dae956af8872ca4cb2e677f91342bc58b0 + languageName: node + linkType: hard + "@metamask/sdk-multichain-react@workspace:playground/multichain-react": version: 0.0.0-use.local resolution: "@metamask/sdk-multichain-react@workspace:playground/multichain-react" @@ -13133,7 +13117,6 @@ __metadata: "@lavamoat/allow-scripts": ^3.0.4 "@lavamoat/preinstall-always-fail": ^2.0.0 "@metamask/api-specs": ^0.14.0 - "@metamask/auto-changelog": ^3.4.3 "@metamask/multichain-sdk": "workspace:^" "@metamask/utils": ^11.8.1 "@open-rpc/meta-schema": ^1.14.9 @@ -13168,7 +13151,6 @@ __metadata: resolution: "@metamask/sdk-multichain-ui@workspace:packages/sdk-multichain-ui" dependencies: "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": 3.1.0 "@paulmillr/qr": ^0.2.1 "@size-limit/preset-big-lib": ^11.0.2 "@stencil/core": ^4.22.2 @@ -13202,7 +13184,6 @@ __metadata: resolution: "@metamask/sdk-react-native@workspace:packages/sdk-react-native" dependencies: "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": ^3.1.0 "@metamask/eslint-config": ^6.0.0 "@metamask/eslint-config-nodejs": ^6.0.0 "@metamask/eslint-config-typescript": ^6.0.0 @@ -13260,12 +13241,11 @@ __metadata: "@babel/core": ^7.23.5 "@headlessui/react": ^1.6.6 "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": ^3.1.0 "@metamask/eslint-config": ^6.0.0 "@metamask/eslint-config-nodejs": ^6.0.0 "@metamask/eslint-config-typescript": ^6.0.0 - "@metamask/sdk": "workspace:^" - "@metamask/sdk-react": "workspace:*" + "@metamask/sdk": 0.33.1 + "@metamask/sdk-react": 0.33.1 "@rollup/plugin-commonjs": ^22.0.1 "@rollup/plugin-json": ^6.0.1 "@rollup/plugin-node-resolve": ^13.3.0 @@ -13302,7 +13282,7 @@ __metadata: rollup-plugin-terser: ^7.0.2 tailwindcss: ^3.1.4 typescript: ^4.7.4 - viem: latest + viem: ^2.38.0 wagmi: 1.4.12 peerDependencies: react: ^18.2.0 @@ -13310,7 +13290,7 @@ __metadata: languageName: unknown linkType: soft -"@metamask/sdk-react@workspace:*, @metamask/sdk-react@workspace:^, @metamask/sdk-react@workspace:packages/sdk-react": +"@metamask/sdk-react@0.33.1, @metamask/sdk-react@workspace:^, @metamask/sdk-react@workspace:packages/sdk-react": version: 0.0.0-use.local resolution: "@metamask/sdk-react@workspace:packages/sdk-react" dependencies: @@ -13319,11 +13299,10 @@ __metadata: "@babel/preset-react": ^7.23.3 "@babel/preset-typescript": ^7.23.3 "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": ^3.1.0 "@metamask/eslint-config": ^6.0.0 "@metamask/eslint-config-nodejs": ^6.0.0 "@metamask/eslint-config-typescript": ^6.0.0 - "@metamask/sdk": "workspace:^" + "@metamask/sdk": 0.33.1 "@react-native-async-storage/async-storage": ^1.19.6 "@rollup/plugin-commonjs": ^22.0.1 "@rollup/plugin-json": ^6.0.1 @@ -13392,7 +13371,6 @@ __metadata: resolution: "@metamask/sdk-socket-server-scale@workspace:packages/sdk-socket-server-next" dependencies: "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": ^2.3.0 "@metamask/eslint-config-jest": ^12.1.0 "@metamask/eslint-config-typescript": ^6.0.0 "@socket.io/admin-ui": ^0.5.1 @@ -13455,7 +13433,6 @@ __metadata: "@babel/preset-flow": ^7.23.3 "@babel/preset-react": ^7.23.3 "@babel/preset-typescript": ^7.23.3 - "@metamask/auto-changelog": ^3.4.3 "@metamask/controller-utils": ^5.0.2 "@metamask/design-tokens": ^1.12.0 "@metamask/network-controller": ^16.0.0 @@ -13562,6 +13539,87 @@ __metadata: languageName: unknown linkType: soft +"@metamask/sdk@0.33.1, @metamask/sdk@^0.33.1, @metamask/sdk@workspace:^, @metamask/sdk@workspace:packages/sdk": + version: 0.0.0-use.local + resolution: "@metamask/sdk@workspace:packages/sdk" + dependencies: + "@babel/runtime": ^7.26.0 + "@jest/globals": ^29.3.1 + "@lavamoat/allow-scripts": ^2.3.1 + "@metamask/eslint-config": ^6.0.0 + "@metamask/eslint-config-nodejs": ^6.0.0 + "@metamask/eslint-config-typescript": ^6.0.0 + "@metamask/onboarding": ^1.0.1 + "@metamask/providers": 16.1.0 + "@metamask/sdk-analytics": ^0.0.5 + "@metamask/sdk-communication-layer": ^0.33.1 + "@metamask/sdk-install-modal-web": ^0.32.1 + "@paulmillr/qr": ^0.2.1 + "@react-native-async-storage/async-storage": ^1.19.6 + "@rollup/plugin-alias": ^5.1.1 + "@rollup/plugin-commonjs": ^25.0.7 + "@rollup/plugin-json": ^6.0.0 + "@rollup/plugin-node-resolve": ^15.0.2 + "@rollup/plugin-replace": ^6.0.1 + "@rollup/plugin-terser": ^0.4.1 + "@size-limit/preset-big-lib": ^11.0.2 + "@types/dom-screen-wake-lock": ^1.0.2 + "@types/node": ^20.1.3 + "@types/pump": ^1.1.1 + "@types/qrcode-terminal": ^0.12.0 + "@types/uuid": ^10.0.0 + "@typescript-eslint/eslint-plugin": ^4.26.0 + "@typescript-eslint/parser": ^4.26.0 + bowser: ^2.9.0 + browserify-zlib: ^0.2.0 + buffer: ^6.0.3 + concurrently: ^9.1.2 + cross-fetch: ^4.0.0 + crypto-browserify: ^3.12.0 + debug: 4.3.4 + eciesjs: ^0.4.11 + eslint: ^7.30.0 + eslint-config-prettier: ^8.3.0 + eslint-plugin-import: ^2.23.4 + eslint-plugin-jest: ^24.4.0 + eslint-plugin-jsdoc: ^36.1.0 + eslint-plugin-node: ^11.1.0 + eslint-plugin-prettier: ^3.4.0 + eth-rpc-errors: ^4.0.3 + eventemitter2: ^6.4.9 + https-browserify: ^1.0.0 + jest: ^29.3.1 + jest-environment-jsdom: ^29.3.1 + obj-multiplex: ^1.0.0 + prettier: ^2.3.0 + process: ^0.11.10 + pump: ^3.0.0 + readable-stream: ^3.6.2 + rimraf: ^4.4.0 + rollup: ^4.26.0 + rollup-plugin-analyzer: ^4.0.0 + rollup-plugin-jscc: ^2.0.0 + rollup-plugin-natives: ^0.7.5 + rollup-plugin-node-builtins: ^2.1.2 + rollup-plugin-polyfill-node: ^0.13.0 + rollup-plugin-sizes: ^1.0.6 + rollup-plugin-typescript2: ^0.31.2 + rollup-plugin-visualizer: ^5.12.0 + size-limit: ^11.0.2 + socket.io-client: ^4.5.1 + stream-browserify: ^3.0.0 + stream-http: ^3.2.0 + ts-jest: ^29.0.3 + ts-node: ^10.9.1 + tslib: ^2.6.0 + typescript: ^4.3.2 + url: ^0.11.0 + util: ^0.12.4 + uuid: ^8.3.2 + webpack: ^5.0.0 + languageName: unknown + linkType: soft + "@metamask/sdk@npm:0.27.0": version: 0.27.0 resolution: "@metamask/sdk@npm:0.27.0" @@ -13641,88 +13699,6 @@ __metadata: languageName: node linkType: hard -"@metamask/sdk@workspace:^, @metamask/sdk@workspace:packages/sdk": - version: 0.0.0-use.local - resolution: "@metamask/sdk@workspace:packages/sdk" - dependencies: - "@babel/runtime": ^7.26.0 - "@jest/globals": ^29.3.1 - "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": 3.1.0 - "@metamask/eslint-config": ^6.0.0 - "@metamask/eslint-config-nodejs": ^6.0.0 - "@metamask/eslint-config-typescript": ^6.0.0 - "@metamask/onboarding": ^1.0.1 - "@metamask/providers": 16.1.0 - "@metamask/sdk-analytics": "workspace:*" - "@metamask/sdk-communication-layer": "workspace:*" - "@metamask/sdk-install-modal-web": "workspace:*" - "@paulmillr/qr": ^0.2.1 - "@react-native-async-storage/async-storage": ^1.19.6 - "@rollup/plugin-alias": ^5.1.1 - "@rollup/plugin-commonjs": ^25.0.7 - "@rollup/plugin-json": ^6.0.0 - "@rollup/plugin-node-resolve": ^15.0.2 - "@rollup/plugin-replace": ^6.0.1 - "@rollup/plugin-terser": ^0.4.1 - "@size-limit/preset-big-lib": ^11.0.2 - "@types/dom-screen-wake-lock": ^1.0.2 - "@types/node": ^20.1.3 - "@types/pump": ^1.1.1 - "@types/qrcode-terminal": ^0.12.0 - "@types/uuid": ^10.0.0 - "@typescript-eslint/eslint-plugin": ^4.26.0 - "@typescript-eslint/parser": ^4.26.0 - bowser: ^2.9.0 - browserify-zlib: ^0.2.0 - buffer: ^6.0.3 - concurrently: ^9.1.2 - cross-fetch: ^4.0.0 - crypto-browserify: ^3.12.0 - debug: 4.3.4 - eciesjs: ^0.4.11 - eslint: ^7.30.0 - eslint-config-prettier: ^8.3.0 - eslint-plugin-import: ^2.23.4 - eslint-plugin-jest: ^24.4.0 - eslint-plugin-jsdoc: ^36.1.0 - eslint-plugin-node: ^11.1.0 - eslint-plugin-prettier: ^3.4.0 - eth-rpc-errors: ^4.0.3 - eventemitter2: ^6.4.9 - https-browserify: ^1.0.0 - jest: ^29.3.1 - jest-environment-jsdom: ^29.3.1 - obj-multiplex: ^1.0.0 - prettier: ^2.3.0 - process: ^0.11.10 - pump: ^3.0.0 - readable-stream: ^3.6.2 - rimraf: ^4.4.0 - rollup: ^4.26.0 - rollup-plugin-analyzer: ^4.0.0 - rollup-plugin-jscc: ^2.0.0 - rollup-plugin-natives: ^0.7.5 - rollup-plugin-node-builtins: ^2.1.2 - rollup-plugin-polyfill-node: ^0.13.0 - rollup-plugin-sizes: ^1.0.6 - rollup-plugin-typescript2: ^0.31.2 - rollup-plugin-visualizer: ^5.12.0 - size-limit: ^11.0.2 - socket.io-client: ^4.5.1 - stream-browserify: ^3.0.0 - stream-http: ^3.2.0 - ts-jest: ^29.0.3 - ts-node: ^10.9.1 - tslib: ^2.6.0 - typescript: ^4.3.2 - url: ^0.11.0 - util: ^0.12.4 - uuid: ^8.3.2 - webpack: ^5.0.0 - languageName: unknown - linkType: soft - "@metamask/superstruct@npm:^3.1.0": version: 3.2.1 resolution: "@metamask/superstruct@npm:3.2.1" @@ -13786,7 +13762,7 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^5.0.0, @metamask/utils@npm:^5.0.1, @metamask/utils@npm:^5.0.2": +"@metamask/utils@npm:^5.0.0, @metamask/utils@npm:^5.0.1": version: 5.0.2 resolution: "@metamask/utils@npm:5.0.2" dependencies: @@ -13831,7 +13807,7 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^9.1.0": +"@metamask/utils@npm:^9.0.0, @metamask/utils@npm:^9.1.0": version: 9.3.0 resolution: "@metamask/utils@npm:9.3.0" dependencies: @@ -14386,7 +14362,16 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.4.2, @noble/curves@npm:^1.9.1": +"@noble/curves@npm:1.9.1": + version: 1.9.1 + resolution: "@noble/curves@npm:1.9.1" + dependencies: + "@noble/hashes": 1.8.0 + checksum: 4f3483a1001538d2f55516cdcb19319d1eaef79550633f670e7d570b989cdbc0129952868b72bb67643329746b8ffefe8e4cd791c8cc35574e05a37f873eef42 + languageName: node + linkType: hard + +"@noble/curves@npm:^1.4.2, @noble/curves@npm:^1.9.1, @noble/curves@npm:~1.9.0": version: 1.9.7 resolution: "@noble/curves@npm:1.9.7" dependencies: @@ -14441,7 +14426,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.8.0, @noble/hashes@npm:^1.8.0": +"@noble/hashes@npm:1.8.0, @noble/hashes@npm:^1.8.0, @noble/hashes@npm:~1.8.0": version: 1.8.0 resolution: "@noble/hashes@npm:1.8.0" checksum: c94e98b941963676feaba62475b1ccfa8341e3f572adbb3b684ee38b658df44100187fa0ef4220da580b13f8d27e87d5492623c8a02ecc61f23fb9960c7918f5 @@ -18336,6 +18321,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:~1.2.5": + version: 1.2.6 + resolution: "@scure/base@npm:1.2.6" + checksum: 1058cb26d5e4c1c46c9cc0ae0b67cc66d306733baf35d6ebdd8ddaba242b80c3807b726e3b48cb0411bb95ec10d37764969063ea62188f86ae9315df8ea6b325 + languageName: node + linkType: hard + "@scure/bip32@npm:1.3.0": version: 1.3.0 resolution: "@scure/bip32@npm:1.3.0" @@ -18369,6 +18361,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.7.0, @scure/bip32@npm:^1.7.0": + version: 1.7.0 + resolution: "@scure/bip32@npm:1.7.0" + dependencies: + "@noble/curves": ~1.9.0 + "@noble/hashes": ~1.8.0 + "@scure/base": ~1.2.5 + checksum: c83adca5a74ec5c4ded8ba93900d0065e4767c4759cf24c2674923aef01d45ba56f171574e3519f2341be99f53a333f01b674eb6cfeb6fa8379607c6d1bc90b5 + languageName: node + linkType: hard + "@scure/bip39@npm:1.2.0": version: 1.2.0 resolution: "@scure/bip39@npm:1.2.0" @@ -18399,6 +18402,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.6.0, @scure/bip39@npm:^1.6.0": + version: 1.6.0 + resolution: "@scure/bip39@npm:1.6.0" + dependencies: + "@noble/hashes": ~1.8.0 + "@scure/base": ~1.2.5 + checksum: 96d46420780473d6c6c9700254a0eceec60302f61d7f9d7f29024e90c7acff3e8e40a5ee52dfaf104db539a10462e531996aaf9e69f082b8540b0a25870545fc + languageName: node + linkType: hard + "@segment/loosely-validate-event@npm:^2.0.0": version: 2.0.0 resolution: "@segment/loosely-validate-event@npm:2.0.0" @@ -25548,6 +25561,36 @@ __metadata: languageName: node linkType: hard +"abitype@npm:1.1.0": + version: 1.1.0 + resolution: "abitype@npm:1.1.0" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3.22.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 55f724d038a60cc5e4ce4913298f912f0c34c53e13240cd3b97b272f4122bdf4c84541d85d1e3bb36f6e8dab6685f232c69600718fad62ccc389bea3f63ed7e4 + languageName: node + linkType: hard + +"abitype@npm:^1.0.9": + version: 1.1.1 + resolution: "abitype@npm:1.1.1" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3.22.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 8df4754f73e0552c5aad228e2ae62368ab858855ffc99ff27698696c27d60883c9655b8d0615448474b8cdecf1733dc188318e4bbd7b18d5f87eaf895fcb5ceb + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -27938,6 +27981,26 @@ __metadata: languageName: node linkType: hard +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" + dependencies: + bytes: 3.1.2 + content-type: ~1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.13.0 + raw-body: 2.5.2 + type-is: ~1.6.18 + unpipe: 1.0.0 + checksum: 1a35c59a6be8d852b00946330141c4f142c6af0f970faa87f10ad74f1ee7118078056706a05ae3093c54dabca9cd3770fa62a170a85801da1a4324f04381167d + languageName: node + linkType: hard + "body-parser@npm:^1.20.1, body-parser@npm:^1.20.2": version: 1.20.2 resolution: "body-parser@npm:1.20.2" @@ -28510,6 +28573,15 @@ __metadata: languageName: node linkType: hard +"bundle-name@npm:^4.1.0": + version: 4.1.0 + resolution: "bundle-name@npm:4.1.0" + dependencies: + run-applescript: ^7.0.0 + checksum: 1d966c8d2dbf4d9d394e53b724ac756c2414c45c01340b37743621f59cc565a435024b394ddcb62b9b335d1c9a31f4640eb648c3fec7f97ee74dc0694c9beb6c + languageName: node + linkType: hard + "bundle-require@npm:^5.1.0": version: 5.1.0 resolution: "bundle-require@npm:5.1.0" @@ -29977,6 +30049,13 @@ __metadata: languageName: node linkType: hard +"cookie@npm:0.7.1": + version: 0.7.1 + resolution: "cookie@npm:0.7.1" + checksum: cec5e425549b3650eb5c3498a9ba3cde0b9cd419e3b36e4b92739d30b4d89e0b678b98c1ddc209ce7cf958cd3215671fd6ac47aec21f10c2a0cc68abd399d8a7 + languageName: node + linkType: hard + "cookie@npm:~0.4.1": version: 0.4.2 resolution: "cookie@npm:0.4.2" @@ -31144,6 +31223,13 @@ __metadata: languageName: node linkType: hard +"default-browser-id@npm:^5.0.0": + version: 5.0.0 + resolution: "default-browser-id@npm:5.0.0" + checksum: 185bfaecec2c75fa423544af722a3469b20704c8d1942794a86e4364fe7d9e8e9f63241a5b769d61c8151993bc65833a5b959026fa1ccea343b3db0a33aa6deb + languageName: node + linkType: hard + "default-browser@npm:^4.0.0": version: 4.0.0 resolution: "default-browser@npm:4.0.0" @@ -31156,6 +31242,16 @@ __metadata: languageName: node linkType: hard +"default-browser@npm:^5.2.1": + version: 5.2.1 + resolution: "default-browser@npm:5.2.1" + dependencies: + bundle-name: ^4.1.0 + default-browser-id: ^5.0.0 + checksum: afab7eff7b7f5f7a94d9114d1ec67273d3fbc539edf8c0f80019879d53aa71e867303c6f6d7cffeb10a6f3cfb59d4f963dba3f9c96830b4540cc7339a1bf9840 + languageName: node + linkType: hard + "default-gateway@npm:^4.2.0": version: 4.2.0 resolution: "default-gateway@npm:4.2.0" @@ -31732,7 +31828,6 @@ __metadata: resolution: "devsocket@workspace:packages/devsocket" dependencies: "@lavamoat/allow-scripts": ^2.3.1 - "@metamask/auto-changelog": ^2.3.0 "@metamask/eslint-config-jest": ^12.1.0 "@metamask/eslint-config-typescript": ^6.0.0 "@socket.io/admin-ui": ^0.5.1 @@ -35572,6 +35667,23 @@ __metadata: languageName: node linkType: hard +"execa@npm:^8.0.1": + version: 8.0.1 + resolution: "execa@npm:8.0.1" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^8.0.1 + human-signals: ^5.0.0 + is-stream: ^3.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^5.1.0 + onetime: ^6.0.0 + signal-exit: ^4.1.0 + strip-final-newline: ^3.0.0 + checksum: cac1bf86589d1d9b73bdc5dda65c52012d1a9619c44c526891956745f7b366ca2603d29fe3f7460bacc2b48c6eab5d6a4f7afe0534b31473d3708d1265545e1f + languageName: node + linkType: hard + "exit@npm:^0.1.2": version: 0.1.2 resolution: "exit@npm:0.1.2" @@ -36233,6 +36345,45 @@ __metadata: languageName: node linkType: hard +"express@npm:^4.21.2": + version: 4.21.2 + resolution: "express@npm:4.21.2" + dependencies: + accepts: ~1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.3 + content-disposition: 0.5.4 + content-type: ~1.0.4 + cookie: 0.7.1 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: ~2.0.0 + escape-html: ~1.0.3 + etag: ~1.8.1 + finalhandler: 1.3.1 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.3 + methods: ~1.1.2 + on-finished: 2.4.1 + parseurl: ~1.3.3 + path-to-regexp: 0.1.12 + proxy-addr: ~2.0.7 + qs: 6.13.0 + range-parser: ~1.2.1 + safe-buffer: 5.2.1 + send: 0.19.0 + serve-static: 1.16.2 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: ~1.6.18 + utils-merge: 1.0.1 + vary: ~1.1.2 + checksum: 3aef1d355622732e20b8f3a7c112d4391d44e2131f4f449e1f273a309752a41abfad714e881f177645517cbe29b3ccdc10b35e7e25c13506114244a5b72f549d + languageName: node + linkType: hard + "ext@npm:^1.1.2": version: 1.7.0 resolution: "ext@npm:1.7.0" @@ -36734,6 +36885,21 @@ __metadata: languageName: node linkType: hard +"finalhandler@npm:1.3.1": + version: 1.3.1 + resolution: "finalhandler@npm:1.3.1" + dependencies: + debug: 2.6.9 + encodeurl: ~2.0.0 + escape-html: ~1.0.3 + on-finished: 2.4.1 + parseurl: ~1.3.3 + statuses: 2.0.1 + unpipe: ~1.0.0 + checksum: a8c58cd97c9cd47679a870f6833a7b417043f5a288cd6af6d0f49b476c874a506100303a128b6d3b654c3d74fa4ff2ffed68a48a27e8630cda5c918f2977dcf4 + languageName: node + linkType: hard + "find-babel-config@npm:^2.0.0": version: 2.0.0 resolution: "find-babel-config@npm:2.0.0" @@ -37598,6 +37764,13 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^8.0.1": + version: 8.0.1 + resolution: "get-stream@npm:8.0.1" + checksum: 01e3d3cf29e1393f05f44d2f00445c5f9ec3d1c49e8179b31795484b9c117f4c695e5e07b88b50785d5c8248a788c85d9913a79266fc77e3ef11f78f10f1b974 + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -38888,6 +39061,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^5.0.0": + version: 5.0.0 + resolution: "human-signals@npm:5.0.0" + checksum: 6504560d5ed91444f16bea3bd9dfc66110a339442084e56c3e7fa7bbdf3f406426d6563d662bdce67064b165eac31eeabfc0857ed170aaa612cf14ec9f9a464c + languageName: node + linkType: hard + "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -40321,6 +40501,15 @@ __metadata: languageName: node linkType: hard +"is-wsl@npm:^3.1.0": + version: 3.1.0 + resolution: "is-wsl@npm:3.1.0" + dependencies: + is-inside-container: ^1.0.0 + checksum: f9734c81f2f9cf9877c5db8356bfe1ff61680f1f4c1011e91278a9c0564b395ae796addb4bf33956871041476ec82c3e5260ed57b22ac91794d4ae70a1d2f0a9 + languageName: node + linkType: hard + "is@npm:~0.2.6": version: 0.2.7 resolution: "is@npm:0.2.7" @@ -40421,6 +40610,15 @@ __metadata: languageName: node linkType: hard +"isows@npm:1.0.7": + version: 1.0.7 + resolution: "isows@npm:1.0.7" + peerDependencies: + ws: "*" + checksum: 044b949b369872882af07b60b613b5801ae01b01a23b5b72b78af80c8103bbeed38352c3e8ceff13a7834bc91fd2eb41cf91ec01d59a041d8705680e6b0ec546 + languageName: node + linkType: hard + "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": version: 3.2.0 resolution: "istanbul-lib-coverage@npm:3.2.0" @@ -44976,6 +45174,13 @@ __metadata: languageName: node linkType: hard +"merge-descriptors@npm:1.0.3": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 + languageName: node + linkType: hard + "merge-options@npm:^3.0.4": version: 3.0.4 resolution: "merge-options@npm:3.0.4" @@ -45018,7 +45223,7 @@ __metadata: "@commitlint/config-conventional": ^17.6.7 "@lavamoat/allow-scripts": ^2.3.1 "@metamask/auto-changelog": ^3.4.3 - "@metamask/create-release-branch": ^1.0.1 + "@metamask/create-release-branch": ^4.1.3 "@metamask/eslint-config": ^8.0.0 "@metamask/eslint-config-jest": ^8.0.0 "@metamask/eslint-config-nodejs": ^8.0.0 @@ -45042,7 +45247,7 @@ __metadata: lint-staged: ^13.2.3 openai: ^4.24.0 patch-package: ^6.4.7 - prettier: ^2.3.2 + prettier: ^3.3.3 rimraf: ^3.0.2 serve: ^14.2.1 ts-jest: ^29.0.3 @@ -48619,6 +48824,18 @@ __metadata: languageName: node linkType: hard +"open@npm:^10.1.0": + version: 10.2.0 + resolution: "open@npm:10.2.0" + dependencies: + default-browser: ^5.2.1 + define-lazy-prop: ^3.0.0 + is-inside-container: ^1.0.0 + wsl-utils: ^0.1.0 + checksum: 64e2e1fb1dc5ab82af06c990467237b8fd349b1b9ecc6324d12df337a005d039cec11f758abea148be68878ccd616977005682c48ef3c5c7ba48bd3e5d6a3dbb + languageName: node + linkType: hard + "open@npm:^6.2.0": version: 6.4.0 resolution: "open@npm:6.4.0" @@ -48799,6 +49016,27 @@ __metadata: languageName: node linkType: hard +"ox@npm:0.9.6": + version: 0.9.6 + resolution: "ox@npm:0.9.6" + dependencies: + "@adraffy/ens-normalize": ^1.11.0 + "@noble/ciphers": ^1.3.0 + "@noble/curves": 1.9.1 + "@noble/hashes": ^1.8.0 + "@scure/bip32": ^1.7.0 + "@scure/bip39": ^1.6.0 + abitype: ^1.0.9 + eventemitter3: 5.0.1 + peerDependencies: + typescript: ">=5.4.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 5f5094502cab9b135f3de3dfe60691fc312a1e534b3a9ef03bd867bfe0921245360c78dcb59bb438f6d66316b7da29506da4b46633f48cd8f7c4f37f56a76e4c + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -49276,6 +49514,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:0.1.12": + version: 0.1.12 + resolution: "path-to-regexp@npm:0.1.12" + checksum: ab237858bee7b25ecd885189f175ab5b5161e7b712b360d44f5c4516b8d271da3e4bf7bf0a7b9153ecb04c7d90ce8ff5158614e1208819cf62bac2b08452722e + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -50700,7 +50945,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.3.0, prettier@npm:^2.3.2, prettier@npm:^2.4.1, prettier@npm:^2.7.1, prettier@npm:^2.8.0, prettier@npm:^2.8.8": +"prettier@npm:^2.3.0, prettier@npm:^2.4.1, prettier@npm:^2.7.1, prettier@npm:^2.8.0, prettier@npm:^2.8.8": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -51314,6 +51559,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:6.13.0": + version: 6.13.0 + resolution: "qs@npm:6.13.0" + dependencies: + side-channel: ^1.0.6 + checksum: e9404dc0fc2849245107108ce9ec2766cde3be1b271de0bf1021d049dc5b98d1a2901e67b431ac5509f865420a7ed80b7acb3980099fe1c118a1c5d2e1432ad8 + languageName: node + linkType: hard + "qs@npm:^6.10.0, qs@npm:^6.10.3, qs@npm:^6.11.0, qs@npm:^6.11.1, qs@npm:^6.11.2": version: 6.11.2 resolution: "qs@npm:6.11.2" @@ -54461,6 +54715,13 @@ __metadata: languageName: node linkType: hard +"run-applescript@npm:^7.0.0": + version: 7.1.0 + resolution: "run-applescript@npm:7.1.0" + checksum: 8659fb5f2717b2b37a68cbfe5f678254cf24b5a82a6df3372b180c80c7c137dcd757a4166c3887e459f59a090ca414e8ea7ca97cf3ee5123db54b3b4006d7b7a + languageName: node + linkType: hard + "run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -54949,7 +55210,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.0, semver@npm:^7.5.1, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.1, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -55136,7 +55397,7 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:^1.16.2": +"serve-static@npm:1.16.2, serve-static@npm:^1.16.2": version: 1.16.2 resolution: "serve-static@npm:1.16.2" dependencies: @@ -55506,6 +55767,13 @@ __metadata: languageName: node linkType: hard +"signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + "simple-plist@npm:^1.1.0": version: 1.4.0 resolution: "simple-plist@npm:1.4.0" @@ -60147,7 +60415,7 @@ __metadata: languageName: node linkType: hard -"viem@npm:^1.0.0, viem@npm:latest": +"viem@npm:^1.0.0": version: 1.3.1 resolution: "viem@npm:1.3.1" dependencies: @@ -60191,6 +60459,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:^2.38.0": + version: 2.38.0 + resolution: "viem@npm:2.38.0" + dependencies: + "@noble/curves": 1.9.1 + "@noble/hashes": 1.8.0 + "@scure/bip32": 1.7.0 + "@scure/bip39": 1.6.0 + abitype: 1.1.0 + isows: 1.0.7 + ox: 0.9.6 + ws: 8.18.3 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 6ad7bf7bf26823550826481abe83df5ed7d8487679d6a6b6e6c3fafa5424da0ff6d59b1338918743f9961e59496840f91cae8f975743dd86f5cbd226e1d80ab5 + languageName: node + linkType: hard + "vite-node@npm:3.1.2": version: 3.1.2 resolution: "vite-node@npm:3.1.2" @@ -61948,6 +62237,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.18.3, ws@npm:^8.18.3": + version: 8.18.3 + resolution: "ws@npm:8.18.3" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: d64ef1631227bd0c5fe21b3eb3646c9c91229402fb963d12d87b49af0a1ef757277083af23a5f85742bae1e520feddfb434cb882ea59249b15673c16dc3f36e0 + languageName: node + linkType: hard + "ws@npm:^6.1.0, ws@npm:^6.2.2": version: 6.2.2 resolution: "ws@npm:6.2.2" @@ -62041,21 +62345,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.18.3": - version: 8.18.3 - resolution: "ws@npm:8.18.3" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: d64ef1631227bd0c5fe21b3eb3646c9c91229402fb963d12d87b49af0a1ef757277083af23a5f85742bae1e520feddfb434cb882ea59249b15673c16dc3f36e0 - languageName: node - linkType: hard - "ws@npm:~8.11.0": version: 8.11.0 resolution: "ws@npm:8.11.0" @@ -62071,6 +62360,15 @@ __metadata: languageName: node linkType: hard +"wsl-utils@npm:^0.1.0": + version: 0.1.0 + resolution: "wsl-utils@npm:0.1.0" + dependencies: + is-wsl: ^3.1.0 + checksum: de4c92187e04c3c27b4478f410a02e81c351dc85efa3447bf1666f34fc80baacd890a6698ec91995631714086992036013286aea3d77e6974020d40a08e00aec + languageName: node + linkType: hard + "xcode@npm:^3.0.1": version: 3.0.1 resolution: "xcode@npm:3.0.1"