mirror of
https://github.com/diced/zipline.git
synced 2025-12-07 13:20:43 -08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d348db4dd | ||
|
|
ececc3ab0e | ||
|
|
a71bde9730 | ||
|
|
3417a84789 | ||
|
|
080c92a968 | ||
|
|
94b0220db8 | ||
|
|
dc29ad42f5 | ||
|
|
4cce4718a2 | ||
|
|
8fe1de013f | ||
|
|
7a6766e9cc | ||
|
|
5537d28849 | ||
|
|
a420d830e3 |
5
.github/workflows/node.js.yml
vendored
5
.github/workflows/node.js.yml
vendored
@@ -23,5 +23,6 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm i -g yarn
|
||||
- run: yarn
|
||||
- run: yarn build
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Zipline
|
||||
The best and only **React + Next.js** ShareX / File Uploader you would ever want.
|
||||
|
||||
9596
package-lock.json
generated
9596
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zipline-next",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.4",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@dicedtomato/colors": "^1.0.3",
|
||||
@@ -23,6 +23,7 @@
|
||||
"fastify-typeorm-plugin": "^2.1.2",
|
||||
"figlet": "^1.5.0",
|
||||
"inquirer": "^7.3.3",
|
||||
"ioredis": "^4.19.2",
|
||||
"material-ui-dropzone": "^3.5.0",
|
||||
"next": "^9.5.4",
|
||||
"pg": "^8.4.1",
|
||||
@@ -47,6 +48,7 @@
|
||||
"devDependencies": {
|
||||
"@types/bcrypt": "^3.0.0",
|
||||
"@types/crypto-js": "^3.1.47",
|
||||
"@types/ioredis": "^4.17.7",
|
||||
"@types/mongodb": "^3.5.27",
|
||||
"@types/node": "^14.11.2",
|
||||
"@types/react": "^16.9.49",
|
||||
@@ -61,4 +63,4 @@
|
||||
"ts-node": "^9.0.0",
|
||||
"typescript": "^4.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3
release.js
Normal file
3
release.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = async (markdown, metaData) => {
|
||||
return markdown;
|
||||
};
|
||||
2
setup.js
2
setup.js
@@ -25,7 +25,7 @@ const base = {
|
||||
'https://github.githubassets.com/images/modules/open_graph/github-mark.png',
|
||||
color: '#128377'
|
||||
},
|
||||
core: { secret: 'my-secret', port: 3000 },
|
||||
core: { secret: 'my-secret', port: 3000, host: '127.0.0.1', theme: 'dark', secure: false },
|
||||
uploader: {
|
||||
directory: './uploads',
|
||||
route: '/u',
|
||||
|
||||
@@ -236,9 +236,7 @@ export class UserController {
|
||||
this.logger.verbose(
|
||||
`attempting to delete ${existing.username} (${existing.id})`
|
||||
);
|
||||
await this.users.delete({
|
||||
id: existing.id
|
||||
});
|
||||
await this.users.remove(existing);
|
||||
|
||||
this.logger.info(`deleted ${existing.username} (${existing.id})`);
|
||||
if (this.webhooks.events.includes(WebhookType.USER_DELETE))
|
||||
|
||||
11
src/index.ts
11
src/index.ts
@@ -11,15 +11,19 @@ import { bootstrap } from 'fastify-decorators';
|
||||
import { Console } from './lib/logger';
|
||||
import { AddressInfo } from 'net';
|
||||
import { magenta, bold, green, reset, blue, red } from '@dicedtomato/colors';
|
||||
import Redis from 'ioredis';
|
||||
import { Configuration } from './lib/Config';
|
||||
import { UserController } from './controllers/UserController';
|
||||
import { RootController } from './controllers/RootController';
|
||||
import { join } from 'path';
|
||||
import { ImagesController } from './controllers/ImagesController';
|
||||
import { URLSController } from './controllers/URLSController';
|
||||
import { URL } from './entities/URL';
|
||||
import { checkVersion } from './lib/Util';
|
||||
import { readFileSync } from 'fs';
|
||||
import { Image } from './entities/Image';
|
||||
import { User } from './entities/User';
|
||||
import { Zipline } from './entities/Zipline';
|
||||
import { URL } from './entities/URL';
|
||||
const dev = process.env.NODE_ENV !== 'production';
|
||||
|
||||
(async () => { if (await checkVersion()) Console.logger('Zipline').info('running an outdated version of zipline, please update soon!'); })();
|
||||
@@ -110,7 +114,7 @@ server.register(fastifyMultipart);
|
||||
|
||||
server.register(fastifyTypeorm, {
|
||||
...config.database,
|
||||
entities: [dev ? './src/entities/**/*.ts' : './dist/entities/**/*.js'],
|
||||
entities: [Image, URL, User, Zipline],
|
||||
synchronize: true,
|
||||
logging: false
|
||||
});
|
||||
@@ -156,6 +160,7 @@ server.listen({
|
||||
});
|
||||
|
||||
server.addHook('preHandler', async (req, reply) => {
|
||||
|
||||
if (
|
||||
config.core.blacklisted_ips &&
|
||||
config.core.blacklisted_ips.includes(req.ip)
|
||||
@@ -163,4 +168,4 @@ server.addHook('preHandler', async (req, reply) => {
|
||||
await app.render404(req.raw, reply.raw);
|
||||
return (reply.sent = true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -9,6 +9,7 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!global.logr) global.logr = { formatter: null };
|
||||
|
||||
export enum ConsoleLevel {
|
||||
|
||||
Reference in New Issue
Block a user