Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Le Cam committed Aug 31, 2018
1 parent c747327 commit facff62
Show file tree
Hide file tree
Showing 6 changed files with 1,986 additions and 1,141 deletions.
11 changes: 7 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"presets": [
[
"env",
"@babel/preset-env",
{
"targets": {
"node": 4
"node": 6
}
}
]
],
"@babel/preset-flow"
],
"plugins": ["syntax-flow", "transform-flow-strip-types", "transform-runtime"]
"plugins": [
"@babel/plugin-transform-runtime"
]
}
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
## v1.0.0 (2018-08-31)

- Update GraphQL to v14
- Update Babel to v7
- Add spinner when using CLI
- Drop support for node v4, as v6 is now the minimum version supported by GraphQL

## v0.8.0 (2018-02-15)

* Update GraphQL to v0.13.1
* Remove `sort` option as the schema is sorted by default
- Update GraphQL to v0.13.1
- Remove `sort` option as the schema is sorted by default

## v0.7.2 (2017-12-06)

Expand Down
36 changes: 23 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
{
"name": "graphql-fetch-schema",
"version": "0.7.2",
"version": "1.0.0",
"description": "Fetch a GraphQL schema from a server and write it to file",
"keywords": [
"graphql",
"schema"
],
"repository": {
"type": "git",
"url": "https://github.com/MainframeHQ/graphql-fetch-schema.git"
},
"author": "Mainframe",
"license": "MIT",
"files": [
"bin/*",
"lib/*"
],
"main": "lib/index.js",
"bin": {
"graphql-fetch-schema": "./bin/graphql-fetch-schema"
},
"scripts": {
"clean": "rm -rf ./lib",
"clean": "del ./lib",
"compile": "babel src --out-dir lib",
"build": "npm run clean && npm run compile",
"flow": "flow check",
Expand All @@ -22,18 +30,20 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"babel-runtime": "^6.26.0",
"commander": "^2.14.1",
"graphql": "^0.13.1",
"node-fetch": "^2.0.0"
"@babel/runtime": "^7.0.0",
"commander": "^2.17.1",
"graphql": "^14.0.0",
"node-fetch": "^2.2.0",
"ora": "^3.0.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-syntax-flow": "^6.18.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.6.1",
"flow-bin": "^0.65.0",
"prettier": "^1.10.2"
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"del-cli": "^1.1.0",
"flow-bin": "^0.79.1",
"prettier": "^1.14.2"
}
}
9 changes: 5 additions & 4 deletions src/cli.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
// @flow

import program from 'commander'
import ora from 'ora'

import pckg from '../package.json'
import fetchSchema from './index'

const run = async (url: string, options: Object) => {
const spinner = ora().start()

try {
const files = await fetchSchema(url, options)
files.forEach((file: Object) => {
console.log(file.filePath)
})
spinner.succeed(files.map((file: Object) => file.filePath).join(' '))
} catch (err) {
console.error(err)
spinner.fail(err.message)
}
}

Expand Down
Loading

0 comments on commit facff62

Please sign in to comment.