File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export * from './lib/forms/component' ;
2+ export * from './lib/forms/definitions' ;
3+ export * from './lib/forms/renderers' ;
4+ export * from './lib/forms/utils' ;
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ declare module '*.json' {
33 export = value ;
44}
55
6- declare module 'react-jsonschema-form/lib/utils' ;
6+ declare module 'react-jsonschema-form/lib/utils' ;
Original file line number Diff line number Diff line change 11import * as fs from 'fs' ;
2- import { IntrospectionQuery , IntrospectionObjectType } from 'graphql' ;
2+ import { IntrospectionObjectType , IntrospectionQuery } from 'graphql' ;
33
44export const extractMutationsNames = ( filePath : string ) : string [ ] | void => {
55 const content = fs . readFileSync ( filePath ) ;
66 if ( content ) {
77 const json = JSON . parse ( content . toString ( ) ) . data as IntrospectionQuery ;
88 const { name : mutationType } = json . __schema . mutationType ;
9- const mutations = json . __schema . types . find ( t => t . name === mutationType ) as ( IntrospectionObjectType | undefined ) ;
9+ const mutations =
10+ json . __schema . types . find ( t => t . name === mutationType ) as ( IntrospectionObjectType | undefined ) ;
1011 return mutations ?
1112 mutations . fields . map ( f => f . name ) :
1213 [ ] ;
1314 } else {
1415 throw new Error ( `Unable to read ${ filePath } ` ) ;
1516 }
16- }
17+ } ;
1718
1819export const generateMutationTypesDef = ( mutations : string [ ] ) : string => {
1920 return (
@@ -22,5 +23,5 @@ export const generateMutationTypesDef = (mutations: string[]): string => {
2223
2324declare type ApolloFormMutationNames = ${ mutations . map ( m => `'${ m } '` ) . join ( ' | ' ) } ;
2425`
25- )
26- }
26+ ) ;
27+ } ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-apollo-form" ,
33 "version" : " 0.1.0-1" ,
4- "main" : " build /index.js" ,
4+ "main" : " dist /index.js" ,
55 "bin" : {
6- "react-apollo-form" : " ./build /lib/cli.js"
6+ "react-apollo-form" : " ./dist /lib/cli.js"
77 },
88 "repository" : " git@github.com:wittydeveloper/react-apollo-form.git" ,
99 "author" : " Charly POLY <cpoly55@gmail.com>" ,
5252 "tslint-react" : " ^3.6.0" ,
5353 "typescript" : " ^2.9.1"
5454 }
55- }
55+ }
You can’t perform that action at this time.
0 commit comments