Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
3126312
feat: lower rate limit budget
Sv443 Nov 17, 2024
9ed17dc
ref!: remove fuzzy filtering
Sv443 Nov 17, 2024
cb2ae01
chore: remove fuse.js and move to pnpm
Sv443 Nov 17, 2024
547f3b7
ref: better IP resolution and store them hashed in mem
Sv443 Nov 17, 2024
2f46541
docs: add /v2/ path
Sv443 Nov 17, 2024
6c7238f
feat: begin work on manual search route
Sv443 Nov 18, 2024
35aa013
ref: move manual search
Sv443 Nov 19, 2024
6aee183
feat: set up vuepress
Sv443 Nov 24, 2024
321fa80
feat: begin working on site
Sv443 Nov 27, 2024
259a81a
feat: add jest for unit testing
Sv443 Nov 27, 2024
15d3cff
feat: wrote unit tests (#14)
Sv443 Nov 27, 2024
f7b80a5
ci: lint and test
Sv443 Nov 27, 2024
7a00c1c
ci: fix branch
Sv443 Nov 27, 2024
d7a51e7
ci: remove on push main
Sv443 Nov 27, 2024
757ec4d
feat: lint command
Sv443 Nov 27, 2024
c29678c
fix: lint errors
Sv443 Nov 27, 2024
fde154e
fix: adjust jest ignore patterns
Sv443 Nov 27, 2024
dec86df
fix: ok now tho
Sv443 Nov 27, 2024
2f81291
fix: ok now it should shut up
Sv443 Nov 27, 2024
d3c3711
ci: rename jobs
Sv443 Nov 27, 2024
a03aa3d
feat: github files
Sv443 Nov 27, 2024
49c3b69
Update album.spec.ts
Sv443 Nov 28, 2024
e800e71
Update album.spec.ts
Sv443 Nov 28, 2024
3a6cd56
Update search.spec.ts
Sv443 Nov 28, 2024
84588c9
Update translations.spec.ts
Sv443 Nov 28, 2024
35b780d
Update translations.spec.ts
Sv443 Nov 28, 2024
66e65e7
Update album.spec.ts
Sv443 Nov 28, 2024
2cc2ae0
ref: overhaul build
Sv443 Nov 28, 2024
ed04dda
ref!: change docs url
Sv443 Nov 28, 2024
8ca5951
ref: add .js to import paths
Sv443 Nov 28, 2024
2714358
fix: routing and redirection problems
Sv443 Nov 28, 2024
18091d3
ref: move files up a directory
Sv443 Nov 28, 2024
47ce307
fix: update start script
Sv443 Nov 28, 2024
a5579d5
ref: path aliases
Sv443 Nov 28, 2024
47c1648
fix: idk whats going on
Sv443 Nov 28, 2024
d175972
fix: I forgored it out
Sv443 Nov 28, 2024
506635f
ci: set timeout
Sv443 Nov 28, 2024
ffd2d39
fix: tests baseUrl
Sv443 Nov 28, 2024
cded73a
fix: ok but now
Sv443 Nov 28, 2024
c9f9e25
ci: remove environment deployment
Sv443 Nov 28, 2024
254bf58
ref: update to eslint v9
Sv443 Nov 28, 2024
e49a078
fix: missing dependency
Sv443 Nov 28, 2024
7a96b0a
feat: XML validation unit test
Sv443 Nov 28, 2024
bcbe587
ref: change test commands
Sv443 Nov 28, 2024
4971b2e
feat: add HOST_HOMEPAGE env var feature toggle
Sv443 Nov 28, 2024
a15b510
ref: sendReq function for unit tests
Sv443 Nov 29, 2024
6d331a0
ref: define docs static build path in constants.ts
Sv443 Nov 29, 2024
452f10c
fix: remove duplicate baseUrl
Sv443 Nov 29, 2024
2d72989
ref: improve latency test
Sv443 Nov 30, 2024
b4acd5f
fix: wrong script name
Sv443 Nov 30, 2024
8d372a5
feat: add low percentiles to latency test
Sv443 Nov 30, 2024
886bd6f
feat: 300 lat. test queries
Sv443 Nov 30, 2024
a92d455
feat: add latency test report files & refactor latency test again
Sv443 Dec 1, 2024
a7e0a94
ref: ok im done now
Sv443 Dec 1, 2024
be4246e
ref: 😳
Sv443 Dec 1, 2024
9b716fd
fix: it broke
Sv443 Dec 1, 2024
7bc9e25
ref: 😳😳😳
Sv443 Dec 1, 2024
a0b467e
docs: big refactor
Sv443 Dec 10, 2024
988fd09
docs: fix linter errors & remove docs from main readme
Sv443 Dec 10, 2024
5f00b8f
docs: random fixes
Sv443 Dec 10, 2024
beca47e
ref: random fixes again
Sv443 Dec 10, 2024
16e0746
docs: custom component support
Sv443 Dec 11, 2024
1d3bebc
ref: minor refactor & comments
Sv443 Dec 11, 2024
ac95baf
fix: I forgor
Sv443 Dec 11, 2024
fdbf35d
fix: remove extra lockfiles
Sv443 Dec 11, 2024
96d130a
feat: git sha in latency test report
Sv443 Dec 11, 2024
08f7b79
ref: vscode and eslint settings
Sv443 Dec 11, 2024
b7f5286
feat: ?limit param
Sv443 Dec 12, 2024
248b37e
ref: stuff that I forgor
Sv443 Dec 12, 2024
cb45642
docs: ?limit param
Sv443 Dec 12, 2024
29814fe
docs: random stuff
Sv443 Dec 12, 2024
06f3eea
docs: more random stuff
Sv443 Dec 12, 2024
4a4a6db
feat: start implementing 'noResults' response type
Sv443 Dec 13, 2024
a21e74b
ref: cache stuff and mime type map constant
Sv443 Dec 17, 2024
8cc61a1
docs: update changelog
Sv443 Dec 17, 2024
d457e11
docs: readme
Sv443 Dec 17, 2024
cf55cd1
fix: unit tests for routes with 0 matches
Sv443 Dec 17, 2024
212a1f2
ref: minor stuff
Sv443 Dec 17, 2024
10d58cc
ref: random minor refactors
Sv443 Dec 17, 2024
b0ebf60
fix: vuepress sidebar
Sv443 Dec 17, 2024
3542530
docs: route errors correction
Sv443 Dec 17, 2024
34ec358
chore: update deps
Sv443 Dec 17, 2024
c256119
ref: improve latency test again
Sv443 Dec 17, 2024
189f22b
fix: update pnpm lock
Sv443 Dec 12, 2024
930e922
ref: env util functions
Sv443 Dec 18, 2024
d83fb9f
ref: getenvvar
Sv443 Dec 22, 2024
d1850b9
ref: lat test
Sv443 Dec 22, 2024
2463233
fix: env var resolution
Sv443 Dec 22, 2024
de47cca
ref: yet more unimportant stuff
Sv443 Dec 22, 2024
12402e2
fix: env var resolution part 2
Sv443 Dec 22, 2024
ec9e199
chore: update deps
Sv443 Jan 23, 2025
95ea2a0
feat: AUTH_REQUIRED env var
Sv443 Jan 30, 2025
1fa5775
ref: move latency test
Sv443 Jan 30, 2025
3e60481
feat: gen-token script
Sv443 Jan 30, 2025
ad7b96e
ref: vsc settings; disable deno
Sv443 Jan 30, 2025
dfc1e15
ref: load api version through env var
Sv443 Jan 30, 2025
94841cc
fix: test stuff
Sv443 Jan 30, 2025
63b5114
fix: path aliases
Sv443 Jan 30, 2025
baaac1b
docs: stuff
Sv443 Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# Has to be either development or production
NODE_ENV=development

# Default is 8074
HTTP_PORT=8074
# Defaults to 0.0.0.0 (listen on all interfaces)
HTTP_HOST=
# Version identifier of the current API spec (needs to be incremented on breaking changes)
API_VERSION=v2

# Gotten from creating a client on https://genius.com/api-clients
GENIUS_ACCESS_TOKEN=

# Default is 8074
HTTP_PORT=8074
# Defaults to 0.0.0.0 (listen on all interfaces)
#HTTP_HOST=
# Whether to trust upstream (reverse) proxies like nginx
TRUST_PROXY=true
# Defaults to true - whether to serve the documentation page
HOST_HOMEPAGE=true

# Whether one of the auth tokens below is required to be able to interact with the API
AUTH_REQUIRED=false
# Comma-separated list of HTTP bearer tokens that are excluded from rate limiting (on geniURL's side)
# If you want to run the unit tests or latency test, at least one token needs to be generated and entered here
# Generate new tokens with `pnpm gen-token [<amount> <length>]`
AUTH_TOKENS=
43 changes: 0 additions & 43 deletions .eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: Sv443
ko_fi: Sv443
custom: ["paypal.me/Sv443"]
26 changes: 26 additions & 0 deletions .github/issue_template/1_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Report a bug
title: ''
labels: bug
assignees: Sv443

---

### Checklist:
<!-- After submitting this issue, please click on the checkboxes to check them after you have done the respective task -->
- [ ] I checked [here](https://github.com/Sv443/geniURL/issues?q=is%3Aissue+sort%3Aupdated-desc) if someone already reported the same bug


### Description of the bug and steps to reproduce:
<!--
Please write a clear and concise description of what the bug is and also include steps to reproduce it.
Don't shy away from going into detail, it's much more helpful than having too little info.
-->


### Other info / screenshots:
<!--
If you have any other info that might be helpful or if you have any screenshots, please include them here.
You can also drag and drop any files here.
-->
15 changes: 15 additions & 0 deletions .github/issue_template/2_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature request
about: Suggest a new or improved feature
title: ''
labels: enhancement
assignees: Sv443

---

### Description of the feature:
<!-- A clear and concise description of what feature you want to be added to geniURL -->


### Other info / sketches:
<!-- If applicable and possible, add other information or sketches to help explain your suggestion -->
8 changes: 8 additions & 0 deletions .github/issue_template/3_blank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Blank issue
about: Use this template if you don't know which one to choose
title: ''
labels:
assignees: Sv443

---
11 changes: 11 additions & 0 deletions .github/issue_template/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
# - name: "Contributor Guide"
# about: "Read the contributor guide to learn how to contribute to the project or how to create a plugin"
# url: "https://github.com/Sv443/geniURL/blob/main/contributing.md"
- name: "Discussions"
about: "Open a new thread on the discussion board if you have a question, want to show off your project, etc."
url: "https://github.com/Sv443/geniURL/discussions"
- name: "Chat on Discord"
about: "If you want, you can also join my Discord server"
url: "https://dc.sv443.net"
14 changes: 9 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,32 @@ on:
jobs:
analyze:
name: Analyze Code

runs-on: ubuntu-latest

timeout-minutes: 6

permissions:
actions: read
contents: read
security-events: write

strategy:
matrix:
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
language: ["javascript-typescript"]
# CodeQL supports "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -42,4 +46,4 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
51 changes: 51 additions & 0 deletions .github/workflows/deploy-docs.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy Docs

on:
workflow_dispatch:

permissions:
contents: write

jobs:
deploy-gh-pages:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

env:
DEPLOY_BRANCH: gh-pages

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# if your docs needs submodules, uncomment the following line
# submodules: true

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: true
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Build
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
pnpm run build-docs
> www/docs/.vuepress/dist/.nojekyll

- name: Deploy on GH Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: ${{ env.DEPLOY_BRANCH }}
folder: www/docs/.vuepress/dist
65 changes: 65 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "Lint and run tests"

on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
lint-and-test:
name: Lint and Test

runs-on: ubuntu-latest

timeout-minutes: 4

strategy:
matrix:
node-version: [22]

env:
CI: "true"
STORE_PATH: ""
PNPM_VERSION: 9

steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

- name: Set up pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Set up pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: Install dependencies
shell: bash
run: pnpm install

- name: Lint the code
shell: bash
run: pnpm run lint

- name: Run unit tests
shell: bash
run: |
echo "${{ secrets.DOTENV_FILE }}" > .env
pnpm run test
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ test.ts

node_modules/
*.log
out/
**/out/
**/dist/

**/.vuepress/.temp
**/.vuepress/.cache
**/.vuepress/dist

*.ignore.*
*.ignore

**/latency-test-reports/
54 changes: 49 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,53 @@
{
"eslint.validate": [
"javascript",
],
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative",
"javascript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.importModuleSpecifierEnding": "js",
"javascript.preferences.importModuleSpecifierEnding": "js",
"npm.packageManager": "pnpm",

"search.exclude": {
"**/*.user.js": true,
"**/BetterYTM.css": true,
},
"files.associations": {
".env": "dotenv",
".env.template": "dotenv",
"*.env": "dotenv",
"*.env.template": "dotenv",
},
"editor.tabSize": 2,

"deno.enable": false,

// requires extension: fabiospampinato.vscode-highlight
"highlight.regexes": {
"(TODO(\\((\\s|\\d|\\w|[,.-_+*&])+\\))?:?)": { // TODO: or TODO or TODO(xy): but not todo or todo:
"backgroundColor": "#ed0",
"color": "black",
"overviewRulerColor": "#ed0",
},
"((//\\s*|/\\*\\s*)?#region ([^\\S\\r\\n]*[\\(\\)\\w,.\\-_&+#*'\"/:]+)*)": { //#region test: (abc):
"backgroundColor": "#35b5d0",
"color": "#000",
"overviewRulerColor": "#35b5d0",
},
"((<!--\\s*)?</?\\{\\{[A-Z_-]+\\}\\}>(\\s*-->)?)": { // <!-- <{{FOO}}> --> and <!-- </{{FOO}}> --> or <{{BAR}}> and </{{BAR}}>
"backgroundColor": "#9af",
"overviewRulerColor": "#9af",
"color": "#000",
},
"(#?(DEBUG|DBG)#?)": { // #DEBUG or DEBUG or #DBG or #DBG#
"backgroundColor": "#ff3",
"color": "blue",
"overviewRulerColor": "#ff3",
},
"(IMPORTANT:)": { // IMPORTANT:
"backgroundColor": "#f34",
"color": "#000",
},
"(FIXME:)": { // FIXME:
"backgroundColor": "#811",
"color": "#fff",
"overviewRulerColor": "#811",
},
},
}
Loading