I hereby claim:
- I am brunoquaresma on github.
- I am faunadb (https://keybase.io/faunadb) on keybase.
- I have a public key ASDHoShbI8liosOWuuCGFWQ8_f4dfamUjTQt-aL5YZ8sMwo
To claim this, I am signing this object:
export const withWebSocket = (Story: FC, { parameters }: StoryContext) => { | |
if (!parameters.webSocket) { | |
console.warn( | |
"Looks like you forgot to add websocket messages to the story", | |
); | |
} | |
// @ts-expect-error -- TS doesn't know about the global WebSocket | |
window.WebSocket = function () { | |
return { |
// Generated from https://tailwindcss.com/docs/customizing-colors | |
export default { | |
slate: { | |
50: "#f8fafc", | |
100: "#f1f5f9", | |
200: "#e2e8f0", | |
300: "#cbd5e1", | |
400: "#94a3b8", | |
500: "#64748b", | |
600: "#475569", |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
export async function getStaticProps() { | |
const postDirectory = path.join(process.cwd(), "src/pages/blog"); | |
const postFilenames = fs | |
.readdirSync(postDirectory) | |
.filter((file) => path.extname(file).toLowerCase() === ".mdx"); | |
const postModules = await Promise.all( | |
postFilenames.map(async (p) => require(`./${p}`)) | |
); | |
return { |
function initializeForm(form) { | |
return Object.keys(form).reduce((newForm, key) => { | |
let value | |
if(form[key] === null || form[key] === undefined) { | |
value = '' | |
} else if(typeof form[key] === 'string') { | |
value = form[key] | |
} else if(typeof form[key] === 'object') { | |
value = initializeForm(form[key]) |
import { IncomingMessage } from 'http' | |
import { | |
NextApiRequestCookies, | |
NextApiRequestQuery, | |
} from 'next/dist/next-server/server/api-utils' | |
import { Socket } from 'net' | |
import { ServerResponse } from 'http' | |
import { NextApiRequest, NextApiResponse } from 'next' | |
import { Env } from 'next/dist/lib/load-env-config' |
import logsFunction from '../logs'; | |
import { IncomingMessage, ServerResponse } from 'http'; | |
import { Socket } from 'net'; | |
import { NowRequestQuery, NowRequestCookies, NowRequestBody } from '@now/node'; | |
class NowRequestMock extends IncomingMessage { | |
public query: NowRequestQuery = {}; | |
public cookies: NowRequestCookies = {}; | |
public body: NowRequestBody; |
I hereby claim:
To claim this, I am signing this object:
This is a draft where we can think of how to improve the FaunaDB JS driver type system, so if you have any suggestions on how we can improve this, feel free to comment and submit your changes.
Current
import faunadb from "faunadb";
type Note = {
["Acrelândia - AC","Assis Brasil - AC","Brasiléia - AC","Bujari - AC","Capixaba - AC","Cruzeiro do Sul - AC","Epitaciolândia - AC","Feijó - AC","Jordão - AC","Mâncio Lima - AC","Manoel Urbano - AC","Marechal Thaumaturgo - AC","Plácido de Castro - AC","Porto Acre - AC","Porto Walter - AC","Rio Branco - AC","Rodrigues Alves - AC","Santa Rosa do Purus - AC","Sena Madureira - AC","Senador Guiomard - AC","Tarauacá - AC","Xapuri - AC","Água Branca - AL","Anadia - AL","Arapiraca - AL","Atalaia - AL","Barra de Santo Antônio - AL","Barra de São Miguel - AL","Batalha - AL","Belém - AL","Belo Monte - AL","Boca da Mata - AL","Branquinha - AL","Cacimbinhas - AL","Cajueiro - AL","Campestre - AL","Campo Alegre - AL","Campo Grande - AL","Canapi - AL","Capela - AL","Carneiros - AL","Chã Preta - AL","Coité do Nóia - AL","Colônia Leopoldina - AL","Coqueiro Seco - AL","Coruripe - AL","Craíbas - AL","Delmiro Gouveia - AL","Dois Riachos - AL","Estrela de Alagoas - AL","Feira Grande - AL","Feliz Deserto - AL","Flexeiras - AL","Gir |