-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 #607 from ClarityCafe/v4
V4.x Rewrite
- Loading branch information
Showing
28 changed files
with
355 additions
and
1,964 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: BunJS CI | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
pull_request: | ||
branches: ["**"] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
bun-version: [latest, 1.1] | ||
|
||
steps: | ||
- uses: actions/checkout@v4.1.7 | ||
- name: Use Bun.js ${{ matrix.bun-version }} | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: ${{ matrix.bun-version }} | ||
|
||
- name: Get Dependencies | ||
run: bun install | ||
# - name: Get CodeClimate Coverage | ||
# run: | | ||
# curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
# chmod +x ./cc-test-reporter | ||
# ./cc-test-reporter before-build | ||
|
||
- name: Run Coverage and Lint | ||
run: | | ||
echo 'SAUCENAO_TOKEN=${{ secrets.SAUCENAO_TOKEN }}' > ./.env.test.local | ||
bun run coverage | ||
# ./cc-test-reporter after-build --exit-code $(echo $?) | ||
# env: | ||
# CC_TEST_REPORTER_ID: bda3746e9ecd039cee2dcfb3c1e4efc59c712a40fa3b9316e281eb00d61c613e |
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 |
---|---|---|
|
@@ -4,5 +4,6 @@ | |
pkgs.vim | ||
pkgs.git | ||
pkgs.bun | ||
pkgs.deno | ||
]; | ||
} |
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,37 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "bun", | ||
"internalConsoleOptions": "neverOpen", | ||
"request": "launch", | ||
"name": "Debug File", | ||
"program": "${file}", | ||
"cwd": "${workspaceFolder}", | ||
"envFile": ".env.test.local", | ||
"stopOnEntry": false, | ||
"watchMode": false | ||
}, | ||
{ | ||
"type": "bun", | ||
"internalConsoleOptions": "neverOpen", | ||
"request": "launch", | ||
"name": "Run File", | ||
"program": "${file}", | ||
"cwd": "${workspaceFolder}", | ||
"noDebug": true, | ||
"watchMode": false | ||
}, | ||
{ | ||
"type": "bun", | ||
"internalConsoleOptions": "neverOpen", | ||
"request": "attach", | ||
"name": "Attach Bun", | ||
"url": "ws://localhost:6499/", | ||
"stopOnEntry": false | ||
} | ||
] | ||
} |
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
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 |
---|---|---|
|
@@ -10,7 +10,8 @@ export default [ | |
{ | ||
ignores: [ | ||
"*.config.*", | ||
"tests/**" | ||
"tests/**", | ||
"dist/**" | ||
] | ||
} | ||
]; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "@clarity/sagiri", | ||
"version": "4.0.1", | ||
"exports": "./lib/index.ts" | ||
"version": "4.0.2", | ||
"exports": "./lib/sagiri.ts" | ||
} |
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
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
import type { IResult } from "./response"; | ||
|
||
/** | ||
* Represents the valid options to pass on to SauceNAO. | ||
*/ | ||
export interface IOptions { | ||
results?: number; | ||
mask?: number[]; | ||
excludeMask?: number[]; | ||
getRatings?: boolean; | ||
testMode?: boolean; | ||
db?: number; | ||
} | ||
|
||
/** | ||
* Represents the result of a Sagiri search. | ||
*/ | ||
export interface ISagiriResult { | ||
url: string; | ||
site: string; | ||
index: number; | ||
similarity: number; | ||
thumbnail: string; | ||
authorName: string | null; | ||
authorUrl: string | null; | ||
raw: IResult; | ||
} |
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
Oops, something went wrong.