From e5f23d2b3ab2f4b623ef0ac8f8313a952568ba36 Mon Sep 17 00:00:00 2001 From: Jochen Jacobs Date: Mon, 23 Dec 2024 23:46:47 +0100 Subject: [PATCH] update deepslate improve errors on registerType --- package-lock.json | 49 +++++++++++++++++++++++++--------- package.json | 4 +-- src/stores/useDatapackStore.ts | 8 ++++-- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25ec5a2..6be4824 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,10 +12,10 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/vue-fontawesome": "^3.0.3", "@vueuse/components": "^10.2.0", - "deepslate": "https://github.com/jacobsjo/deepslate.git#dimension-padding-built", + "deepslate": "^0.23.4", "idb-keyval": "^6.2.1", "leaflet": "^1.9.4", - "mc-datapack-loader": "0.5.0", + "mc-datapack-loader": "0.5.1", "pinia": "^2.1.4", "vue": "^3.3.4", "vue-i18n": "^9.2.2", @@ -3252,8 +3252,9 @@ } }, "node_modules/deepslate": { - "version": "0.22.4", - "resolved": "git+ssh://git@github.com/jacobsjo/deepslate.git#251dadfad76e23f44954e15d675436c3a6e57b57", + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.23.4.tgz", + "integrity": "sha512-7UcKHgpCFiwsfa7yonDOyE/W3VvpIdJkDIXhH+6WslY//dQk10oDCdkp8QgKWLd2Pyz/h8e+2ulMPwtZOFM85w==", "license": "MIT", "dependencies": { "gl-matrix": "^3.3.0", @@ -4671,9 +4672,9 @@ } }, "node_modules/mc-datapack-loader": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mc-datapack-loader/-/mc-datapack-loader-0.5.0.tgz", - "integrity": "sha512-d8VeZrcNpKfdSN97WYgK43GiZRkinl/BjTS0+vwUORFIRaDTfnzTXEWPYfrThBwCtPp1skFk3jkHoWCqMK8ehA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mc-datapack-loader/-/mc-datapack-loader-0.5.1.tgz", + "integrity": "sha512-WfaXxlmd7nZJUcOZCzLiUVJq74bObdYhFEEYN91TMhrC0Fbnvh06eut6ozSdMDqRTEwAdBky+QbAEwstoqijmA==", "license": "MIT", "dependencies": { "@fireflysemantics/join": "^1.0.14", @@ -4682,6 +4683,17 @@ "strip-json-comments": "^5.0.0" } }, + "node_modules/mc-datapack-loader/node_modules/deepslate": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.22.4.tgz", + "integrity": "sha512-Fv0SELOnZhgariC4uGRgLmk1VdGQD9xr5nxQsRwb3YiSk+CWDWoNmdOtL93XCNHPAXRjppmW4eFJoT0Eut06dA==", + "license": "MIT", + "dependencies": { + "gl-matrix": "^3.3.0", + "md5": "^2.3.0", + "pako": "^2.0.3" + } + }, "node_modules/md5": { "version": "2.3.0", "license": "BSD-3-Clause", @@ -8526,8 +8538,9 @@ "dev": true }, "deepslate": { - "version": "git+ssh://git@github.com/jacobsjo/deepslate.git#251dadfad76e23f44954e15d675436c3a6e57b57", - "from": "deepslate@https://github.com/jacobsjo/deepslate.git#dimension-padding-built", + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.23.4.tgz", + "integrity": "sha512-7UcKHgpCFiwsfa7yonDOyE/W3VvpIdJkDIXhH+6WslY//dQk10oDCdkp8QgKWLd2Pyz/h8e+2ulMPwtZOFM85w==", "requires": { "gl-matrix": "^3.3.0", "md5": "^2.3.0", @@ -9572,14 +9585,26 @@ } }, "mc-datapack-loader": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mc-datapack-loader/-/mc-datapack-loader-0.5.0.tgz", - "integrity": "sha512-d8VeZrcNpKfdSN97WYgK43GiZRkinl/BjTS0+vwUORFIRaDTfnzTXEWPYfrThBwCtPp1skFk3jkHoWCqMK8ehA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mc-datapack-loader/-/mc-datapack-loader-0.5.1.tgz", + "integrity": "sha512-WfaXxlmd7nZJUcOZCzLiUVJq74bObdYhFEEYN91TMhrC0Fbnvh06eut6ozSdMDqRTEwAdBky+QbAEwstoqijmA==", "requires": { "@fireflysemantics/join": "^1.0.14", "deepslate": "^0.22.4", "jszip": "^3.10.1", "strip-json-comments": "^5.0.0" + }, + "dependencies": { + "deepslate": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.22.4.tgz", + "integrity": "sha512-Fv0SELOnZhgariC4uGRgLmk1VdGQD9xr5nxQsRwb3YiSk+CWDWoNmdOtL93XCNHPAXRjppmW4eFJoT0Eut06dA==", + "requires": { + "gl-matrix": "^3.3.0", + "md5": "^2.3.0", + "pako": "^2.0.3" + } + } } }, "md5": { diff --git a/package.json b/package.json index 42deb76..f65a88b 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/vue-fontawesome": "^3.0.3", "@vueuse/components": "^10.2.0", - "deepslate": "https://github.com/jacobsjo/deepslate.git#dimension-padding-built", + "deepslate": "^0.23.4", "idb-keyval": "^6.2.1", "leaflet": "^1.9.4", - "mc-datapack-loader": "0.5.0", + "mc-datapack-loader": "0.5.1", "pinia": "^2.1.4", "vue": "^3.3.4", "vue-i18n": "^9.2.2", diff --git a/src/stores/useDatapackStore.ts b/src/stores/useDatapackStore.ts index 83b4b22..6ff0393 100644 --- a/src/stores/useDatapackStore.ts +++ b/src/stores/useDatapackStore.ts @@ -82,9 +82,13 @@ export const useDatapackStore = defineStore('datapacks', () => { await Promise.all((await composite_datapack.getIds(location)).map(id => new Promise(async (resolve) => { try { const data = await composite_datapack.get(location, id) - registry.register(id, loader(data, id)) + try { + registry.register(id, loader(data, id)) + } catch (e) { + console.warn(`Failed to register ${location.location}: ${id.toString()}: ${e}`) + } } catch (e) { - console.warn(`Failed to load ${location}: ${id.toString()}: ${e}`) + console.warn(`Failed to load ${location.location}: ${id.toString()}: ${e}`) } resolve() })))