Compare commits

...

12 Commits

Author SHA1 Message Date
diced
1d348db4dd 2.2.4 2020-11-05 19:20:58 -08:00
diced
ececc3ab0e fix workflow 2020-11-05 19:14:33 -08:00
diced
a71bde9730 teyest 2020-11-05 19:12:35 -08:00
diced
3417a84789 remove some useless stuff 2020-11-05 19:10:19 -08:00
diced
080c92a968 2.2.2 2020-11-05 19:08:13 -08:00
diced
94b0220db8 yes 2020-11-05 19:07:47 -08:00
diced
dc29ad42f5 2.2.1 2020-11-05 19:06:25 -08:00
diced
4cce4718a2 2.2.2 2020-11-05 19:06:12 -08:00
diced
8fe1de013f 2.2.1 2020-11-05 19:05:47 -08:00
diced
7a6766e9cc 2.2.2 2020-11-05 19:05:35 -08:00
diced
5537d28849 2.2.1 2020-11-05 19:04:29 -08:00
dicedtomato
a420d830e3 Create codeql-analysis.yml 2020-11-02 21:51:40 -08:00
10 changed files with 7576 additions and 9609 deletions

View File

@@ -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

View File

@@ -10,8 +10,6 @@
![David](https://img.shields.io/david/dicedtomatoreal/zipline)
![David](https://img.shields.io/david/dev/dicedtomatoreal/zipline)
![GitHub package.json dependency version (prod)](https://img.shields.io/github/package-json/dependency-version/dicedtomatoreal/zipline/react)
![GitHub package.json dependency version (prod)](https://img.shields.io/github/package-json/dependency-version/dicedtomatoreal/zipline/next)
![GitHub package.json dependency version (prod)](https://img.shields.io/github/package-json/dependency-version/dicedtomatoreal/zipline/fastify)
# Zipline
The best and only **React + Next.js** ShareX / File Uploader you would ever want.

9596
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -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
View File

@@ -0,0 +1,3 @@
module.exports = async (markdown, metaData) => {
return markdown;
};

View File

@@ -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',

View File

@@ -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))

View File

@@ -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);
}
});
});

View File

@@ -9,6 +9,7 @@ declare global {
}
}
if (!global.logr) global.logr = { formatter: null };
export enum ConsoleLevel {

7555
yarn.lock Normal file

File diff suppressed because it is too large Load Diff