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
{ | |
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", | |
"files": { | |
"ignore": [ | |
"**/dist/**", | |
"**/storybook-static/**", | |
"**/coverage/**", | |
"**/.next/**", | |
"**/node_modules/**" | |
] |
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
```ts | |
import AdmZip from 'adm-zip'; | |
import { NextApiRequest, NextApiResponse } from 'next'; | |
export default async function handler( | |
req: NextApiRequest, | |
res: NextApiResponse, | |
) { | |
const zip = new AdmZip(); |
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
import { getSession } from 'next-auth/react'; | |
import { findUserByEmailOrName, getMatches } from '../../graphql/resolvers'; | |
import { createObjectCsvStringifier as createCsvStringifier } from 'csv-writer'; | |
import AdmZip from 'adm-zip'; | |
import { NextApiRequest, NextApiResponse } from 'next'; | |
import isDowntime from '../../util/isDowntime'; | |
export default async function handler( | |
req: NextApiRequest, | |
res: NextApiResponse, |
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
[{ | |
"title": "Acts of Vengeance: Marvel Universe", | |
"author": "", | |
"image": "https://d23tvywehq0xq.cloudfront.net/i72c1e74bbcfe6d28dac782c8912b4206c.jpg" | |
}, { | |
"title": "Atlantis Attacks", | |
"author": "", | |
"image": "https://d23tvywehq0xq.cloudfront.net/ykd882437984e3fa5b644d868662cef55d.jpg" | |
}, { | |
"title": "Avatar the Last Airbender", |
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
export type Country = { | |
code: string; | |
flag: string; | |
mobileCode: string; | |
name: string; | |
timezone: string; | |
utc: string; | |
}; | |
const countries: Record<string, Country> = { |
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
app.use('/graphql', graphqlExpress(async (req) => { | |
const userId = req.userId; | |
const user = await db.findUserById(userId) | |
return { | |
schema, | |
context: { | |
user | |
}, |
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
const path = require('path'); | |
const nodeExternals = require('webpack-node-externals'); | |
module.exports = { | |
entry: './src/index.js', | |
target: 'node', | |
externals: [nodeExternals()], | |
devtool: 'eval-source-map', | |
output: { | |
path: path.join(__dirname, '/lib'), |
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
const FORM_REGISTRY_KEY = Symbol.for('yaFormRegistry'); | |
const globalSymbols = Object.getOwnPropertySymbols(global); | |
const hasSymbol = globalSymbols.indexOf(FORM_REGISTRY_KEY) > -1; | |
if (!hasSymbol) { | |
global[FORM_REGISTRY_KEY] = { | |
handlers: {}, | |
add(name, handler) { | |
this.handlers[name] = handler; |
NewerOlder