diff --git a/package-lock.json b/package-lock.json index e1102c4..ca16b5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.1.1", "license": "Apache-2.0", "devDependencies": { - "@dcl/sdk": "^7.1.6", + "@dcl/sdk": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-7.4.8-8267289014.commit-3356b5d.tgz", "typescript": "^5.0.2" } }, @@ -20,9 +20,9 @@ "dev": true }, "node_modules/@dcl-sdk/utils": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.6.tgz", - "integrity": "sha512-PePRsdXfs4vZCDm/1awBAakCsqgM1R0AyyizA0qG+S5AHgQm+kN2+SjFOJ6HEi94Vy91EU3TES3/NpY7L3+SCA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.7.tgz", + "integrity": "sha512-sVEBJJ9XcAhI0kb6PLpdgG1a3wGDmc6BYiGyovoHTTh7Iz2IvAPvVRiW5h18X/Q4iB/33wpsAx0OTZ8zA5uiDg==", "dev": true }, "node_modules/@dcl/asset-packs": { @@ -36,6 +36,105 @@ "mitt": "^3.0.1" } }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/ecs": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.4.7.tgz", + "integrity": "sha512-k0xYenP9S399Dt+CRPWlRiYH2TQIpe04Gc9K0gDV0Ns1KyNkBJgulwPTWU50ZKZHj1aF1uDpE++vfxyRfzCeHA==", + "dev": true + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/explorer": { + "version": "1.0.160056-20240212151637.commit-33b7e01", + "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.160056-20240212151637.commit-33b7e01.tgz", + "integrity": "sha512-1k/dOHOOaV2k5yTNbWmwlx8OdUEpgUV8dnG4sBwQHtkWcHO/sqNb5YxZ7Ju9j17Opf2tRbt8DJoGYmxArskP0w==", + "dev": true + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/inspector": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.4.7.tgz", + "integrity": "sha512-0POwSm4wUvC4Dkuv58UGClEDJhXVpNjceWcuzSjqeDw0x+Aw5zJaLce5Fl9oApt+cEgj6E5xrdsq/NL/HWkHWw==", + "dev": true, + "dependencies": { + "@dcl/asset-packs": "^1.12.2", + "ts-deepmerge": "^7.0.0" + } + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/js-runtime": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.4.7.tgz", + "integrity": "sha512-ZT3QRVPIZV2ASCynoC0Gl/Ix91DL/sUgcFPEXZiBMs8lEmOBTC/ONBuf+nqSKyBPRyKEAqAz4Yea5xasDnc7dg==", + "dev": true + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/react-ecs": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.4.7.tgz", + "integrity": "sha512-7M/kAchsPB41F2YQFi6yjDCmCLTlsXL3cQBmFBsW8KjQszJ/mIHVvCeEdF2uzCoYz9EFfN+AuWSulWWu0q9sgg==", + "dev": true, + "dependencies": { + "@dcl/ecs": "7.4.7", + "react": "^18.2.0", + "react-reconciler": "^0.29.0" + } + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/sdk": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.4.7.tgz", + "integrity": "sha512-U2X4PufRpfVDpb2Bz1hcg62d8vefj/2ezSeViF9sqMl4+ACkS0CTNt2RRTuMRpaerq8BNsOun9gOjZ02abPCaA==", + "dev": true, + "dependencies": { + "@dcl/ecs": "7.4.7", + "@dcl/ecs-math": "2.0.2", + "@dcl/explorer": "1.0.160056-20240212151637.commit-33b7e01", + "@dcl/js-runtime": "7.4.7", + "@dcl/react-ecs": "7.4.7", + "@dcl/sdk-commands": "7.4.7", + "text-encoding": "0.7.0" + } + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/sdk-commands": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.4.7.tgz", + "integrity": "sha512-UlaGMT603Q0Yh/XwqNqZbp49zViC0p4lC7WMUzfU+zC+7UgVE8P/w4iQdpruiJuXaZ2qY+EcdzBemBnykf6TdA==", + "dev": true, + "dependencies": { + "@dcl/crypto": "^3.4.4", + "@dcl/ecs": "7.4.7", + "@dcl/hashing": "1.1.3", + "@dcl/inspector": "7.4.7", + "@dcl/linker-dapp": "^0.12.0", + "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", + "@dcl/protocol": "1.0.0-7716486147.commit-7433b10", + "@dcl/quests-client": "^1.0.3", + "@dcl/quests-manager": "^0.1.4", + "@dcl/rpc": "^1.1.1", + "@dcl/schemas": "^8.2.3-20230718182824.commit-356025c", + "@segment/analytics-node": "^1.1.3", + "@well-known-components/env-config-provider": "^1.2.0", + "@well-known-components/fetch-component": "^2.0.2", + "@well-known-components/http-server": "^2.0.0-20230501134558.commit-be9a25d", + "@well-known-components/logger": "^3.1.2", + "@well-known-components/metrics": "^2.0.1", + "archiver": "^5.3.1", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "colorette": "^2.0.19", + "dcl-catalyst-client": "^21.5.0", + "esbuild": "^0.18.17", + "extract-zip": "2.0.1", + "fp-future": "^1.0.1", + "glob": "^9.3.2", + "ignore": "^5.2.4", + "node-fetch": "^2.7.0", + "open": "^8.4.0", + "portfinder": "^1.0.32", + "prompts": "^2.4.2", + "typescript": "^5.0.2", + "undici": "^5.19.1", + "uuid": "^9.0.1" + }, + "bin": { + "sdk-commands": "dist/index.js" + } + }, "node_modules/@dcl/catalyst-contracts": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@dcl/catalyst-contracts/-/catalyst-contracts-4.3.1.tgz", @@ -65,10 +164,11 @@ } }, "node_modules/@dcl/ecs": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.4.7.tgz", - "integrity": "sha512-k0xYenP9S399Dt+CRPWlRiYH2TQIpe04Gc9K0gDV0Ns1KyNkBJgulwPTWU50ZKZHj1aF1uDpE++vfxyRfzCeHA==", - "dev": true + "version": "7.4.8-8267289014.commit-3356b5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-OXOUu9aoWX+UPCFGRAJmUWNcK5+XRi8wAKsHCv8P6pf1TOj1K87F72CqabN4F3qvIQYXaY2GB3ZSEjzP3ZWYVA==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/@dcl/ecs-math": { "version": "2.0.2", @@ -77,9 +177,9 @@ "dev": true }, "node_modules/@dcl/explorer": { - "version": "1.0.160056-20240212151637.commit-33b7e01", - "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.160056-20240212151637.commit-33b7e01.tgz", - "integrity": "sha512-1k/dOHOOaV2k5yTNbWmwlx8OdUEpgUV8dnG4sBwQHtkWcHO/sqNb5YxZ7Ju9j17Opf2tRbt8DJoGYmxArskP0w==", + "version": "1.0.161055-20240311152126.commit-cae33b0", + "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.161055-20240311152126.commit-cae33b0.tgz", + "integrity": "sha512-iLSXjkGssjKagPAK9ylTO4pzCrao6qlSbBP73PlH4HBFwJXLQuRI0eLTWn2FfAO3UdwoJSsXRoZjwEmsZdML/w==", "dev": true }, "node_modules/@dcl/hashing": { @@ -94,20 +194,21 @@ } }, "node_modules/@dcl/inspector": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.4.7.tgz", - "integrity": "sha512-0POwSm4wUvC4Dkuv58UGClEDJhXVpNjceWcuzSjqeDw0x+Aw5zJaLce5Fl9oApt+cEgj6E5xrdsq/NL/HWkHWw==", + "version": "7.4.8-8267289014.commit-3356b5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/inspector/dcl-inspector-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-WAhx+n5DxYOfds9yIi9wGVGoAhXJurk0q7Q/hI+iOf6euuWwcn22vL0FVREgDIFHsTa2OGzcceB3lHZjgk/39A==", "dev": true, "dependencies": { - "@dcl/asset-packs": "^1.12.2", + "@dcl/asset-packs": "^1.13.0", "ts-deepmerge": "^7.0.0" } }, "node_modules/@dcl/js-runtime": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.4.7.tgz", - "integrity": "sha512-ZT3QRVPIZV2ASCynoC0Gl/Ix91DL/sUgcFPEXZiBMs8lEmOBTC/ONBuf+nqSKyBPRyKEAqAz4Yea5xasDnc7dg==", - "dev": true + "version": "7.4.8-8267289014.commit-3356b5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/js-runtime/dcl-js-runtime-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-qaBlEvMXB+yGJzb8lHh3WtdsTE6w0xrHha06+th4PbqDITqdlJj0lX+H1i21SKCJLPM0NnTpZZcT9e5fXBGopQ==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/@dcl/linker-dapp": { "version": "0.12.0", @@ -174,12 +275,13 @@ "dev": true }, "node_modules/@dcl/react-ecs": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.4.7.tgz", - "integrity": "sha512-7M/kAchsPB41F2YQFi6yjDCmCLTlsXL3cQBmFBsW8KjQszJ/mIHVvCeEdF2uzCoYz9EFfN+AuWSulWWu0q9sgg==", + "version": "7.4.8-8267289014.commit-3356b5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/react-ecs/dcl-react-ecs-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-Zhr5UvTpnflPT3KIZf+aUS/kp50B2d1/mczKki0v6VnfVtgYJgtlnMvCLsUZgBvqW9BKam00WyYr8N4wR02u1Q==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@dcl/ecs": "7.4.7", + "@dcl/ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", "react": "^18.2.0", "react-reconciler": "^0.29.0" } @@ -206,30 +308,33 @@ } }, "node_modules/@dcl/sdk": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.4.7.tgz", - "integrity": "sha512-U2X4PufRpfVDpb2Bz1hcg62d8vefj/2ezSeViF9sqMl4+ACkS0CTNt2RRTuMRpaerq8BNsOun9gOjZ02abPCaA==", + "version": "7.4.8-8267289014.commit-3356b5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-AKetgbQMxBBVyrHVyCjWe+wuBxDYaWbX6R43A5zSHaU7DiAr15YpnOOjV00aBCtNDP/ArpS3ZmcbJ090aKgCyA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@dcl/ecs": "7.4.7", + "@dcl/ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", "@dcl/ecs-math": "2.0.2", - "@dcl/explorer": "1.0.160056-20240212151637.commit-33b7e01", - "@dcl/js-runtime": "7.4.7", - "@dcl/react-ecs": "7.4.7", - "@dcl/sdk-commands": "7.4.7", + "@dcl/explorer": "1.0.161055-20240311152126.commit-cae33b0", + "@dcl/inspector": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/inspector/dcl-inspector-7.4.8-8267289014.commit-3356b5d.tgz", + "@dcl/js-runtime": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/js-runtime/dcl-js-runtime-7.4.8-8267289014.commit-3356b5d.tgz", + "@dcl/react-ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/react-ecs/dcl-react-ecs-7.4.8-8267289014.commit-3356b5d.tgz", + "@dcl/sdk-commands": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-commands-7.4.8-8267289014.commit-3356b5d.tgz", "text-encoding": "0.7.0" } }, "node_modules/@dcl/sdk-commands": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.4.7.tgz", - "integrity": "sha512-UlaGMT603Q0Yh/XwqNqZbp49zViC0p4lC7WMUzfU+zC+7UgVE8P/w4iQdpruiJuXaZ2qY+EcdzBemBnykf6TdA==", + "version": "7.4.8-8267289014.commit-3356b5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-commands-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-zwA7OtClqRmCVBgkjC6wDznv4G0yRdxLOjcWvDsFaQKeTjyGAiLZgZyiLJGCeYaLMiz778sGQS9VLsEAZE25Gg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@dcl/crypto": "^3.4.4", - "@dcl/ecs": "7.4.7", + "@dcl/ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", "@dcl/hashing": "1.1.3", - "@dcl/inspector": "7.4.7", + "@dcl/inspector": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/inspector/dcl-inspector-7.4.8-8267289014.commit-3356b5d.tgz", "@dcl/linker-dapp": "^0.12.0", "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", "@dcl/protocol": "1.0.0-7716486147.commit-7433b10", @@ -852,9 +957,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "20.11.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", + "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -934,9 +1039,9 @@ } }, "node_modules/@well-known-components/interfaces": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.4.2.tgz", - "integrity": "sha512-1tkr/OhZ4UmnQiST2svKznEiJ86crV2S+AIhokhowR4MexAKWgYlmZpoP6VIcgDVPf7nu8hOtIPMQaCZ+COC0A==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.4.3.tgz", + "integrity": "sha512-roVtoOHG6uaH+nL4C0ISnAwkkopc2FLsS7fqX+roI22EdX9PAknPoImhPU8/3u6jgRAVpglX5Zj4nWZkSaXPkQ==", "dev": true, "dependencies": { "@types/node": "^20.3.1", @@ -2952,9 +3057,9 @@ } }, "node_modules/ts-proto": { - "version": "1.167.9", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.167.9.tgz", - "integrity": "sha512-zqZ15CzqvupSpoTl/fzOs5gG7SFvj1ENmWeKMgD4Yl2BSx8I5F+qgYkr9EZYMu7Ho7u+QtwzfudROo+/jwM2pg==", + "version": "1.169.1", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.169.1.tgz", + "integrity": "sha512-MHdllDrtFCabxvIyUqze7/4vSh55SEgwirpthGVUGt3pMqIpmmrDyBv0vDk/RCjBxm0/LIWVMnXlOjBxYaE1rA==", "dev": true, "dependencies": { "case-anything": "^2.1.13", @@ -3201,9 +3306,9 @@ "dev": true }, "@dcl-sdk/utils": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.6.tgz", - "integrity": "sha512-PePRsdXfs4vZCDm/1awBAakCsqgM1R0AyyizA0qG+S5AHgQm+kN2+SjFOJ6HEi94Vy91EU3TES3/NpY7L3+SCA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.7.tgz", + "integrity": "sha512-sVEBJJ9XcAhI0kb6PLpdgG1a3wGDmc6BYiGyovoHTTh7Iz2IvAPvVRiW5h18X/Q4iB/33wpsAx0OTZ8zA5uiDg==", "dev": true }, "@dcl/asset-packs": { @@ -3215,6 +3320,104 @@ "@dcl-sdk/utils": "^1.2.6", "@dcl/sdk": "7.4.7", "mitt": "^3.0.1" + }, + "dependencies": { + "@dcl/ecs": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.4.7.tgz", + "integrity": "sha512-k0xYenP9S399Dt+CRPWlRiYH2TQIpe04Gc9K0gDV0Ns1KyNkBJgulwPTWU50ZKZHj1aF1uDpE++vfxyRfzCeHA==", + "dev": true + }, + "@dcl/explorer": { + "version": "1.0.160056-20240212151637.commit-33b7e01", + "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.160056-20240212151637.commit-33b7e01.tgz", + "integrity": "sha512-1k/dOHOOaV2k5yTNbWmwlx8OdUEpgUV8dnG4sBwQHtkWcHO/sqNb5YxZ7Ju9j17Opf2tRbt8DJoGYmxArskP0w==", + "dev": true + }, + "@dcl/inspector": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.4.7.tgz", + "integrity": "sha512-0POwSm4wUvC4Dkuv58UGClEDJhXVpNjceWcuzSjqeDw0x+Aw5zJaLce5Fl9oApt+cEgj6E5xrdsq/NL/HWkHWw==", + "dev": true, + "requires": { + "@dcl/asset-packs": "^1.12.2", + "ts-deepmerge": "^7.0.0" + } + }, + "@dcl/js-runtime": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.4.7.tgz", + "integrity": "sha512-ZT3QRVPIZV2ASCynoC0Gl/Ix91DL/sUgcFPEXZiBMs8lEmOBTC/ONBuf+nqSKyBPRyKEAqAz4Yea5xasDnc7dg==", + "dev": true + }, + "@dcl/react-ecs": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.4.7.tgz", + "integrity": "sha512-7M/kAchsPB41F2YQFi6yjDCmCLTlsXL3cQBmFBsW8KjQszJ/mIHVvCeEdF2uzCoYz9EFfN+AuWSulWWu0q9sgg==", + "dev": true, + "requires": { + "@dcl/ecs": "7.4.7", + "react": "^18.2.0", + "react-reconciler": "^0.29.0" + } + }, + "@dcl/sdk": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.4.7.tgz", + "integrity": "sha512-U2X4PufRpfVDpb2Bz1hcg62d8vefj/2ezSeViF9sqMl4+ACkS0CTNt2RRTuMRpaerq8BNsOun9gOjZ02abPCaA==", + "dev": true, + "requires": { + "@dcl/ecs": "7.4.7", + "@dcl/ecs-math": "2.0.2", + "@dcl/explorer": "1.0.160056-20240212151637.commit-33b7e01", + "@dcl/js-runtime": "7.4.7", + "@dcl/react-ecs": "7.4.7", + "@dcl/sdk-commands": "7.4.7", + "text-encoding": "0.7.0" + } + }, + "@dcl/sdk-commands": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.4.7.tgz", + "integrity": "sha512-UlaGMT603Q0Yh/XwqNqZbp49zViC0p4lC7WMUzfU+zC+7UgVE8P/w4iQdpruiJuXaZ2qY+EcdzBemBnykf6TdA==", + "dev": true, + "requires": { + "@dcl/crypto": "^3.4.4", + "@dcl/ecs": "7.4.7", + "@dcl/hashing": "1.1.3", + "@dcl/inspector": "7.4.7", + "@dcl/linker-dapp": "^0.12.0", + "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", + "@dcl/protocol": "1.0.0-7716486147.commit-7433b10", + "@dcl/quests-client": "^1.0.3", + "@dcl/quests-manager": "^0.1.4", + "@dcl/rpc": "^1.1.1", + "@dcl/schemas": "^8.2.3-20230718182824.commit-356025c", + "@segment/analytics-node": "^1.1.3", + "@well-known-components/env-config-provider": "^1.2.0", + "@well-known-components/fetch-component": "^2.0.2", + "@well-known-components/http-server": "^2.0.0-20230501134558.commit-be9a25d", + "@well-known-components/logger": "^3.1.2", + "@well-known-components/metrics": "^2.0.1", + "archiver": "^5.3.1", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "colorette": "^2.0.19", + "dcl-catalyst-client": "^21.5.0", + "esbuild": "^0.18.17", + "extract-zip": "2.0.1", + "fp-future": "^1.0.1", + "glob": "^9.3.2", + "ignore": "^5.2.4", + "node-fetch": "^2.7.0", + "open": "^8.4.0", + "portfinder": "^1.0.32", + "prompts": "^2.4.2", + "typescript": "^5.0.2", + "undici": "^5.19.1", + "uuid": "^9.0.1" + } + } } }, "@dcl/catalyst-contracts": { @@ -3248,9 +3451,8 @@ } }, "@dcl/ecs": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.4.7.tgz", - "integrity": "sha512-k0xYenP9S399Dt+CRPWlRiYH2TQIpe04Gc9K0gDV0Ns1KyNkBJgulwPTWU50ZKZHj1aF1uDpE++vfxyRfzCeHA==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-OXOUu9aoWX+UPCFGRAJmUWNcK5+XRi8wAKsHCv8P6pf1TOj1K87F72CqabN4F3qvIQYXaY2GB3ZSEjzP3ZWYVA==", "dev": true }, "@dcl/ecs-math": { @@ -3260,9 +3462,9 @@ "dev": true }, "@dcl/explorer": { - "version": "1.0.160056-20240212151637.commit-33b7e01", - "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.160056-20240212151637.commit-33b7e01.tgz", - "integrity": "sha512-1k/dOHOOaV2k5yTNbWmwlx8OdUEpgUV8dnG4sBwQHtkWcHO/sqNb5YxZ7Ju9j17Opf2tRbt8DJoGYmxArskP0w==", + "version": "1.0.161055-20240311152126.commit-cae33b0", + "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.161055-20240311152126.commit-cae33b0.tgz", + "integrity": "sha512-iLSXjkGssjKagPAK9ylTO4pzCrao6qlSbBP73PlH4HBFwJXLQuRI0eLTWn2FfAO3UdwoJSsXRoZjwEmsZdML/w==", "dev": true }, "@dcl/hashing": { @@ -3277,19 +3479,17 @@ } }, "@dcl/inspector": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.4.7.tgz", - "integrity": "sha512-0POwSm4wUvC4Dkuv58UGClEDJhXVpNjceWcuzSjqeDw0x+Aw5zJaLce5Fl9oApt+cEgj6E5xrdsq/NL/HWkHWw==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/inspector/dcl-inspector-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-WAhx+n5DxYOfds9yIi9wGVGoAhXJurk0q7Q/hI+iOf6euuWwcn22vL0FVREgDIFHsTa2OGzcceB3lHZjgk/39A==", "dev": true, "requires": { - "@dcl/asset-packs": "^1.12.2", + "@dcl/asset-packs": "^1.13.0", "ts-deepmerge": "^7.0.0" } }, "@dcl/js-runtime": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.4.7.tgz", - "integrity": "sha512-ZT3QRVPIZV2ASCynoC0Gl/Ix91DL/sUgcFPEXZiBMs8lEmOBTC/ONBuf+nqSKyBPRyKEAqAz4Yea5xasDnc7dg==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/js-runtime/dcl-js-runtime-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-qaBlEvMXB+yGJzb8lHh3WtdsTE6w0xrHha06+th4PbqDITqdlJj0lX+H1i21SKCJLPM0NnTpZZcT9e5fXBGopQ==", "dev": true }, "@dcl/linker-dapp": { @@ -3359,12 +3559,11 @@ "dev": true }, "@dcl/react-ecs": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.4.7.tgz", - "integrity": "sha512-7M/kAchsPB41F2YQFi6yjDCmCLTlsXL3cQBmFBsW8KjQszJ/mIHVvCeEdF2uzCoYz9EFfN+AuWSulWWu0q9sgg==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/react-ecs/dcl-react-ecs-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-Zhr5UvTpnflPT3KIZf+aUS/kp50B2d1/mczKki0v6VnfVtgYJgtlnMvCLsUZgBvqW9BKam00WyYr8N4wR02u1Q==", "dev": true, "requires": { - "@dcl/ecs": "7.4.7", + "@dcl/ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", "react": "^18.2.0", "react-reconciler": "^0.29.0" } @@ -3391,30 +3590,29 @@ } }, "@dcl/sdk": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.4.7.tgz", - "integrity": "sha512-U2X4PufRpfVDpb2Bz1hcg62d8vefj/2ezSeViF9sqMl4+ACkS0CTNt2RRTuMRpaerq8BNsOun9gOjZ02abPCaA==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-AKetgbQMxBBVyrHVyCjWe+wuBxDYaWbX6R43A5zSHaU7DiAr15YpnOOjV00aBCtNDP/ArpS3ZmcbJ090aKgCyA==", "dev": true, "requires": { - "@dcl/ecs": "7.4.7", + "@dcl/ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", "@dcl/ecs-math": "2.0.2", - "@dcl/explorer": "1.0.160056-20240212151637.commit-33b7e01", - "@dcl/js-runtime": "7.4.7", - "@dcl/react-ecs": "7.4.7", - "@dcl/sdk-commands": "7.4.7", + "@dcl/explorer": "1.0.161055-20240311152126.commit-cae33b0", + "@dcl/inspector": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/inspector/dcl-inspector-7.4.8-8267289014.commit-3356b5d.tgz", + "@dcl/js-runtime": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/js-runtime/dcl-js-runtime-7.4.8-8267289014.commit-3356b5d.tgz", + "@dcl/react-ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/react-ecs/dcl-react-ecs-7.4.8-8267289014.commit-3356b5d.tgz", + "@dcl/sdk-commands": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-commands-7.4.8-8267289014.commit-3356b5d.tgz", "text-encoding": "0.7.0" } }, "@dcl/sdk-commands": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.4.7.tgz", - "integrity": "sha512-UlaGMT603Q0Yh/XwqNqZbp49zViC0p4lC7WMUzfU+zC+7UgVE8P/w4iQdpruiJuXaZ2qY+EcdzBemBnykf6TdA==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-commands-7.4.8-8267289014.commit-3356b5d.tgz", + "integrity": "sha512-zwA7OtClqRmCVBgkjC6wDznv4G0yRdxLOjcWvDsFaQKeTjyGAiLZgZyiLJGCeYaLMiz778sGQS9VLsEAZE25Gg==", "dev": true, "requires": { "@dcl/crypto": "^3.4.4", - "@dcl/ecs": "7.4.7", + "@dcl/ecs": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/ecs/dcl-ecs-7.4.8-8267289014.commit-3356b5d.tgz", "@dcl/hashing": "1.1.3", - "@dcl/inspector": "7.4.7", + "@dcl/inspector": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/@dcl/inspector/dcl-inspector-7.4.8-8267289014.commit-3356b5d.tgz", "@dcl/linker-dapp": "^0.12.0", "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", "@dcl/protocol": "1.0.0-7716486147.commit-7433b10", @@ -3794,9 +3992,9 @@ "dev": true }, "@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "20.11.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", + "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -3873,9 +4071,9 @@ } }, "@well-known-components/interfaces": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.4.2.tgz", - "integrity": "sha512-1tkr/OhZ4UmnQiST2svKznEiJ86crV2S+AIhokhowR4MexAKWgYlmZpoP6VIcgDVPf7nu8hOtIPMQaCZ+COC0A==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.4.3.tgz", + "integrity": "sha512-roVtoOHG6uaH+nL4C0ISnAwkkopc2FLsS7fqX+roI22EdX9PAknPoImhPU8/3u6jgRAVpglX5Zj4nWZkSaXPkQ==", "dev": true, "requires": { "@types/node": "^20.3.1", @@ -5480,9 +5678,9 @@ } }, "ts-proto": { - "version": "1.167.9", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.167.9.tgz", - "integrity": "sha512-zqZ15CzqvupSpoTl/fzOs5gG7SFvj1ENmWeKMgD4Yl2BSx8I5F+qgYkr9EZYMu7Ho7u+QtwzfudROo+/jwM2pg==", + "version": "1.169.1", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.169.1.tgz", + "integrity": "sha512-MHdllDrtFCabxvIyUqze7/4vSh55SEgwirpthGVUGt3pMqIpmmrDyBv0vDk/RCjBxm0/LIWVMnXlOjBxYaE1rA==", "dev": true, "requires": { "case-anything": "^2.1.13", diff --git a/package.json b/package.json index e16becf..33cbbeb 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,13 @@ "type": "git", "url": "https://github.com/decentraland/sdk7-utils.git" }, - "keywords": ["decentraland", "sdk7", "sdk 7", "sdk utils", "sdk library"], + "keywords": [ + "decentraland", + "sdk7", + "sdk 7", + "sdk utils", + "sdk library" + ], "author": "Decentraland", "license": "Apache-2.0", "bugs": { @@ -19,7 +25,7 @@ }, "homepage": "https://github.com/decentraland/sdk7-utils#readme", "devDependencies": { - "@dcl/sdk": "^7.1.6", + "@dcl/sdk": "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/shape-up/control-audio-scene/dcl-sdk-7.4.8-8267289014.commit-3356b5d.tgz", "typescript": "^5.0.2" }, "files": [ diff --git a/src/audio.ts b/src/audio.ts new file mode 100644 index 0000000..9cc0f6f --- /dev/null +++ b/src/audio.ts @@ -0,0 +1,62 @@ +import { AudioSource, Entity, EntityState, IEngine, PBAudioSource, engine } from "@dcl/sdk/ecs"; +import { priority } from "./priority"; + +export type Sounds = ReturnType + +function assertSound(start: number, end: number) { + if (start < 0) { + throw new Error('Invalid "start" parameter provided. "start" parameter should be >= 0.') + } + + if (start >= end) { + throw new Error('Invalid "start" & "end" parameters provided. "start" parameter should be lower than "end" parameter.') + } +} + +function createSounds(targetEngine: IEngine) { + const soundMap = new Map() + + function makeSystem(dt: number) { + const deadSounds = []; + + for (const [entity, soundData] of soundMap.entries()) { + if ( + targetEngine.getEntityState(entity) == EntityState.Removed || + !AudioSource.has(entity) + ) { + soundMap.delete(entity); + continue; + } + + soundData.currentTime += dt; + + if (soundData.currentTime >= soundData.end) { + deadSounds.push(entity); + } + } + + for (const entity of deadSounds) { + AudioSource.stopSound(entity) + soundMap.delete(entity); + } + } + + function playSoundSegment(entity: Entity, value: PBAudioSource, start: number, end: number) { + assertSound(start, end) + + soundMap.set(entity, { currentTime: start, end }) + AudioSource.createOrReplace(entity, { + ...value, + playing: true, + currentTime: start + }) + } + + targetEngine.addSystem(makeSystem, priority.TweenSystemPriority) + + return { + playSoundSegment, + } +} + +export const sounds = createSounds(engine) diff --git a/src/index.ts b/src/index.ts index fc5cef3..5b87c2d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,6 +23,11 @@ export { tweens } from './tween' +export { + Sounds, + sounds +} from './audio' + export { PerpetualMotions, perpetualMotions