-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from meili-NG/staging
meiliNG v0.9.0
- Loading branch information
Showing
113 changed files
with
3,430 additions
and
1,095 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,6 @@ config.js | |
|
||
# use prisma db push | ||
prisma/migrations | ||
|
||
# Emacs Temp files | ||
*~ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
{ | ||
"name": "meiling", | ||
"version": "0.8.4", | ||
"version": "0.9.0", | ||
"description": "An Opensource Next Generation \"Gatekeeper\" with oAuth2 Authentication Provider and OpenID Connect Server", | ||
"main": "dist/", | ||
"repository": "https://github.com/meili-ng/meiliNG", | ||
"repository": "https://github.com/meili-NG/meiliNG", | ||
"author": "Alex4386 <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@prisma/client": "^3.9.2", | ||
"@prisma/client": "4", | ||
"@sentry/node": "^7.9.0", | ||
"@sentry/tracing": "^7.9.0", | ||
"@simplewebauthn/server": "^5.4.0", | ||
"@xmldom/xmldom": "^0.8.0", | ||
"ansi-regex": "^6.0.1", | ||
"axios": "^0.21.2", | ||
|
@@ -18,6 +21,7 @@ | |
"fastify-cors": "^5.1.0", | ||
"fastify-formbody": "^5.0.0", | ||
"fastify-secure-session": "^2.3.0", | ||
"fastify-swagger": "^4.15.0", | ||
"figlet": "^1.5.0", | ||
"jsonwebtoken": "^8.5.1", | ||
"libphonenumber-js": "^1.9.49", | ||
|
@@ -29,9 +33,10 @@ | |
"pino-pretty": "^4.3.0", | ||
"prompts": "^2.4.1", | ||
"speakeasy": "^2.0.0", | ||
"typescript": "^4.5.5" | ||
"typescript": "^4.7.4" | ||
}, | ||
"devDependencies": { | ||
"@simplewebauthn/typescript-types": "^5.4.0", | ||
"@swc/cli": "^0.1.51", | ||
"@swc/core": "^1.2.138", | ||
"@types/bcryptjs": "^2.4.2", | ||
|
@@ -40,24 +45,25 @@ | |
"@types/node": "^14.14.7", | ||
"@types/openpgp": "^4.4.14", | ||
"@types/speakeasy": "^2.0.5", | ||
"@typescript-eslint/eslint-plugin": "^4.7.0", | ||
"@typescript-eslint/parser": "^4.7.0", | ||
"@typescript-eslint/typescript-estree": "^5.11.0", | ||
"eslint": "^7.13.0", | ||
"@typescript-eslint/eslint-plugin": "^5.0.0", | ||
"@typescript-eslint/parser": "^5.0.0", | ||
"@typescript-eslint/typescript-estree": "^5.0.0", | ||
"eslint": "^8.0.0", | ||
"eslint-config-prettier": "^6.15.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"husky": "^4.3.0", | ||
"lint-staged": "^10.5.1", | ||
"prettier": "^2.1.2", | ||
"prisma": "^3.9.2", | ||
"prisma": "4", | ||
"ts-node": "^9.0.0" | ||
}, | ||
"scripts": { | ||
"debug": "ts-node ./src/", | ||
"build": "swc src --out-dir dist/ --sync", | ||
"build:types": "tsc", | ||
"build:docker": "docker build .", | ||
"start:dev": "nodemon", | ||
"dev": "nodemon", | ||
"start:dev": "swc src --out-dir dist/ --sync && node ./dist/", | ||
"start:prod": "swc src --out-dir dist/ --sync && NODE_ENV=production node ./dist/", | ||
"start": "NODE_ENV=production node ./dist/", | ||
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix", | ||
|
@@ -68,7 +74,8 @@ | |
"migrate:redeploy": "prisma migrate reset --preview-feature; rm -rf ./prisma/migrations/; prisma migrate dev --preview-feature", | ||
"generate": "prisma generate", | ||
"keygen": "node ./keygen.js", | ||
"cleanup": "node ./dist/cleanup.js" | ||
"cleanup": "node ./dist/cleanup.js", | ||
"env:setup": "NODE_OPTIONS=\"--es-module-specifier-resolution=node\"" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { FastifyInstance } from 'fastify'; | ||
import fastifySwagger from 'fastify-swagger'; | ||
import { nameStylized } from '..'; | ||
import { info as packageJson } from '../../resources/package'; | ||
import config from '../../resources/config'; | ||
|
||
export function setupSwaggerUI(app: FastifyInstance) { | ||
app.register(fastifySwagger, { | ||
routePrefix: '/docs', | ||
openapi: { | ||
info: { | ||
title: nameStylized, | ||
description: packageJson.description, | ||
version: packageJson.version, | ||
}, | ||
externalDocs: { | ||
url: 'https://meili.ng', | ||
description: 'GitHub Repository', | ||
}, | ||
servers: [ | ||
{ | ||
url: config.meiling.hostname, | ||
}, | ||
], | ||
components: { | ||
securitySchemes: { | ||
sessionV1: { | ||
type: 'http', | ||
description: 'Session Token for Meiling V1 Endpoints', | ||
scheme: 'bearer', | ||
}, | ||
}, | ||
}, | ||
}, | ||
hideUntagged: true, | ||
exposeRoute: true, | ||
}); | ||
|
||
app.addSchema({ | ||
$id: 'Any', | ||
anyOf: [ | ||
{ | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
{ | ||
type: 'number', | ||
nullable: true, | ||
}, | ||
{ | ||
type: 'boolean', | ||
nullable: true, | ||
}, | ||
{ | ||
type: 'integer', | ||
nullable: true, | ||
}, | ||
{ | ||
type: 'array', | ||
items: { | ||
$ref: 'Any#', | ||
}, | ||
nullable: true, | ||
}, | ||
{ | ||
type: 'object', | ||
nullable: true, | ||
}, | ||
], | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.