From fc8387aecb72a78a6b7e7a7fa3e189cdd2a7de12 Mon Sep 17 00:00:00 2001 From: Nathan Seva Date: Mon, 11 Sep 2023 17:05:10 +0200 Subject: [PATCH 1/2] update wallet to v0.2.5 --- plugins.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins.json b/plugins.json index 5e3066f..1985fc5 100644 --- a/plugins.json +++ b/plugins.json @@ -34,23 +34,23 @@ "description": "Massa blockchain official wallet", "assets": { "windows": { - "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_windows-amd64.zip", - "checksum": "30b83890b32afa801fa6f0bda678dedd" + "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_windows-amd64.zip", + "checksum": "85f199123dd0e72e14ac0e3bbec2edff" }, "linux": { - "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_linux-amd64.zip", - "checksum": "b1fe39ad7c0bd164cb08a9ab929377bc" + "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_linux-amd64.zip", + "checksum": "fead5743653d420483e11f42281fd95d" }, "macos-arm64": { - "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_darwin-arm64.zip", - "checksum": "b3d2888298eb2b31dd4722a8830ae5f1" + "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_darwin-arm64.zip", + "checksum": "ab40a5cc281ca912d6284e493558be90" }, "macos-amd64": { - "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.4/wallet-plugin_darwin-amd64.zip", - "checksum": "b0ec455b334dc3f167256b3b89574e84" + "url": "https://github.com/massalabs/station-massa-wallet/releases/download/v0.2.5/wallet-plugin_darwin-amd64.zip", + "checksum": "0eced777b9a80c60a4f65fd79c0fefde" } }, - "version": "0.2.4", + "version": "0.2.5", "url": "https://github.com/massalabs/station-massa-plugin-wallet" } ] From 6528e6c9527ea9fcf22f55a25f314d56f6e4fc69 Mon Sep 17 00:00:00 2001 From: Nathan Seva Date: Mon, 11 Sep 2023 17:10:12 +0200 Subject: [PATCH 2/2] update areAllFilesInZipValid --- src/validate-store-update.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/validate-store-update.ts b/src/validate-store-update.ts index 51d40cc..1a7826e 100644 --- a/src/validate-store-update.ts +++ b/src/validate-store-update.ts @@ -13,15 +13,18 @@ const patterns = { "macos-amd64": /^[^.]+$/, "macos-arm64": /^[^.]+$/ }; + function areAllFilesInZipValid(files: Array, pattern: RegExp) { - return files.every( - // all files must be either a binary either a manifest either an image - (file) => - (!!file.match(pattern) !== // file is a binary - IMAGE_FORMATS.some((format) => file.endsWith(`.${format}`))) !== // file is an image - (file === "manifest.json") // file is a manifest - ); + return files.every((file) => { + const isBinary = !!file.match(pattern); + const isImage = IMAGE_FORMATS.some((format) => file.endsWith(`.${format}`)); + const isManifest = file === "manifest.json"; + const isZip = file.endsWith(".zip") + + return (isBinary || isImage || isManifest || isZip); + }); } + async function checkPluginZips(plugin: StorePlugin) { for (let assetName in plugin.assets) { const asset = plugin.assets[assetName];