Skip to content

Commit

Permalink
feat: migrate to deno v1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
checkerschaf committed Apr 24, 2022
1 parent 1944601 commit 740b555
Show file tree
Hide file tree
Showing 28 changed files with 554 additions and 200 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ jobs:
with:
deno-version: ${{ matrix.deno }}

- name: Setup Velociraptor
uses: jurassiscripts/setup-velociraptor@v1

- name: Lint Code
run: vr run lint
run: deno lint

- name: Check Code Format
run: vr run format-check
run: deno fmt --check

- name: Run Tests
run: vr run test
run: deno task test
2 changes: 1 addition & 1 deletion .github/workflows/publish-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
deno-version: ${{ matrix.deno }}

- name: Compile to binary
run: deno compile --output=${{ matrix.asset_name }} -q --allow-net cli.ts
run: deno compile --output=${{ matrix.asset_name }} -q --allow-net --import-map=import_map.json cli.ts

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
coverage
sherlock

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["editorconfig.editorconfig", "denoland.vscode-deno"]
}
18 changes: 14 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.config": "./deno.jsonc",
"deno.importMap": "./import_map.json",
"deno.unstable": true,
"deno.suggest.imports.hosts": {
"https://deno.land": true,
"https://x.nest.land": true
"https://deno.land": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno",
"editor.formatOnSave": true
},
"editor.defaultFormatter": "denoland.vscode-deno",
"files.eol": "\n",
"files.trimTrailingWhitespace": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Jan Poth
Copyright (c) 2022 Jan Poth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sherlock-Deno 🕵️ - search users across 310+ websites
# Sherlock-Deno 🕵️ - search users across 350+ websites

<p align="center">
<br>
Expand Down Expand Up @@ -30,9 +30,8 @@ This is an improved remake of the original
[![Latest Release](https://img.shields.io/github/release/checkerschaf/sherlock-deno.svg?label=Latest%20Release)](https://github.com/checkerschaf/sherlock-deno/releases/latest)
[![Deno CI](https://img.shields.io/github/workflow/status/checkerschaf/sherlock-deno/Deno%20CI?label=Deno%20CI&logo=GitHub)](https://github.com/checkerschaf/sherlock-deno/actions)
[![Deno Land](https://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/sherlock)
[![Deno Version](https://img.shields.io/badge/Deno%20Version-^1.14.0-lightgrey?logo=deno)](https://deno.land)
[![Deno Version](https://img.shields.io/badge/Deno%20Version-^1.21.0-lightgrey?logo=deno)](https://deno.land)
![Code size](https://img.shields.io/github/languages/code-size/checkerschaf/sherlock-deno?label=Code%20Size)
[![vr scripts](https://badges.velociraptor.run/flat.svg)](https://velociraptor.run)

---

Expand Down Expand Up @@ -98,18 +97,14 @@ Thanks in advance!
## 💻 How to install the source code?

1. Clone the repository.
2. Install [Velociraptor](https://velociraptor.run)
3. Run `vr run start`
2. Run `deno task start`

**Done!** 🎉 You now have a running version of the Sherlock-Deno CLI on your
machine.

### Development commands:

We use [Velociraptor](https://velociraptor.run) as our script runner.
We use [Deno Task Runner](https://deno.land/manual/tools/task_runner) as our
script runner.

Follow the installation instructions and then run `vr` to view all available
commands.

_Tip: You can find more info about the deno cli
[here](https://deno.land/manual/getting_started/command_line_interface)._
Run `deno task` to view all available commands.
2 changes: 1 addition & 1 deletion all-sites/all-sites.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fetchSite } from "../src/lib/fetcher.ts";
import { sites } from "../sites.ts";
import { assert, assertEquals } from "../src/testing-deps.ts";
import { assert, assertEquals } from "std/testing/asserts.ts";
import { ScannerResult } from "../src/enums.ts";
import type { Site } from "../src/types.ts";

Expand Down
7 changes: 1 addition & 6 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ const runSherlockCli = async (): Promise<void> => {

// Start the scan and wait for it to finish
await scanner
.scan()
.catch((err: Error) => {
printFatalError(err);
Deno.exit(1);
})
.finally(() => Deno.exit(0));
.scan();
};

// Start the Sherlock-CLI
Expand Down
27 changes: 27 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"tasks": {
"start": "deno run --allow-net -q --import-map=import_map.json cli.ts",
"update-sites": "deno run --allow-net --allow-write --import-map=import_map.json ./src/scripts/update-sites.ts && deno fmt",
"test": "deno test --import-map=import_map.json src",
"coverage": "deno test src --coverage=coverage/profile",
"coverage-pretty": "deno task coverage && deno coverage coverage/profile",
"coverage-html": "deno task coverage && deno coverage coverage/profile --lcov > coverage/coverage.lcov && genhtml -o coverage/html coverage/coverage.lcov",
"test-sites": "deno test --allow-net --import-map=import_map.json all-sites",
"compile": "deno compile --output=sherlock -q --allow-net --import-map=import_map.json cli.ts"
},
"lint": {
"files": {
"include": ["."],
"exclude": ["coverage/"]
},
"rules": {
"tags": ["recommended"]
}
},
"fmt": {
"files": {
"include": ["."],
"exclude": ["coverage/"]
}
}
}
5 changes: 5 additions & 0 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"imports": {
"std/": "https://deno.land/std@0.136.0/"
}
}
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const SHERLOCK_VERSION = "2.1.0";
export const SHERLOCK_VERSION = "2.2.0";

export { SherlockScanner } from "./src/sherlock-scanner.ts";
Loading

0 comments on commit 740b555

Please sign in to comment.