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 1313 ],
1414 "scripts" : {
1515 "start" : " ./bin/run" ,
16- "prepublishOnly" : " rm -rf lib && tsc -b" ,
16+ "build" : " rm -rf lib && tsc -b" ,
17+ "prepack" : " npm run build" ,
1718 "test" : " mocha -r ts-node/register 'test/**/*.spec.ts'"
1819 },
1920 "repository" : " httptoolkit/httptoolkit-server" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { GraphQLScalarType } from 'graphql';
55import { HtkConfig } from './config' ;
66import { buildInterceptors , Interceptor } from './interceptors' ;
77
8+ const packageJson = require ( '../package.json' ) ;
9+
810const typeDefs = `
911 type Query {
1012 version: String!
@@ -38,7 +40,7 @@ const typeDefs = `
3840const buildResolvers = ( interceptors : _ . Dictionary < Interceptor > ) => {
3941 return {
4042 Query : {
41- version : async ( ) => ( await import ( '../package.json' ) ) . version ,
43+ version : ( ) => packageJson . version ,
4244 interceptors : ( ) => _ . values ( interceptors ) ,
4345 } ,
4446
You can’t perform that action at this time.
0 commit comments