chore: merge master

This commit is contained in:
jfrazx 2024-01-21 19:15:52 -08:00
commit 06391b9b37
No known key found for this signature in database
GPG Key ID: 7E72C3BCC0F85A7B
15 changed files with 6637 additions and 20426 deletions

View File

@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16 ARG VARIANT=20
FROM mcr.microsoft.com/devcontainers/javascript-node:0-${VARIANT} as base FROM mcr.microsoft.com/devcontainers/javascript-node:0-${VARIANT} as base
# Setup the node environment # Setup the node environment

View File

@ -8,7 +8,7 @@
// Append -bullseye or -buster to pin to an OS version. // Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon. // Use -bullseye variants on local arm64/Apple Silicon.
"args": { "args": {
"VARIANT": "16" "VARIANT": "20"
} }
}, },
"mounts": [ "mounts": [

View File

@ -71,7 +71,7 @@ jobs:
with: with:
tags: ${{ github.event.inputs.tags || steps.meta.outputs.tags }} tags: ${{ github.event.inputs.tags || steps.meta.outputs.tags }}
context: . context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64
push: true push: true
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

View File

@ -16,7 +16,7 @@ jobs:
- name: setup nade - name: setup nade
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 20
- name: install pkg - name: install pkg
run: npm install -g pkg run: npm install -g pkg

View File

@ -1,5 +1,5 @@
### STAGE 0: Build client ### ### STAGE 0: Build client ###
FROM node:16-alpine AS build FROM node:20-alpine AS build
WORKDIR /client WORKDIR /client
COPY /client /client COPY /client /client
RUN npm ci && npm cache clean --force RUN npm ci && npm cache clean --force
@ -7,7 +7,7 @@ RUN npm run generate
### STAGE 1: Build server ### ### STAGE 1: Build server ###
FROM sandreas/tone:v0.1.5 AS tone FROM sandreas/tone:v0.1.5 AS tone
FROM node:16-alpine FROM node:20-alpine
ENV NODE_ENV=production ENV NODE_ENV=production

View File

@ -48,7 +48,7 @@ Description: $DESCRIPTION"
echo "$controlfile" > dist/debian/DEBIAN/control; echo "$controlfile" > dist/debian/DEBIAN/control;
# Package debian # Package debian
pkg -t node16-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf . pkg -t node18-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf .
fakeroot dpkg-deb --build dist/debian fakeroot dpkg-deb --build dist/debian

View File

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -8,7 +8,7 @@
<!-- Alternative bookshelf title/author/sort --> <!-- Alternative bookshelf title/author/sort -->
<div v-if="isAlternativeBookshelfView || isAuthorBookshelfView" class="absolute left-0 z-50 w-full" :style="{ bottom: `-${titleDisplayBottomOffset}rem` }"> <div v-if="isAlternativeBookshelfView || isAuthorBookshelfView" class="absolute left-0 z-50 w-full" :style="{ bottom: `-${titleDisplayBottomOffset}rem` }">
<div :style="{ fontSize: 0.9 * sizeMultiplier + 'rem' }"> <div :style="{ fontSize: 0.9 * sizeMultiplier + 'rem' }">
<ui-tooltip :text="displayTitle" :disabled="!displayTitleTruncated" direction="bottom" :delayOnShow="500" class="flex items-center"> <ui-tooltip v-if="displayTitle" :text="displayTitle" :disabled="!displayTitleTruncated" direction="bottom" :delayOnShow="500" class="flex items-center">
<p ref="displayTitle" class="truncate">{{ displayTitle }}</p> <p ref="displayTitle" class="truncate">{{ displayTitle }}</p>
<widgets-explicit-indicator :explicit="isExplicit" /> <widgets-explicit-indicator :explicit="isExplicit" />
</ui-tooltip> </ui-tooltip>

View File

@ -39,6 +39,7 @@ module.exports = {
// Global CSS: https://go.nuxtjs.dev/config-css // Global CSS: https://go.nuxtjs.dev/config-css
css: [ css: [
'@/assets/tailwind.css',
'@/assets/app.css' '@/assets/app.css'
], ],
@ -58,9 +59,7 @@ module.exports = {
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [ buildModules: [
// https://go.nuxtjs.dev/tailwindcss // https://go.nuxtjs.dev/tailwindcss
'@nuxtjs/tailwindcss', '@nuxtjs/pwa'
'@nuxtjs/pwa',
'@nuxt/postcss8'
], ],
// Modules: https://go.nuxtjs.dev/config-modules // Modules: https://go.nuxtjs.dev/config-modules

26963
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
"epubjs": "^0.3.88", "epubjs": "^0.3.88",
"hls.js": "^1.0.7", "hls.js": "^1.0.7",
"libarchive.js": "^1.3.0", "libarchive.js": "^1.3.0",
"nuxt": "^2.15.8", "nuxt": "^2.17.3",
"nuxt-socket-io": "^1.1.18", "nuxt-socket-io": "^1.1.18",
"trix": "^1.3.1", "trix": "^1.3.1",
"v-click-outside": "^3.1.2", "v-click-outside": "^3.1.2",
@ -31,11 +31,9 @@
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"
}, },
"devDependencies": { "devDependencies": {
"@nuxt/postcss8": "^1.1.3",
"@nuxtjs/pwa": "^3.3.5", "@nuxtjs/pwa": "^3.3.5",
"@nuxtjs/tailwindcss": "^4.2.1",
"autoprefixer": "^10.4.7", "autoprefixer": "^10.4.7",
"postcss": "^8.3.6", "postcss": "^8.3.6",
"tailwindcss": "^3.1.4" "tailwindcss": "^3.4.1"
} }
} }

View File

@ -1,29 +1,18 @@
module.exports = { module.exports = {
purge: { content: [
content: [ 'components/**/*.vue',
'components/**/*.vue', 'layouts/**/*.vue',
'layouts/**/*.vue', 'pages/**/*.vue',
'pages/**/*.vue', 'templates/**/*.vue',
'templates/**/*.vue', 'plugins/**/*.js',
'plugins/**/*.js', 'nuxt.config.js'
'nuxt.config.js' ],
], safelist: [
safelist: [ 'bg-red-600',
'bg-success', 'px-1.5',
'bg-red-600', 'min-w-5',
'bg-yellow-400', 'border-warning'
'text-green-500', ],
'py-1.5',
'bg-info',
'px-1.5',
'min-w-5',
'w-3.5',
'h-3.5',
'border-warning',
'mb-px',
'text-1.5xl'
],
},
theme: { theme: {
extend: { extend: {
height: { height: {

20
package-lock.json generated
View File

@ -22,7 +22,7 @@
"openid-client": "^5.6.1", "openid-client": "^5.6.1",
"passport": "^0.6.0", "passport": "^0.6.0",
"passport-jwt": "^4.0.1", "passport-jwt": "^4.0.1",
"sequelize": "^6.32.1", "sequelize": "^6.35.2",
"socket.io": "^4.5.4", "socket.io": "^4.5.4",
"sqlite3": "^5.1.6", "sqlite3": "^5.1.6",
"ssrf-req-filter": "^1.1.0", "ssrf-req-filter": "^1.1.0",
@ -4380,9 +4380,9 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}, },
"node_modules/sequelize": { "node_modules/sequelize": {
"version": "6.32.1", "version": "6.35.2",
"resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.32.1.tgz", "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.35.2.tgz",
"integrity": "sha512-3Iv0jruv57Y0YvcxQW7BE56O7DC1BojcfIrqh6my+IQwde+9u/YnuYHzK+8kmZLhLvaziRT1eWu38nh9yVwn/g==", "integrity": "sha512-EdzLaw2kK4/aOnWQ7ed/qh3B6/g+1DvmeXr66RwbcqSm/+QRS9X0LDI5INBibsy4eNJHWIRPo3+QK0zL+IPBHg==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -4393,14 +4393,14 @@
"@types/debug": "^4.1.8", "@types/debug": "^4.1.8",
"@types/validator": "^13.7.17", "@types/validator": "^13.7.17",
"debug": "^4.3.4", "debug": "^4.3.4",
"dottie": "^2.0.4", "dottie": "^2.0.6",
"inflection": "^1.13.4", "inflection": "^1.13.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"moment": "^2.29.4", "moment": "^2.29.4",
"moment-timezone": "^0.5.43", "moment-timezone": "^0.5.43",
"pg-connection-string": "^2.6.0", "pg-connection-string": "^2.6.1",
"retry-as-promised": "^7.0.4", "retry-as-promised": "^7.0.4",
"semver": "^7.5.1", "semver": "^7.5.4",
"sequelize-pool": "^7.1.0", "sequelize-pool": "^7.1.0",
"toposort-class": "^1.0.1", "toposort-class": "^1.0.1",
"uuid": "^8.3.2", "uuid": "^8.3.2",
@ -4481,9 +4481,9 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}, },
"node_modules/sequelize/node_modules/semver": { "node_modules/sequelize/node_modules/semver": {
"version": "7.5.3", "version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": { "dependencies": {
"lru-cache": "^6.0.0" "lru-cache": "^6.0.0"
}, },

View File

@ -9,12 +9,11 @@
"start": "node index.js", "start": "node index.js",
"client": "cd client && npm ci && npm run generate", "client": "cd client && npm ci && npm run generate",
"prod": "npm run client && npm ci && node prod.js", "prod": "npm run client && npm ci && node prod.js",
"build-win": "npm run client && pkg -t node16-win-x64 -o ./dist/win/audiobookshelf -C GZip .", "build-win": "npm run client && pkg -t node18-win-x64 -o ./dist/win/audiobookshelf -C GZip .",
"build-linux": "build/linuxpackager", "build-linux": "build/linuxpackager",
"docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push . -t advplyr/audiobookshelf", "docker": "docker buildx build --platform linux/amd64,linux/arm64 --push . -t advplyr/audiobookshelf",
"docker-amd64-local": "docker buildx build --platform linux/amd64 --load . -t advplyr/audiobookshelf-amd64-local", "docker-amd64-local": "docker buildx build --platform linux/amd64 --load . -t advplyr/audiobookshelf-amd64-local",
"docker-arm64-local": "docker buildx build --platform linux/arm64 --load . -t advplyr/audiobookshelf-arm64-local", "docker-arm64-local": "docker buildx build --platform linux/arm64 --load . -t advplyr/audiobookshelf-arm64-local",
"docker-armv7-local": "docker buildx build --platform linux/arm/v7 --load . -t advplyr/audiobookshelf-armv7-local",
"deploy-linux": "node deploy/linux", "deploy-linux": "node deploy/linux",
"test": "mocha", "test": "mocha",
"coverage": "nyc mocha" "coverage": "nyc mocha"
@ -49,7 +48,7 @@
"openid-client": "^5.6.1", "openid-client": "^5.6.1",
"passport": "^0.6.0", "passport": "^0.6.0",
"passport-jwt": "^4.0.1", "passport-jwt": "^4.0.1",
"sequelize": "^6.32.1", "sequelize": "^6.35.2",
"socket.io": "^4.5.4", "socket.io": "^4.5.4",
"sqlite3": "^5.1.6", "sqlite3": "^5.1.6",
"ssrf-req-filter": "^1.1.0", "ssrf-req-filter": "^1.1.0",

View File

@ -309,7 +309,7 @@ You are now ready to start development!
### Manual Environment Setup ### Manual Environment Setup
If you don't want to use the dev container, you can still develop this project. First, you will need to install [NodeJs](https://nodejs.org/) (version 16) and [FFmpeg](https://ffmpeg.org/). If you don't want to use the dev container, you can still develop this project. First, you will need to install [NodeJs](https://nodejs.org/) (version 20) and [FFmpeg](https://ffmpeg.org/).
Next you will need to create a `dev.js` file in the project's root directory. This contains configuration information and paths unique to your development environment. You can find an example of this file in `.devcontainer/dev.js`. Next you will need to create a `dev.js` file in the project's root directory. This contains configuration information and paths unique to your development environment. You can find an example of this file in `.devcontainer/dev.js`.