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 nodeLinker: node-modules
plugins: plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs - 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 yarnPath: .yarn/releases/yarn-3.2.4.cjs
checksumBehavior: 'update'

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 FROM alpine:3.16 AS deps
RUN mkdir -p /prisma-engines 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/next.config.js ./next.config.js
COPY --from=builder /build/src ./src COPY --from=builder /build/src ./src
COPY --from=builder /build/dist ./dist
COPY --from=builder /build/prisma ./prisma COPY --from=builder /build/prisma ./prisma
COPY --from=builder /build/tsconfig.json ./tsconfig.json COPY --from=builder /build/tsconfig.json ./tsconfig.json
COPY --from=builder /build/package.json ./package.json COPY --from=builder /build/package.json ./package.json
COPY --from=builder /build/mimes.json ./mimes.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: ports:
- '3000:3000' - '3000:3000'
restart: unless-stopped restart: unless-stopped
environment: env_file:
- CORE_HTTPS=false - .env.local
- CORE_SECRET=changethislol
- CORE_HOST=0.0.0.0
- CORE_PORT=3000
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
- CORE_LOGGER=true
volumes: volumes:
- '$PWD/uploads:/zipline/uploads' - '$PWD/uploads:/zipline/uploads'
- '$PWD/public:/zipline/public' - '$PWD/public:/zipline/public'

View file

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

View file

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

View file

@ -6,15 +6,14 @@ import { createServer, IncomingMessage, OutgoingMessage, ServerResponse } from '
import { extname } from 'path'; import { extname } from 'path';
import { mkdir } from 'fs/promises'; import { mkdir } from 'fs/promises';
import { getStats, log, migrations } from './util'; import { getStats, log, migrations } from './util';
import Logger from 'lib/logger'; import Logger from '../lib/logger';
import { guess } from 'lib/mimes'; import { guess } from '../lib/mimes';
import exts from 'lib/exts'; import exts from '../lib/exts';
import { version } from '../../package.json'; import { version } from '../../package.json';
import config from 'lib/config'; import config from '../lib/config';
import datasource from 'lib/datasource'; import datasource from '../lib/datasource';
const dev = process.env.NODE_ENV === 'development'; const dev = process.env.NODE_ENV === 'development';
const logger = Logger.get('server'); const logger = Logger.get('server');
start(); 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) => { const http = createServer((req, res) => {
router.lookup(req, res); router.lookup(req, res);

2593
yarn.lock

File diff suppressed because it is too large Load diff