cask "webstorm" do arch arm: "-aarch64" version "2024.3,243.21565.180" sha256 arm: "b3fed87c00746694419b0da71baf71ebb10a8c3803c5a1502c689ff9ce7831f4", intel: "fccac67e93d69ad98a36b0b8c092913fbc8bfc06b1cb7ee3932bad4394f78c78" url "https://download.jetbrains.com/webstorm/WebStorm-#{version.csv.first}#{arch}.dmg" name "WebStorm" desc "JavaScript IDE" homepage "https://www.jetbrains.com/webstorm/" livecheck do url "https://data.services.jetbrains.com/products/releases?code=WS&latest=true&type=release" strategy :json do |json| json["WS"]&.map do |release| version = release["version"] build = release["build"] next if version.blank? || build.blank? "#{version},#{build}" end end end auto_updates true depends_on macos: ">= :high_sierra" app "WebStorm.app" binary "#{appdir}/WebStorm.app/Contents/MacOS/webstorm" zap trash: [ "~/Library/Application Support/JetBrains/WebStorm#{version.major_minor}", "~/Library/Caches/com.apple.nsurlsessiond/Downloads/com.jetbrains.WebStorm", "~/Library/Caches/JetBrains/WebStorm#{version.major_minor}", "~/Library/Logs/JetBrains/WebStorm#{version.major_minor}", "~/Library/Preferences/com.jetbrains.WebStorm.plist", "~/Library/Preferences/jetbrains.webstorm.*.plist", "~/Library/Preferences/WebStorm#{version.major_minor}", "~/Library/Preferences/webstorm.plist", "~/Library/Saved Application State/com.jetbrains.WebStorm.savedState", ] end