File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 13
13
],
14
14
"scripts" : {
15
15
"start" : " ./bin/run" ,
16
- "prepublishOnly" : " rm -rf lib && tsc -b" ,
16
+ "build" : " rm -rf lib && tsc -b" ,
17
+ "prepack" : " npm run build" ,
17
18
"test" : " mocha -r ts-node/register 'test/**/*.spec.ts'"
18
19
},
19
20
"repository" : " httptoolkit/httptoolkit-server" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { GraphQLScalarType } from 'graphql';
5
5
import { HtkConfig } from './config' ;
6
6
import { buildInterceptors , Interceptor } from './interceptors' ;
7
7
8
+ const packageJson = require ( '../package.json' ) ;
9
+
8
10
const typeDefs = `
9
11
type Query {
10
12
version: String!
@@ -38,7 +40,7 @@ const typeDefs = `
38
40
const buildResolvers = ( interceptors : _ . Dictionary < Interceptor > ) => {
39
41
return {
40
42
Query : {
41
- version : async ( ) => ( await import ( '../package.json' ) ) . version ,
43
+ version : ( ) => packageJson . version ,
42
44
interceptors : ( ) => _ . values ( interceptors ) ,
43
45
} ,
44
46
You can’t perform that action at this time.
0 commit comments