1802f50163
* feat: replace eslint with preset * chore: update * add empty line * Revert changes * chore: replace colors * chore: tweaks * Revert "chore: replace colors" This reverts commit 3462420ecbdd9c5275a895643dad1586e92226a0. * bring lint back * chore: tweaks * chore: add note * chore: fix yarn lock * chore: fix yarn.lock 2 * chore: use ESLint from npm * Chore: update lockfile * tweaks * chore: initial take fixing some lint issues * tweaks * chore: another take * chore: further tweaks * chore: fix further * feat: ignore Jest for cypress * revert change * chore: update to latest preset * tmp lets see if this works * chore: turn error into warning * chore: remove warnings * chore: deduplicate yarn lock * feat: add recommended ESLint extension in case someone has Prettier instead * upgrade to latest uniswap config * chore: update todo * remove patch * find to some * name * chore: tweak yarn lock * update * cleanup * update name for filter * nl * no unsafe finally * chore: update doc * fix * fix * one more fix * one more file * chore: Fix two last build issues * add generated back * fix lint after merge * chore: fix tests * remove * one more
24 lines
734 B
JavaScript
24 lines
734 B
JavaScript
/* eslint-env node */
|
|
|
|
require('dotenv').config({ path: '.env.production' })
|
|
|
|
const { exec } = require('child_process')
|
|
const dataConfig = require('./graphql.config')
|
|
const thegraphConfig = require('./graphql_thegraph.config')
|
|
|
|
function fetchSchema(url, outputFile) {
|
|
exec(
|
|
`get-graphql-schema --h Origin=https://app.uniswap.org ${url} | tee ${outputFile}.temp`,
|
|
(error, stdout, stderr) => {
|
|
if (error || stderr) {
|
|
console.log(`Failed to fetch schema from ${url}`)
|
|
} else if (stdout) {
|
|
exec(`mv ${outputFile}.temp ${outputFile}`)
|
|
}
|
|
}
|
|
)
|
|
}
|
|
|
|
fetchSchema(process.env.THE_GRAPH_SCHEMA_ENDPOINT, thegraphConfig.schema)
|
|
fetchSchema(process.env.REACT_APP_AWS_API_ENDPOINT, dataConfig.schema)
|