chore: update deps & tsx -> esbuild

This commit is contained in:
diced 2022-10-22 14:23:23 -07:00
parent c3215c7425
commit 1be61b8d89
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
10 changed files with 1967 additions and 2347 deletions

File diff suppressed because one or more lines are too long

801
.yarn/releases/yarn-3.2.4.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View file

@ -1,9 +1,9 @@
checksumBehavior: update
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-3.2.1.cjs
checksumBehavior: 'update'
yarnPath: .yarn/releases/yarn-3.2.4.cjs

View file

@ -1,4 +1,4 @@
FROM ghcr.io/diced/prisma-binaries:4.1.x as prisma
FROM ghcr.io/diced/prisma-binaries:4.5.x as prisma
FROM alpine:3.16 AS deps
RUN mkdir -p /prisma-engines
@ -55,9 +55,10 @@ COPY --from=builder /build/node_modules ./node_modules
COPY --from=builder /build/next.config.js ./next.config.js
COPY --from=builder /build/src ./src
COPY --from=builder /build/dist ./dist
COPY --from=builder /build/prisma ./prisma
COPY --from=builder /build/tsconfig.json ./tsconfig.json
COPY --from=builder /build/package.json ./package.json
COPY --from=builder /build/mimes.json ./mimes.json
CMD ["node_modules/.bin/tsx", "src/server"]
CMD ["node", "--enable-source-maps", "dist/server"]

View file

@ -22,13 +22,8 @@ services:
ports:
- '3000:3000'
restart: unless-stopped
environment:
- CORE_HTTPS=false
- CORE_SECRET=changethislol
- CORE_HOST=0.0.0.0
- CORE_PORT=3000
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
- CORE_LOGGER=true
env_file:
- .env.local
volumes:
- '$PWD/uploads:/zipline/uploads'
- '$PWD/public:/zipline/public'

View file

@ -3,8 +3,6 @@ const { existsSync } = require('fs');
const { rm } = require('fs/promises');
(async () => {
const watch = process.argv[2] === '--watch';
if (existsSync('./dist')) {
await rm('./dist', { recursive: true });
}
@ -14,7 +12,6 @@ const { rm } = require('fs/promises');
outdir: 'dist',
bundle: false,
platform: 'node',
treeShaking: true,
entryPoints: [
'src/server/index.ts',
'src/server/util.ts',
@ -31,12 +28,11 @@ const { rm } = require('fs/promises');
'src/lib/datasources/S3.ts',
'src/lib/datasources/Swift.ts',
'src/lib/datasource.ts',
'src/scripts/read-config.ts',
],
format: 'cjs',
resolveExtensions: ['.ts', '.js'],
write: true,
watch,
incremental: watch,
sourcemap: true,
minify: false,
});

View file

@ -3,84 +3,83 @@
"version": "3.5.1",
"license": "MIT",
"scripts": {
"dev": "cross-env REACT_EDITOR=code NODE_ENV=development tsx src/server",
"build": "npm-run-all build:schema build:next",
"build-ci": "cross-env ZIPLINE_DOCKER_BUILD=1 npm-run-all build:schema build:next",
"dev": "npm-run-all build:server dev:run",
"dev:run": "cross-env REACT_EDITOR=code NODE_ENV=development node --enable-source-maps dist/server",
"build": "npm-run-all build:server build:schema build:next",
"build-ci": "cross-env ZIPLINE_DOCKER_BUILD=1 npm-run-all build:server build:schema build:next",
"build:server": "node esbuild.config.js",
"build:next": "next build",
"build:schema": "prisma generate --schema=prisma/schema.prisma",
"format": "prettier --write ./src/**/*.{ts,tsx} ./*.{md,js,json,yml}",
"migrate:dev": "prisma migrate dev --create-only",
"start": "tsx src/server",
"start": "node dist/server",
"lint": "next lint",
"docker:run": "docker-compose up -d",
"docker:down": "docker-compose down",
"docker:build-dev": "docker-compose --file docker-compose.dev.yml up --build",
"scripts:read-config": "tsx src/scripts/read-config"
"scripts:read-config": "node dist/scripts/read-config"
},
"dependencies": {
"@dicedtomato/mantine-data-grid": "0.0.21",
"@emotion/react": "^11.9.3",
"@emotion/server": "^11.4.0",
"@mantine/core": "^5.2.6",
"@mantine/dropzone": "^5.2.6",
"@mantine/form": "^5.2.6",
"@mantine/hooks": "^5.2.6",
"@mantine/modals": "^5.2.6",
"@mantine/next": "^5.2.6",
"@mantine/notifications": "^5.2.6",
"@mantine/nprogress": "^5.2.6",
"@mantine/prism": "^5.2.6",
"@prisma/client": "^4.1.0",
"@prisma/internals": "^4.1.0",
"@prisma/migrate": "^4.1.0",
"@dicedtomato/mantine-data-grid": "0.0.23",
"@emotion/react": "^11.10.4",
"@emotion/server": "^11.10.0",
"@mantine/core": "^5.6.1",
"@mantine/dropzone": "^5.6.1",
"@mantine/form": "^5.6.1",
"@mantine/hooks": "^5.6.1",
"@mantine/modals": "^5.6.1",
"@mantine/next": "^5.6.1",
"@mantine/notifications": "^5.6.1",
"@mantine/nprogress": "^5.6.1",
"@mantine/prism": "^5.6.1",
"@prisma/client": "^4.5.0",
"@prisma/internals": "^4.5.0",
"@prisma/migrate": "^4.5.0",
"@sapphire/shapeshift": "^3.7.0",
"@tanstack/react-query": "^4.2.3",
"argon2": "^0.28.5",
"@tanstack/react-query": "^4.13.0",
"argon2": "^0.30.1",
"chart.js": "^3.9.1",
"chartjs-plugin-datalabels": "^2.1.0",
"color-hash": "^2.0.1",
"colorette": "^2.0.19",
"cookie": "^0.5.0",
"dayjs": "^1.11.5",
"dotenv": "^16.0.1",
"dotenv-expand": "^8.0.3",
"fflate": "^0.7.3",
"find-my-way": "^6.3.0",
"minio": "^7.0.28",
"dayjs": "^1.11.6",
"dotenv": "^16.0.3",
"dotenv-expand": "^9.0.0",
"fflate": "^0.7.4",
"find-my-way": "^7.3.1",
"minio": "^7.0.32",
"ms": "canary",
"multer": "^1.4.5-lts.1",
"next": "^12.1.6",
"prisma": "^4.1.0",
"next": "^12.3.1",
"prisma": "^4.5.0",
"react": "^18.2.0",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-feather": "^2.0.10",
"recoil": "^0.7.5",
"sharp": "^0.30.7"
"recoil": "^0.7.6",
"sharp": "^0.31.1"
},
"devDependencies": {
"@types/cookie": "^0.5.1",
"@types/minio": "^7.0.13",
"@types/minio": "^7.0.14",
"@types/multer": "^1.4.7",
"@types/node": "^15.12.2",
"@types/react": "^18.0.18",
"@types/sharp": "^0.30.5",
"babel-plugin-import": "^1.13.5",
"@types/node": "16.11.68",
"@types/react": "^18.0.21",
"@types/sharp": "^0.31.0",
"cross-env": "^7.0.3",
"esbuild": "^0.14.44",
"eslint": "^7.32.0",
"eslint-config-next": "12.1.6",
"esbuild": "^0.15.12",
"eslint": "^8.26.0",
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"ts-node": "^10.8.1",
"tsx": "^3.8.0",
"typescript": "^4.7.3"
"typescript": "^4.8.4"
},
"repository": {
"type": "git",
"url": "https://github.com/diced/zipline.git"
},
"packageManager": "yarn@3.2.1"
"packageManager": "yarn@3.2.4"
}

View file

@ -1,7 +1,7 @@
import { Config } from 'lib/config/Config';
import { CombinedError, s, ValidationError } from '@sapphire/shapeshift';
import { inspect } from 'util';
import Logger from 'lib/logger';
import Logger from '../logger';
const discord_content = s
.object({

View file

@ -6,15 +6,14 @@ import { createServer, IncomingMessage, OutgoingMessage, ServerResponse } from '
import { extname } from 'path';
import { mkdir } from 'fs/promises';
import { getStats, log, migrations } from './util';
import Logger from 'lib/logger';
import { guess } from 'lib/mimes';
import exts from 'lib/exts';
import Logger from '../lib/logger';
import { guess } from '../lib/mimes';
import exts from '../lib/exts';
import { version } from '../../package.json';
import config from 'lib/config';
import datasource from 'lib/datasource';
import config from '../lib/config';
import datasource from '../lib/datasource';
const dev = process.env.NODE_ENV === 'development';
const logger = Logger.get('server');
start();
@ -96,7 +95,11 @@ async function start() {
}
});
await nextServer.prepare();
try {
await nextServer.prepare();
} catch (e) {
console.log(e);
}
const http = createServer((req, res) => {
router.lookup(req, res);

2593
yarn.lock

File diff suppressed because it is too large Load diff