Fixed CI for real now
This commit is contained in:
parent
9cfb6052b2
commit
6bbcc49815
@ -74,7 +74,7 @@ package_server:
|
|||||||
- mv frontend/dist/* "$TMP/frontend"
|
- mv frontend/dist/* "$TMP/frontend"
|
||||||
- rm -r *
|
- rm -r *
|
||||||
- rm -r .* || true
|
- rm -r .* || true
|
||||||
- mv "$TMP/*" .
|
- mv "$TMP/"* .
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- .
|
- .
|
||||||
|
13579
frontend/yarn.lock
13579
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
188
package.json
188
package.json
@ -1,94 +1,94 @@
|
|||||||
{
|
{
|
||||||
"name": "fileserver",
|
"name": "fileserver",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Crackhead fileserver",
|
"description": "Crackhead fileserver",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "rimraf dist",
|
"prebuild": "rimraf dist",
|
||||||
"build": "nest build",
|
"build": "nest build",
|
||||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||||
"start": "nest start",
|
"start": "nest start",
|
||||||
"start:dev": "nest start --watch",
|
"start:dev": "nest start --watch",
|
||||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
|
||||||
"lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
"lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"test:cov": "jest --coverage",
|
"test:cov": "jest --coverage",
|
||||||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||||
"test:e2e": "jest --config ./test/jest-e2e.json",
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
||||||
"webpack": "webpack --config webpack.config.ts",
|
"webpack": "webpack --config webpack.config.ts",
|
||||||
"genapi": "ts-node tools/apigen.ts"
|
"genapi": "ts-node tools/apigen.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/multipart": "^7.1.0",
|
"@fastify/multipart": "^7.1.0",
|
||||||
"@fastify/static": "^6.5.0",
|
"@fastify/static": "^6.5.0",
|
||||||
"@nestjs/common": "^9.0.8",
|
"@nestjs/common": "^9.0.8",
|
||||||
"@nestjs/core": "^9.0.8",
|
"@nestjs/core": "^9.0.8",
|
||||||
"@nestjs/jwt": "^9.0.0",
|
"@nestjs/jwt": "^9.0.0",
|
||||||
"@nestjs/passport": "^9.0.0",
|
"@nestjs/passport": "^9.0.0",
|
||||||
"@nestjs/platform-fastify": "^9.0.8",
|
"@nestjs/platform-fastify": "^9.0.8",
|
||||||
"@nestjs/serve-static": "^3.0.0",
|
"@nestjs/serve-static": "^3.0.0",
|
||||||
"@nestjs/typeorm": "^9.0.0",
|
"@nestjs/typeorm": "^9.0.0",
|
||||||
"argon2": "^0.28.7",
|
"argon2": "^0.28.7",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
"passport-jwt": "^4.0.0",
|
"passport-jwt": "^4.0.0",
|
||||||
"passport-local": "^1.0.0",
|
"passport-local": "^1.0.0",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rxjs": "^7.5.6",
|
"rxjs": "^7.5.6",
|
||||||
"sqlite3": "^5.0.11",
|
"sqlite3": "^5.0.11",
|
||||||
"typeorm": "^0.3.7"
|
"typeorm": "^0.3.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/cli": "^9.0.0",
|
"@nestjs/cli": "^9.0.0",
|
||||||
"@nestjs/schematics": "^9.0.1",
|
"@nestjs/schematics": "^9.0.1",
|
||||||
"@nestjs/testing": "^9.0.8",
|
"@nestjs/testing": "^9.0.8",
|
||||||
"@types/express": "^4.17.13",
|
"@types/express": "^4.17.13",
|
||||||
"@types/jest": "^28.1.6",
|
"@types/jest": "^28.1.6",
|
||||||
"@types/jsonwebtoken": "^8.5.8",
|
"@types/jsonwebtoken": "^8.5.8",
|
||||||
"@types/node": "^18.6.5",
|
"@types/node": "^18.6.5",
|
||||||
"@types/passport-jwt": "^3.0.6",
|
"@types/passport-jwt": "^3.0.6",
|
||||||
"@types/passport-local": "^1.0.34",
|
"@types/passport-local": "^1.0.34",
|
||||||
"@types/supertest": "^2.0.12",
|
"@types/supertest": "^2.0.12",
|
||||||
"@types/webpack": "^5.28.0",
|
"@types/webpack": "^5.28.0",
|
||||||
"@types/webpack-node-externals": "^2.5.3",
|
"@types/webpack-node-externals": "^2.5.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||||
"@typescript-eslint/parser": "^5.33.0",
|
"@typescript-eslint/parser": "^5.33.0",
|
||||||
"@typescript-eslint/typescript-estree": "^5.33.0",
|
"@typescript-eslint/typescript-estree": "^5.33.0",
|
||||||
"copy-webpack-plugin": "^11.0.0",
|
"copy-webpack-plugin": "^11.0.0",
|
||||||
"eslint": "^8.21.0",
|
"eslint": "^8.21.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"jest": "^28.1.3",
|
"jest": "^28.1.3",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"supertest": "^6.2.4",
|
"supertest": "^6.2.4",
|
||||||
"ts-jest": "^28.0.7",
|
"ts-jest": "^28.0.7",
|
||||||
"ts-loader": "^9.3.1",
|
"ts-loader": "^9.3.1",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"tsconfig-paths": "^4.1.0",
|
"tsconfig-paths": "^4.1.0",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.7.4",
|
||||||
"webpack": "^5.74.0",
|
"webpack": "^5.74.0",
|
||||||
"webpack-cli": "^4.10.0",
|
"webpack-cli": "^4.10.0",
|
||||||
"webpack-node-externals": "^3.0.0"
|
"webpack-node-externals": "^3.0.0"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": [
|
||||||
"js",
|
"js",
|
||||||
"json",
|
"json",
|
||||||
"ts"
|
"ts"
|
||||||
],
|
],
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"testRegex": ".*\\.spec\\.ts$",
|
"testRegex": ".*\\.spec\\.ts$",
|
||||||
"transform": {
|
"transform": {
|
||||||
"^.+\\.(t|j)s$": "ts-jest"
|
"^.+\\.(t|j)s$": "ts-jest"
|
||||||
},
|
},
|
||||||
"collectCoverageFrom": [
|
"collectCoverageFrom": [
|
||||||
"**/*.(t|j)s"
|
"**/*.(t|j)s"
|
||||||
],
|
],
|
||||||
"coverageDirectory": "../coverage",
|
"coverageDirectory": "../coverage",
|
||||||
"testEnvironment": "node"
|
"testEnvironment": "node"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,57 +1,57 @@
|
|||||||
import { Controller, Get, Module } from '@nestjs/common';
|
import { Controller, Get, Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
import { INode, JWTToken, User, UserRole } from './entities';
|
import { INode, JWTToken, User, UserRole } from './entities';
|
||||||
import FileSystemModule from './modules/filesystem';
|
import FileSystemModule from './modules/filesystem';
|
||||||
import { JWTAuthGuard, Role, RoleGuard } from './authguards';
|
import { JWTAuthGuard, Role, RoleGuard } from './authguards';
|
||||||
import AuthModule from './modules/auth';
|
import AuthModule from './modules/auth';
|
||||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
|
||||||
declare const PROD: boolean | undefined;
|
declare const PROD: boolean | undefined;
|
||||||
|
|
||||||
@Controller('test')
|
@Controller('test')
|
||||||
class TestController {
|
class TestController {
|
||||||
@Role(UserRole.USER)
|
@Role(UserRole.USER)
|
||||||
@Get('hello')
|
@Get('hello')
|
||||||
getHello(): string {
|
getHello(): string {
|
||||||
return 'UwU';
|
return 'UwU';
|
||||||
}
|
}
|
||||||
|
|
||||||
@Role(UserRole.ADMIN)
|
@Role(UserRole.ADMIN)
|
||||||
@Get('hello2')
|
@Get('hello2')
|
||||||
getHelloAdmin(): string {
|
getHelloAdmin(): string {
|
||||||
return 'UwU Admin';
|
return 'UwU Admin';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
TypeOrmModule.forRoot({
|
TypeOrmModule.forRoot({
|
||||||
type: 'sqlite',
|
type: 'sqlite',
|
||||||
database: 'sqlite.db',
|
database: 'sqlite.db',
|
||||||
synchronize: true,
|
synchronize: true,
|
||||||
entities: [User, INode, JWTToken]
|
entities: [User, INode, JWTToken]
|
||||||
}),
|
}),
|
||||||
ServeStaticModule.forRoot({
|
ServeStaticModule.forRoot({
|
||||||
rootPath:
|
rootPath:
|
||||||
typeof PROD !== 'undefined' && PROD
|
typeof PROD !== 'undefined' && PROD
|
||||||
? join(__dirname, 'frontend')
|
? join(__dirname, 'frontend')
|
||||||
: join(__dirname, '..', '..', 'frontend', 'dist'),
|
: join(__dirname, '..', '..', 'frontend', 'dist'),
|
||||||
exclude: ['/api*']
|
exclude: ['/api*']
|
||||||
}),
|
}),
|
||||||
FileSystemModule,
|
FileSystemModule,
|
||||||
AuthModule
|
AuthModule
|
||||||
],
|
],
|
||||||
controllers: [TestController],
|
controllers: [TestController],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: 'APP_GUARD',
|
provide: 'APP_GUARD',
|
||||||
useClass: JWTAuthGuard
|
useClass: JWTAuthGuard
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: 'APP_GUARD',
|
provide: 'APP_GUARD',
|
||||||
useClass: RoleGuard
|
useClass: RoleGuard
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"target": "es2017",
|
"target": "es2017",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "dist", "test", "**/*spec.ts", "frontend"]
|
"exclude": ["node_modules", "dist", "test", "**/*spec.ts", "frontend"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user