diff --git a/package-lock.json b/package-lock.json index 9459e727..f1942c54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@dcl/mini-rpc": "^1.0.7", "@dcl/schemas": "^11.10.4", - "@dcl/sdk": "^7.7.5", + "@dcl/sdk": "^7.7.6", "@ethersproject/hash": "^5.7.0", "@segment/analytics-node": "^2.1.2", "cmd-shim": "^6.0.3", @@ -41,6 +41,7 @@ "@types/semver": "^7.5.8", "@typescript-eslint/eslint-plugin": "7.15.0", "@vitejs/plugin-react": "^4.3.1", + "ansi-to-html": "^0.7.2", "classnames": "^2.5.1", "cross-env": "7.0.3", "decentraland-ui2": "^0.6.1", @@ -62,7 +63,7 @@ "typescript": "5.5.3", "unplugin-auto-expose": "0.3.0", "vite": "5.3.2", - "vitest": "1.6.0" + "vitest": "1.6.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -97,8 +98,7 @@ "node_modules/@assemblyscript/loader": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz", - "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==", - "license": "Apache-2.0" + "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==" }, "node_modules/@babel/code-frame": { "version": "7.24.7", @@ -947,14 +947,12 @@ "node_modules/@dcl-sdk/utils": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.8.tgz", - "integrity": "sha512-IOur6rSK5vN/oUpfawW6ax6vXPeADPCB44WNudeIYEYER7kwT2akNKUCLLjR19cLo006i/dkdt6UsTQ677uMxA==", - "license": "Apache-2.0" + "integrity": "sha512-IOur6rSK5vN/oUpfawW6ax6vXPeADPCB44WNudeIYEYER7kwT2akNKUCLLjR19cLo006i/dkdt6UsTQ677uMxA==" }, "node_modules/@dcl/asset-packs": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@dcl/asset-packs/-/asset-packs-2.1.2.tgz", "integrity": "sha512-Zwi7EMl0XfQ6JLkytIVk8nFC1fa8uzWMo7K4HAaO8bZSWbkMbp71vaFVyg8uA18dIBukYwrHfF0Loe4z5PA56Q==", - "license": "ISC", "dependencies": { "@dcl-sdk/utils": "^1.2.8", "@dcl/js-runtime": "7.5.2", @@ -966,14 +964,12 @@ "node_modules/@dcl/asset-packs/node_modules/@dcl/js-runtime": { "version": "7.5.2", "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.5.2.tgz", - "integrity": "sha512-KZbxb2ONV6QlKmCer0gi/1Z0DKD6TcZZK+wfHRPlFrrIwd9ZoYRbKAqZXDChu1ZgWen2k3GwvYCEP7vyI/Ay3Q==", - "license": "Apache-2.0" + "integrity": "sha512-KZbxb2ONV6QlKmCer0gi/1Z0DKD6TcZZK+wfHRPlFrrIwd9ZoYRbKAqZXDChu1ZgWen2k3GwvYCEP7vyI/Ay3Q==" }, "node_modules/@dcl/asset-packs/node_modules/glob": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz", "integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==", - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^4.0.1", @@ -993,10 +989,9 @@ } }, "node_modules/@dcl/asset-packs/node_modules/jackspeak": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.3.tgz", - "integrity": "sha512-oSwM7q8PTHQWuZAlp995iPpPJ4Vkl7qT0ZRD+9duL9j2oBy6KcTfyxc8mEuHJYC+z/kbps80aJLkaNzTOrf/kw==", - "license": "BlueOak-1.0.0", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.0.tgz", + "integrity": "sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -1011,7 +1006,6 @@ "version": "11.0.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", - "license": "ISC", "engines": { "node": "20 || >=22" } @@ -1020,7 +1014,6 @@ "version": "10.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1035,7 +1028,6 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -1044,7 +1036,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" @@ -1059,8 +1050,7 @@ "node_modules/@dcl/catalyst-contracts": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/@dcl/catalyst-contracts/-/catalyst-contracts-4.4.2.tgz", - "integrity": "sha512-gJZo3IB8U+jhBJWR0DgoLS+zaUDIb/u79e7Rp+MEM78uH3bvC19S3Dd8lxWEbPXNKlCB0saUptfK/Buw0c1y2Q==", - "license": "Apache-2.0" + "integrity": "sha512-gJZo3IB8U+jhBJWR0DgoLS+zaUDIb/u79e7Rp+MEM78uH3bvC19S3Dd8lxWEbPXNKlCB0saUptfK/Buw0c1y2Q==" }, "node_modules/@dcl/crypto": { "version": "3.4.5", @@ -1084,10 +1074,9 @@ } }, "node_modules/@dcl/ecs": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.7.5.tgz", - "integrity": "sha512-C55jlg5Yd9Ks8gi45OJeudeY7OsIByhv+PC2OajF6GI8p0nytud/J6sit0NgUP3uMME4K/igEikIP51mSFh3vw==", - "license": "Apache-2.0" + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.7.6.tgz", + "integrity": "sha512-P076sAcI7n6jseKXUz0Frjh44QQ2jWwtQ399YKttM8jrqcABSLQZFD7SVW1IFXQOTKq5vFeDWoz1GvOw8+9bHw==" }, "node_modules/@dcl/ecs-math": { "version": "2.1.0", @@ -1104,7 +1093,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-1.1.3.tgz", "integrity": "sha512-mU1+Q8jcFLAR1hSBOd6WcnLwvQmKIPAH8+UPf2DZUk+Ntu7jWqSOqG+PoWRlh7/gPfI/gKofeW0a+HzVUK6N/g==", - "license": "Apache-2.0", "dependencies": { "ethereum-cryptography": "^1.0.3", "ipfs-unixfs-importer": "^7.0.3", @@ -1112,25 +1100,23 @@ } }, "node_modules/@dcl/inspector": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.7.5.tgz", - "integrity": "sha512-rqDZuIakvsS+T2HSY6lUwWc/MNXcwrIy50KXU7mb59RY5z94qrQvqq3EChd9uolD1z9dBMkEcgABxAqpmF7VEw==", + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.7.6.tgz", + "integrity": "sha512-+46vk+/3bUgLEY80kfolvK03LWOZ4E9SB1hgmTgY04+fWZtZhdmcNeucymGjxgILme63nxWkCYbqKV060abotw==", "dependencies": { "@dcl/asset-packs": "^2.1.2", "ts-deepmerge": "^7.0.0" } }, "node_modules/@dcl/js-runtime": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.7.5.tgz", - "integrity": "sha512-f/zkY5q86dfOKdcPV9A8ic7Co2XCHPoUmKEW/9GrMtHtvY9HgFlvsUjeoVGPrdacGZDOScoGhoE//mXzyU7wKA==", - "license": "Apache-2.0" + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.7.6.tgz", + "integrity": "sha512-J5YieM3rOauwqYp9XAP0XT6McvAoIS1qhxrFo8Kql1tsyIauXx4opV2MUGnoLCDBmhjJmTjTQQhWv/NjJ0Hbdg==" }, "node_modules/@dcl/linker-dapp": { "version": "0.14.2", "resolved": "https://registry.npmjs.org/@dcl/linker-dapp/-/linker-dapp-0.14.2.tgz", - "integrity": "sha512-Sq3ziGZUN/fXpSZ0+y7ngdS8WbHuinuJKJeNm81izDH7qo/viToDcnKMNX3lqgGqZqtDes604QxBhehJ0MhsRQ==", - "license": "Apache-2.0" + "integrity": "sha512-Sq3ziGZUN/fXpSZ0+y7ngdS8WbHuinuJKJeNm81izDH7qo/viToDcnKMNX3lqgGqZqtDes604QxBhehJ0MhsRQ==" }, "node_modules/@dcl/mini-comms": { "version": "1.0.1-20230216163137.commit-a4c75be", @@ -1155,7 +1141,6 @@ "version": "6.19.0", "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-6.19.0.tgz", "integrity": "sha512-S8lrq8L1vriVXkBzeycxppjbfgJ5XofA9pbCKdteJR+79r6Dn5oLo3t5g7RcMQDihdjWdDLbbwxlEAkPgmvc8w==", - "license": "Apache-2.0", "dependencies": { "ajv": "^8.11.0", "ajv-errors": "^3.0.0", @@ -1175,7 +1160,6 @@ "version": "1.0.0-12891435340.commit-b3fea33", "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-12891435340.commit-b3fea33.tgz", "integrity": "sha512-WBiLqh5g8imJNPvihgxBbqLf9cOY7g+rsj98yjkU1wl+WTuIyXKIWJn6XlQ2+h797ZF+aDRm66q9bhTGMmYdsA==", - "license": "Apache-2.0", "dependencies": { "@dcl/ts-proto": "1.154.0" } @@ -1184,7 +1168,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@dcl/quests-client/-/quests-client-1.0.3.tgz", "integrity": "sha512-VwZbXuHsRbRcboUUlBrauuR7VQ7IQP31rWI7wNKIYfWroTH4Yw7Bby1au9JBPWPayM/zRDij4uSd9pMJtidsqw==", - "license": "Apache-2.0", "dependencies": { "@dcl/protocol": "^1.0.0-6160718705.commit-03626d7", "@dcl/rpc": "^1.1.2", @@ -1195,16 +1178,14 @@ "node_modules/@dcl/quests-manager": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@dcl/quests-manager/-/quests-manager-0.1.4.tgz", - "integrity": "sha512-IPB043+NbQB3om2FlmQGmaRxTokHaSM9o3a7sEL0yJgBb60mukCpMdNXxzdIcemixfV3EhIJQ2G8HgK30XKTkA==", - "license": "Apache-2.0" + "integrity": "sha512-IPB043+NbQB3om2FlmQGmaRxTokHaSM9o3a7sEL0yJgBb60mukCpMdNXxzdIcemixfV3EhIJQ2G8HgK30XKTkA==" }, "node_modules/@dcl/react-ecs": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.7.5.tgz", - "integrity": "sha512-Bh1uPwT9lMm9Gcd5NHfE1gUWg22NrKRfrGmyYzHDWUcTglcHmPJeCf5cLkMCFIaFBK+mLpQcvPPn67EaHP8t3g==", - "license": "Apache-2.0", + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.7.6.tgz", + "integrity": "sha512-cwU1slgdXzRtGvD8NmMOESJOuyeXMmL28ukxF9AI2xucejQ6qLQJK/1G3YYZSJDuxGAbTg72/5baiJmrq+IT2Q==", "dependencies": { - "@dcl/ecs": "7.7.5", + "@dcl/ecs": "7.7.6", "react": "^18.2.0", "react-reconciler": "^0.29.0" } @@ -1213,7 +1194,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@dcl/rpc/-/rpc-1.1.2.tgz", "integrity": "sha512-HgZe9umoD48ZQRaiKTss+vj/War/HjH/DBnb6pzd5fx2OMInaB1YYso3OZ4dCT/OC0AtNny8Tkb3CUJdYAvj/w==", - "license": "Apache-2.0", "dependencies": { "mitt": "^3.0.0", "ts-proto": "^1.146.0" @@ -1231,30 +1211,28 @@ } }, "node_modules/@dcl/sdk": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.7.5.tgz", - "integrity": "sha512-nEJfenEfaTWtMuFd/cg9fEo1qtETrLhoLhca3rEk1DFoJpm8cklQGO1DJxIyWua2eQ8+IN+MMV3RAeSO9k3BkQ==", - "license": "Apache-2.0", + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.7.6.tgz", + "integrity": "sha512-jv+hmQ7SzwJDdAfNXQQ03zKg07AmGWVxRyU61PIX/vac2fgjuDTEE5+UYiAAofryFO0przx4egQ/G7cajZEDqQ==", "dependencies": { - "@dcl/ecs": "7.7.5", + "@dcl/ecs": "7.7.6", "@dcl/ecs-math": "2.1.0", "@dcl/explorer": "1.0.164509-20240802172549.commit-fb95b9b", - "@dcl/js-runtime": "7.7.5", - "@dcl/react-ecs": "7.7.5", - "@dcl/sdk-commands": "7.7.5", + "@dcl/js-runtime": "7.7.6", + "@dcl/react-ecs": "7.7.6", + "@dcl/sdk-commands": "7.7.6", "text-encoding": "0.7.0" } }, "node_modules/@dcl/sdk-commands": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.7.5.tgz", - "integrity": "sha512-KGeOLdUtm3K3035G1UHtS9fkGq0LA7Ear0wTdKKBgmkTF69b5bTQr31fMm42svQFbqw4fAcWO6vWnKrCnJN6XQ==", - "license": "Apache-2.0", + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.7.6.tgz", + "integrity": "sha512-qWOekm1VTNXb+udNAmTjbOKE8wFrdwl2DnBZjfsRoK11MqdiAN6iYrMPQE90Uoquml/AAxAzK/GdOKTsNcCuEA==", "dependencies": { "@dcl/crypto": "^3.4.4", - "@dcl/ecs": "7.7.5", + "@dcl/ecs": "7.7.6", "@dcl/hashing": "1.1.3", - "@dcl/inspector": "7.7.5", + "@dcl/inspector": "7.7.6", "@dcl/linker-dapp": "^0.14.2", "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", "@dcl/protocol": "1.0.0-12891435340.commit-b3fea33", @@ -1294,7 +1272,6 @@ "version": "8.2.3-20230801124703.commit-ade94fc", "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-8.2.3-20230801124703.commit-ade94fc.tgz", "integrity": "sha512-GP8veICDcxZaxcCbsr8oT0tgOtv3OPN+LJMo3DsNPx1ABe2UhrjJGk5qETfZX5qyTtcKLNMhEMZ3SP11PbU2qg==", - "license": "Apache-2.0", "dependencies": { "ajv": "^8.11.0", "ajv-errors": "^3.0.0", @@ -1308,7 +1285,6 @@ "cpu": [ "arm" ], - "license": "MIT", "optional": true, "os": [ "android" @@ -1324,7 +1300,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "android" @@ -1340,7 +1315,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "android" @@ -1356,7 +1330,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "darwin" @@ -1372,7 +1345,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "darwin" @@ -1388,7 +1360,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "freebsd" @@ -1404,7 +1375,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "freebsd" @@ -1420,7 +1390,6 @@ "cpu": [ "arm" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1436,7 +1405,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1452,7 +1420,6 @@ "cpu": [ "ia32" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1468,7 +1435,6 @@ "cpu": [ "loong64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1484,7 +1450,6 @@ "cpu": [ "mips64el" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1500,7 +1465,6 @@ "cpu": [ "ppc64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1516,7 +1480,6 @@ "cpu": [ "riscv64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1532,7 +1495,6 @@ "cpu": [ "s390x" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1548,7 +1510,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1564,7 +1525,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "netbsd" @@ -1580,7 +1540,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "openbsd" @@ -1596,7 +1555,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "sunos" @@ -1612,7 +1570,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1628,7 +1585,6 @@ "cpu": [ "ia32" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1644,7 +1600,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1657,7 +1612,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/@segment/analytics-core/-/analytics-core-1.4.1.tgz", "integrity": "sha512-kV0Pf33HnthuBOVdYNani21kYyj118Fn+9757bxqoksiXoZlYvBsFq6giNdCsKcTIE1eAMqNDq3xE1VQ0cfsHA==", - "license": "MIT", "dependencies": { "@lukeed/uuid": "^2.0.0", "@segment/analytics-generic-utils": "1.1.1", @@ -1669,7 +1623,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@segment/analytics-generic-utils/-/analytics-generic-utils-1.1.1.tgz", "integrity": "sha512-THTIzBPHnvu1HYJU3fARdJ3qIkukO3zDXsmDm+kAeUks5R9CBXOQ6rPChiASVzSmwAIIo5uFIXXnCraojlq/Gw==", - "license": "MIT", "dependencies": { "tslib": "^2.4.1" } @@ -1678,7 +1631,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/@segment/analytics-node/-/analytics-node-1.3.0.tgz", "integrity": "sha512-lRLz1WZaDokMoUe299yP5JkInc3OgJuqNNlxb6j0q22umCiq6b5iDo2gRmFn93reirIvJxWIicQsGrHd93q8GQ==", - "license": "MIT", "dependencies": { "@lukeed/uuid": "^2.0.0", "@segment/analytics-core": "1.4.1", @@ -1709,7 +1661,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -1720,7 +1671,6 @@ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -1756,7 +1706,6 @@ "version": "9.3.5", "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "minimatch": "^8.0.2", @@ -1774,7 +1723,6 @@ "version": "8.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1789,7 +1737,6 @@ "version": "4.2.8", "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "license": "ISC", "engines": { "node": ">=8" } @@ -1807,7 +1754,6 @@ "version": "1.154.0", "resolved": "https://registry.npmjs.org/@dcl/ts-proto/-/ts-proto-1.154.0.tgz", "integrity": "sha512-2S5AKMMPVZrVfa/1WRy4/h0niikcbu3Yf6dCoudh7ScG7BsyKAPC3CMg6IJKHzrmWS593UZClq7YJof6Vt4O+w==", - "license": "ISC", "dependencies": { "@types/object-hash": "^3.0.2", "case-anything": "^2.1.10", @@ -3373,7 +3319,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "license": "MIT", "engines": { "node": ">=14" } @@ -3621,6 +3566,7 @@ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -4133,13 +4079,6 @@ } } }, - "node_modules/@mui/material/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, "node_modules/@mui/private-theming": { "version": "5.16.6", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.6.tgz", @@ -4288,18 +4227,10 @@ } } }, - "node_modules/@mui/utils/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, "node_modules/@multiformats/base-x": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", - "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==", - "license": "MIT" + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" }, "node_modules/@noble/curves": { "version": "1.2.0", @@ -4386,7 +4317,6 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", - "license": "Apache-2.0", "engines": { "node": ">=8.0.0" } @@ -4719,32 +4649,27 @@ "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, "node_modules/@protobufjs/base64": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" }, "node_modules/@protobufjs/codegen": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "license": "BSD-3-Clause" + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" }, "node_modules/@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "license": "BSD-3-Clause" + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" }, "node_modules/@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -4753,32 +4678,27 @@ "node_modules/@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" }, "node_modules/@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" }, "node_modules/@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" }, "node_modules/@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" }, "node_modules/@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "license": "BSD-3-Clause" + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@reduxjs/toolkit": { "version": "2.2.6", @@ -5112,7 +5032,8 @@ "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@sindresorhus/is": { "version": "4.6.0", @@ -5417,7 +5338,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", - "license": "MIT", "dependencies": { "@types/minimatch": "^5.1.2", "@types/node": "*" @@ -5442,8 +5362,7 @@ "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "license": "MIT" + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/is-running": { "version": "2.1.2", @@ -5464,14 +5383,12 @@ "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", - "license": "MIT" + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "license": "MIT" + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==" }, "node_modules/@types/ms": { "version": "0.7.34", @@ -5491,7 +5408,6 @@ "version": "2.6.12", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", - "license": "MIT", "dependencies": { "@types/node": "*", "form-data": "^4.0.0" @@ -5500,8 +5416,7 @@ "node_modules/@types/object-hash": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-3.0.6.tgz", - "integrity": "sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==", - "license": "MIT" + "integrity": "sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==" }, "node_modules/@types/parse-json": { "version": "4.0.2", @@ -5632,7 +5547,6 @@ "version": "8.5.14", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -5731,20 +5645,20 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.1.tgz", - "integrity": "sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.0.1", - "@typescript-eslint/types": "7.0.1", - "@typescript-eslint/typescript-estree": "7.0.1", - "@typescript-eslint/visitor-keys": "7.0.1", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -5760,17 +5674,17 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", - "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "7.0.1", - "@typescript-eslint/visitor-keys": "7.0.1" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -5866,30 +5780,14 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/types": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", - "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -5897,23 +5795,23 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", - "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "7.0.1", - "@typescript-eslint/visitor-keys": "7.0.1", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -6027,34 +5925,18 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", - "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "7.0.1", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -6088,13 +5970,14 @@ } }, "node_modules/@vitest/expect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", - "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz", + "integrity": "sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/spy": "1.6.0", - "@vitest/utils": "1.6.0", + "@vitest/spy": "1.6.1", + "@vitest/utils": "1.6.1", "chai": "^4.3.10" }, "funding": { @@ -6102,12 +5985,13 @@ } }, "node_modules/@vitest/runner": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", - "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz", + "integrity": "sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/utils": "1.6.0", + "@vitest/utils": "1.6.1", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -6120,6 +6004,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^1.0.0" }, @@ -6131,10 +6016,11 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", - "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz", + "integrity": "sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==", "dev": true, + "license": "MIT", "dependencies": { "magic-string": "^0.30.5", "pathe": "^1.1.1", @@ -6145,10 +6031,11 @@ } }, "node_modules/@vitest/spy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", - "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz", + "integrity": "sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==", "dev": true, + "license": "MIT", "dependencies": { "tinyspy": "^2.2.0" }, @@ -6157,10 +6044,11 @@ } }, "node_modules/@vitest/utils": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", - "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz", + "integrity": "sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==", "dev": true, + "license": "MIT", "dependencies": { "diff-sequences": "^29.6.3", "estree-walker": "^3.0.3", @@ -6743,7 +6631,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@well-known-components/env-config-provider/-/env-config-provider-1.2.0.tgz", "integrity": "sha512-QYDL9Uk1zEs5Q4ymgeZo1GVzuHe9Pp/jOLPRIbhwtPOCQ2Bd9yIlUWiFoC36JpcUSIlQ7Fzh8x21v2U95q5/+Q==", - "license": "Apache-2.0", "dependencies": { "dotenv": "^16.0.1" }, @@ -6755,7 +6642,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/@well-known-components/fetch-component/-/fetch-component-2.0.2.tgz", "integrity": "sha512-LdY+6n9kuyACg3fcU4qMrNhLZuG7eqPxLSqzDgQyoHKeNjlzggoUqTVJKtIyi6vjPs8pSQ/Fx1xdLuBhOKCgww==", - "license": "Apache-2.0", "dependencies": { "@well-known-components/interfaces": "^1.4.1", "cross-fetch": "^3.1.5" @@ -6765,7 +6651,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/@well-known-components/http-server/-/http-server-2.1.0.tgz", "integrity": "sha512-IHD7aLTA+9DYEchQubHDBwc4FmVEmQC+2TWbi8Tz+QlkiQdtndcuba8XHH+EwqlB5sna/EAJGZGXPxS7okcHKA==", - "license": "Apache-2.0", "dependencies": { "@types/http-errors": "^2.0.1", "destroy": "^1.2.0", @@ -6781,7 +6666,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.5.1.tgz", "integrity": "sha512-2/8/xSOGXB8UsC4P5ORqxox+zCep35ShvW8i660YrqO57jeElfUVKOtekYEZDH0TaebP4ek35bJUW+WbAw/d0w==", - "license": "Apache-2.0", "dependencies": { "@types/node": "^20.3.1", "@types/node-fetch": "^2.5.12", @@ -6792,7 +6676,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@well-known-components/logger/-/logger-3.1.3.tgz", "integrity": "sha512-tTjD27CdfU4SVe+kPfjRbPSqdrw0Crg+M31RNejinCuMEBtEGbhYLtB1M4gn+PSTy2Oi3cI3iOdeQ1xVhMSerQ==", - "license": "Apache-2.0", "peerDependencies": { "@well-known-components/interfaces": "^1.0.0" } @@ -6801,7 +6684,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/@well-known-components/metrics/-/metrics-2.1.0.tgz", "integrity": "sha512-nJ3TdVMiJN2i7TtelndDtxvZERcSE7dtlmRfRV7yYZZshDZrQTC9EFH2uhmCWDWI0qnonvlq++JRSXBNJJfbvg==", - "license": "Apache-2.0", "dependencies": { "prom-client": "^15.1.0" } @@ -6810,7 +6692,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@well-known-components/pushable-channel/-/pushable-channel-1.0.3.tgz", "integrity": "sha512-8ibswJXQx7YfmUgzXp02xsIBTw6zrVXgNybV8asvEr1vE/0m/xmZi41+NwTcZmLCNRzsE/i+aRUzNO+oyq/g2g==", - "license": "Apache-2.0", "dependencies": { "mitt": "^3.0.0" } @@ -6933,6 +6814,30 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/ansi-to-html": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.7.2.tgz", + "integrity": "sha512-v6MqmEpNlxF+POuyhKkidusCHWWkaLcGRURzivcU3I9tv7k4JVhFcnukrM5Rlk2rUywdZuzYAZ+kbZqWCnfN3g==", + "dev": true, + "dependencies": { + "entities": "^2.2.0" + }, + "bin": { + "ansi-to-html": "bin/ansi-to-html" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/ansi-to-html/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -7107,8 +7012,7 @@ "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "license": "MIT" + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" }, "node_modules/argparse": { "version": "2.0.1", @@ -7139,6 +7043,7 @@ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -7339,8 +7244,7 @@ "node_modules/bintrees": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", - "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==", - "license": "MIT" + "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==" }, "node_modules/bl": { "version": "4.1.0", @@ -7634,6 +7538,7 @@ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7727,7 +7632,6 @@ "version": "2.1.13", "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", - "license": "MIT", "engines": { "node": ">=12.13" }, @@ -7736,10 +7640,11 @@ } }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -7747,7 +7652,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" @@ -7773,6 +7678,7 @@ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -7850,7 +7756,6 @@ "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", "deprecated": "This module has been superseded by the multiformats module", - "license": "MIT", "dependencies": { "multibase": "^4.0.1", "multicodec": "^3.0.1", @@ -7866,7 +7771,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "license": "MIT", "dependencies": { "multiformats": "^9.4.2" } @@ -8009,8 +7913,7 @@ "node_modules/colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "license": "MIT" + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -8118,7 +8021,6 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -8332,8 +8234,7 @@ "node_modules/dataloader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", - "license": "BSD-3-Clause" + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" }, "node_modules/date-fns": { "version": "3.6.0", @@ -8350,7 +8251,6 @@ "version": "21.8.0", "resolved": "https://registry.npmjs.org/dcl-catalyst-client/-/dcl-catalyst-client-21.8.0.tgz", "integrity": "sha512-ZLPso7AB8lbV0NYjQIt+K0d8yHXo065UWq/UQh/dlaFeM2vV40iojWmOpnaxPWjxiVwLbj9TSUubUw3/Nnit/Q==", - "license": "Apache-2.0", "dependencies": { "@dcl/catalyst-contracts": "^4.4.0", "@dcl/crypto": "^3.4.0", @@ -8365,8 +8265,7 @@ "node_modules/dcl-catalyst-client/node_modules/@dcl/hashing": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-3.0.4.tgz", - "integrity": "sha512-Cg+MoIOn+BYmQV2q8zSFnNYY+GldlnUazwBnfgrq3i66ZxOaZ65h01btd8OUtSAlfWG4VTNIOHDjtKqmuwJNBg==", - "license": "Apache-2.0" + "integrity": "sha512-Cg+MoIOn+BYmQV2q8zSFnNYY+GldlnUazwBnfgrq3i66ZxOaZ65h01btd8OUtSAlfWG4VTNIOHDjtKqmuwJNBg==" }, "node_modules/debug": { "version": "4.3.4", @@ -8546,10 +8445,11 @@ "license": "MIT" }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -8602,7 +8502,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "license": "MIT", "engines": { "node": ">=8" } @@ -8643,7 +8542,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -8658,7 +8556,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -8693,6 +8590,7 @@ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -8881,7 +8779,6 @@ "version": "16.4.7", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", - "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -8899,7 +8796,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", - "license": "MIT", "dependencies": { "detect-libc": "^1.0.3" } @@ -8939,8 +8835,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/ejs": { "version": "3.1.10", @@ -10458,6 +10353,7 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -10707,7 +10603,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-2.0.1.tgz", "integrity": "sha512-vnjrmdXG9dDs1m/H4iJ6z0JFI2NtgsW5keRkTcM85NGak69Mkf5PHUqBz+Xs0T4sg0ppvj9O5EGAJo40FTxmmA==", - "license": "MIT", "dependencies": { "sparse-array": "^1.3.1", "uint8arrays": "^3.0.0" @@ -10721,7 +10616,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "license": "MIT", "dependencies": { "multiformats": "^9.4.2" } @@ -10908,7 +10802,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -11168,7 +11061,6 @@ "resolved": "https://registry.npmjs.org/interface-ipld-format/-/interface-ipld-format-1.0.1.tgz", "integrity": "sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==", "deprecated": "This module has been superseded by the multiformats module", - "license": "(Apache-2.0 AND MIT)", "dependencies": { "cids": "^1.1.6", "multicodec": "^3.0.1", @@ -11191,7 +11083,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-4.0.3.tgz", "integrity": "sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==", - "license": "MIT", "dependencies": { "err-code": "^3.0.1", "protobufjs": "^6.10.2" @@ -11205,7 +11096,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-7.0.3.tgz", "integrity": "sha512-qeFOlD3AQtGzr90sr5Tq1Bi8pT5Nr2tSI8z310m7R4JDYgZc6J1PEZO3XZQ8l1kuGoqlAppBZuOYmPEqaHcVQQ==", - "license": "MIT", "dependencies": { "bl": "^5.0.0", "cids": "^1.1.5", @@ -11231,7 +11121,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", - "license": "MIT", "dependencies": { "buffer": "^6.0.3", "inherits": "^2.0.4", @@ -11256,7 +11145,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -11265,27 +11153,23 @@ "node_modules/ipfs-unixfs-importer/node_modules/err-code": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", - "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==", - "license": "MIT" + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" }, "node_modules/ipfs-unixfs/node_modules/err-code": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", - "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==", - "license": "MIT" + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" }, "node_modules/ipfs-unixfs/node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "license": "Apache-2.0" + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "node_modules/ipfs-unixfs/node_modules/protobufjs": { "version": "6.11.4", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -11311,7 +11195,6 @@ "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.22.3.tgz", "integrity": "sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==", "deprecated": "This module has been superseded by @ipld/dag-pb and multiformats", - "license": "MIT", "dependencies": { "cids": "^1.0.0", "interface-ipld-format": "^1.0.0", @@ -11329,15 +11212,13 @@ "node_modules/ipld-dag-pb/node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "license": "Apache-2.0" + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "node_modules/ipld-dag-pb/node_modules/protobufjs": { "version": "6.11.4", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -11445,7 +11326,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -11568,7 +11448,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "license": "MIT", "engines": { "node": ">=8" } @@ -11615,7 +11494,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -11663,26 +11541,22 @@ "node_modules/it-all": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz", - "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==", - "license": "ISC" + "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==" }, "node_modules/it-batch": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-1.0.9.tgz", - "integrity": "sha512-7Q7HXewMhNFltTsAMdSz6luNhyhkhEtGGbYek/8Xb/GiqYMtwUmopE1ocPSiJKKp3rM4Dt045sNFoUu+KZGNyA==", - "license": "ISC" + "integrity": "sha512-7Q7HXewMhNFltTsAMdSz6luNhyhkhEtGGbYek/8Xb/GiqYMtwUmopE1ocPSiJKKp3rM4Dt045sNFoUu+KZGNyA==" }, "node_modules/it-first": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/it-first/-/it-first-1.0.7.tgz", - "integrity": "sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==", - "license": "ISC" + "integrity": "sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==" }, "node_modules/it-parallel-batch": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-1.0.11.tgz", "integrity": "sha512-UWsWHv/kqBpMRmyZJzlmZeoAMA0F3SZr08FBdbhtbe+MtoEBgr/ZUAKrnenhXCBrsopy76QjRH2K/V8kNdupbQ==", - "license": "ISC", "dependencies": { "it-batch": "^1.0.9" } @@ -11913,7 +11787,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "license": "MIT", "engines": { "node": ">=6" } @@ -12140,8 +12013,7 @@ "node_modules/long": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", - "license": "Apache-2.0" + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" }, "node_modules/loose-envify": { "version": "1.4.0", @@ -12160,6 +12032,7 @@ "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } @@ -12246,7 +12119,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", - "license": "MIT", "dependencies": { "is-plain-obj": "^2.1.0" }, @@ -12357,9 +12229,9 @@ "license": "MIT" }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -12493,7 +12365,6 @@ "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", "deprecated": "This module has been superseded by the multiformats module", - "license": "MIT", "dependencies": { "@multiformats/base-x": "^4.0.1" }, @@ -12507,7 +12378,6 @@ "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", "deprecated": "This module has been superseded by the multiformats module", - "license": "MIT", "dependencies": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" @@ -12517,7 +12387,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "license": "MIT", "dependencies": { "multiformats": "^9.4.2" } @@ -12531,7 +12400,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "license": "MIT", "dependencies": { "multibase": "^4.0.1", "uint8arrays": "^3.0.0", @@ -12546,7 +12414,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "license": "MIT", "dependencies": { "multiformats": "^9.4.2" } @@ -12554,14 +12421,12 @@ "node_modules/multihashes/node_modules/varint": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "license": "MIT" + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" }, "node_modules/multihashing-async": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", - "license": "MIT", "dependencies": { "blakejs": "^1.1.0", "err-code": "^3.0.0", @@ -12578,14 +12443,12 @@ "node_modules/multihashing-async/node_modules/err-code": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", - "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==", - "license": "MIT" + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" }, "node_modules/multihashing-async/node_modules/uint8arrays": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "license": "MIT", "dependencies": { "multiformats": "^9.4.2" } @@ -12594,7 +12457,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", - "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -15204,7 +15066,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "license": "MIT", "engines": { "node": ">= 6" } @@ -15267,7 +15128,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -15301,7 +15161,6 @@ "version": "8.4.2", "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "license": "MIT", "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -15523,8 +15382,7 @@ "node_modules/path-to-regexp": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "license": "MIT" + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==" }, "node_modules/path-type": { "version": "4.0.0", @@ -15545,6 +15403,7 @@ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -15831,6 +15690,7 @@ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -15845,6 +15705,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -15885,7 +15746,6 @@ "version": "15.1.3", "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-15.1.3.tgz", "integrity": "sha512-6ZiOBfCywsD4k1BN9IX0uZhF+tJkV8q8llP64G5Hajs4JOeVLPCwpPVcpXy3BwYiUGgyJzsJJQeOIv7+hDSq8g==", - "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.4.0", "tdigest": "^0.1.1" @@ -15911,7 +15771,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -15944,7 +15803,6 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -16198,7 +16056,6 @@ "version": "0.1.5", "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz", "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==", - "license": "MIT", "dependencies": { "@assemblyscript/loader": "^0.9.4", "bl": "^5.0.0", @@ -16215,7 +16072,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", - "license": "MIT", "dependencies": { "buffer": "^6.0.3", "inherits": "^2.0.4", @@ -16240,7 +16096,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -16325,16 +16180,16 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" }, "node_modules/react-reconciler": { "version": "0.29.2", "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz", "integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==", - "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -17051,8 +16906,7 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/sha.js": { "version": "2.4.11", @@ -17196,8 +17050,7 @@ "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT" + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, "node_modules/slash": { "version": "3.0.0", @@ -17302,8 +17155,7 @@ "node_modules/sparse-array": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz", - "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==", - "license": "ISC" + "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==" }, "node_modules/split-on-first": { "version": "1.1.0", @@ -17334,8 +17186,7 @@ "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", - "license": "MIT" + "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility" }, "node_modules/stackback": { "version": "0.0.2", @@ -17356,7 +17207,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -17587,7 +17437,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", - "license": "MIT", "dependencies": { "bintrees": "1.0.2" } @@ -17704,6 +17553,7 @@ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -17780,7 +17630,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", "engines": { "node": ">=0.6" } @@ -17848,7 +17697,6 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/ts-deepmerge/-/ts-deepmerge-7.0.2.tgz", "integrity": "sha512-akcpDTPuez4xzULo5NwuoKwYRtjQJ9eoNfBACiBMaXwNAx7B1PKfe5wqUFJuW5uKzQ68YjDFwPaWHDG1KnFGsA==", - "license": "ISC", "engines": { "node": ">=14.13.1" } @@ -17857,7 +17705,6 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.11.0.tgz", "integrity": "sha512-r5AGF8vvb+GjBsnqiTqbLhN1/U2FJt6BI+k0dfCrkKzWvUhNlwMmq9nDHuucHs45LomgHjZPvYj96dD3JawjJA==", - "license": "Apache-2.0", "dependencies": { "dprint-node": "^1.0.8" } @@ -17866,7 +17713,6 @@ "version": "1.181.2", "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.181.2.tgz", "integrity": "sha512-knJ8dtjn2Pd0c5ZGZG8z9DMiD4PUY8iGI9T9tb8DvGdWRMkLpf0WcPO7G+7cmbZyxvNTAG6ci3fybEaFgMZIvg==", - "license": "ISC", "dependencies": { "case-anything": "^2.1.13", "protobufjs": "^7.2.4", @@ -17881,7 +17727,6 @@ "version": "1.16.0", "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.16.0.tgz", "integrity": "sha512-3yKuzMLpltdpcyQji1PJZRfoo4OJjNieKTYkQY8pF7xGKsYz/RHe3aEe4KiRxcinoBmnEhmuI+yJTxLb922ULA==", - "license": "ISC", "dependencies": { "long": "^5.2.3", "protobufjs": "^7.2.4" @@ -17911,10 +17756,11 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -17934,8 +17780,7 @@ "node_modules/typed-url-params": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/typed-url-params/-/typed-url-params-1.0.1.tgz", - "integrity": "sha512-762imXO+myoSDHD9+YxUfSmfT0yGH1j+3s9UJ6uqKkOYIwHH6/gsFo67ZoST0Ey/RSoaps1zGu1N+eiuuCxfeg==", - "license": "MIT" + "integrity": "sha512-762imXO+myoSDHD9+YxUfSmfT0yGH1j+3s9UJ6uqKkOYIwHH6/gsFo67ZoST0Ey/RSoaps1zGu1N+eiuuCxfeg==" }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", @@ -17969,7 +17814,6 @@ "version": "2.1.10", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", - "license": "MIT", "dependencies": { "multiformats": "^9.4.2" } @@ -17984,7 +17828,6 @@ "version": "5.28.5", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", - "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -18364,8 +18207,7 @@ "node_modules/varint": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "license": "MIT" + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" }, "node_modules/verror": { "version": "1.10.1", @@ -18439,10 +18281,11 @@ } }, "node_modules/vite-node": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", - "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz", + "integrity": "sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==", "dev": true, + "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", @@ -18476,16 +18319,17 @@ } }, "node_modules/vitest": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", - "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz", + "integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/expect": "1.6.0", - "@vitest/runner": "1.6.0", - "@vitest/snapshot": "1.6.0", - "@vitest/spy": "1.6.0", - "@vitest/utils": "1.6.0", + "@vitest/expect": "1.6.1", + "@vitest/runner": "1.6.1", + "@vitest/snapshot": "1.6.1", + "@vitest/spy": "1.6.1", + "@vitest/utils": "1.6.1", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -18499,7 +18343,7 @@ "tinybench": "^2.5.1", "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.6.0", + "vite-node": "1.6.1", "why-is-node-running": "^2.2.2" }, "bin": { @@ -18514,8 +18358,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.6.0", - "@vitest/ui": "1.6.0", + "@vitest/browser": "1.6.1", + "@vitest/ui": "1.6.1", "happy-dom": "*", "jsdom": "*" }, @@ -18975,10 +18819,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 06ecaa54..54df9142 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@types/semver": "^7.5.8", "@typescript-eslint/eslint-plugin": "7.15.0", "@vitejs/plugin-react": "^4.3.1", + "ansi-to-html": "^0.7.2", "classnames": "^2.5.1", "cross-env": "7.0.3", "decentraland-ui2": "^0.6.1", @@ -65,12 +66,12 @@ "typescript": "5.5.3", "unplugin-auto-expose": "0.3.0", "vite": "5.3.2", - "vitest": "1.6.0" + "vitest": "1.6.1" }, "dependencies": { "@dcl/mini-rpc": "^1.0.7", "@dcl/schemas": "^11.10.4", - "@dcl/sdk": "^7.7.5", + "@dcl/sdk": "^7.7.6", "@ethersproject/hash": "^5.7.0", "@segment/analytics-node": "^2.1.2", "cmd-shim": "^6.0.3", diff --git a/packages/main/src/index.ts b/packages/main/src/index.ts index 69f34c02..3a51c4e1 100644 --- a/packages/main/src/index.ts +++ b/packages/main/src/index.ts @@ -1,15 +1,16 @@ import { app } from 'electron'; -import { restoreOrCreateWindow } from '/@/mainWindow'; import { platform } from 'node:process'; import updater from 'electron-updater'; import log from 'electron-log/main'; -import { initIpc } from './modules/ipc'; -import { deployServer, killPreview, previewCache } from './modules/cli'; -import { inspectorServer } from './modules/inspector'; -import { getAnalytics, track } from './modules/analytics'; -import './security-restrictions'; -import { runMigrations } from './modules/migrations'; +import { restoreOrCreateMainWindow } from '/@/mainWindow'; +import { initIpc } from '/@/modules/ipc'; +import { deployServer, killAllPreviews } from '/@/modules/cli'; +import { inspectorServer } from '/@/modules/inspector'; +import { getAnalytics, track } from '/@/modules/analytics'; +import { runMigrations } from '/@/modules/migrations'; + +import '/@/security-restrictions'; log.initialize(); @@ -21,7 +22,7 @@ if (!isSingleInstance) { app.quit(); process.exit(0); } -app.on('second-instance', restoreOrCreateWindow); +app.on('second-instance', restoreOrCreateMainWindow); /** * Shut down background process if all windows was closed @@ -36,7 +37,7 @@ app.on('window-all-closed', async () => { /** * @see https://www.electronjs.org/docs/latest/api/app#event-activate-macos Event: 'activate'. */ -app.on('activate', restoreOrCreateWindow); +app.on('activate', restoreOrCreateMainWindow); /** * Create the application window when app is ready. @@ -49,7 +50,7 @@ app log.info(`[App] Ready v${app.getVersion()}`); initIpc(); log.info('[IPC] Ready'); - await restoreOrCreateWindow(); + await restoreOrCreateMainWindow(); log.info('[BrowserWindow] Ready'); const analytics = await getAnalytics(); if (analytics) { @@ -103,10 +104,7 @@ if (import.meta.env.PROD) { } export async function killAll() { - const promises: Promise<unknown>[] = []; - for (const key in previewCache.keys()) { - promises.push(killPreview(key)); - } + const promises: Promise<unknown>[] = [killAllPreviews()]; if (deployServer) { promises.push(deployServer.kill()); } diff --git a/packages/main/src/mainWindow.ts b/packages/main/src/mainWindow.ts index 8e467f90..0b6a1653 100644 --- a/packages/main/src/mainWindow.ts +++ b/packages/main/src/mainWindow.ts @@ -1,21 +1,12 @@ -import { app, BrowserWindow } from 'electron'; -import { join } from 'node:path'; +import { type BrowserWindow } from 'electron'; import { fileURLToPath } from 'node:url'; -async function createWindow() { - const browserWindow = new BrowserWindow({ - show: false, // Use the 'ready-to-show' event to show the instantiated BrowserWindow. - webPreferences: { - nodeIntegration: false, - contextIsolation: true, - sandbox: false, // Sandbox disabled because the demo of preload script depend on the Node.js api - webviewTag: false, // The webview tag is not recommended. Consider alternatives like an iframe or Electron's BrowserView. @see https://www.electronjs.org/docs/latest/api/webview-tag#warning - preload: join(app.getAppPath(), 'packages/preload/dist/index.mjs'), - }, - }); +import { createWindow, focusWindow, getWindow } from './modules/window'; - browserWindow.setMenuBarVisibility(false); - browserWindow.maximize(); +async function createMainWindow(id: string) { + const window = createWindow(id); + window.setMenuBarVisibility(false); + window.maximize(); /** * If the 'show' property of the BrowserWindow's constructor is omitted from the initialization options, @@ -25,11 +16,11 @@ async function createWindow() { * * @see https://github.com/electron/electron/issues/25012 for the afford mentioned issue. */ - browserWindow.on('ready-to-show', () => { - browserWindow?.show(); + window.on('ready-to-show', () => { + window.show(); if (import.meta.env.DEV) { - browserWindow?.webContents.openDevTools(); + window?.webContents.openDevTools(); } }); @@ -40,7 +31,7 @@ async function createWindow() { /** * Load from the Vite dev server for development. */ - await browserWindow.loadURL(import.meta.env.VITE_DEV_SERVER_URL); + await window.loadURL(import.meta.env.VITE_DEV_SERVER_URL); } else { /** * Load from the local file system for production and test. @@ -51,27 +42,35 @@ async function createWindow() { * @see https://github.com/nodejs/node/issues/12682 * @see https://github.com/electron/electron/issues/6869 */ - await browserWindow.loadFile( + await window.loadFile( fileURLToPath(new URL('./../../renderer/dist/index.html', import.meta.url)), ); } - return browserWindow; + return window; } /** - * Restore an existing BrowserWindow or Create a new BrowserWindow. + * Restores an existing main window or creates a new one if none exists. + * This function ensures only one main window is active at a time. + * + * The function will: + * 1. Check if a main window already exists + * 2. Create a new window if none exists + * 3. Restore the window if it's minimized + * 4. Focus the window to bring it to the foreground + * + * @returns {Promise<Electron.BrowserWindow>} A promise that resolves to the main window instance */ -export async function restoreOrCreateWindow() { - let window = BrowserWindow.getAllWindows().find(w => !w.isDestroyed()); +export async function restoreOrCreateMainWindow(): Promise<BrowserWindow> { + const id = 'main'; + let window = getWindow(id); if (window === undefined) { - window = await createWindow(); + window = await createMainWindow(id); } - if (window.isMinimized()) { - window.restore(); - } + focusWindow(window); - window.focus(); + return window; } diff --git a/packages/main/src/modules/bin.ts b/packages/main/src/modules/bin.ts index 9397ce27..bb024fbc 100644 --- a/packages/main/src/modules/bin.ts +++ b/packages/main/src/modules/bin.ts @@ -12,6 +12,7 @@ import { promisify } from 'util'; import { exec as execSync } from 'child_process'; import { ErrorBase } from '/shared/types/error'; +import { createCircularBuffer } from '/shared/circular-buffer'; import { APP_UNPACKED_PATH, getBinPath, getNodeCmdPath, joinEnvPaths } from './path'; import { track } from './analytics'; @@ -173,6 +174,8 @@ export async function install() { } } +const MAX_BUFFER_SIZE = 2048; + type Error = 'COMMAND_FAILED'; export class StreamError extends ErrorBase<Error> { @@ -188,14 +191,19 @@ export class StreamError extends ErrorBase<Error> { export type StreamType = 'all' | 'stdout' | 'stderr'; +export type EventOptions = { + type?: StreamType; + sanitize?: boolean; +}; + export type Child = { pkg: string; bin: string; args: string[]; cwd: string; process: Electron.UtilityProcess; - on: (pattern: RegExp, handler: (data?: string) => void, streamType?: StreamType) => number; - once: (pattern: RegExp, handler: (data?: string) => void, streamType?: StreamType) => number; + on: (pattern: RegExp, handler: (data?: string) => void, opts?: EventOptions) => number; + once: (pattern: RegExp, handler: (data?: string) => void, opts?: EventOptions) => number; off: (index: number) => void; wait: () => Promise<Buffer>; waitFor: ( @@ -205,13 +213,14 @@ export type Child = { ) => Promise<string>; kill: () => Promise<void>; alive: () => boolean; + stdall: (opts?: EventOptions) => string[]; }; type Matcher = { pattern: RegExp; handler: (data: string) => void; enabled: boolean; - streamType: StreamType; + opts?: EventOptions; }; type RunOptions = { @@ -229,7 +238,6 @@ type RunOptions = { * @returns Child */ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { - // status let isKilling = false; let alive = true; @@ -240,6 +248,10 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { const binPath = getBinPath(pkg, bin, workspace); + const stdout = createCircularBuffer<Uint8Array>(MAX_BUFFER_SIZE); + const stderr = createCircularBuffer<Uint8Array>(MAX_BUFFER_SIZE); + const stdall = createCircularBuffer<Uint8Array>(MAX_BUFFER_SIZE); // ordered buffer of stdout and stderr + const forked = utilityProcess.fork(binPath, [...args], { cwd, stdio: 'pipe', @@ -250,16 +262,28 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { }, }); - const stdout: Uint8Array[] = []; + const cleanup = () => { + for (const matcher of matchers) { + matcher.enabled = false; + } + forked.stdout?.removeAllListeners('data'); + forked.stderr?.removeAllListeners('data'); + stdout.clear(); + stderr.clear(); + stdall.clear(); + matchers.length = 0; + }; + forked.stdout!.on('data', (data: Buffer) => { handleData(data, matchers, 'stdout'); stdout.push(Uint8Array.from(data)); + stdall.push(Uint8Array.from(data)); }); - const stderr: Uint8Array[] = []; forked.stderr!.on('data', (data: Buffer) => { handleData(data, matchers, 'stderr'); stderr.push(Uint8Array.from(data)); + stdall.push(Uint8Array.from(data)); }); const ready = future<void>(); @@ -275,12 +299,12 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { forked.on('exit', code => { if (!alive) return; alive = false; - const stdoutBuf = Buffer.concat(stdout); + const stdoutBuf = Buffer.concat(stdout.getAll()); log.info( `[UtilityProcess] Exiting "${name}" with pid=${forked.pid} and exit code=${code || 0}`, ); if (code !== 0 && code !== null) { - const stderrBuf = Buffer.concat(stderr); + const stderrBuf = Buffer.concat(stderr.getAll()); promise.reject( new StreamError( 'COMMAND_FAILED', @@ -292,6 +316,7 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { } else { promise.resolve(stdoutBuf); } + cleanup(); }); const child: Child = { @@ -300,20 +325,38 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { args, cwd, process: forked, - on: (pattern, handler, streamType = 'all') => { + stdall: (opts: EventOptions = {}) => { + const out: string[] = []; + for (const buf of stdall.getAllIterator()) { + const data = Buffer.from(buf).toString('utf8'); + out.push(processData(data, opts)); + } + return out; + }, + on: (pattern, handler, opts = {}) => { if (alive) { - return matchers.push({ pattern, handler, enabled: true, streamType }) - 1; + return ( + matchers.push({ + pattern, + handler, + enabled: true, + opts: { + type: opts.type ?? 'all', + sanitize: opts.sanitize ?? true, + }, + }) - 1 + ); } throw new Error('Process has been killed'); }, - once: (pattern, handler, streamType) => { + once: (pattern, handler, opts = {}) => { const index = child.on( pattern, data => { handler(data); child.off(index); }, - streamType, + opts, ); return index; }, @@ -325,9 +368,9 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { wait: () => promise, waitFor: (resolvePattern, rejectPattern, opts) => new Promise((resolve, reject) => { - child.once(resolvePattern, data => resolve(data!), opts?.resolve); + child.once(resolvePattern, data => resolve(data!), { type: opts?.resolve }); if (rejectPattern) { - child.once(rejectPattern, data => reject(new Error(data)), opts?.reject); + child.once(rejectPattern, data => reject(new Error(data)), { type: opts?.reject }); } }), kill: async () => { @@ -340,27 +383,25 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { log.info(`[UtilityProcess] Killing process "${name}" with pid=${pid}...`); // create promise to kill child - const promise = future<void>(); + const killPromise = future<void>(); // kill child gracefully treeKill(pid); - // child succesfully killed + // child successfully killed const die = (force: boolean = false) => { isKilling = false; alive = false; - clearInterval(interval); - clearTimeout(timeout); - for (const matcher of matchers) { - matcher.enabled = false; - } + cleanup(); if (force) { log.info(`[UtilityProcess] Process "${name}" with pid=${pid} forcefully killed`); treeKill(pid!, 'SIGKILL'); } else { log.info(`[UtilityProcess] Process "${name}" with pid=${pid} gracefully killed`); } - promise.resolve(); + clearInterval(interval); + clearTimeout(timeout); + killPromise.resolve(); }; // interval to check if child still running and flag it as dead when is not running anymore @@ -378,7 +419,7 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { }, 5000); // return promise - return promise; + return killPromise; }, alive: () => alive, }; @@ -389,22 +430,28 @@ export function run(pkg: string, bin: string, options: RunOptions = {}): Child { async function handleData(buffer: Buffer, matchers: Matcher[], type: StreamType) { const data = buffer.toString('utf8'); log.info(`[UtilityProcess] ${data}`); // pipe data to console - for (const { pattern, handler, enabled, streamType } of matchers) { + for (const { pattern, handler, enabled, opts } of matchers) { if (!enabled) continue; - if (streamType !== 'all' && streamType !== type) continue; + if (opts?.type !== 'all' && opts?.type !== type) continue; pattern.lastIndex = 0; // reset regexp if (pattern.test(data)) { - // remove control characters from data - const text = data.replace( - // eslint-disable-next-line no-control-regex - /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, - '', - ); - handler(text); + handler(processData(data, opts)); } } } +function processData(data: string, opts: EventOptions | undefined) { + const { sanitize = true } = opts ?? {}; + // remove control characters from data + const text = sanitize + ? data.replace( + // eslint-disable-next-line no-control-regex + /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, + '', + ) + : data; + return text; +} export async function dclDeepLink(deepLink: string) { const command = process.platform === 'win32' ? 'start' : 'open'; try { diff --git a/packages/main/src/modules/cache.ts b/packages/main/src/modules/cache.ts new file mode 100644 index 00000000..f80bcd6d --- /dev/null +++ b/packages/main/src/modules/cache.ts @@ -0,0 +1,3 @@ +export { getPreview } from './cli'; +export { getWindow } from './window'; +export { getDebugger } from './inspector'; diff --git a/packages/main/src/modules/cli.ts b/packages/main/src/modules/cli.ts index f8f05245..5a24b73d 100644 --- a/packages/main/src/modules/cli.ts +++ b/packages/main/src/modules/cli.ts @@ -5,6 +5,15 @@ import { getAvailablePort } from './port'; import { getProjectId } from './analytics'; import { install } from './npm'; +export type Preview = { child: Child; previewURL: string }; + +const previewCache: Map<string, Preview> = new Map(); +export let deployServer: Child | null = null; + +export function getPreview(path: string) { + return previewCache.get(path); +} + async function getEnv(path: string) { const projectId = await getProjectId(path); return { @@ -13,7 +22,7 @@ async function getEnv(path: string) { }; } -export async function init(path: string, repo?: string) { +export async function init(path: string, repo?: string): Promise<void> { const initCommand = run('@dcl/sdk-commands', 'sdk-commands', { args: ['init', '--yes', '--skip-install', ...(repo ? ['--github-repo', repo] : [])], cwd: path, @@ -29,15 +38,19 @@ export async function killPreview(path: string) { await promise; } -type Preview = { child: Child; previewURL: string }; -export const previewCache: Map<string, Preview> = new Map(); +export async function killAllPreviews() { + for (const path of previewCache.keys()) { + await killPreview(path); + } + previewCache.clear(); // just to be sure... +} -export async function start(path: string, retry = true) { +export async function start(path: string, retry = true): Promise<string> { const preview = previewCache.get(path); // If we have a preview running for this path, open it if (preview?.child.alive() && preview.previewURL) { await dclDeepLink(preview.previewURL); - return; + return path; } killPreview(path); @@ -54,21 +67,22 @@ export async function start(path: string, retry = true) { const resultLogs = await process.waitFor(dclLauncherURL, /CliError/i); const previewURL = resultLogs.match(dclLauncherURL)?.[1] ?? ''; - previewCache.set(path, { child: process, previewURL }); + const preview = { child: process, previewURL }; + previewCache.set(path, preview); + return path; } catch (error) { killPreview(path); if (retry) { log.info('[CLI] Something went wrong trying to start preview:', (error as Error).message); await install(path); - await start(path, false); + return await start(path, false); } else { throw error; } } } -export let deployServer: Child | null = null; -export async function deploy({ path, target, targetContent }: DeployOptions) { +export async function deploy({ path, target, targetContent }: DeployOptions): Promise<number> { if (deployServer) { await deployServer.kill(); } diff --git a/packages/main/src/modules/inspector.ts b/packages/main/src/modules/inspector.ts index 26459690..0b4ce6ab 100644 --- a/packages/main/src/modules/inspector.ts +++ b/packages/main/src/modules/inspector.ts @@ -1,8 +1,20 @@ -import path from 'node:path'; import log from 'electron-log'; +import { type BrowserWindow } from 'electron'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + import { run, type Child } from './bin'; import { getAvailablePort } from './port'; import { APP_UNPACKED_PATH } from './path'; +import { createWindow, focusWindow, getWindow } from './window'; +import * as cache from './cache'; + +const debuggers: Map<string, { window: BrowserWindow; preview: Child; listener: number }> = + new Map(); + +export function getDebugger(path: string) { + return debuggers.get(path); +} export let inspectorServer: Child | null = null; export async function start() { @@ -13,10 +25,96 @@ export async function start() { const port = await getAvailablePort(); inspectorServer = run('http-server', 'http-server', { args: ['--port', port.toString()], - cwd: path.join(APP_UNPACKED_PATH, './node_modules/@dcl/inspector/public'), + cwd: join(APP_UNPACKED_PATH, './node_modules/@dcl/inspector/public'), }); await inspectorServer.waitFor(/available/i, /error/i).catch(error => log.error(error.message)); return port; } + +export async function openSceneDebugger(path: string): Promise<string> { + const alreadyOpen = getWindow(path); + if (alreadyOpen) { + focusWindow(alreadyOpen); + return path; + } + + const window = createWindow(path); + window.setMenuBarVisibility(false); + window.on('ready-to-show', () => window.show()); + + if (import.meta.env.DEV && import.meta.env.VITE_DEV_SERVER_URL !== undefined) { + const url = join(import.meta.env.VITE_DEV_SERVER_URL, `debugger.html?path=${path}`); + await window.loadURL(url); + } else { + await window.loadFile( + fileURLToPath(new URL('./../../renderer/dist/debugger.html', import.meta.url)), + { query: { path } }, + ); + } + + return path; +} + +function assertDebuggerState(path: string) { + const window = cache.getWindow(path); + const preview = cache.getPreview(path); + + if (!window || window.isDestroyed()) { + throw new Error(`Window not found for path: ${path}`); + } + + if (!preview || !preview.child.alive()) { + throw new Error(`Preview not found for path: ${path}`); + } +} + +function isDebuggerAttached(path: string, window: BrowserWindow, preview: Child): boolean { + const _debugger = debuggers.get(path) ?? false; + return _debugger && _debugger.window === window && _debugger.preview === preview; +} + +export async function attachSceneDebugger(path: string, eventName: string): Promise<boolean> { + assertDebuggerState(path); + + const window = cache.getWindow(path)!; + const { child: preview } = cache.getPreview(path)!; + + focusWindow(window); + + if (isDebuggerAttached(path, window, preview)) { + return false; + } + + // Send all the current logs to the debugger window + const stdall = preview.stdall({ sanitize: false }); + if (stdall.length > 0) { + window.webContents.send(eventName, stdall); + } + // Attach the event listener to preview output to send future logs to debugger window + const listener = preview.on( + /(.*)/i, + (data?: string) => { + if (data) window.webContents.send(eventName, data); + }, + { sanitize: false }, + ); + + debuggers.set(path, { window, preview, listener }); + + const cleanup = () => debuggers.delete(path); + + window.on('closed', () => { + // Remove the event listener from the preview when the debugger window is closed + preview.off(listener); + cleanup(); + }); + preview.process.on('exit', () => { + // Destoy debugger window when the preview process exits + window.destroy(); + cleanup(); + }); + + return true; +} diff --git a/packages/main/src/modules/ipc.ts b/packages/main/src/modules/ipc.ts index fe903765..b3cb982a 100644 --- a/packages/main/src/modules/ipc.ts +++ b/packages/main/src/modules/ipc.ts @@ -19,6 +19,10 @@ export function initIpc() { // inspector handle('inspector.start', () => inspector.start()); + handle('inspector.openSceneDebugger', (_event, path) => inspector.openSceneDebugger(path)); + handle('inspector.attachSceneDebugger', (_event, path, eventName) => + inspector.attachSceneDebugger(path, eventName), + ); // cli handle('cli.init', (_event, path, repo) => cli.init(path, repo)); diff --git a/packages/main/src/modules/npm.ts b/packages/main/src/modules/npm.ts index 3a4f9949..d9af385e 100644 --- a/packages/main/src/modules/npm.ts +++ b/packages/main/src/modules/npm.ts @@ -29,7 +29,9 @@ export async function getOutdatedDeps(_path: string, packages: string[] = []): P await npmOutdated.wait(); return {}; } catch (e) { - if (e instanceof StreamError) return parseOutdated(e.stdout); + if (e instanceof StreamError) { + return parseOutdated(e.stdout); + } return {}; } } diff --git a/packages/main/src/modules/window.ts b/packages/main/src/modules/window.ts new file mode 100644 index 00000000..b14a7939 --- /dev/null +++ b/packages/main/src/modules/window.ts @@ -0,0 +1,40 @@ +import { app, BrowserWindow, type BrowserWindowConstructorOptions } from 'electron'; +import { join } from 'node:path'; + +const activeWindows = new Map<string, BrowserWindow>(); + +export function createWindow(path: string, options?: BrowserWindowConstructorOptions) { + const window = new BrowserWindow({ + show: false, // Use the 'ready-to-show' event to show the instantiated BrowserWindow. + webPreferences: { + nodeIntegration: false, + contextIsolation: true, + sandbox: false, // Sandbox disabled because the demo of preload script depend on the Node.js api + webviewTag: false, // The webview tag is not recommended. Consider alternatives like an iframe or Electron's BrowserView. @see https://www.electronjs.org/docs/latest/api/webview-tag#warning + preload: join(app.getAppPath(), 'packages/preload/dist/index.mjs'), + ...options, + }, + }); + + // Setup active windows map. We don't want to use window.id because we want to identify the window by the path WE give it + activeWindows.set(path, window); + window.on('closed', () => activeWindows.delete(path)); + + return window; +} + +export function getWindow(path: string): BrowserWindow | undefined { + return activeWindows.get(path); +} + +export function focusWindow(window: BrowserWindow): void { + if (window) { + if (window.isMinimized()) window.restore(); + window.focus(); + } +} + +export function destroyAllWindows(): void { + activeWindows.forEach(window => window.destroy()); + activeWindows.clear(); +} diff --git a/packages/main/src/security-restrictions.ts b/packages/main/src/security-restrictions.ts index 5b646ddc..62fe9c89 100644 --- a/packages/main/src/security-restrictions.ts +++ b/packages/main/src/security-restrictions.ts @@ -41,6 +41,7 @@ const ALLOWED_EXTERNAL_ORIGINS = new Set<AllowedOrigins<typeof IS_DEV>>([ 'https://decentraland.today', 'https://decentraland.zone', 'https://studios.decentraland.org', + 'https://docs.decentraland.org', ...(import.meta.env.VITE_ALLOWED_EXTERNAL_ORIGINS ?? '').split(',').filter(Boolean), ] as AllowedOrigins<typeof IS_DEV>[]); diff --git a/packages/main/tests/unit.spec.ts b/packages/main/tests/unit.spec.ts index 9c694d63..267c064a 100644 --- a/packages/main/tests/unit.spec.ts +++ b/packages/main/tests/unit.spec.ts @@ -1,9 +1,10 @@ import type { MockedClass, MockedObject } from 'vitest'; import { beforeEach, expect, test, vi } from 'vitest'; -import { restoreOrCreateWindow } from '../src/mainWindow'; - import { BrowserWindow } from 'electron'; +import { restoreOrCreateMainWindow } from '../src/mainWindow'; +import { destroyAllWindows } from '../src/modules/window'; + /** * Mock real electron BrowserWindow API */ @@ -35,13 +36,14 @@ vi.mock('electron', () => { beforeEach(() => { vi.clearAllMocks(); + destroyAllWindows(); }); -test('Should create a new window', async () => { +test('Should create the main window', async () => { const { mock } = vi.mocked(BrowserWindow); expect(mock.instances).toHaveLength(0); - await restoreOrCreateWindow(); + await restoreOrCreateMainWindow(); expect(mock.instances).toHaveLength(1); const instance = mock.instances[0] as MockedObject<BrowserWindow>; const loadURLCalls = instance.loadURL.mock.calls.length; @@ -58,12 +60,12 @@ test('Should restore an existing window', async () => { const { mock } = vi.mocked(BrowserWindow); // Create a window and minimize it. - await restoreOrCreateWindow(); + await restoreOrCreateMainWindow(); expect(mock.instances).toHaveLength(1); const appWindow = vi.mocked(mock.instances[0]); appWindow.isMinimized.mockReturnValueOnce(true); - await restoreOrCreateWindow(); + await restoreOrCreateMainWindow(); expect(mock.instances).toHaveLength(1); expect(appWindow.restore).toHaveBeenCalledOnce(); }); @@ -72,11 +74,13 @@ test('Should create a new window if the previous one was destroyed', async () => const { mock } = vi.mocked(BrowserWindow); // Create a window and destroy it. - await restoreOrCreateWindow(); + await restoreOrCreateMainWindow(); expect(mock.instances).toHaveLength(1); const appWindow = vi.mocked(mock.instances[0]); appWindow.isDestroyed.mockReturnValueOnce(true); - await restoreOrCreateWindow(); + destroyAllWindows(); + + await restoreOrCreateMainWindow(); expect(mock.instances).toHaveLength(2); }); diff --git a/packages/preload/src/modules/editor.ts b/packages/preload/src/modules/editor.ts index 859fad5e..28c61ddc 100644 --- a/packages/preload/src/modules/editor.ts +++ b/packages/preload/src/modules/editor.ts @@ -1,3 +1,5 @@ +import { ipcRenderer, type IpcRendererEvent } from 'electron'; + import type { DeployOptions } from '/shared/types/ipc'; import { invoke } from './invoke'; @@ -10,11 +12,39 @@ export async function install() { return invoke('bin.install'); } +export async function openCode(_path: string) { + return invoke('bin.code', _path); +} + export async function startInspector() { const port = await invoke('inspector.start'); return port; } +export async function openSceneDebugger(path: string) { + return invoke('inspector.openSceneDebugger', path); +} + +export async function attachSceneDebugger( + path: string, + cb: (data: string) => void, +): Promise<{ cleanup: () => void }> { + // TODO: what happens when there is no window or preview? + const eventName = `debugger://${path}`; + + const attached = await invoke('inspector.attachSceneDebugger', path, eventName); + if (!attached) return { cleanup: () => {} }; + + const handler = (_: IpcRendererEvent, data: string) => cb(data); + ipcRenderer.on(eventName, handler); + + return { + cleanup: () => { + ipcRenderer.off(eventName, handler); + }, + }; +} + export async function runScene(path: string) { const port = await invoke('cli.start', path); return port; @@ -35,10 +65,6 @@ export async function openPreview(port: number) { await invoke('electron.openExternal', url); } -export async function openCode(_path: string) { - return invoke('bin.code', _path); -} - export async function openTutorial(opts: { id: string; list?: string }) { const { id, list } = opts; const url = `https://youtu.be/${id}${list ? `?list=${list}` : ''}`.trim(); diff --git a/packages/renderer/debugger.html b/packages/renderer/debugger.html new file mode 100644 index 00000000..7354dacd --- /dev/null +++ b/packages/renderer/debugger.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta + content="script-src 'self' blob:" + http-equiv="Content-Security-Policy" + /> + <meta + content="width=device-width, initial-scale=1.0" + name="viewport" + /> + <title>Decentraland Debugger</title> + </head> + <body> + <div id="debugger"></div> + <script src="./src/debugger.tsx" type="module"></script> + </body> +</html> diff --git a/packages/renderer/index.html b/packages/renderer/index.html index 55d4c556..2ccf4ab4 100644 --- a/packages/renderer/index.html +++ b/packages/renderer/index.html @@ -14,9 +14,6 @@ </head> <body> <div id="app"></div> - <script - src="./src/index.tsx" - type="module" - ></script> + <script src="./src/index.tsx" type="module"></script> </body> </html> diff --git a/packages/renderer/src/components/Button/component.tsx b/packages/renderer/src/components/Button/component.tsx index 363c5216..fa6b338c 100644 --- a/packages/renderer/src/components/Button/component.tsx +++ b/packages/renderer/src/components/Button/component.tsx @@ -1,18 +1,63 @@ +import { useCallback, useState } from 'react'; import cx from 'classnames'; -import { Button } from 'decentraland-ui2'; +import { Button as DclButton, ButtonGroup as DclButtonGroup } from 'decentraland-ui2'; +import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; -import type { Props } from './types'; +import { Popper } from '../Popper'; + +import type { ButtonProps, GroupProps } from './types'; import './styles.css'; -export function ButtonComponent({ children, className = '', onClick, ...props }: Props) { +export function Button({ children, className = '', onClick, ...props }: ButtonProps) { return ( - <Button + <DclButton {...props} className={cx('Button', className)} onClick={onClick} > {children} - </Button> + </DclButton> + ); +} + +export function ButtonGroup({ extra, ...props }: GroupProps) { + const [open, setOpen] = useState(false); + const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null); + const handleToggle = useCallback((e: React.MouseEvent<HTMLElement>) => { + setAnchorEl(e.currentTarget); + setOpen(prev => !prev); + }, []); + + const handleClose = useCallback(() => { + setOpen(false); + setAnchorEl(null); + }, []); + + return ( + <> + <DclButtonGroup variant="contained"> + <Button {...props} /> + <Button + className="extra-button" + color={props.color} + size="small" + onClick={handleToggle} + > + <ArrowDropDownIcon /> + </Button> + {open && ( + <Popper + open={open} + onClose={handleClose} + className="PreviewOptions" + anchorEl={anchorEl} + placement="bottom-end" + > + {extra} + </Popper> + )} + </DclButtonGroup> + </> ); } diff --git a/packages/renderer/src/components/Button/index.ts b/packages/renderer/src/components/Button/index.ts index 132ed3fa..6b3bd656 100644 --- a/packages/renderer/src/components/Button/index.ts +++ b/packages/renderer/src/components/Button/index.ts @@ -1,2 +1,2 @@ -import { ButtonComponent } from './component'; -export { ButtonComponent as Button }; +import { Button, ButtonGroup } from './component'; +export { Button, ButtonGroup }; diff --git a/packages/renderer/src/components/Button/styles.css b/packages/renderer/src/components/Button/styles.css index 5d944558..4a780725 100644 --- a/packages/renderer/src/components/Button/styles.css +++ b/packages/renderer/src/components/Button/styles.css @@ -5,7 +5,9 @@ font-weight: 400; } -.Button.MuiButton-root + .Button.MuiButton-root { +.Button.MuiButton-root + .Button.MuiButton-root, +.Button.MuiButton-root + .MuiButtonGroup-root, +.MuiButtonGroup-root + .Button.MuiButton-root { margin-left: 10px; } @@ -16,25 +18,31 @@ } /* Color primary */ -.Button.MuiButton-colorPrimary { - background-color: var(--dcl); +.Button.MuiButton-colorPrimary, +.Button.MuiButton-colorPrimary.MuiButtonGroup-grouped { + background-color: var(--dcl) !important; } -.Button.MuiButton-colorPrimary:hover { - background-color: var(--dcl-dark); +.Button.MuiButton-colorPrimary:hover, +.Button.MuiButton-colorPrimary.MuiButtonGroup-grouped:hover { + background-color: var(--dcl-dark) !important; } /* Color secondary */ -.Button.MuiButton-colorSecondary { - background-color: var(--dark-gray); +.Button.MuiButton-colorSecondary, +.Button.MuiButton-colorSecondary.MuiButtonGroup-grouped { + background-color: var(--dark-gray) !important; + border-color: var(--light-gray); } -.Button.MuiButton-colorSecondary:hover { - background-color: var(--darker-gray); +.Button.MuiButton-colorSecondary:hover, +.Button.MuiButton-colorSecondary.MuiButtonGroup-grouped:hover { + background-color: var(--darker-gray) !important; } /* Color info */ -.Button.MuiButton-colorInfo { +.Button.MuiButton-colorInfo, +.Button.MuiButton-colorInfo.MuiButtonGroup-grouped { color: var(--white); background-color: initial; border: 1px solid var(--white); @@ -42,10 +50,25 @@ padding: 2px 10px; } -.Button.MuiButton-colorInfo:hover { +.Button.MuiButton-colorInfo:hover, +.Button.MuiButton-colorInfo.MuiButtonGroup-grouped:hover { background-color: var(--light-gray); } -.Button.MuiButton-outlined { +.Button.MuiButton-outlined, +.Button.MuiButton-outlined.MuiButtonGroup-grouped { background-color: transparent; } + +/* ButtonGroup */ +.Button.MuiButton-root.MuiButtonGroup-grouped:not(.extra-button) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.Button.extra-button { + border-top-left-radius: 0 !important; + border-bottom-left-radius: 0 !important; + margin-left: 0 !important; + border-right: none !important; +} diff --git a/packages/renderer/src/components/Button/types.ts b/packages/renderer/src/components/Button/types.ts index 6895b957..868819ce 100644 --- a/packages/renderer/src/components/Button/types.ts +++ b/packages/renderer/src/components/Button/types.ts @@ -1,6 +1,10 @@ import type { ButtonOwnProps } from 'decentraland-ui2'; -export type Props = ButtonOwnProps & { +export type ButtonProps = ButtonOwnProps & { className?: string; onClick?: React.MouseEventHandler<HTMLButtonElement>; }; + +export type GroupProps = ButtonProps & { + extra: React.ReactNode; +}; diff --git a/packages/renderer/src/components/EditorPage/component.tsx b/packages/renderer/src/components/EditorPage/component.tsx index 83872d16..9a2c8f3c 100644 --- a/packages/renderer/src/components/EditorPage/component.tsx +++ b/packages/renderer/src/components/EditorPage/component.tsx @@ -1,6 +1,11 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import { CircularProgress as Loader } from 'decentraland-ui2'; +import { + Checkbox, + FormControlLabel, + FormGroup, + CircularProgress as Loader, +} from 'decentraland-ui2'; import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'; import PlayCircleIcon from '@mui/icons-material/PlayCircle'; import CodeIcon from '@mui/icons-material/Code'; @@ -13,6 +18,7 @@ import { isWorkspaceError } from '/shared/types/workspace'; import { t } from '/@/modules/store/translation/utils'; import { initRpc } from '/@/modules/rpc'; import { useEditor } from '/@/hooks/useEditor'; +import { useSettings } from '/@/hooks/useSettings'; import EditorPng from '/assets/images/editor.png'; @@ -20,6 +26,9 @@ import { PublishProject } from '../Modals/PublishProject'; import { Button } from '../Button'; import { Header } from '../Header'; import { Row } from '../Row'; +import { ButtonGroup } from '../Button'; + +import type { PreviewOptionsProps } from './types'; import './styles.css'; @@ -41,9 +50,10 @@ export function EditorPage() { isInstallingProject, killPreview, } = useEditor(); + const { settings, updateAppSettings } = useSettings(); const userId = useSelector(state => state.analytics.userId); const iframeRef = useRef<ReturnType<typeof initRpc>>(); - const [open, setOpen] = useState<ModalType | undefined>(); + const [modalOpen, setModalOpen] = useState<ModalType | undefined>(); const handleIframeRef = useCallback( (e: React.SyntheticEvent<HTMLIFrameElement, Event>) => { @@ -80,16 +90,27 @@ export function EditorPage() { const rpc = iframeRef.current; if (rpc) { saveAndGetThumbnail(rpc); - setOpen(type); + setModalOpen(type); } }, [iframeRef.current], ); const handleCloseModal = useCallback(() => { - setOpen(undefined); + setModalOpen(undefined); }, []); + const handleChangePreviewOptions = useCallback( + (options: PreviewOptionsProps['options']) => { + updateAppSettings({ ...settings, previewOptions: options }); + }, + [settings, updateAppSettings], + ); + + const handleOpenPreview = useCallback(() => { + openPreview(settings.previewOptions); + }, [openPreview, settings.previewOptions]); + // inspector url const htmlUrl = `http://localhost:${import.meta.env.VITE_INSPECTOR_PORT || inspectorPort}`; let binIndexJsUrl = `${htmlUrl}/bin/index.js`; @@ -143,7 +164,7 @@ export function EditorPage() { ); return ( - <div className="Editor"> + <main className="Editor"> {!isReady ? ( renderLoading() ) : ( @@ -166,14 +187,20 @@ export function EditorPage() { > {t('editor.header.actions.code')} </Button> - <Button + <ButtonGroup color="secondary" disabled={loadingPreview || isInstallingProject} - onClick={openPreview} + onClick={handleOpenPreview} startIcon={loadingPreview ? <Loader size={20} /> : <PlayCircleIcon />} + extra={ + <PreviewOptions + options={settings.previewOptions} + onChange={handleChangePreviewOptions} + /> + } > {t('editor.header.actions.preview')} - </Button> + </ButtonGroup> <Button color="primary" disabled={loadingPublish || isInstallingProject} @@ -191,13 +218,39 @@ export function EditorPage() { ></iframe> {project && ( <PublishProject - open={open === 'publish'} + open={modalOpen === 'publish'} project={project} onClose={handleCloseModal} /> )} </> )} + </main> + ); +} + +function PreviewOptions({ onChange, options }: PreviewOptionsProps) { + const handleChange = useCallback( + (newOptions: Partial<PreviewOptionsProps['options']>) => () => { + onChange({ ...options, ...newOptions }); + }, + [onChange, options], + ); + + return ( + <div className="PreviewOptions"> + <span className="title">Preview options</span> + <FormGroup> + <FormControlLabel + control={ + <Checkbox + checked={!!options.debugger} + onChange={handleChange({ debugger: !options.debugger })} + /> + } + label="Open Console Window during preview" + /> + </FormGroup> </div> ); } diff --git a/packages/renderer/src/components/EditorPage/styles.css b/packages/renderer/src/components/EditorPage/styles.css index 9e021994..2767b6ee 100644 --- a/packages/renderer/src/components/EditorPage/styles.css +++ b/packages/renderer/src/components/EditorPage/styles.css @@ -33,6 +33,12 @@ margin-left: 20px; } +.Editor .Header .actions { + display: flex; + align-items: center; + justify-content: center; +} + .Editor .inspector { flex: 1 0 auto; border: none; @@ -56,3 +62,16 @@ .Editor .loading span { margin-right: 15px; } + +.PreviewOptions { + width: 300px; + display: flex; + flex-direction: column; +} + +.PreviewOptions .title { + font-size: 12px; + color: var(--clear-divider); + margin: 0 0 10px 0; + text-transform: uppercase; +} diff --git a/packages/renderer/src/components/EditorPage/types.ts b/packages/renderer/src/components/EditorPage/types.ts new file mode 100644 index 00000000..4d65a5bc --- /dev/null +++ b/packages/renderer/src/components/EditorPage/types.ts @@ -0,0 +1,6 @@ +import type { PreviewOptions } from '/shared/types/settings'; + +export type PreviewOptionsProps = { + options: PreviewOptions; + onChange: (options: PreviewOptions) => void; +}; diff --git a/packages/renderer/src/components/Modals/PublishProject/steps/PublishToWorld/component.tsx b/packages/renderer/src/components/Modals/PublishProject/steps/PublishToWorld/component.tsx index 29ad2678..aa22095a 100644 --- a/packages/renderer/src/components/Modals/PublishProject/steps/PublishToWorld/component.tsx +++ b/packages/renderer/src/components/Modals/PublishProject/steps/PublishToWorld/component.tsx @@ -8,6 +8,7 @@ import { Select, Typography, type SelectChangeEvent, + FormControlLabel, } from 'decentraland-ui2'; import WarningIcon from '@mui/icons-material/Warning'; import AddIcon from '@mui/icons-material/Add'; @@ -221,11 +222,15 @@ function SelectWorld({ project, onPublish }: { project: Project; onPublish: () = <div className="actions"> {hasWorldContent && ( <div className="ConfirmWorldReplaceContent"> - <Checkbox - checked={confirmWorldReplaceContent} - onChange={handleConfirmWorldReplaceContent} + <FormControlLabel + control={ + <Checkbox + checked={confirmWorldReplaceContent} + onChange={handleConfirmWorldReplaceContent} + /> + } + label={t('modal.publish_project.worlds.select_world.confirm_world_replace_content')} /> - {t('modal.publish_project.worlds.select_world.confirm_world_replace_content')} </div> )} <Button diff --git a/packages/renderer/src/components/Navbar/styles.css b/packages/renderer/src/components/Navbar/styles.css index b7036fd5..0624b26e 100644 --- a/packages/renderer/src/components/Navbar/styles.css +++ b/packages/renderer/src/components/Navbar/styles.css @@ -1,6 +1,6 @@ .Navbar { - margin: 32px 0px 64px 0px; - padding: 0px 32px; + margin-bottom: 64px; + padding: 32px 32px 0 32px; } .Navbar .menu { diff --git a/packages/renderer/src/components/Popper/component.tsx b/packages/renderer/src/components/Popper/component.tsx new file mode 100644 index 00000000..cba20248 --- /dev/null +++ b/packages/renderer/src/components/Popper/component.tsx @@ -0,0 +1,21 @@ +import { type PropsWithChildren } from 'react'; +import { Popper as DclPopper, ClickAwayListener } from 'decentraland-ui2'; +import cx from 'classnames'; + +import type { Props } from './types'; + +import './styles.css'; + +export function Popper({ open, onClose, children, className, ...props }: PropsWithChildren<Props>) { + return ( + <ClickAwayListener onClickAway={onClose}> + <DclPopper + open={open} + className={cx('Popper', className)} + {...props} + > + {children} + </DclPopper> + </ClickAwayListener> + ); +} diff --git a/packages/renderer/src/components/Popper/index.ts b/packages/renderer/src/components/Popper/index.ts new file mode 100644 index 00000000..110e4629 --- /dev/null +++ b/packages/renderer/src/components/Popper/index.ts @@ -0,0 +1,2 @@ +import { Popper } from './component'; +export { Popper }; diff --git a/packages/renderer/src/components/Popper/styles.css b/packages/renderer/src/components/Popper/styles.css new file mode 100644 index 00000000..2b30a9df --- /dev/null +++ b/packages/renderer/src/components/Popper/styles.css @@ -0,0 +1,5 @@ +.Popper { + padding: 20px; + background-color: var(--secondary); + border-radius: 4px; +} diff --git a/packages/renderer/src/components/Popper/types.ts b/packages/renderer/src/components/Popper/types.ts new file mode 100644 index 00000000..80f85628 --- /dev/null +++ b/packages/renderer/src/components/Popper/types.ts @@ -0,0 +1,5 @@ +import type { PopperProps } from '@mui/material/Popper'; + +export type Props = PopperProps & { + onClose: () => void; +}; diff --git a/packages/renderer/src/components/SceneList/styles.css b/packages/renderer/src/components/SceneList/styles.css index d99300ad..64576f9b 100644 --- a/packages/renderer/src/components/SceneList/styles.css +++ b/packages/renderer/src/components/SceneList/styles.css @@ -22,9 +22,14 @@ border: 1px solid white; } + .SceneList .projects-menu .actions .action-button.MuiButton-textSecondary, + .SceneList .projects-menu .actions .action-button.MuiButton-textSecondary:hover { + background-color: transparent !important; + } + .SceneList .projects-menu .actions .action-button.MuiButton-textPrimary, .SceneList .projects-menu .actions .action-button.MuiButton-textPrimary:hover { - background-color: white; + background-color: white !important; color: black !important; } diff --git a/packages/renderer/src/debugger.tsx b/packages/renderer/src/debugger.tsx new file mode 100644 index 00000000..c18f8c88 --- /dev/null +++ b/packages/renderer/src/debugger.tsx @@ -0,0 +1,98 @@ +import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { createRoot } from 'react-dom/client'; +import Convert from 'ansi-to-html'; + +import { editor } from '#preload'; +import { createCircularBuffer } from '/shared/circular-buffer'; + +import '/@/themes'; + +const container = document.getElementById('debugger')!; +const root = createRoot(container); + +function getDebuggerPath() { + const url = new URL(window.location.href); + return url.searchParams.get('path'); +} + +const MAX_LOGS = 1000; +const convert = new Convert(); +const logsBuffer = createCircularBuffer<string>(MAX_LOGS); + +function Debugger() { + const debuggerPath = getDebuggerPath(); + const logsRef = useRef<HTMLDivElement>(null); + const [attachStatus, setAttachStatus] = useState<'loading' | 'attached' | 'failed'>('loading'); + const [, forceUpdate] = useState(0); + + const log = useCallback((messages: string[] | string) => { + messages = Array.isArray(messages) ? messages : [messages]; + + if (messages.length === 0) return; + + for (const message of messages) { + logsBuffer.push(message); + } + forceUpdate(prev => prev + 1); + + // Auto-scroll to the bottom + requestAnimationFrame(() => { + if (logsRef.current) { + logsRef.current.scrollTop = logsRef.current.scrollHeight; + } + }); + }, []); + + useEffect(() => { + if (!debuggerPath) return; + + let dettachFromSceneDebugger: (() => void) | undefined; + editor + .attachSceneDebugger(debuggerPath, log) + .then(({ cleanup }) => { + dettachFromSceneDebugger = cleanup; + setAttachStatus('attached'); + }) + .catch(() => { + setAttachStatus('failed'); + }); + + return () => { + dettachFromSceneDebugger?.(); + }; + }, []); + + const logs = logsBuffer.getAll(); + + return ( + <main className="Debugger"> + {!debuggerPath ? ( + 'No path provided' + ) : attachStatus === 'loading' ? ( + 'Loading' + ) : attachStatus === 'failed' ? ( + 'Failed to attach. Please close this window and launch debugger again' + ) : ( + <> + <div + className="logs" + ref={logsRef} + > + {logs.map(($, i) => ( + <span + key={i} + dangerouslySetInnerHTML={{ __html: convert.toHtml($) }} + /> + ))} + </div> + </> + )} + </main> + ); +} + +root.render( + <React.StrictMode> + <Debugger /> + </React.StrictMode>, +); diff --git a/packages/renderer/src/hooks/useEditor.ts b/packages/renderer/src/hooks/useEditor.ts index c8876ce9..efbd8cb5 100644 --- a/packages/renderer/src/hooks/useEditor.ts +++ b/packages/renderer/src/hooks/useEditor.ts @@ -4,6 +4,7 @@ import { editor as editorApi } from '#preload'; import { useDispatch, useSelector } from '#store'; import type { DeployOptions } from '/shared/types/ipc'; +import type { PreviewOptions } from '/shared/types/settings'; import { actions as editorActions } from '/@/modules/store/editor'; import { actions as workspaceActions } from '/@/modules/store/workspace'; @@ -32,11 +33,14 @@ export const useEditor = () => { [project, editorActions.publishScene], ); - const openPreview = useCallback(() => { - if (project) { - dispatch(editorActions.runScene(project.path)); - } - }, [project, editorActions.runScene]); + const openPreview = useCallback( + (opts: PreviewOptions) => { + if (project) { + dispatch(editorActions.runScene({ path: project.path, ...opts })); + } + }, + [project, editorActions.runScene], + ); const killPreview = useCallback(() => { if (project) { diff --git a/packages/renderer/src/index.tsx b/packages/renderer/src/index.tsx index 441ba461..297833cd 100644 --- a/packages/renderer/src/index.tsx +++ b/packages/renderer/src/index.tsx @@ -1,27 +1,28 @@ import React from 'react'; import { createRoot } from 'react-dom/client'; import { Provider as StoreProvider } from 'react-redux'; -import { MemoryRouter as Router, Routes, Route } from 'react-router-dom'; import { dark, ThemeProvider } from 'decentraland-ui2/dist/theme'; import { store } from '#store'; import { TranslationProvider } from '/@/components/TranslationProvider'; -import { AuthProvider } from '/@/components/AuthProvider'; -import { HomePage } from './components/HomePage'; -import { ScenesPage } from './components/ScenesPage'; -import { EditorPage } from './components/EditorPage'; -import { CollectionsPage } from './components/CollectionsPage'; -import { ManagePage } from './components/ManagePage'; -import { LearnPage } from './components/LearnPage'; -import { SignInPage } from './components/SignInPage'; -import { TemplatesPage } from './components/TemplatesPage'; -import { MorePage } from './components/MorePage'; -import { VideosPage } from './components/VideosPage'; -import { DocsPage } from './components/DocsPage'; +import { MemoryRouter as Router, Routes, Route } from 'react-router-dom'; + +import { AuthProvider } from '/@/components/AuthProvider'; -import { Snackbar } from './components/Snackbar'; -import { Install } from './components/Install'; +import { HomePage } from '/@/components/HomePage'; +import { ScenesPage } from '/@/components/ScenesPage'; +import { EditorPage } from '/@/components/EditorPage'; +import { CollectionsPage } from '/@/components/CollectionsPage'; +import { ManagePage } from '/@/components/ManagePage'; +import { LearnPage } from '/@/components/LearnPage'; +import { SignInPage } from '/@/components/SignInPage'; +import { TemplatesPage } from '/@/components/TemplatesPage'; +import { MorePage } from '/@/components/MorePage'; +import { VideosPage } from '/@/components/VideosPage'; +import { DocsPage } from '/@/components/DocsPage'; +import { Install } from '/@/components/Install'; +import { Snackbar } from '/@/components/Snackbar'; import '/@/themes'; @@ -33,61 +34,63 @@ root.render( <StoreProvider store={store}> <TranslationProvider> <ThemeProvider theme={dark}> - <Router> - <AuthProvider> - <Routes> - <Route - path="/" - element={<Install />} - /> - <Route - path="/home" - element={<HomePage />} - /> - <Route - path="/scenes" - element={<ScenesPage />} - /> - <Route - path="/templates" - element={<TemplatesPage />} - /> - <Route - path="/collections" - element={<CollectionsPage />} - /> - <Route - path="/manage" - element={<ManagePage />} - /> - <Route - path="/learn" - element={<LearnPage />} - /> - <Route - path="/learn/videos" - element={<VideosPage />} - /> - <Route - path="/learn/docs" - element={<DocsPage />} - /> - <Route - path="/more" - element={<MorePage />} - /> - <Route - path="/editor" - element={<EditorPage />} - /> - <Route - path="/sign-in" - element={<SignInPage />} - /> - </Routes> - <Snackbar /> - </AuthProvider> - </Router> + <main className="Main"> + <Router> + <AuthProvider> + <Routes> + <Route + path="/" + element={<Install />} + /> + <Route + path="/home" + element={<HomePage />} + /> + <Route + path="/scenes" + element={<ScenesPage />} + /> + <Route + path="/templates" + element={<TemplatesPage />} + /> + <Route + path="/collections" + element={<CollectionsPage />} + /> + <Route + path="/manage" + element={<ManagePage />} + /> + <Route + path="/learn" + element={<LearnPage />} + /> + <Route + path="/learn/videos" + element={<VideosPage />} + /> + <Route + path="/learn/docs" + element={<DocsPage />} + /> + <Route + path="/more" + element={<MorePage />} + /> + <Route + path="/editor" + element={<EditorPage />} + /> + <Route + path="/sign-in" + element={<SignInPage />} + /> + </Routes> + <Snackbar /> + </AuthProvider> + </Router> + </main> </ThemeProvider> </TranslationProvider> </StoreProvider> diff --git a/packages/renderer/src/modules/store/editor/slice.ts b/packages/renderer/src/modules/store/editor/slice.ts index f00b6e1b..ca07477e 100644 --- a/packages/renderer/src/modules/store/editor/slice.ts +++ b/packages/renderer/src/modules/store/editor/slice.ts @@ -4,6 +4,7 @@ import { editor } from '#preload'; import { createAsyncThunk } from '/@/modules/store/thunk'; import { type Project } from '/shared/types/projects'; +import type { PreviewOptions } from '/shared/types/settings'; import { WorkspaceError } from '/shared/types/workspace'; import { actions as workspaceActions } from '../workspace'; @@ -12,7 +13,15 @@ import { actions as workspaceActions } from '../workspace'; export const fetchVersion = createAsyncThunk('editor/fetchVersion', editor.getVersion); export const install = createAsyncThunk('editor/install', editor.install); export const startInspector = createAsyncThunk('editor/startInspector', editor.startInspector); -export const runScene = createAsyncThunk('editor/runScene', editor.runScene); +export const runScene = createAsyncThunk( + 'editor/runScene', + async ({ path, debugger: openDebugger }: PreviewOptions & { path: string }) => { + const id = await editor.runScene(path); + if (openDebugger) { + await editor.openSceneDebugger(id); + } + }, +); export const publishScene = createAsyncThunk('editor/publishScene', editor.publishScene); export const killPreviewScene = createAsyncThunk( 'editor/killPreviewScene', @@ -54,8 +63,6 @@ const initialState: EditorState = { error: null, }; -// selectors - // slice export const slice = createSlice({ name: 'editor', diff --git a/packages/renderer/src/modules/store/workspace/slice.ts b/packages/renderer/src/modules/store/workspace/slice.ts index d526d0c9..0b7076cf 100644 --- a/packages/renderer/src/modules/store/workspace/slice.ts +++ b/packages/renderer/src/modules/store/workspace/slice.ts @@ -16,6 +16,9 @@ const initialState: Async<Workspace> = { settings: { scenesPath: '', dependencyUpdateStrategy: DEFAULT_DEPENDENCY_UPDATE_STRATEGY, + previewOptions: { + debugger: false, + }, }, status: 'idle', error: null, diff --git a/packages/renderer/src/themes/theme.css b/packages/renderer/src/themes/theme.css index 96674bc3..3c15f5d2 100644 --- a/packages/renderer/src/themes/theme.css +++ b/packages/renderer/src/themes/theme.css @@ -60,22 +60,17 @@ /* TODO: Fix styles in the ui2 library */ --mui-shape-borderRadius: 6px; /* --mui-palette-primary-main: #ff2d55; */ - --mui-palette-action-disabled: #f8919d; + --mui-palette-action-disabled: #231113; --mui-palette-secondary-contrast: #ffffff; } html { - background: url(../../assets/images/background.png) #242129ff; - background-position: center; - background-size: cover; - background-blend-mode: overlay; color: var(--white); font-family: var(--font-family); height: 100%; - background-attachment: fixed; } -body { +body, #app, #debugger { padding: 0px; margin: 0px; height: 100%; @@ -88,6 +83,35 @@ body { left: 0px; } +.Main { + background: url(../../assets/images/background.png) #242129ff; + background-position: center; + background-size: cover; + background-blend-mode: overlay; + background-attachment: fixed; + min-height: 100vh; +} + +.Debugger { + background-color: black !important; + color: var(--white); + font-family: var(--font-family); + display: flex; + flex-direction: column; + height: 100%; + overflow: hidden; + box-sizing: border-box; +} + +.Debugger .logs { + display: flex; + flex-direction: column; + line-height: 30px; + overflow-y: auto; + flex: 1; + padding: 10px; +} + a { color: var(--white); } diff --git a/packages/renderer/vite.config.js b/packages/renderer/vite.config.js index 2028b7bf..2cdd52d5 100644 --- a/packages/renderer/vite.config.js +++ b/packages/renderer/vite.config.js @@ -36,7 +36,7 @@ const config = { outDir: 'dist', assetsDir: '.', rollupOptions: { - input: join(PACKAGE_ROOT, 'index.html'), + input: [join(PACKAGE_ROOT, 'index.html'), join(PACKAGE_ROOT, 'debugger.html')], }, emptyOutDir: true, reportCompressedSize: false, diff --git a/packages/shared/circular-buffer.ts b/packages/shared/circular-buffer.ts new file mode 100644 index 00000000..f3bea52b --- /dev/null +++ b/packages/shared/circular-buffer.ts @@ -0,0 +1,84 @@ +export interface CircularBufferType<T> { + push: (data: T) => void; + getAll: () => T[]; + getAllIterator: () => Generator<T>; + clear: () => void; + getLast: () => T | undefined; + getSize: () => number; + getAt: (index: number) => T | undefined; + getFirst: () => T | undefined; +} + +export function createCircularBuffer<T>(maxSize: number): CircularBufferType<T> { + const buffer: T[] = new Array(maxSize); + let start = 0; + let end = 0; + let size = 0; + + function push(data: T): void { + buffer[end] = data; + end = (end + 1) % maxSize; + + if (size < maxSize) { + size += 1; + } else { + start = (start + 1) % maxSize; // Overwrite the oldest data + } + } + + function getSize(): number { + return size; + } + + function getAll(): T[] { + const result: T[] = []; + for (let i = 0; i < size; i++) { + result.push(buffer[(start + i) % maxSize]); + } + return result; + } + + function* getAllIterator(): Generator<T> { + for (let i = 0; i < size; i++) { + yield buffer[(start + i) % maxSize]; + } + } + + function getAt(index: number): T | undefined { + if (index < 0 || index >= size) { + return undefined; + } + return buffer[(start + index) % maxSize]; + } + + function getLast(): T | undefined { + if (size === 0) { + return undefined; + } + return getAt(size - 1); + } + + function getFirst(): T | undefined { + if (size === 0) { + return undefined; + } + return getAt(0); + } + + function clear(): void { + start = 0; + end = 0; + size = 0; + } + + return { + push, + getAll, + getAllIterator, + clear, + getLast, + getSize, + getAt, + getFirst, + }; +} diff --git a/packages/shared/types/config.ts b/packages/shared/types/config.ts index 29395a17..79343ee1 100644 --- a/packages/shared/types/config.ts +++ b/packages/shared/types/config.ts @@ -22,6 +22,9 @@ export const DEFAULT_CONFIG: Config = { settings: { scenesPath: SCENES_DIRECTORY, // Base directory name, will be joined with userDataPath by main/preload dependencyUpdateStrategy: DEFAULT_DEPENDENCY_UPDATE_STRATEGY, + previewOptions: { + debugger: false, + }, }, }; diff --git a/packages/shared/types/ipc.ts b/packages/shared/types/ipc.ts index f85402b8..25ca7e49 100644 --- a/packages/shared/types/ipc.ts +++ b/packages/shared/types/ipc.ts @@ -1,4 +1,4 @@ -import { type OpenDialogOptions } from 'electron'; +import type { OpenDialogOptions } from 'electron'; import type { Outdated } from '/shared/types/npm'; @@ -20,10 +20,12 @@ export interface Ipc { 'electron.openExternal': (url: string) => Promise<void>; 'electron.copyToClipboard': (text: string) => Promise<void>; 'inspector.start': () => Promise<number>; + 'inspector.openSceneDebugger': (path: string) => Promise<string>; + 'inspector.attachSceneDebugger': (path: string, eventName: string) => Promise<boolean>; 'bin.install': () => Promise<void>; 'bin.code': (path: string) => Promise<void>; 'cli.init': (path: string, repo?: string) => Promise<void>; - 'cli.start': (path: string) => Promise<void>; + 'cli.start': (path: string) => Promise<string>; 'cli.deploy': (opts: DeployOptions) => Promise<number>; 'cli.killPreview': (path: string) => Promise<void>; 'analytics.track': (event: string, data?: Record<string, any>) => void; diff --git a/packages/shared/types/settings.ts b/packages/shared/types/settings.ts index b29ae7c9..b5134e49 100644 --- a/packages/shared/types/settings.ts +++ b/packages/shared/types/settings.ts @@ -6,7 +6,12 @@ export enum DEPENDENCY_UPDATE_STRATEGY { export const DEFAULT_DEPENDENCY_UPDATE_STRATEGY = DEPENDENCY_UPDATE_STRATEGY.NOTIFY; +export type PreviewOptions = { + debugger: boolean; +}; + export type AppSettings = { scenesPath: string; dependencyUpdateStrategy: DEPENDENCY_UPDATE_STRATEGY; + previewOptions: PreviewOptions; }; diff --git a/tests/e2e.spec.ts b/tests/e2e.spec.ts index 3208784e..768b6ca1 100644 --- a/tests/e2e.spec.ts +++ b/tests/e2e.spec.ts @@ -2,7 +2,6 @@ import type { ElectronApplication, JSHandle } from 'playwright'; import { _electron as electron } from 'playwright'; import { afterAll, beforeAll, expect, test } from 'vitest'; import type { BrowserWindow } from 'electron'; - let electronApp: ElectronApplication; beforeAll(async () => {