Skip to content

Commit

Permalink
address comments and remove console.log line
Browse files Browse the repository at this point in the history
  • Loading branch information
kjin committed Apr 3, 2018
1 parent 5a298eb commit ddbcc13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 242 deletions.
239 changes: 3 additions & 236 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion scripts/get-plugin-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export async function getPluginTypes() {
if (!matches) {
continue;
}
console.log(matches);
const [, packageName, name, version] = matches;
const installDir = `${TYPES_DIRECTORY}/${packageName}`;
if (await mkdirSafeP(installDir)) {
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/plugin-hapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import {hapi_16, hapi_17} from './types';
const ORIGINAL = Symbol();

type Hapi16Module = typeof hapi_16;
type Hapi17RequestExecutePrivate = {
interface Hapi17RequestExecutePrivate {
(this: hapi_17.Request): Promise<void>;
[ORIGINAL]?: Hapi17RequestExecutePrivate;
};
[ORIGINAL]?: Hapi17RequestExecutePrivate;
}
type Hapi17Request = hapi_17.Request&{
_execute: Hapi17RequestExecutePrivate;
};
Expand Down Expand Up @@ -110,7 +110,7 @@ function instrument<T>(
const plugin: PluginTypes.Plugin = [
{
versions: '8 - 16',
patch(hapi, api) {
patch: (hapi, api) => {
function createMiddleware(): hapi_16.ServerExtRequestHandler {
return function handler(request, reply) {
return instrument(api, request, () => reply.continue());
Expand All @@ -125,7 +125,7 @@ const plugin: PluginTypes.Plugin = [
};
});
},
unpatch(hapi) {
unpatch: (hapi) => {
shimmer.unwrap(hapi.Server.prototype, 'connection');
}
} as PluginTypes.Patch<Hapi16Module>,
Expand Down

0 comments on commit ddbcc13

Please sign in to comment.