Skip to content

Commit c96ddb1

Browse files
committed
fix(build): fix build
1 parent c2a5fbe commit c96ddb1

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './lib/forms/component';
2+
export * from './lib/forms/definitions';
3+
export * from './lib/forms/renderers';
4+
export * from './lib/forms/utils';

lib/declarations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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';

lib/utils.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import * as fs from 'fs';
2-
import { IntrospectionQuery, IntrospectionObjectType } from 'graphql';
2+
import { IntrospectionObjectType, IntrospectionQuery } from 'graphql';
33

44
export 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

1819
export const generateMutationTypesDef = (mutations: string[]): string => {
1920
return (
@@ -22,5 +23,5 @@ export const generateMutationTypesDef = (mutations: string[]): string => {
2223
2324
declare type ApolloFormMutationNames = ${mutations.map(m => `'${m}'`).join(' | ')};
2425
`
25-
)
26-
}
26+
);
27+
};

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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>",
@@ -52,4 +52,4 @@
5252
"tslint-react": "^3.6.0",
5353
"typescript": "^2.9.1"
5454
}
55-
}
55+
}

0 commit comments

Comments
 (0)