-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201397 from Homebrew/synchrony
synchrony 2.4.5 (new formula)
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2942,6 +2942,7 @@ swig | |
swtpm | ||
syft | ||
symengine | ||
synchrony | ||
syncthing | ||
sysaidmin | ||
sysdig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
class Synchrony < Formula | ||
desc "Simple deobfuscator for mangled or obfuscated JavaScript files" | ||
homepage "https://deobfuscate.relative.im/" | ||
url "https://registry.npmjs.org/deobfuscator/-/deobfuscator-2.4.5.tgz" | ||
sha256 "feca0c36e1efe029827f2cb44d206c9e32751f207dae25ca5a93a4e6fe21388d" | ||
license "GPL-3.0-only" | ||
|
||
bottle do | ||
sha256 cellar: :any_skip_relocation, all: "cfdc7b740313472e31a522dc164bada69ff861e361bf7df460da30748c2c3fba" | ||
end | ||
|
||
depends_on "node" | ||
|
||
def install | ||
system "npm", "install", *std_npm_args | ||
bin.install_symlink libexec/"bin/synchrony" | ||
end | ||
|
||
test do | ||
resource "test-file" do | ||
url "https://gist.github.com/relative/79e392bced4b9bed8fd076f834e06dee/raw/obfuscated.js" | ||
sha256 "01058a548c9beb1df0586ddb30ca88256b15dba4bd5b95ddf90541dbaceef0b0" | ||
end | ||
|
||
testpath.install resource("test-file") | ||
system bin/"synchrony", "deobfuscate", "obfuscated.js" | ||
assert_match "console.log('test message');", (testpath/"obfuscated.cleaned.js").read | ||
|
||
assert_match version.to_s, shell_output("#{bin}/synchrony --version") | ||
end | ||
end |