added Services/Controllers/Routes for Portfolio Functions
This commit is contained in:
parent
518a1a0bf0
commit
56361181e8
|
@ -0,0 +1,25 @@
|
|||
import DiscordService from '../services/discord.service'
|
||||
import { Request, Response } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class DiscordController extends DiscordService {
|
||||
public getProfile = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.activity()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public getBanner = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.banner()
|
||||
res.setHeader('content-type', 'image/svg+xml; charset=utf-8').send(
|
||||
data
|
||||
)
|
||||
} catch (error: any) {
|
||||
res.send(makeResponse(error.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
import GithubService from '../services/github.service'
|
||||
import { Request, Response } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class GithubController extends GithubService {
|
||||
public fetchSelfGithubUser = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const user = await this.getGithubUser()
|
||||
res.status(200).json(makeResponse(user))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public fetchSelfGithubUserRepos = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const username = 'bravo68web'
|
||||
const repos = await this.getGithubUserRepos(username)
|
||||
res.status(200).json(makeResponse(repos))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public fetchSelfGithubUserGists = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const username = 'bravo68web'
|
||||
const gists = await this.getGithubUserGists(username)
|
||||
res.status(200).json(makeResponse(gists))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public fetchSelfGithubUserFollowers = async (
|
||||
req: Request,
|
||||
res: Response
|
||||
) => {
|
||||
try {
|
||||
const username = 'bravo68web'
|
||||
const followers = await this.getGithubUserFollowers(username)
|
||||
res.status(200).json(makeResponse(followers))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public fetchSelfGithubUserFollowing = async (
|
||||
req: Request,
|
||||
res: Response
|
||||
) => {
|
||||
try {
|
||||
const username = 'bravo68web'
|
||||
const following = await this.getGithubUserFollowing(username)
|
||||
res.status(200).json(makeResponse(following))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public fetchSelfGithubUserStarred = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const username = 'bravo68web'
|
||||
const starred = await this.getGithubUserStarred(username)
|
||||
res.status(200).json(makeResponse(starred))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public fetchSelfGithubUserEvents = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const username = 'bravo68web'
|
||||
const events = await this.getGithubUserEvents(username)
|
||||
res.status(200).json(makeResponse(events))
|
||||
} catch (error: any) {
|
||||
res.status(400).json(
|
||||
makeResponse(error.message, {}, 'Failed', true)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import HashnodeService from '../services/hashnode.service'
|
||||
import { Request, Response } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class HashnodeController extends HashnodeService {
|
||||
public getProfile = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getHashnodeProfile()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
import LastfmService from '../services/lastfm.service'
|
||||
import { Response, Request } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class LastFMController extends LastfmService {
|
||||
public fetchUser = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.user()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public fetchTop = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = this.top()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public fetchLoved = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = this.loved()
|
||||
res.send(makeResponse(data))
|
||||
} catch (error: any) {
|
||||
res.send(makeResponse(error.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public fetchCurrent = async (req: Request, res: Response) => {
|
||||
const data = this.current()
|
||||
res.send(data)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
import OsuService from '../services/osu.service'
|
||||
import { Request, Response } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class OsuController extends OsuService {
|
||||
public fetchUser = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getOsuSelf()
|
||||
res.send(makeResponse(data))
|
||||
} catch (error: any) {
|
||||
res.send(makeResponse(error.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public fetchBestScores = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.bestScoresSelf()
|
||||
res.send(makeResponse(data))
|
||||
} catch (error: any) {
|
||||
res.send(makeResponse(error.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public fetchFavBeatmaps = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.favouriteBeatmapsSelf()
|
||||
res.send(makeResponse(data))
|
||||
} catch (error: any) {
|
||||
res.send(makeResponse(error.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public fetchRecentScores = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.recentScoresSelf()
|
||||
res.send(makeResponse(data))
|
||||
} catch (error: any) {
|
||||
res.send(makeResponse(error.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import SpotifyService from '../services/spotify.service'
|
||||
import { Request, Response } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class SpotifyController extends SpotifyService {
|
||||
public login = async (req: Request, res: Response) => {
|
||||
const data = await this.loginAuth()
|
||||
res.redirect(data)
|
||||
}
|
||||
|
||||
public loginCallback = async (req: Request, res: Response) => {
|
||||
const data = await this.loginAuthCallback(req.query.code as string)
|
||||
res.send(data)
|
||||
}
|
||||
|
||||
public fetchSpotifyTopSongs = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getSpotifyTopSongs()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
import { makeResponse } from '../libs'
|
||||
import TwitterService from '../services/twitter.service'
|
||||
|
||||
export default class TwitterController extends TwitterService {
|
||||
public getTweets = async (req, res) => {
|
||||
try {
|
||||
const data = await this.getSelfUserTweets()
|
||||
res.send(data)
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public getProfile = async (req, res) => {
|
||||
try {
|
||||
const data = await this.getSelfUserProfile()
|
||||
res.send(data)
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import VSCodeService from '../services/vscode.service'
|
||||
import { Request, Response } from 'express'
|
||||
|
||||
export default class VSCodeController extends VSCodeService {
|
||||
public fetchList = async (req: Request, res: Response) => {
|
||||
const data = this.list()
|
||||
return res.send(data)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
import WakatimeService from '../services/wakatime.service'
|
||||
import { Request, Response } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
|
||||
export default class Wakatime extends WakatimeService {
|
||||
public profile = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getWakatimeStats()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public last7DaysLanguages = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getWakatimeLanguageUsageInLast7Days()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public last7DaysCode = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getWakatimeCodeStatsLast7Days()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
|
||||
public allTimeCode = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const data = await this.getWakatimeCodeStatesAllTime()
|
||||
res.send(makeResponse(data))
|
||||
} catch (err: any) {
|
||||
res.send(makeResponse(err.message, {}, 'Failed', true))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
let data = qs.stringify({
|
||||
grant_type: 'refresh_token',
|
||||
refresh_token: `${process.env.SPOTIFY_REFRESH_TOKEN}`,
|
||||
})
|
||||
|
||||
let config = {
|
||||
method: 'post',
|
||||
url: 'https://accounts.spotify.com/api/token',
|
||||
headers: {
|
||||
Authorization:
|
||||
`Basic ` +
|
||||
Buffer.from(
|
||||
`${process.env.SPOTIFY_CLIENT_ID!}:${process.env
|
||||
.SPOTIFY_CLIENT_SECRET!}`
|
||||
).toString('base64'),
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
data: data,
|
||||
}
|
||||
|
||||
let accessToken = ''
|
||||
|
||||
let getAccessToken = async () => {
|
||||
axios(config)
|
||||
.then(function (result) {
|
||||
accessToken = result.data.access_token
|
||||
console.log('Initail Generation !!')
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error)
|
||||
})
|
||||
setInterval(() => {
|
||||
axios(config)
|
||||
.then(function (result) {
|
||||
accessToken = result.data.access_token
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error)
|
||||
})
|
||||
console.log('Token regenerated')
|
||||
}, 3600000)
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
accessToken =
|
||||
'ascawqw3efwsedve45gedrfwe34rwefrwsedgvbxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
console.log('🤞', 'Spotify Token not generated')
|
||||
} else {
|
||||
getAccessToken()
|
||||
}
|
||||
|
||||
export default () => {
|
||||
return accessToken
|
||||
}
|
|
@ -7,7 +7,7 @@ import helmet from 'helmet'
|
|||
import { hgqlInit } from './helpers'
|
||||
import routes from './routes'
|
||||
import { errorHandler, notFoundHandler } from './libs'
|
||||
import pkg from './package.json'
|
||||
import pkg from './package.json' assert { type: 'json' }
|
||||
import configStore from './configs'
|
||||
|
||||
export const app: express.Application = express()
|
||||
|
@ -17,6 +17,7 @@ hgqlInit()
|
|||
const isDev: boolean = process.env.NODE_ENV == 'production'
|
||||
console.log(isDev ? '🚀 Production Mode' : '🚀 Development Mode')
|
||||
const configs = new configStore(isDev)
|
||||
const configKeys: any = await configs.getConfigStore()
|
||||
|
||||
app.use(cors())
|
||||
app.use(helmet())
|
||||
|
@ -43,4 +44,4 @@ app.listen(process.env.PORT, async () => {
|
|||
console.log(`\nServer running on port ${process.env.PORT}`)
|
||||
})
|
||||
|
||||
export { configs as configKeys }
|
||||
export { configKeys }
|
||||
|
|
|
@ -3,10 +3,11 @@ import { PaginationType } from '../types'
|
|||
export const makeResponse = (
|
||||
data: any,
|
||||
meta_data: any = null,
|
||||
message = 'Success'
|
||||
message = 'Success',
|
||||
error = false
|
||||
) => ({
|
||||
message,
|
||||
error: false,
|
||||
error,
|
||||
meta_data,
|
||||
data,
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"repository": "git@github.com:BRAVO68WEB/api-rewrite.git",
|
||||
"author": "Jyotirmoy Bandyopadhyaya [Bravo68] <jbandyopadhayaya@gmail.com>",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.226.0",
|
||||
|
@ -26,15 +27,17 @@
|
|||
"napi-nanoid": "^0.0.4",
|
||||
"node-cache": "^5.1.2",
|
||||
"nodemailer": "^6.8.0",
|
||||
"osu-api-extended": "^2.5.12",
|
||||
"redis": "^4.5.1",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm run dev:express\" \"npm run dev:hasura\"",
|
||||
"dev:hasura": "cd hasura && hasura --skip-update-check --envfile ../.env console",
|
||||
"dev:express": "cross-env NODE_ENV=development nodemon -r dotenv/config --watch \"*/**/*.ts\" --exec \"ts-node\" --files \"index.ts\" --signal SIGKILL",
|
||||
"dev:express": "cross-env NODE_ENV=development nodemon -x node --no-warnings --experimental-specifier-resolution=node --loader ts-node/esm index.ts --signal SIGKILL",
|
||||
"build": "tsc",
|
||||
"start": "node dist/index.js"
|
||||
"start": "node --es-module-specifier-resolution=node ./dist/index.js",
|
||||
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,scss,md}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "^1.3.23",
|
||||
|
@ -43,6 +46,8 @@
|
|||
"@types/morgan": "^1.9.3",
|
||||
"concurrently": "^7.6.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"hasura-cli": "^2.15.1"
|
||||
"hasura-cli": "^2.15.1",
|
||||
"prettier": "^2.8.2",
|
||||
"ts-node": "^10.9.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../libs'
|
||||
import SpotifyController from '../controllers/spotify.controller'
|
||||
|
||||
const router = Router()
|
||||
const { login, loginCallback } = new SpotifyController()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.get('/spotify', login)
|
||||
router.get('/spotify/callback', loginCallback)
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
import path from 'path'
|
||||
import { readdirSync } from 'fs'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { dirname } from 'path'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = dirname(__filename)
|
||||
|
||||
import { Router } from 'express'
|
||||
|
||||
|
@ -12,6 +17,7 @@ const loadRoutes = async (dirPath: string, prefix = '/') => {
|
|||
readdirSync(dirPath, {
|
||||
withFileTypes: true,
|
||||
}).forEach(async (f) => {
|
||||
// console.log(f)
|
||||
if (f.isFile()) {
|
||||
if (f.name == thisFileName) return
|
||||
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import DiscordController from '../../controllers/discord.controller'
|
||||
|
||||
const router = Router()
|
||||
const { getProfile, getBanner } = new DiscordController()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
router.get('/profile', getProfile)
|
||||
router.get('/banner', getBanner)
|
||||
|
||||
export default router
|
||||
|
|
|
@ -1,18 +1,23 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import GithubController from '../../controllers/github.controller'
|
||||
|
||||
const router = Router()
|
||||
const {
|
||||
fetchSelfGithubUser,
|
||||
fetchSelfGithubUserEvents,
|
||||
fetchSelfGithubUserFollowers,
|
||||
fetchSelfGithubUserFollowing,
|
||||
fetchSelfGithubUserGists,
|
||||
fetchSelfGithubUserRepos,
|
||||
fetchSelfGithubUserStarred,
|
||||
} = new GithubController()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
router.get('/user', fetchSelfGithubUser)
|
||||
router.get('/events', fetchSelfGithubUserEvents)
|
||||
router.get('/followers', fetchSelfGithubUserFollowers)
|
||||
router.get('/following', fetchSelfGithubUserFollowing)
|
||||
router.get('/gists', fetchSelfGithubUserGists)
|
||||
router.get('/repos', fetchSelfGithubUserRepos)
|
||||
router.get('/starred', fetchSelfGithubUserStarred)
|
||||
|
||||
export default router
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import HashnodeController from '../../controllers/hashnode.controller'
|
||||
|
||||
const router = Router()
|
||||
const { getProfile } = new HashnodeController()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
router.get('/', getProfile)
|
||||
|
||||
export default router
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import LastFMController from '../../controllers/lastfm.controller'
|
||||
|
||||
const { fetchTop, fetchCurrent, fetchLoved, fetchUser } = new LastFMController()
|
||||
|
||||
const router = Router()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
router.get('/', fetchUser)
|
||||
router.get('/top', fetchTop)
|
||||
router.get('/loved', fetchLoved)
|
||||
router.all('/current', fetchCurrent)
|
||||
|
||||
export default router
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
|
||||
const router = Router()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
|
||||
export default router
|
|
@ -1,18 +1,10 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import SpotifyController from '../../controllers/spotify.controller'
|
||||
|
||||
const router = Router()
|
||||
const { fetchSpotifyTopSongs } = new SpotifyController()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
router.get('/top', fetchSpotifyTopSongs)
|
||||
|
||||
export default router
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import TwitterController from '../../controllers/twitter.controller'
|
||||
|
||||
const router = Router()
|
||||
const { getProfile, getTweets } = new TwitterController()
|
||||
|
||||
router.get('/profile', getProfile)
|
||||
router.get('/tweets', getTweets)
|
||||
|
||||
export default router
|
|
@ -1,18 +1,10 @@
|
|||
import { Router } from 'express'
|
||||
import { makeResponse } from '../../libs'
|
||||
import VSCodeController from '../../controllers/vscode.controller'
|
||||
|
||||
const { fetchList } = new VSCodeController()
|
||||
|
||||
const router = Router()
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(makeResponse({ message: 'Hello World!' }))
|
||||
})
|
||||
|
||||
router.all('/err', async (req, res, next) => {
|
||||
try {
|
||||
throw new Error('This is an error')
|
||||
} catch (err) {
|
||||
next(err)
|
||||
}
|
||||
})
|
||||
router.get('/', fetchList)
|
||||
|
||||
export default router
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
import { Router } from 'express'
|
||||
import WakatimeController from '../../controllers/wakatime.controller'
|
||||
|
||||
const router = Router()
|
||||
const { allTimeCode, last7DaysCode, last7DaysLanguages, profile } =
|
||||
new WakatimeController()
|
||||
|
||||
router.get('/', profile)
|
||||
router.get('/LanguageUsageInLast7Days', last7DaysLanguages)
|
||||
router.get('/codeStatsLast7Days', last7DaysCode)
|
||||
router.get('/codeTimeAllTime', allTimeCode)
|
||||
|
||||
export default router
|
|
@ -0,0 +1,17 @@
|
|||
import axios from '../helpers/axios_client'
|
||||
|
||||
export default class DiscordService {
|
||||
public activity = async () => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.lanyard.rest/v1/users/457039372009865226`
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
public banner = async () => {
|
||||
const { data } = await axios.get(
|
||||
`https://lanyard-profile-readme.vercel.app/api/457039372009865226`
|
||||
)
|
||||
return data
|
||||
}
|
||||
}
|
|
@ -1,48 +1,84 @@
|
|||
import axios from '../helpers/axios_client'
|
||||
|
||||
export const getGithubUser = async (username: string) => {
|
||||
const { data } = await axios.get(`https://api.github.com/users/${username}`)
|
||||
return data
|
||||
}
|
||||
export default class Github {
|
||||
public getGithubUser = async () => {
|
||||
const { data } = await axios.get(`https://api.github.com/user`, {
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
||||
export const getGithubUserRepos = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/repos`
|
||||
)
|
||||
return data
|
||||
}
|
||||
public getGithubUserRepos = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/repos`,
|
||||
{
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export const getGithubUserGists = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/gists`
|
||||
)
|
||||
return data
|
||||
}
|
||||
public getGithubUserGists = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/gists`,
|
||||
{
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export const getGithubUserFollowers = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/followers`
|
||||
)
|
||||
return data
|
||||
}
|
||||
public getGithubUserFollowers = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/followers`,
|
||||
{
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export const getGithubUserFollowing = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/following`
|
||||
)
|
||||
return data
|
||||
}
|
||||
public getGithubUserFollowing = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/following`,
|
||||
{
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export const getGithubUserStarred = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/starred`
|
||||
)
|
||||
return data
|
||||
}
|
||||
public getGithubUserStarred = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/starred`,
|
||||
{
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
export const getGithubUserEvents = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/events`
|
||||
)
|
||||
return data
|
||||
public getGithubUserEvents = async (username: string) => {
|
||||
const { data } = await axios.get(
|
||||
`https://api.github.com/users/${username}/events`,
|
||||
{
|
||||
headers: {
|
||||
Autherization: `token ${process.env.GH_TOKEN}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
import axiosInstance from '../helpers/axios_client'
|
||||
|
||||
export default class HashnodeService {
|
||||
public getHashnodeProfile = async () => {
|
||||
const query = `
|
||||
query {
|
||||
user(username: "bravo68web") {
|
||||
name
|
||||
username
|
||||
tagline
|
||||
dateJoined
|
||||
socialMedia {
|
||||
twitter
|
||||
github
|
||||
stackoverflow
|
||||
linkedin
|
||||
google
|
||||
website
|
||||
facebook
|
||||
}
|
||||
numFollowing
|
||||
numFollowers
|
||||
location
|
||||
photo
|
||||
coverImage
|
||||
publicationDomain
|
||||
numPosts
|
||||
numReactions
|
||||
publication {
|
||||
author
|
||||
domain
|
||||
title
|
||||
logo
|
||||
metaHTML
|
||||
description
|
||||
links {
|
||||
website
|
||||
github
|
||||
hashnode
|
||||
}
|
||||
}
|
||||
blogHandle
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const { data } = await axiosInstance.post(
|
||||
'https://api.hashnode.com/',
|
||||
{
|
||||
query,
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `${process.env.HASHNODE_API_KEY}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
import axiosInstance from '../helpers/axios_client'
|
||||
|
||||
export default class LastfmService {
|
||||
public current = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
`https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=Bravo68web&api_key=${process.env.LASTFM_API_KEY}&format=json&limit=1`
|
||||
)
|
||||
return data
|
||||
}
|
||||
public user = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
`https://ws.audioscrobbler.com/2.0/?method=user.getInfo&user=Bravo68web&api_key=${process.env.LASTFM_API_KEY}&format=json&limit=1`
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
public loved = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
`https://ws.audioscrobbler.com/2.0/?method=user.getLovedTracks&user=Bravo68web&api_key=${process.env.LASTFM_API_KEY}&format=json&limit=1`
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
public top = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
`https://ws.audioscrobbler.com/2.0/?method=user.getTopTracks&user=Bravo68web&api_key=${process.env.LASTFM_API_KEY}&format=json&limit=1`
|
||||
)
|
||||
return data
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
import axios from '../helpers/axios_client'
|
||||
import { v1, v2, auth, tools } from 'osu-api-extended'
|
||||
import { configKeys } from '../'
|
||||
|
||||
const config = configKeys
|
||||
|
||||
export default class Osu {
|
||||
constructor() {
|
||||
auth.login_lazer(config.OSU_USERNAME!, config.OSU_PASSWORD!)
|
||||
}
|
||||
|
||||
public async getOsuSelf() {
|
||||
const data = await v2.user.me.details('osu')
|
||||
return data
|
||||
}
|
||||
|
||||
public async bestScoresSelf() {
|
||||
const data = await v2.user.scores.category(15227110, 'best', {})
|
||||
return data
|
||||
}
|
||||
|
||||
public async recentScoresSelf() {
|
||||
const data = await v2.user.scores.category(15227110, 'recent', {})
|
||||
return data
|
||||
}
|
||||
|
||||
public async favouriteBeatmapsSelf() {
|
||||
const data = await v2.user.beatmaps.most_played(15227110, {
|
||||
limit: 10,
|
||||
})
|
||||
return data
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
import axiosInstance from '../helpers/axios_client'
|
||||
import spotifyAccessToken from '../helpers/spotify_provider'
|
||||
import { configKeys } from '../'
|
||||
|
||||
const config = configKeys
|
||||
|
||||
export default class Spotify {
|
||||
private clientID: string = config.SPOTIFY_CLIENT_ID!
|
||||
private clientSecret: string = config.SPOTIFY_CLIENT_SECRET!
|
||||
|
||||
public loginAuth = async () => {
|
||||
// let state = crypto.getRandomValues(new Uint32Array(1));
|
||||
const data =
|
||||
`https://accounts.spotify.com/authorize?client_id=` +
|
||||
this.clientID +
|
||||
`&response_type=code&redirect_uri=http://localhost:9000/dev/spotify/callback&scope=user-follow-read,user-library-read,user-read-recently-played,user-top-read,user-read-email,user-read-currently-playing`
|
||||
return data
|
||||
}
|
||||
|
||||
public loginAuthCallback = async (code: string) => {
|
||||
const { data } = await axiosInstance.post(
|
||||
'https://accounts.spotify.com/api/token',
|
||||
`grant_type=authorization_code&code=${code}&redirect_uri=http://localhost:9000/dev/spotify/callback`,
|
||||
{
|
||||
auth: {
|
||||
username: this.clientID,
|
||||
password: this.clientSecret,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
public getSpotifyTopSongs = async () => {
|
||||
const data = await axiosInstance.get(
|
||||
'https://api.spotify.com/v1/me/top/tracks?limit=10&time_range=short_term',
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${spotifyAccessToken()}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
return data.data
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
import axiosInstance from '../helpers/axios_client'
|
||||
|
||||
export default class TwitterService {
|
||||
public getSelfUserProfile = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
'https://api.twitter.com/2/users/959990126687342595?user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld&expansions=pinned_tweet_id&tweet.fields=attachments,author_id,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source,text,withheld',
|
||||
{
|
||||
headers: {
|
||||
Authorization: 'Bearer ' + process.env.TWITTER_BEARER_TOKEN,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
public getSelfUserTweets = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
'https://api.twitter.com/2/users/959990126687342595/tweets?max_results=100&tweet.fields=attachments,author_id,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source,text,withheld',
|
||||
{
|
||||
headers: {
|
||||
Authorization: 'Bearer ' + process.env.TWITTER_BEARER_TOKEN,
|
||||
},
|
||||
}
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
export default class VSCodeService {
|
||||
public list = () => {
|
||||
return [
|
||||
{
|
||||
id: 'vscode-uipack',
|
||||
extentionPack: true,
|
||||
name: "Bravo's UI pack",
|
||||
description: 'VSCode UI Pack created by Bravo68web',
|
||||
links: [
|
||||
{
|
||||
platform: 'vs-marketplace',
|
||||
link: 'https://marketplace.visualstudio.com/items?itemName=Bravo68web.vector-vscode-devpack',
|
||||
},
|
||||
{
|
||||
platform: 'open-vsx',
|
||||
link: 'https://open-vsx.org/extension/bravo68web/vscode-uipack',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'icyicons',
|
||||
extentionPack: false,
|
||||
name: 'Icy icons',
|
||||
description: 'Crystalify all your VSCode Icons.',
|
||||
links: [
|
||||
{
|
||||
platform: 'vs-marketplace',
|
||||
link: 'https://marketplace.visualstudio.com/items?itemName=Bravo68web.icyicons',
|
||||
},
|
||||
{
|
||||
platform: 'open-vsx',
|
||||
link: 'https://open-vsx.org/extension/bravo68web/icyicons',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'propstar',
|
||||
extentionPack: false,
|
||||
name: 'A multivariant VS-Code Theme build with ❤️. All theme designs and colour combinations are handpicked to suit every Programmers needs. Hope you love it.',
|
||||
links: [
|
||||
{
|
||||
platform: 'vs-marketplace',
|
||||
link: 'https://marketplace.visualstudio.com/items?itemName=Bravo68web.propstar',
|
||||
},
|
||||
{
|
||||
platform: 'open-vsx',
|
||||
link: 'https://open-vsx.org/extension/bravo68web/propstar',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'vector-vscode-devpack',
|
||||
extentionPack: true,
|
||||
name: 'Feature Rich VSCode Extension Pack created by Bravo68web',
|
||||
links: [
|
||||
{
|
||||
platform: 'vs-marketplace',
|
||||
link: 'https://marketplace.visualstudio.com/items?itemName=Bravo68web.vector-vscode-devpack',
|
||||
},
|
||||
{
|
||||
platform: 'open-vsx',
|
||||
link: 'https://open-vsx.org/extension/bravo68web/vector-vscode-devpack',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
import axiosInstance from '../helpers/axios_client'
|
||||
|
||||
export default class WakatimeService {
|
||||
public getWakatimeStats = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
'https://wakatime.com/api/v1/users/current?api_key=' +
|
||||
process.env.WAKATIME_API_KEY
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
public getWakatimeCodeStatesAllTime = async () => {
|
||||
const { data } = await axiosInstance.get(
|
||||
'https://wakatime.com/api/v1/users/current/all_time_since_today?api_key=' +
|
||||
process.env.WAKATIME_API_KEY
|
||||
)
|
||||
return data
|
||||
}
|
||||
|
||||
public getWakatimeCodeStatsLast7Days = async () => {
|
||||
let { data } = await axiosInstance.get(
|
||||
'https://wakatime.com/api/v1/users/current/stats/last_7_days?api_key=' +
|
||||
process.env.WAKATIME_API_KEY
|
||||
)
|
||||
return {
|
||||
main: data.categories[0].text,
|
||||
avg: data.human_readable_daily_average_including_other_language,
|
||||
}
|
||||
}
|
||||
|
||||
public getWakatimeLanguageUsageInLast7Days = async () => {
|
||||
let { data } = await axiosInstance.get(
|
||||
'https://wakatime.com/api/v1/users/current/stats/last_7_days?api_key=' +
|
||||
process.env.WAKATIME_API_KEY
|
||||
)
|
||||
return data.languages
|
||||
}
|
||||
}
|
|
@ -4,9 +4,9 @@
|
|||
"typeRoots": ["node_modules/@types", "./types"],
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"target": "es6",
|
||||
"target": "ES2017",
|
||||
"strict": true,
|
||||
"module": "commonjs",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "./build",
|
||||
"emitDecoratorMetadata": true,
|
||||
|
|
158
yarn.lock
158
yarn.lock
|
@ -988,6 +988,13 @@
|
|||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@cspotcode/source-map-support@^0.8.0":
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
|
||||
integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==
|
||||
dependencies:
|
||||
"@jridgewell/trace-mapping" "0.3.9"
|
||||
|
||||
"@gar/promisify@^1.1.3":
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
|
||||
|
@ -1020,6 +1027,24 @@
|
|||
resolved "https://registry.yarnpkg.com/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b"
|
||||
integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==
|
||||
|
||||
"@jridgewell/resolve-uri@^3.0.3":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
|
||||
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
|
||||
|
||||
"@jridgewell/sourcemap-codec@^1.4.10":
|
||||
version "1.4.14"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
|
||||
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
|
||||
|
||||
"@jridgewell/trace-mapping@0.3.9":
|
||||
version "0.3.9"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9"
|
||||
integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||
|
||||
"@lerna/add@6.1.0":
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@lerna/add/-/add-6.1.0.tgz#0f09495c5e1af4c4f316344af34b6d1a91b15b19"
|
||||
|
@ -2132,6 +2157,26 @@
|
|||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
||||
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
|
||||
|
||||
"@tsconfig/node10@^1.0.7":
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2"
|
||||
integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==
|
||||
|
||||
"@tsconfig/node12@^1.0.7":
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d"
|
||||
integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==
|
||||
|
||||
"@tsconfig/node14@^1.0.0":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1"
|
||||
integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==
|
||||
|
||||
"@tsconfig/node16@^1.0.2":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"
|
||||
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==
|
||||
|
||||
"@types/body-parser@*":
|
||||
version "1.19.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0"
|
||||
|
@ -2274,6 +2319,16 @@ accepts@~1.3.8:
|
|||
mime-types "~2.1.34"
|
||||
negotiator "0.6.3"
|
||||
|
||||
acorn-walk@^8.1.1:
|
||||
version "8.2.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
|
||||
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
|
||||
|
||||
acorn@^8.4.1:
|
||||
version "8.8.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73"
|
||||
integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==
|
||||
|
||||
add-stream@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
|
||||
|
@ -2387,6 +2442,11 @@ are-we-there-yet@^3.0.0:
|
|||
delegates "^1.0.0"
|
||||
readable-stream "^3.6.0"
|
||||
|
||||
arg@^4.1.0:
|
||||
version "4.1.3"
|
||||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
||||
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
|
||||
|
||||
argparse@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||
|
@ -3119,6 +3179,11 @@ cosmiconfig@^7.0.0:
|
|||
path-type "^4.0.0"
|
||||
yaml "^1.10.0"
|
||||
|
||||
create-require@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
|
||||
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
|
||||
|
||||
cross-env@^7.0.3:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
|
||||
|
@ -3285,6 +3350,11 @@ dezalgo@^1.0.0:
|
|||
asap "^2.0.0"
|
||||
wrappy "1"
|
||||
|
||||
diff@^4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
|
||||
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
|
||||
|
||||
dir-glob@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
|
||||
|
@ -4198,6 +4268,11 @@ inquirer@^8.2.4:
|
|||
through "^2.3.6"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
int64-buffer@^0.1.9:
|
||||
version "0.1.10"
|
||||
resolved "https://registry.yarnpkg.com/int64-buffer/-/int64-buffer-0.1.10.tgz#277b228a87d95ad777d07c13832022406a473423"
|
||||
integrity sha512-v7cSY1J8ydZ0GyjUHqF+1bshJ6cnEVLo9EnjB8p+4HDRPZc9N5jjmvUV7NvEsqQOKyH0pmIBFWXVQbiS0+OBbA==
|
||||
|
||||
ip@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
||||
|
@ -4471,6 +4546,11 @@ kind-of@^6.0.2, kind-of@^6.0.3:
|
|||
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
|
||||
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
|
||||
|
||||
leb@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/leb/-/leb-0.3.0.tgz#32bee9fad168328d6aea8522d833f4180eed1da3"
|
||||
integrity sha512-Da85JQprJx6zuIlglSs2443/yZ259Cbxw5PTyQP9oPfmWON8vmV6FD7HcA8QBvb/xmUXPReS/nAb+08omBiHQw==
|
||||
|
||||
lerna@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.1.0.tgz#693145393ec22fd3ca98d817deab2246c1e2b107"
|
||||
|
@ -4652,6 +4732,20 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1:
|
|||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.1.tgz#8da8d2f5f59827edb388e63e459ac23d6d408fea"
|
||||
integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==
|
||||
|
||||
lzma-native@^8.0.1:
|
||||
version "8.0.6"
|
||||
resolved "https://registry.yarnpkg.com/lzma-native/-/lzma-native-8.0.6.tgz#3ea456209d643bafd9b5d911781bdf0b396b2665"
|
||||
integrity sha512-09xfg67mkL2Lz20PrrDeNYZxzeW7ADtpYFbwSQh9U8+76RIzx5QsJBMy8qikv3hbUPfpy6hqwxt6FcGK81g9AA==
|
||||
dependencies:
|
||||
node-addon-api "^3.1.0"
|
||||
node-gyp-build "^4.2.1"
|
||||
readable-stream "^3.6.0"
|
||||
|
||||
lzma@^2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/lzma/-/lzma-2.3.2.tgz#3783b24858b9c0e747a0df3cbf1fb5fcaa92c441"
|
||||
integrity sha512-DcfiawQ1avYbW+hsILhF38IKAlnguc/fjHrychs9hdxe4qLykvhT5VTGNs5YRWgaNePh7NTxGD4uv4gKsRomCQ==
|
||||
|
||||
make-dir@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
|
||||
|
@ -4667,6 +4761,11 @@ make-dir@^3.0.0:
|
|||
dependencies:
|
||||
semver "^6.0.0"
|
||||
|
||||
make-error@^1.1.1:
|
||||
version "1.3.6"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
|
||||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
||||
|
||||
make-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6:
|
||||
version "10.2.1"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164"
|
||||
|
@ -5085,7 +5184,7 @@ neo-async@^2.6.0:
|
|||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
|
||||
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
||||
|
||||
node-addon-api@^3.2.1:
|
||||
node-addon-api@^3.1.0, node-addon-api@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
|
||||
integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==
|
||||
|
@ -5118,6 +5217,11 @@ node-fetch@^3.2.3:
|
|||
fetch-blob "^3.1.4"
|
||||
formdata-polyfill "^4.0.10"
|
||||
|
||||
node-gyp-build@^4.2.1:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055"
|
||||
integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==
|
||||
|
||||
node-gyp-build@^4.3.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40"
|
||||
|
@ -5147,6 +5251,15 @@ node-imap@^0.9.6:
|
|||
readable-stream "^3.6.0"
|
||||
utf7 "^1.0.2"
|
||||
|
||||
node-osr@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/node-osr/-/node-osr-1.2.1.tgz#d818cb80474c96fb9e554a4db53c16f80b21b4e9"
|
||||
integrity sha512-BKTE4Nx4Mim9/Q5i8mdTxw7Cp8ljtLg93EFMUvP7xsfxgruqA50MKyPj9a9SM6utyl1+HFpdmtvaAf3cp3G1mg==
|
||||
dependencies:
|
||||
int64-buffer "^0.1.9"
|
||||
leb "^0.3.0"
|
||||
lzma "^2.3.2"
|
||||
|
||||
nodemailer@^6.8.0:
|
||||
version "6.8.0"
|
||||
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.8.0.tgz#804bcc5256ee5523bc914506ee59f8de8f0b1cd5"
|
||||
|
@ -5451,6 +5564,15 @@ os-tmpdir@~1.0.2:
|
|||
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
||||
integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==
|
||||
|
||||
osu-api-extended@^2.5.12:
|
||||
version "2.5.12"
|
||||
resolved "https://registry.yarnpkg.com/osu-api-extended/-/osu-api-extended-2.5.12.tgz#448b1cb091aba6fa30b7a754269f82133cc51419"
|
||||
integrity sha512-7WId3PPLT/5dZMuORmpsDVedR5ojXgPbgZH1JHFO7HLZS/5pKeK7AEHGFhO2i7YsZIF+I16pyT02WBzWrLd/4g==
|
||||
dependencies:
|
||||
lzma-native "^8.0.1"
|
||||
node-osr "^1.2.1"
|
||||
open "^8.4.0"
|
||||
|
||||
p-finally@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
||||
|
@ -5716,6 +5838,11 @@ pkg-up@^3.1.0:
|
|||
dependencies:
|
||||
find-up "^3.0.0"
|
||||
|
||||
prettier@^2.8.2:
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160"
|
||||
integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==
|
||||
|
||||
proc-log@^2.0.0, proc-log@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-2.0.1.tgz#8f3f69a1f608de27878f91f5c688b225391cb685"
|
||||
|
@ -6577,6 +6704,25 @@ trim-newlines@^3.0.0:
|
|||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
|
||||
integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==
|
||||
|
||||
ts-node@^10.9.1:
|
||||
version "10.9.1"
|
||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
|
||||
integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==
|
||||
dependencies:
|
||||
"@cspotcode/source-map-support" "^0.8.0"
|
||||
"@tsconfig/node10" "^1.0.7"
|
||||
"@tsconfig/node12" "^1.0.7"
|
||||
"@tsconfig/node14" "^1.0.0"
|
||||
"@tsconfig/node16" "^1.0.2"
|
||||
acorn "^8.4.1"
|
||||
acorn-walk "^8.1.1"
|
||||
arg "^4.1.0"
|
||||
create-require "^1.1.0"
|
||||
diff "^4.0.1"
|
||||
make-error "^1.1.1"
|
||||
v8-compile-cache-lib "^3.0.1"
|
||||
yn "3.1.1"
|
||||
|
||||
tsconfig-paths@^3.9.0:
|
||||
version "3.14.1"
|
||||
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a"
|
||||
|
@ -6782,6 +6928,11 @@ uuid@^8.3.2:
|
|||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
||||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
||||
|
||||
v8-compile-cache-lib@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
|
||||
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
|
||||
|
||||
v8-compile-cache@2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
|
||||
|
@ -7024,3 +7175,8 @@ yargs@^17.3.1, yargs@^17.6.2:
|
|||
string-width "^4.2.3"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^21.1.1"
|
||||
|
||||
yn@3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
|
||||
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
|
||||
|
|
Loading…
Reference in New Issue