This file contains hidden or 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
| export type PlainObject<T> = { [K in keyof T]: T[K] extends object ? never : T[K] }; |
This file contains hidden or 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
| type PathInto<T extends Record<string, any>> = keyof { | |
| [K in keyof T as T[K] extends string | |
| ? K | |
| : T[K] extends Record<string, any> | |
| ? `${K & string}.${PathInto<T[K]> & string}` | |
| : never]: any | |
| } | |
| type PathTrace<T, K extends keyof T = keyof T> = | |
| K extends string |
This file contains hidden or 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
| export namespace server { | |
| export let database: { title: string, message: string }[] = [] | |
| } |
This file contains hidden or 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
| declare global { | |
| namespace NodeJS { | |
| interface ProcessEnv { | |
| VARIABLE_NAME: string; | |
| } | |
| } | |
| } | |
| export { } |
This file contains hidden or 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
| name: deploy | |
| on: | |
| # Triggers the workflow on push | |
| push: | |
| branches: | |
| - development | |
| permissions: write-all | |
This file contains hidden or 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
| name: Generate cache file | |
| on: | |
| # Triggers the workflow everyday | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest |
This file contains hidden or 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
| import fs from 'fs' | |
| import fetch from 'cross-fetch'; | |
| import dotenv from 'dotenv'; | |
| dotenv.config(); | |
| const TOKEN = process.env.TOKEN || '' | |
| const GUILD_URL = process.env.GUILD_URL || '' | |
| class IGuild { |
This file contains hidden or 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
| import type { NextApiRequest, NextApiResponse } from "next"; | |
| export default async function handler( | |
| req: NextApiRequest, | |
| res: NextApiResponse | |
| ) { | |
| const { slug } = req.query; | |
| type HTTP_METHOD = | |
| | "GET" |
This file contains hidden or 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
| export default defineEventHandler((event) => { | |
| let { req, res } = event; | |
| const params = String(event.context.params._).split('/').filter(item => item != '') | |
| if (params.length == 0) { | |
| switch (req.method) { | |
| case "GET": | |
| res.statusCode = 200 | |
| return 'All resources getted with success.'; | |
| case "POST": |
This file contains hidden or 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
| /* supported on Chrome 81, Firefox 96 and Safari 13 */ | |
| :root { | |
| color-scheme: dark; | |
| } |
NewerOlder