cask "wechatwebdevtools" do arch arm: "arm64", intel: "x64" version "2.02.2608070" sha256 arm: "911600453eacc4e7c7b64366719bc8d0151bd5bdb36d7816ca17fc0881dcc681", intel: "5321a9c772252222125487a9f84f67cc3844ef9a956edca7408dfab70a00e042" url "https://dldir1.qq.com/WechatWebDev/release/be1ec64cf6184b0fa64091919793f068/wechat_devtools_#{version}_darwin_#{arch}.dmg" name "Wechat DevTools" name "微信开发者工具" desc "Wechat DevTools for Official Account and Mini Program development" homepage "https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html" livecheck do url "https://devtools.wxqcloud.qq.com.cn/WechatWebDev/nightly/versions/config.json" strategy :json do |json| stable = json["channels"]&.find { |channel| channel["id"] == "stable" } next unless stable stable["version"] end end auto_updates true depends_on :macos app "wechatwebdevtools.app" zap trash: [ "~/Library/Application Support/微信开发者工具", "~/Library/Caches/微信开发者工具", "~/Library/Preferences/com.tencent.webplusdevtools.plist", "~/Library/Preferences/com.tencent.wechat.devtools.plist", "~/Library/Saved Application State/com.tencent.wechat.devtools.savedState", ] end