Compare commits
17 Commits
f061ab2ec5
...
renovate/s
Author | SHA1 | Date | |
---|---|---|---|
f259aca2e1 | |||
f717a6b610
|
|||
648d5cde32
|
|||
288ec34fb4
|
|||
4e03757d69
|
|||
f92035ed8e
|
|||
0e2117e4c7
|
|||
ec6c0a9a13
|
|||
34bcdc3b05
|
|||
e98ab85034
|
|||
255fbb521f
|
|||
ac60bda3bd
|
|||
bde980536d
|
|||
e6ebf6ca78
|
|||
9a16fa65c9
|
|||
8ba89d1885
|
|||
10772a8d6f
|
@ -1,28 +1,34 @@
|
|||||||
name: Build and publish the docker image
|
name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["custom"]
|
branches:
|
||||||
|
- "main"
|
||||||
|
paths-ignore:
|
||||||
|
- "README.md"
|
||||||
|
- "LICENSE.txt"
|
||||||
|
- "docker-compose.example.yml"
|
||||||
|
- "ups.json"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.ngn.tf
|
REGISTRY: git.ngn.tf
|
||||||
IMAGE: ${{gitea.repository}}
|
IMAGE: ${{gitea.repository}}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: "https://github.com/actions/checkout@v4"
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to container repo
|
- name: Login to container repo
|
||||||
uses: "https://github.com/docker/login-action@v1"
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{env.REGISTRY}}
|
registry: ${{env.REGISTRY}}
|
||||||
username: ${{gitea.actor}}
|
username: ${{gitea.actor}}
|
||||||
password: ${{secrets.PACKAGES_TOKEN}}
|
password: ${{secrets.PACKAGES_TOKEN}}
|
||||||
|
|
||||||
- name: Build image
|
- name: Build docker image
|
||||||
run: |
|
run: |
|
||||||
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
||||||
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
25
.gitea/workflows/ups.yml
Normal file
25
.gitea/workflows/ups.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: ups
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "@weekly"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ups:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update -y
|
||||||
|
sudo apt install -y python3 python3-build python3-requests make
|
||||||
|
|
||||||
|
- name: Install ups
|
||||||
|
run: |
|
||||||
|
git clone https://git.ngn.tf/ngn/ups && cd ups
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
- name: Run ups
|
||||||
|
run: PATH=~/.local/bin:$PATH ups-check
|
10
Dockerfile
10
Dockerfile
@ -1,20 +1,12 @@
|
|||||||
FROM node:lts-alpine AS deps
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
|
||||||
RUN pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
FROM node:lts-alpine AS builder
|
FROM node:lts-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
|
RUN pnpm install
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
FROM node:lts-alpine AS runner
|
FROM node:lts-alpine AS runner
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# [ngn.tf] | libremdb
|
# libremdb - IMDb frontend
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
A fork of the [libremdb](https://github.com/zyachel/libremdb) project, with my personal changes.
|
A fork of the [libremdb](https://github.com/zyachel/libremdb) project, with my
|
||||||
|
personal changes.
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- libremdb_redis
|
- libremdb_redis
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /opt/app/.next/cache/:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
- /app/.next/cache/:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
cap_drop:
|
cap_drop:
|
||||||
|
@ -9,6 +9,11 @@ const nextConfig = {
|
|||||||
destination: '/find',
|
destination: '/find',
|
||||||
permanent: true,
|
permanent: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
source: '/:langcode(\\w{2})/:slug*',
|
||||||
|
destination: '/:slug*',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
images: {
|
images: {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "libremdb",
|
"name": "libremdb",
|
||||||
"version": "4.1.0",
|
"version": "4.2.0",
|
||||||
"description": "a free & open source IMDb front-end",
|
"description": "a free & open source IMDb front-end",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@ -18,15 +18,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"cheerio": "1.0.0",
|
"cheerio": "1.0.0-rc.12",
|
||||||
"ioredis": "^5.3.2",
|
"ioredis": "^5.3.2",
|
||||||
"next": "12.2.5",
|
"next": "12.2.5",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"sharp": "^0.33.1"
|
"sharp": "^0.34.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "18.19.71",
|
"@types/node": "18.7.3",
|
||||||
"@types/react": "18.0.17",
|
"@types/react": "18.0.17",
|
||||||
"@types/react-dom": "18.0.6",
|
"@types/react-dom": "18.0.6",
|
||||||
"eslint": "8.22.0",
|
"eslint": "8.22.0",
|
||||||
|
126
pnpm-lock.yaml
generated
126
pnpm-lock.yaml
generated
@ -12,8 +12,8 @@ importers:
|
|||||||
specifier: ^0.27.2
|
specifier: ^0.27.2
|
||||||
version: 0.27.2
|
version: 0.27.2
|
||||||
cheerio:
|
cheerio:
|
||||||
specifier: 1.0.0
|
specifier: 1.0.0-rc.12
|
||||||
version: 1.0.0
|
version: 1.0.0-rc.12
|
||||||
ioredis:
|
ioredis:
|
||||||
specifier: ^5.3.2
|
specifier: ^5.3.2
|
||||||
version: 5.3.2
|
version: 5.3.2
|
||||||
@ -31,8 +31,8 @@ importers:
|
|||||||
version: 0.33.1
|
version: 0.33.1
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: 18.19.71
|
specifier: 18.7.3
|
||||||
version: 18.19.71
|
version: 18.7.3
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: 18.0.17
|
specifier: 18.0.17
|
||||||
version: 18.0.17
|
version: 18.0.17
|
||||||
@ -68,14 +68,12 @@ packages:
|
|||||||
'@humanwhocodes/config-array@0.10.7':
|
'@humanwhocodes/config-array@0.10.7':
|
||||||
resolution: {integrity: sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==}
|
resolution: {integrity: sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==}
|
||||||
engines: {node: '>=10.10.0'}
|
engines: {node: '>=10.10.0'}
|
||||||
deprecated: Use @eslint/config-array instead
|
|
||||||
|
|
||||||
'@humanwhocodes/gitignore-to-minimatch@1.0.2':
|
'@humanwhocodes/gitignore-to-minimatch@1.0.2':
|
||||||
resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==}
|
resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==}
|
||||||
|
|
||||||
'@humanwhocodes/object-schema@1.2.1':
|
'@humanwhocodes/object-schema@1.2.1':
|
||||||
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
|
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
|
||||||
deprecated: Use @eslint/object-schema instead
|
|
||||||
|
|
||||||
'@img/sharp-darwin-arm64@0.33.1':
|
'@img/sharp-darwin-arm64@0.33.1':
|
||||||
resolution: {integrity: sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==}
|
resolution: {integrity: sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==}
|
||||||
@ -298,8 +296,8 @@ packages:
|
|||||||
'@types/json5@0.0.29':
|
'@types/json5@0.0.29':
|
||||||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||||
|
|
||||||
'@types/node@18.19.71':
|
'@types/node@18.7.3':
|
||||||
resolution: {integrity: sha512-evXpcgtZm8FY4jqBSN8+DmOTcVkkvTmAayeo4Wf3m1xAruyVGzGuDh/Fb/WWX2yLItUiho42ozyJjB0dw//Tkw==}
|
resolution: {integrity: sha512-LJgzOEwWuMTBxHzgBR/fhhBOWrvBjvO+zPteUgbbuQi80rYIZHrk1mNbRUqPZqSLP2H7Rwt1EFLL/tNLD1Xx/w==}
|
||||||
|
|
||||||
'@types/prop-types@15.7.5':
|
'@types/prop-types@15.7.5':
|
||||||
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
|
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
|
||||||
@ -451,9 +449,9 @@ packages:
|
|||||||
cheerio-select@2.1.0:
|
cheerio-select@2.1.0:
|
||||||
resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==}
|
resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==}
|
||||||
|
|
||||||
cheerio@1.0.0:
|
cheerio@1.0.0-rc.12:
|
||||||
resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==}
|
resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==}
|
||||||
engines: {node: '>=18.17'}
|
engines: {node: '>= 6'}
|
||||||
|
|
||||||
chokidar@3.5.3:
|
chokidar@3.5.3:
|
||||||
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
|
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
|
||||||
@ -482,7 +480,7 @@ packages:
|
|||||||
engines: {node: '>= 0.8'}
|
engines: {node: '>= 0.8'}
|
||||||
|
|
||||||
concat-map@0.0.1:
|
concat-map@0.0.1:
|
||||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
|
||||||
|
|
||||||
cross-spawn@7.0.3:
|
cross-spawn@7.0.3:
|
||||||
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
|
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
|
||||||
@ -562,15 +560,12 @@ packages:
|
|||||||
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
|
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
|
||||||
engines: {node: '>= 4'}
|
engines: {node: '>= 4'}
|
||||||
|
|
||||||
domutils@3.2.2:
|
domutils@3.0.1:
|
||||||
resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==}
|
resolution: {integrity: sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==}
|
||||||
|
|
||||||
emoji-regex@9.2.2:
|
emoji-regex@9.2.2:
|
||||||
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
|
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
|
||||||
|
|
||||||
encoding-sniffer@0.2.0:
|
|
||||||
resolution: {integrity: sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==}
|
|
||||||
|
|
||||||
entities@4.5.0:
|
entities@4.5.0:
|
||||||
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
||||||
engines: {node: '>=0.12'}
|
engines: {node: '>=0.12'}
|
||||||
@ -686,7 +681,6 @@ packages:
|
|||||||
eslint@8.22.0:
|
eslint@8.22.0:
|
||||||
resolution: {integrity: sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==}
|
resolution: {integrity: sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
|
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
espree@9.5.1:
|
espree@9.5.1:
|
||||||
@ -798,11 +792,9 @@ packages:
|
|||||||
|
|
||||||
glob@7.1.7:
|
glob@7.1.7:
|
||||||
resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==}
|
resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==}
|
||||||
deprecated: Glob versions prior to v9 are no longer supported
|
|
||||||
|
|
||||||
glob@7.2.3:
|
glob@7.2.3:
|
||||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||||
deprecated: Glob versions prior to v9 are no longer supported
|
|
||||||
|
|
||||||
globals@13.20.0:
|
globals@13.20.0:
|
||||||
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
|
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
|
||||||
@ -848,12 +840,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
|
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
|
||||||
engines: {node: '>= 0.4.0'}
|
engines: {node: '>= 0.4.0'}
|
||||||
|
|
||||||
htmlparser2@9.1.0:
|
htmlparser2@8.0.2:
|
||||||
resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==}
|
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
|
||||||
|
|
||||||
iconv-lite@0.6.3:
|
|
||||||
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
|
|
||||||
ignore@5.2.4:
|
ignore@5.2.4:
|
||||||
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
|
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
|
||||||
@ -872,7 +860,6 @@ packages:
|
|||||||
|
|
||||||
inflight@1.0.6:
|
inflight@1.0.6:
|
||||||
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
|
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
|
||||||
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
|
|
||||||
|
|
||||||
inherits@2.0.4:
|
inherits@2.0.4:
|
||||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||||
@ -1146,9 +1133,6 @@ packages:
|
|||||||
parse5-htmlparser2-tree-adapter@7.0.0:
|
parse5-htmlparser2-tree-adapter@7.0.0:
|
||||||
resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==}
|
resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==}
|
||||||
|
|
||||||
parse5-parser-stream@7.1.2:
|
|
||||||
resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==}
|
|
||||||
|
|
||||||
parse5@7.1.2:
|
parse5@7.1.2:
|
||||||
resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==}
|
resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==}
|
||||||
|
|
||||||
@ -1249,7 +1233,6 @@ packages:
|
|||||||
|
|
||||||
rimraf@3.0.2:
|
rimraf@3.0.2:
|
||||||
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
|
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
|
||||||
deprecated: Rimraf versions prior to v4 are no longer supported
|
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
run-parallel@1.2.0:
|
run-parallel@1.2.0:
|
||||||
@ -1258,9 +1241,6 @@ packages:
|
|||||||
safe-regex-test@1.0.0:
|
safe-regex-test@1.0.0:
|
||||||
resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
|
resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
|
||||||
|
|
||||||
safer-buffer@2.1.2:
|
|
||||||
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
|
||||||
|
|
||||||
sass@1.62.1:
|
sass@1.62.1:
|
||||||
resolution: {integrity: sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A==}
|
resolution: {integrity: sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
@ -1378,9 +1358,6 @@ packages:
|
|||||||
tslib@2.5.0:
|
tslib@2.5.0:
|
||||||
resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==}
|
resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==}
|
||||||
|
|
||||||
tslib@2.6.2:
|
|
||||||
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
|
||||||
|
|
||||||
tsutils@3.21.0:
|
tsutils@3.21.0:
|
||||||
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
|
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
@ -1406,13 +1383,6 @@ packages:
|
|||||||
unbox-primitive@1.0.2:
|
unbox-primitive@1.0.2:
|
||||||
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
|
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
|
||||||
|
|
||||||
undici-types@5.26.5:
|
|
||||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
|
||||||
|
|
||||||
undici@6.21.1:
|
|
||||||
resolution: {integrity: sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==}
|
|
||||||
engines: {node: '>=18.17'}
|
|
||||||
|
|
||||||
uri-js@4.4.1:
|
uri-js@4.4.1:
|
||||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||||
|
|
||||||
@ -1424,14 +1394,6 @@ packages:
|
|||||||
v8-compile-cache@2.3.0:
|
v8-compile-cache@2.3.0:
|
||||||
resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==}
|
resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==}
|
||||||
|
|
||||||
whatwg-encoding@3.1.1:
|
|
||||||
resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==}
|
|
||||||
engines: {node: '>=18'}
|
|
||||||
|
|
||||||
whatwg-mimetype@4.0.0:
|
|
||||||
resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==}
|
|
||||||
engines: {node: '>=18'}
|
|
||||||
|
|
||||||
which-boxed-primitive@1.0.2:
|
which-boxed-primitive@1.0.2:
|
||||||
resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
|
resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
|
||||||
|
|
||||||
@ -1469,7 +1431,7 @@ snapshots:
|
|||||||
|
|
||||||
'@emnapi/runtime@0.44.0':
|
'@emnapi/runtime@0.44.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.6.2
|
tslib: 2.5.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@eslint/eslintrc@1.4.1':
|
'@eslint/eslintrc@1.4.1':
|
||||||
@ -1640,9 +1602,7 @@ snapshots:
|
|||||||
|
|
||||||
'@types/json5@0.0.29': {}
|
'@types/json5@0.0.29': {}
|
||||||
|
|
||||||
'@types/node@18.19.71':
|
'@types/node@18.7.3': {}
|
||||||
dependencies:
|
|
||||||
undici-types: 5.26.5
|
|
||||||
|
|
||||||
'@types/prop-types@15.7.5': {}
|
'@types/prop-types@15.7.5': {}
|
||||||
|
|
||||||
@ -1818,21 +1778,17 @@ snapshots:
|
|||||||
css-what: 6.1.0
|
css-what: 6.1.0
|
||||||
domelementtype: 2.3.0
|
domelementtype: 2.3.0
|
||||||
domhandler: 5.0.3
|
domhandler: 5.0.3
|
||||||
domutils: 3.2.2
|
domutils: 3.0.1
|
||||||
|
|
||||||
cheerio@1.0.0:
|
cheerio@1.0.0-rc.12:
|
||||||
dependencies:
|
dependencies:
|
||||||
cheerio-select: 2.1.0
|
cheerio-select: 2.1.0
|
||||||
dom-serializer: 2.0.0
|
dom-serializer: 2.0.0
|
||||||
domhandler: 5.0.3
|
domhandler: 5.0.3
|
||||||
domutils: 3.2.2
|
domutils: 3.0.1
|
||||||
encoding-sniffer: 0.2.0
|
htmlparser2: 8.0.2
|
||||||
htmlparser2: 9.1.0
|
|
||||||
parse5: 7.1.2
|
parse5: 7.1.2
|
||||||
parse5-htmlparser2-tree-adapter: 7.0.0
|
parse5-htmlparser2-tree-adapter: 7.0.0
|
||||||
parse5-parser-stream: 7.1.2
|
|
||||||
undici: 6.21.1
|
|
||||||
whatwg-mimetype: 4.0.0
|
|
||||||
|
|
||||||
chokidar@3.5.3:
|
chokidar@3.5.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -1881,7 +1837,7 @@ snapshots:
|
|||||||
boolbase: 1.0.0
|
boolbase: 1.0.0
|
||||||
css-what: 6.1.0
|
css-what: 6.1.0
|
||||||
domhandler: 5.0.3
|
domhandler: 5.0.3
|
||||||
domutils: 3.2.2
|
domutils: 3.0.1
|
||||||
nth-check: 2.1.1
|
nth-check: 2.1.1
|
||||||
|
|
||||||
css-what@6.1.0: {}
|
css-what@6.1.0: {}
|
||||||
@ -1955,7 +1911,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
domelementtype: 2.3.0
|
domelementtype: 2.3.0
|
||||||
|
|
||||||
domutils@3.2.2:
|
domutils@3.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
dom-serializer: 2.0.0
|
dom-serializer: 2.0.0
|
||||||
domelementtype: 2.3.0
|
domelementtype: 2.3.0
|
||||||
@ -1963,11 +1919,6 @@ snapshots:
|
|||||||
|
|
||||||
emoji-regex@9.2.2: {}
|
emoji-regex@9.2.2: {}
|
||||||
|
|
||||||
encoding-sniffer@0.2.0:
|
|
||||||
dependencies:
|
|
||||||
iconv-lite: 0.6.3
|
|
||||||
whatwg-encoding: 3.1.1
|
|
||||||
|
|
||||||
entities@4.5.0: {}
|
entities@4.5.0: {}
|
||||||
|
|
||||||
es-abstract@1.21.2:
|
es-abstract@1.21.2:
|
||||||
@ -2045,7 +1996,7 @@ snapshots:
|
|||||||
eslint: 8.22.0
|
eslint: 8.22.0
|
||||||
eslint-import-resolver-node: 0.3.7
|
eslint-import-resolver-node: 0.3.7
|
||||||
eslint-import-resolver-typescript: 2.7.1(eslint-plugin-import@2.27.5(eslint@8.22.0))(eslint@8.22.0)
|
eslint-import-resolver-typescript: 2.7.1(eslint-plugin-import@2.27.5(eslint@8.22.0))(eslint@8.22.0)
|
||||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.1(eslint@8.22.0)(typescript@4.7.4))(eslint-import-resolver-typescript@2.7.1)(eslint@8.22.0)
|
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.1(eslint@8.22.0)(typescript@4.7.4))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.27.5(eslint@8.22.0))(eslint@8.22.0))(eslint@8.22.0)
|
||||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.22.0)
|
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.22.0)
|
||||||
eslint-plugin-react: 7.32.2(eslint@8.22.0)
|
eslint-plugin-react: 7.32.2(eslint@8.22.0)
|
||||||
eslint-plugin-react-hooks: 4.6.0(eslint@8.22.0)
|
eslint-plugin-react-hooks: 4.6.0(eslint@8.22.0)
|
||||||
@ -2067,7 +2018,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 8.22.0
|
eslint: 8.22.0
|
||||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.1(eslint@8.22.0)(typescript@4.7.4))(eslint-import-resolver-typescript@2.7.1)(eslint@8.22.0)
|
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.1(eslint@8.22.0)(typescript@4.7.4))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.27.5(eslint@8.22.0))(eslint@8.22.0))(eslint@8.22.0)
|
||||||
glob: 7.2.3
|
glob: 7.2.3
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
resolve: 1.22.2
|
resolve: 1.22.2
|
||||||
@ -2086,7 +2037,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.1(eslint@8.22.0)(typescript@4.7.4))(eslint-import-resolver-typescript@2.7.1)(eslint@8.22.0):
|
eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.1(eslint@8.22.0)(typescript@4.7.4))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.27.5(eslint@8.22.0))(eslint@8.22.0))(eslint@8.22.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes: 3.1.6
|
array-includes: 3.1.6
|
||||||
array.prototype.flat: 1.3.1
|
array.prototype.flat: 1.3.1
|
||||||
@ -2378,17 +2329,13 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
function-bind: 1.1.1
|
function-bind: 1.1.1
|
||||||
|
|
||||||
htmlparser2@9.1.0:
|
htmlparser2@8.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
domelementtype: 2.3.0
|
domelementtype: 2.3.0
|
||||||
domhandler: 5.0.3
|
domhandler: 5.0.3
|
||||||
domutils: 3.2.2
|
domutils: 3.0.1
|
||||||
entities: 4.5.0
|
entities: 4.5.0
|
||||||
|
|
||||||
iconv-lite@0.6.3:
|
|
||||||
dependencies:
|
|
||||||
safer-buffer: 2.1.2
|
|
||||||
|
|
||||||
ignore@5.2.4: {}
|
ignore@5.2.4: {}
|
||||||
|
|
||||||
immutable@4.3.0: {}
|
immutable@4.3.0: {}
|
||||||
@ -2702,10 +2649,6 @@ snapshots:
|
|||||||
domhandler: 5.0.3
|
domhandler: 5.0.3
|
||||||
parse5: 7.1.2
|
parse5: 7.1.2
|
||||||
|
|
||||||
parse5-parser-stream@7.1.2:
|
|
||||||
dependencies:
|
|
||||||
parse5: 7.1.2
|
|
||||||
|
|
||||||
parse5@7.1.2:
|
parse5@7.1.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
entities: 4.5.0
|
entities: 4.5.0
|
||||||
@ -2804,8 +2747,6 @@ snapshots:
|
|||||||
get-intrinsic: 1.2.0
|
get-intrinsic: 1.2.0
|
||||||
is-regex: 1.1.4
|
is-regex: 1.1.4
|
||||||
|
|
||||||
safer-buffer@2.1.2: {}
|
|
||||||
|
|
||||||
sass@1.62.1:
|
sass@1.62.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
chokidar: 3.5.3
|
chokidar: 3.5.3
|
||||||
@ -2942,9 +2883,6 @@ snapshots:
|
|||||||
|
|
||||||
tslib@2.5.0: {}
|
tslib@2.5.0: {}
|
||||||
|
|
||||||
tslib@2.6.2:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
tsutils@3.21.0(typescript@4.7.4):
|
tsutils@3.21.0(typescript@4.7.4):
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 1.14.1
|
tslib: 1.14.1
|
||||||
@ -2971,10 +2909,6 @@ snapshots:
|
|||||||
has-symbols: 1.0.3
|
has-symbols: 1.0.3
|
||||||
which-boxed-primitive: 1.0.2
|
which-boxed-primitive: 1.0.2
|
||||||
|
|
||||||
undici-types@5.26.5: {}
|
|
||||||
|
|
||||||
undici@6.21.1: {}
|
|
||||||
|
|
||||||
uri-js@4.4.1:
|
uri-js@4.4.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode: 2.3.0
|
punycode: 2.3.0
|
||||||
@ -2985,12 +2919,6 @@ snapshots:
|
|||||||
|
|
||||||
v8-compile-cache@2.3.0: {}
|
v8-compile-cache@2.3.0: {}
|
||||||
|
|
||||||
whatwg-encoding@3.1.1:
|
|
||||||
dependencies:
|
|
||||||
iconv-lite: 0.6.3
|
|
||||||
|
|
||||||
whatwg-mimetype@4.0.0: {}
|
|
||||||
|
|
||||||
which-boxed-primitive@1.0.2:
|
which-boxed-primitive@1.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-bigint: 1.0.4
|
is-bigint: 1.0.4
|
||||||
|
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
onlyBuiltDependencies:
|
||||||
|
- sharp
|
7
public/opensearch.xml
Normal file
7
public/opensearch.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||||
|
<ShortName>libremdb</ShortName>
|
||||||
|
<Description>Search libremdb</Description>
|
||||||
|
<InputEncoding>UTF-8</InputEncoding>
|
||||||
|
<Image width="16" height="16" type="image/x-icon">https://libremdb.iket.me/favicon.ico</Image>
|
||||||
|
<Url type="text/html" method="get" template="https://libremdb.iket.me/find?q={searchTerms}"/>
|
||||||
|
</OpenSearchDescription>
|
@ -11,6 +11,7 @@ type Props = {
|
|||||||
message: string;
|
message: string;
|
||||||
statusCode?: number;
|
statusCode?: number;
|
||||||
originalPath?: string;
|
originalPath?: string;
|
||||||
|
stack?: string;
|
||||||
/** props specific to error boundary. */
|
/** props specific to error boundary. */
|
||||||
misc?: {
|
misc?: {
|
||||||
subtext: string;
|
subtext: string;
|
||||||
@ -19,7 +20,9 @@ type Props = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const ErrorInfo = ({ message, statusCode, misc, originalPath }: Props) => {
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
|
const ErrorInfo = ({ message, statusCode, misc, originalPath, stack }: Props) => {
|
||||||
const title = statusCode ? `${message} (${statusCode})` : message;
|
const title = statusCode ? `${message} (${statusCode})` : message;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -39,6 +42,11 @@ const ErrorInfo = ({ message, statusCode, misc, originalPath }: Props) => {
|
|||||||
<use href='/svg/sadgnu.svg#sad-gnu'></use>
|
<use href='/svg/sadgnu.svg#sad-gnu'></use>
|
||||||
</svg>
|
</svg>
|
||||||
<h1 className={`heading heading__primary ${styles.heading}`}>{title}</h1>
|
<h1 className={`heading heading__primary ${styles.heading}`}>{title}</h1>
|
||||||
|
{Boolean(stack && isDev) && (
|
||||||
|
<pre className={styles.stack}>
|
||||||
|
<code>{stack}</code>
|
||||||
|
</pre>
|
||||||
|
)}
|
||||||
{misc ? (
|
{misc ? (
|
||||||
<>
|
<>
|
||||||
<p>{misc.subtext}</p>
|
<p>{misc.subtext}</p>
|
||||||
@ -64,6 +72,13 @@ const ErrorInfo = ({ message, statusCode, misc, originalPath }: Props) => {
|
|||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
<p>
|
||||||
|
If you think this shouldn't happen,{' '}
|
||||||
|
<Link href='/contact'>
|
||||||
|
<a className='link'>let it be known</a>
|
||||||
|
</Link>
|
||||||
|
.
|
||||||
|
</p>
|
||||||
</Layout>
|
</Layout>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -14,32 +14,41 @@ type Props = {
|
|||||||
const Media = ({ className, media }: Props) => {
|
const Media = ({ className, media }: Props) => {
|
||||||
return (
|
return (
|
||||||
<div className={`${className} ${styles.media}`}>
|
<div className={`${className} ${styles.media}`}>
|
||||||
{(media.trailer || !!media.videos.total) && (
|
{(media.trailers?.length || !!media.videos.total) && (
|
||||||
<section className={styles.videos}>
|
<section className={styles.videos}>
|
||||||
<h2 className='heading heading__secondary'>Videos</h2>
|
<h2 className='heading heading__secondary'>Videos</h2>
|
||||||
|
|
||||||
<div className={styles.videos__container}>
|
<div className={styles.videos__container}>
|
||||||
{media.trailer && (
|
{media.trailers?.map(trailer => (
|
||||||
<div className={styles.trailer}>
|
<div className={styles.trailer} key={trailer.id}>
|
||||||
<video
|
<video
|
||||||
aria-label='trailer video'
|
aria-label={trailer.caption ?? 'trailer video'}
|
||||||
controls
|
controls
|
||||||
playsInline
|
playsInline
|
||||||
poster={getProxiedIMDbImgUrl(modifyIMDbImg(media.trailer.thumbnail))}
|
poster={getProxiedIMDbImgUrl(modifyIMDbImg(trailer.thumbnail))}
|
||||||
className={styles.trailer__video}
|
className={styles.trailer__video}
|
||||||
preload='none'
|
preload='none'
|
||||||
|
muted
|
||||||
>
|
>
|
||||||
{media.trailer.urls.map(source => (
|
{trailer.urls.map(source => (
|
||||||
<source
|
<source
|
||||||
key={source.url}
|
key={source.url}
|
||||||
type={source.mimeType ?? undefined}
|
type='video/mp4'
|
||||||
src={getProxiedIMDbImgUrl(source.url)}
|
src={getProxiedIMDbImgUrl(source.url)}
|
||||||
|
media={source.resolution !== 'SD' ? '(min-width: 450px)' : undefined}
|
||||||
data-res={source.resolution}
|
data-res={source.resolution}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{trailer.caption}:{' '}
|
||||||
|
<Link href={getProxiedIMDbImgUrl(trailer.urls[0]?.url)}>
|
||||||
|
<a className='link'>link</a>
|
||||||
|
</Link>
|
||||||
|
</p>
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
)}
|
))}
|
||||||
|
|
||||||
{!!media.videos.total &&
|
{!!media.videos.total &&
|
||||||
media.videos.videos.map(video => (
|
media.videos.videos.map(video => (
|
||||||
|
@ -36,6 +36,13 @@ const Meta = ({
|
|||||||
<meta property='og:locale' content='en_US' />
|
<meta property='og:locale' content='en_US' />
|
||||||
<meta property='og:type' content='video.movie' />
|
<meta property='og:type' content='video.movie' />
|
||||||
<meta property='og:image' content={url.toString()} />
|
<meta property='og:image' content={url.toString()} />
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel='search'
|
||||||
|
type='application/opensearchdescription+xml'
|
||||||
|
href='/opensearch.xml'
|
||||||
|
title='libremdb'
|
||||||
|
></link>
|
||||||
</Head>
|
</Head>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -9,6 +9,10 @@ type Props = {
|
|||||||
const DidYouKnow = ({ data }: Props) => (
|
const DidYouKnow = ({ data }: Props) => (
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
<h2 className='heading heading__secondary'>Did you know</h2>
|
<h2 className='heading heading__secondary'>Did you know</h2>
|
||||||
|
{isEmpty(data) ? (
|
||||||
|
<p>Nothing interesting to show.</p>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
{!!data.trivia?.total && (
|
{!!data.trivia?.total && (
|
||||||
<section>
|
<section>
|
||||||
<h3 className='heading heading__tertiary'>Trivia</h3>
|
<h3 className='heading heading__tertiary'>Trivia</h3>
|
||||||
@ -45,7 +49,14 @@ const DidYouKnow = ({ data }: Props) => (
|
|||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default DidYouKnow;
|
export default DidYouKnow;
|
||||||
|
|
||||||
|
const isEmpty = (data: Props['data']) =>
|
||||||
|
Boolean(
|
||||||
|
!data.nicknames.length && !data.quotes && !data.salary && !data.trademark && !data.trivia
|
||||||
|
);
|
@ -86,6 +86,21 @@ const Basic = ({ data, className }: Props) => {
|
|||||||
))}
|
))}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{!!data.interests.length && (
|
||||||
|
<p className={styles.genres}>
|
||||||
|
<span className={styles.genres__heading}>Interests: </span>
|
||||||
|
{data.interests.map((interest, i) => (
|
||||||
|
<Fragment key={interest.id}>
|
||||||
|
{i > 0 && ', '}
|
||||||
|
<Link href={`/interest/${interest.id}`}>
|
||||||
|
<a className={styles.link}>{interest.text}</a>
|
||||||
|
</Link>
|
||||||
|
</Fragment>
|
||||||
|
))}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
|
||||||
<p className={styles.overview}>
|
<p className={styles.overview}>
|
||||||
<span className={styles.overview__heading}>Plot: </span>
|
<span className={styles.overview__heading}>Plot: </span>
|
||||||
<span className={styles.overview__text}>{data.plot || '-'}</span>
|
<span className={styles.overview__text}>{data.plot || '-'}</span>
|
||||||
|
@ -7,7 +7,13 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const DidYouKnow = ({ data }: Props) => {
|
const DidYouKnow = ({ data }: Props) => {
|
||||||
if (!Object.keys(data).length) return <></>;
|
if (!Object.keys(data).length)
|
||||||
|
return (
|
||||||
|
<section className={styles.didYouKnow}>
|
||||||
|
<h2 className='heading heading__secondary'>Did you know</h2>
|
||||||
|
<p>Nothing interesting to show.</p>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<section className={styles.didYouKnow}>
|
<section className={styles.didYouKnow}>
|
||||||
<h2 className='heading heading__secondary'>Did you know</h2>
|
<h2 className='heading heading__secondary'>Did you know</h2>
|
||||||
|
@ -1,82 +1,127 @@
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { Reviews } from 'src/interfaces/shared/title';
|
import type { Reviews as TReviews } from 'src/interfaces/shared/title';
|
||||||
import { formatNumber } from 'src/utils/helpers';
|
import { formatNumber } from 'src/utils/helpers';
|
||||||
import styles from 'src/styles/modules/components/title/reviews.module.scss';
|
import styles from 'src/styles/modules/components/title/reviews.module.scss';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
reviews: Reviews;
|
reviews: TReviews;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Reviews = ({ reviews }: Props) => {
|
const Reviews = ({ reviews }: Props) => {
|
||||||
const router = useRouter();
|
|
||||||
const { titleId } = router.query;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={styles.reviews}>
|
<section className={styles.reviews}>
|
||||||
<h2 className="heading heading__secondary">Reviews</h2>
|
<h2 className='heading heading__secondary'>Reviews</h2>
|
||||||
|
|
||||||
{reviews.featuredReview && (
|
<RatingsDistribution ratings={reviews.ratingsDistribution} />
|
||||||
<article className={styles.reviews__reviewContainer}>
|
|
||||||
|
<section className={styles.userReviews}>
|
||||||
|
<h3 className='heading heading__tertiary'>User Reviews</h3>
|
||||||
|
{reviews.featuredReviews ? (
|
||||||
|
<ul className={styles.userReviews__list} role='list'>
|
||||||
|
{reviews.featuredReviews.map(featuredReview => (
|
||||||
|
<li key={featuredReview.id}>
|
||||||
<details className={styles.review}>
|
<details className={styles.review}>
|
||||||
<summary className={styles.review__summary}>
|
<summary className={styles.review__summary}>
|
||||||
<strong>{reviews.featuredReview.review.summary}</strong>
|
<strong>{featuredReview.review.summary}</strong>
|
||||||
</summary>
|
</summary>
|
||||||
<div
|
<div
|
||||||
className={styles.review__text}
|
className={styles.review__text}
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: reviews.featuredReview.review.html,
|
__html: featuredReview.review.html,
|
||||||
}}
|
}}
|
||||||
></div>
|
></div>
|
||||||
</details>
|
|
||||||
<footer className={styles.review__metadata}>
|
<footer className={styles.review__metadata}>
|
||||||
<p>
|
<p>
|
||||||
{reviews.featuredReview.rating && (
|
{featuredReview.rating && <span>Rated {featuredReview.rating}/10</span>}
|
||||||
<span>Rated {reviews.featuredReview.rating}/10</span>
|
|
||||||
)}
|
|
||||||
<span>
|
<span>
|
||||||
{' '}
|
{' '}
|
||||||
by{' '}
|
by{' '}
|
||||||
<Link href={`/user/${reviews.featuredReview.reviewer.id}`}>
|
<Link href={`/user/${featuredReview.reviewer.id}`}>
|
||||||
<a className="link">{reviews.featuredReview.reviewer.name}</a>
|
<a className='link'>{featuredReview.reviewer.name}</a>
|
||||||
</Link>
|
</Link>
|
||||||
</span>
|
</span>
|
||||||
<span> on {reviews.featuredReview.date}.</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<span>
|
|
||||||
{formatNumber(reviews.featuredReview.votes.up)} upvotes
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
, {formatNumber(reviews.featuredReview.votes.down)} downvotes
|
|
||||||
</span>
|
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</details>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
<p>No reviews yet.</p>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{reviews.ai?.summary && (
|
||||||
|
<details className={styles.reviewAi}>
|
||||||
|
<summary className='heading heading__tertiary'>AI Summary</summary>
|
||||||
|
<p dangerouslySetInnerHTML={{ __html: reviews.ai.summary }} />
|
||||||
|
<ul>
|
||||||
|
{reviews.ai.themes.map(theme => (
|
||||||
|
<li key={theme.id}>{theme.text}</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className={styles.reviews__stats}>
|
<ReviewStats reviews={reviews} />
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Reviews;
|
||||||
|
|
||||||
|
const RatingsDistribution = ({ ratings }: { ratings: Props['reviews']['ratingsDistribution'] }) => {
|
||||||
|
const maxRating = Math.max(...ratings.map(r => r.votes));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.ratingsDistribution}>
|
||||||
|
<h3 className='heading heading__tertiary'>Ratings Distribution</h3>
|
||||||
|
{ratings.length ? (
|
||||||
|
<ul>
|
||||||
|
{ratings.map(rating => (
|
||||||
|
<li
|
||||||
|
key={rating.rating}
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
'--bar-height': `${((rating.votes / maxRating) * 100).toFixed(2)}%`,
|
||||||
|
} as React.CSSProperties
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
{rating.rating} <span>({formatNumber(rating.votes)})</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
<p>No ratings yet.</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ReviewStats = ({ reviews }: { reviews: Props['reviews'] }) => {
|
||||||
|
const router = useRouter();
|
||||||
|
const { titleId } = router.query;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.reviewStats}>
|
||||||
<p>
|
<p>
|
||||||
<Link href={`/title/${titleId}/reviews`}>
|
<Link href={`/title/${titleId}/reviews`}>
|
||||||
<a className="link">
|
<a className='link'>{formatNumber(reviews.numUserReviews)} User reviews</a>
|
||||||
{formatNumber(reviews.numUserReviews)} User reviews
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<Link href={`/title/${titleId}/externalreviews`}>
|
<Link href={`/title/${titleId}/externalreviews`}>
|
||||||
<a className="link">
|
<a className='link'>{formatNumber(reviews.numCriticReviews)} Critic reviews</a>
|
||||||
{formatNumber(reviews.numCriticReviews)} Critic reviews
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<Link href={`/title/${titleId}/criticreviews`}>
|
<Link href={`/title/${titleId}/criticreviews`}>
|
||||||
<a className="link"> {reviews.metacriticScore} Metascore</a>
|
<a className='link'> {reviews.metacriticScore} Metascore</a>
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default Reviews;
|
|
||||||
|
@ -143,7 +143,7 @@ export default interface Name {
|
|||||||
value: string;
|
value: string;
|
||||||
language: string;
|
language: string;
|
||||||
};
|
};
|
||||||
mimeType?: string;
|
videoMimeType?: string;
|
||||||
url: string;
|
url: string;
|
||||||
}>;
|
}>;
|
||||||
recommendedTimedTextTrack?: {
|
recommendedTimedTextTrack?: {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
|||||||
import { AppError as AppErrorClass } from 'src/utils/helpers';
|
import { AppError as AppErrorClass } from 'src/utils/helpers';
|
||||||
|
|
||||||
export type AppError = Omit<InstanceType<typeof AppErrorClass>, 'name'>;
|
export type AppError = Pick<InstanceType<typeof AppErrorClass>, 'message' | 'statusCode' | 'stack'>;
|
||||||
|
@ -67,13 +67,13 @@ export const getServerSideProps: GetServerSideProps<Data, FindQueryParams> = asy
|
|||||||
props: { data: { title: query, results: res }, error: null, originalPath },
|
props: { data: { title: query, results: res }, error: null, originalPath },
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const { message, statusCode } = getErrorProperties(error);
|
const err = getErrorProperties(error);
|
||||||
ctx.res.statusCode = statusCode;
|
ctx.res.statusCode = err.statusCode;
|
||||||
ctx.res.statusMessage = message;
|
ctx.res.statusMessage = err.message;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
error: { message, statusCode },
|
error: { message: err.message, statusCode: err.statusCode, stack: err.format() },
|
||||||
data: { title: query, results: null },
|
data: { title: query, results: null },
|
||||||
originalPath,
|
originalPath,
|
||||||
},
|
},
|
||||||
|
@ -55,11 +55,17 @@ export const getServerSideProps: GetServerSideProps<Data, Params> = async ctx =>
|
|||||||
|
|
||||||
return { props: { data, error: null, originalPath } };
|
return { props: { data, error: null, originalPath } };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const { message, statusCode } = getErrorProperties(error);
|
const err = getErrorProperties(error);
|
||||||
ctx.res.statusCode = statusCode;
|
ctx.res.statusCode = err.statusCode;
|
||||||
ctx.res.statusMessage = message;
|
ctx.res.statusMessage = err.message;
|
||||||
|
|
||||||
return { props: { error: { message, statusCode }, data: null, originalPath } };
|
return {
|
||||||
|
props: {
|
||||||
|
error: { message: err.message, statusCode: err.statusCode, stack: err.format() },
|
||||||
|
data: null,
|
||||||
|
originalPath,
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import ErrorInfo from 'src/components/error/ErrorInfo';
|
|||||||
import Media from 'src/components/media/Media';
|
import Media from 'src/components/media/Media';
|
||||||
import { Basic, Cast, DidYouKnow, Info, MoreLikeThis, Reviews } from 'src/components/title';
|
import { Basic, Cast, DidYouKnow, Info, MoreLikeThis, Reviews } from 'src/components/title';
|
||||||
import Title from 'src/interfaces/shared/title';
|
import Title from 'src/interfaces/shared/title';
|
||||||
import { AppError } from 'src/interfaces/shared/error';
|
import type { AppError } from 'src/interfaces/shared/error';
|
||||||
import getOrSetApiCache from 'src/utils/getOrSetApiCache';
|
import getOrSetApiCache from 'src/utils/getOrSetApiCache';
|
||||||
import title from 'src/utils/fetchers/title';
|
import title from 'src/utils/fetchers/title';
|
||||||
import { getErrorProperties, getProxiedIMDbImgUrl } from 'src/utils/helpers';
|
import { getErrorProperties, getProxiedIMDbImgUrl } from 'src/utils/helpers';
|
||||||
@ -63,12 +63,18 @@ export const getServerSideProps: GetServerSideProps<Data, Params> = async ctx =>
|
|||||||
const data = await getOrSetApiCache(titleKey(titleId), title, titleId);
|
const data = await getOrSetApiCache(titleKey(titleId), title, titleId);
|
||||||
|
|
||||||
return { props: { data, error: null, originalPath } };
|
return { props: { data, error: null, originalPath } };
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
const { message, statusCode } = getErrorProperties(error);
|
const err = getErrorProperties(e);
|
||||||
ctx.res.statusCode = statusCode;
|
ctx.res.statusCode = err.statusCode;
|
||||||
ctx.res.statusMessage = message;
|
ctx.res.statusMessage = err.message;
|
||||||
|
|
||||||
return { props: { error: { message, statusCode }, data: null, originalPath } };
|
const error = {
|
||||||
|
message: err.message,
|
||||||
|
statusCode: err.statusCode,
|
||||||
|
stack: err.format(),
|
||||||
|
};
|
||||||
|
console.error(err);
|
||||||
|
return { props: { error, data: null, originalPath } };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
gap: var(--spacer-1);
|
gap: var(--comp-whitespace);
|
||||||
|
|
||||||
@include helper.bp('bp-700') {
|
@include helper.bp('bp-700') {
|
||||||
--doc-whitespace: var(--spacer-5);
|
--doc-whitespace: var(--spacer-5);
|
||||||
@ -31,6 +31,19 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stack {
|
||||||
|
max-width: 90%;
|
||||||
|
max-height: 20rem;
|
||||||
|
padding: var(--spacer-3);
|
||||||
|
white-space: pre-wrap;
|
||||||
|
overflow: scroll;
|
||||||
|
|
||||||
|
user-select: all;
|
||||||
|
|
||||||
|
border-radius: var(--spacer-1);
|
||||||
|
background-color: var(--clr-bg-muted);
|
||||||
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
align-self: end;
|
align-self: end;
|
||||||
|
|
||||||
|
@ -1,26 +1,94 @@
|
|||||||
.reviews {
|
.reviews {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--comp-whitespace);
|
gap: var(--comp-whitespace);
|
||||||
|
}
|
||||||
|
|
||||||
&__reviewContainer {
|
.ratingsDistribution {
|
||||||
// background-color: antiquewhite;
|
overflow: hidden;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
gap: var(--spacer-2);
|
||||||
|
overflow-x: auto;
|
||||||
|
padding-block: var(--spacer-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__stats {
|
li {
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 5em;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
|
||||||
|
height: var(--bar-height);
|
||||||
|
margin-top: auto;
|
||||||
|
background-color: var(--clr-fill);
|
||||||
|
width: var(--spacer-6);
|
||||||
|
border-radius: var(--spacer-0);
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-weight: var(--fw-bold);
|
||||||
|
|
||||||
|
> span {
|
||||||
|
font-weight: initial;
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: var(--clr-text-muted);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reviewAi {
|
||||||
|
summary {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
padding-block: var(--spacer-2);
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
gap: var(--spacer-1);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
li {
|
||||||
|
padding: var(--spacer-1);
|
||||||
|
background-color: var(--clr-bg-muted);
|
||||||
|
border-radius: var(--spacer-0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reviewStats {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: var(--spacer-2);
|
gap: var(--spacer-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.userReviews {
|
||||||
|
|
||||||
|
&__list {
|
||||||
|
padding-block-start: var(--spacer-1);
|
||||||
|
display: grid;
|
||||||
|
gap: var(--spacer-1);
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.review {
|
.review {
|
||||||
&__summary {
|
&__summary {
|
||||||
font-size: calc(var(--fs-5) * 1.1);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__text,
|
&__text,
|
||||||
&__metadata {
|
&__metadata {
|
||||||
padding-top: var(--spacer-2);
|
padding-top: var(--spacer-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,18 +42,18 @@ const cleanName = (rawData: RawName) => {
|
|||||||
},
|
},
|
||||||
media: {
|
media: {
|
||||||
...(main.primaryVideos.edges.length && {
|
...(main.primaryVideos.edges.length && {
|
||||||
trailer: {
|
trailers: main.primaryVideos.edges.map(trailer => ({
|
||||||
id: main.primaryVideos.edges[0].node.id,
|
id: trailer.node.id,
|
||||||
isMature: main.primaryVideos.edges[0].node.isMature,
|
isMature: trailer.node.isMature,
|
||||||
thumbnail: main.primaryVideos.edges[0].node.thumbnail.url,
|
thumbnail: trailer.node.thumbnail.url,
|
||||||
runtime: main.primaryVideos.edges[0].node.runtime.value,
|
runtime: trailer.node.runtime.value,
|
||||||
caption: main.primaryVideos.edges[0].node.description?.value ?? null,
|
caption: trailer.node.description?.value ?? null,
|
||||||
urls: main.primaryVideos.edges[0].node.playbackURLs.map(url => ({
|
urls: trailer.node.playbackURLs.map(url => ({
|
||||||
resolution: url.displayName.value,
|
resolution: url.displayName.value as 'SD' | '480p',
|
||||||
mimeType: url.mimeType ?? null,
|
mimeType: url.videoMimeType ?? null,
|
||||||
url: url.url,
|
url: url.url,
|
||||||
})),
|
})),
|
||||||
},
|
})),
|
||||||
}),
|
}),
|
||||||
images: {
|
images: {
|
||||||
total: misc.images.total,
|
total: misc.images.total,
|
||||||
|
@ -12,6 +12,7 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
titleId: main.id,
|
titleId: main.id,
|
||||||
basic: {
|
basic: {
|
||||||
id: main.id,
|
id: main.id,
|
||||||
|
isAdult: main.isAdult,
|
||||||
title: main.titleText.text,
|
title: main.titleText.text,
|
||||||
// ...(main.originalTitleText.text.toLowerCase() !==
|
// ...(main.originalTitleText.text.toLowerCase() !==
|
||||||
// main.titleText.text.toLowerCase() && {
|
// main.titleText.text.toLowerCase() && {
|
||||||
@ -50,6 +51,10 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
id: genre.id,
|
id: genre.id,
|
||||||
text: genre.text,
|
text: genre.text,
|
||||||
})),
|
})),
|
||||||
|
interests: main.interests.edges.map(interest => ({
|
||||||
|
id: interest.node.id,
|
||||||
|
text: interest.node.primaryText.text,
|
||||||
|
})),
|
||||||
plot: main.plot?.plotText?.plainText || null,
|
plot: main.plot?.plotText?.plainText || null,
|
||||||
primaryCrew: main.principalCredits.map(type => ({
|
primaryCrew: main.principalCredits.map(type => ({
|
||||||
type: { category: type.category.text, id: type.category.id },
|
type: { category: type.category.text, id: type.category.id },
|
||||||
@ -76,18 +81,18 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
})),
|
})),
|
||||||
media: {
|
media: {
|
||||||
...(main.primaryVideos.edges.length && {
|
...(main.primaryVideos.edges.length && {
|
||||||
trailer: {
|
trailers: main.primaryVideos.edges.map(trailer => ({
|
||||||
id: main.primaryVideos.edges[0].node.id,
|
id: trailer.node.id,
|
||||||
isMature: main.primaryVideos.edges[0].node.isMature,
|
isMature: trailer.node.isMature,
|
||||||
thumbnail: main.primaryVideos.edges[0].node.thumbnail.url,
|
thumbnail: trailer.node.thumbnail.url,
|
||||||
runtime: main.primaryVideos.edges[0].node.runtime.value,
|
runtime: trailer.node.runtime.value,
|
||||||
caption: main.primaryVideos.edges[0].node.description?.value ?? null,
|
caption: trailer.node.description?.value ?? null,
|
||||||
urls: main.primaryVideos.edges[0].node.playbackURLs.map(url => ({
|
urls: trailer.node.playbackURLs.map(url => ({
|
||||||
resolution: url.displayName.value,
|
resolution: url.displayName.value as 'SD' | '480p',
|
||||||
mimeType: url.mimeType ?? null,
|
mimeType: url.videoMimeType ?? null,
|
||||||
url: url.url,
|
url: url.url,
|
||||||
})),
|
})),
|
||||||
},
|
})),
|
||||||
}),
|
}),
|
||||||
images: {
|
images: {
|
||||||
total: misc.titleMainImages.total,
|
total: misc.titleMainImages.total,
|
||||||
@ -122,6 +127,9 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
}),
|
}),
|
||||||
topRating: misc.ratingsSummary.topRanking?.rank || null,
|
topRating: misc.ratingsSummary.topRanking?.rank || null,
|
||||||
},
|
},
|
||||||
|
watchlist: {
|
||||||
|
text: main.engagementStatistics?.watchlistStatistics.displayableCount.text || null,
|
||||||
|
},
|
||||||
meta: {
|
meta: {
|
||||||
// for tv episode
|
// for tv episode
|
||||||
...(main.series && {
|
...(main.series && {
|
||||||
@ -208,24 +216,34 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
metacriticScore: main.metacritic?.metascore.score || null,
|
metacriticScore: main.metacritic?.metascore.score || null,
|
||||||
numCriticReviews: main.criticReviewsTotal.total,
|
numCriticReviews: main.criticReviewsTotal.total,
|
||||||
numUserReviews: misc.reviews.total,
|
numUserReviews: misc.reviews.total,
|
||||||
|
ratingsDistribution:
|
||||||
|
misc.aggregateRatingsBreakdown.histogram?.histogramValues.map(v => ({
|
||||||
|
rating: v.rating,
|
||||||
|
votes: v.voteCount,
|
||||||
|
})) || [],
|
||||||
|
...(misc.reviewSummary && {
|
||||||
|
ai: {
|
||||||
|
summary: misc.reviewSummary.overall.medium.value.plaidHtml,
|
||||||
|
themes: misc.reviewSummary.themes.map(t => ({
|
||||||
|
text: t.label.value,
|
||||||
|
id: t.themeId,
|
||||||
|
sentiment: t.sentiment as 'POSITIVE' | 'NEGATIVE',
|
||||||
|
})),
|
||||||
|
},
|
||||||
|
}),
|
||||||
...(misc.featuredReviews.edges.length && {
|
...(misc.featuredReviews.edges.length && {
|
||||||
featuredReview: {
|
featuredReviews: misc.featuredReviews.edges.map(featuredReview => ({
|
||||||
id: misc.featuredReviews.edges[0].node.id,
|
id: featuredReview.node.id,
|
||||||
reviewer: {
|
reviewer: {
|
||||||
id: misc.featuredReviews.edges[0].node.author.userId,
|
id: featuredReview.node.author.userId,
|
||||||
name: misc.featuredReviews.edges[0].node.author.nickName,
|
name: featuredReview.node.author.username.text,
|
||||||
},
|
|
||||||
rating: misc.featuredReviews.edges[0].node.authorRating,
|
|
||||||
date: formatDate(misc.featuredReviews.edges[0].node.submissionDate),
|
|
||||||
votes: {
|
|
||||||
up: misc.featuredReviews.edges[0].node.helpfulness.upVotes,
|
|
||||||
down: misc.featuredReviews.edges[0].node.helpfulness.downVotes,
|
|
||||||
},
|
},
|
||||||
|
rating: featuredReview.node.authorRating,
|
||||||
review: {
|
review: {
|
||||||
summary: misc.featuredReviews.edges[0].node.summary.originalText,
|
summary: featuredReview.node.summary.originalText,
|
||||||
html: misc.featuredReviews.edges[0].node.text.originalText.plaidHtml,
|
html: featuredReview.node.text.originalText.plaidHtml,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
})),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
details: {
|
details: {
|
||||||
@ -242,8 +260,8 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
...(misc.countriesOfOrigin && {
|
...(misc.countriesDetails && {
|
||||||
countriesOfOrigin: misc.countriesOfOrigin.countries.map(country => ({
|
countriesOfOrigin: misc.countriesDetails.countries.map(country => ({
|
||||||
id: country.id,
|
id: country.id,
|
||||||
text: country.text,
|
text: country.text,
|
||||||
})),
|
})),
|
||||||
@ -353,6 +371,10 @@ const cleanTitle = (rawData: RawTitle) => {
|
|||||||
},
|
},
|
||||||
genres: title.node.titleGenres?.genres.map(genre => genre.genre.text) ?? null,
|
genres: title.node.titleGenres?.genres.map(genre => genre.genre.text) ?? null,
|
||||||
})),
|
})),
|
||||||
|
faqs: {
|
||||||
|
questions: misc.faqs.edges.map(q => ({ question: q.node.question, id: q.node.id })),
|
||||||
|
total: misc.faqs.total,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
return cleanData;
|
return cleanData;
|
||||||
|
@ -74,12 +74,33 @@ export const getProxiedIMDbImgUrl = (url: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const AppError = class extends Error {
|
export const AppError = class extends Error {
|
||||||
constructor(message: string, public statusCode: number, errorOptions?: unknown) {
|
constructor(message: string, public statusCode: number, cause?: unknown) {
|
||||||
const saneErrorOptions = getErrorOptions(errorOptions);
|
const _cause = cause ? AppError.toError(cause) : undefined;
|
||||||
super(message, saneErrorOptions);
|
super(message, { cause: _cause });
|
||||||
|
|
||||||
Error.captureStackTrace(this, AppError);
|
Error.captureStackTrace(this, AppError);
|
||||||
if (process.env.NODE_ENV === 'development') console.error(this);
|
}
|
||||||
|
|
||||||
|
static toError(err: unknown) {
|
||||||
|
if (err instanceof Error) return err;
|
||||||
|
return new Error(`Unexpected: ${JSON.stringify(err)}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
format() {
|
||||||
|
let str = '';
|
||||||
|
let cur: Error | null = this;
|
||||||
|
let depth = 0;
|
||||||
|
|
||||||
|
while (cur && depth <= 4) {
|
||||||
|
if (cur.stack) str += `${cur.stack}\n`;
|
||||||
|
else str += `${cur.name}: ${cur.message}\n`;
|
||||||
|
|
||||||
|
cur = cur.cause instanceof Error ? cur.cause : null;
|
||||||
|
if (cur) str += 'Caused by:\n';
|
||||||
|
depth++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str.trimEnd();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -110,19 +131,6 @@ export const isLocalStorageAvailable = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getErrorOptions = (error: unknown): ErrorOptions | undefined => {
|
|
||||||
if (!error || typeof error !== 'object') return undefined;
|
|
||||||
|
|
||||||
let cause: unknown;
|
|
||||||
// @ts-expect-error it's not an error! just that project's ts version is old, which can't be upgraded
|
|
||||||
if ('cause' in error) cause = error.cause;
|
|
||||||
// @ts-expect-error it's not an error! just that project's ts version is old, which can't be upgraded
|
|
||||||
else if ('stack' in error) cause = error.stack;
|
|
||||||
|
|
||||||
// @ts-expect-error it's not an error! just that project's ts version is old, which can't be upgraded
|
|
||||||
return { cause };
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getErrorProperties = (
|
export const getErrorProperties = (
|
||||||
error: unknown,
|
error: unknown,
|
||||||
message = 'Something went very wrong',
|
message = 'Something went very wrong',
|
||||||
|
Reference in New Issue
Block a user