[hapi-pino] Support scoped Hapi package, update for 6.x (#36425)

This commit is contained in:
Todd Bealmear 2019-07-01 11:02:02 -07:00 committed by Ryan Cavanaugh
parent c86d5c4ed9
commit 08ba1b8dfa
3 changed files with 39 additions and 13 deletions

View File

@ -1,4 +1,4 @@
import { Server } from 'hapi';
import { Server } from '@hapi/hapi';
import * as pino from 'pino';
import * as HapiPino from 'hapi-pino';

View File

@ -1,24 +1,24 @@
// Type definitions for hapi-pino 5.2
// Type definitions for hapi-pino 6.0
// Project: https://github.com/pinojs/hapi-pino#readme
// Definitions by: Rodrigo Saboya <https://github.com/saboya>
// Todd Bealmear <https://github.com/todd>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
/// <reference types='node' />
import {
Plugin,
} from 'hapi';
import * as pino from 'pino';
declare module 'hapi' {
interface Server {
logger: () => pino.Logger;
}
import { Plugin } from '@hapi/hapi';
interface Request {
logger: pino.Logger;
}
declare module '@hapi/hapi' {
interface Server {
logger: () => pino.Logger;
}
interface Request {
logger: pino.Logger;
}
}
declare namespace HapiPino {

View File

@ -14,7 +14,33 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"paths": {
"@hapi/hapi": [
"hapi__hapi"
],
"@hapi/boom": [
"hapi__boom"
],
"@hapi/shot": [
"hapi__shot"
],
"@hapi/mimos": [
"hapi__mimos"
],
"@hapi/iron": [
"hapi__iron"
],
"@hapi/joi": [
"hapi__joi"
],
"@hapi/podium": [
"hapi__podium"
],
"@hapi/catbox": [
"hapi__catbox"
]
}
},
"files": [
"index.d.ts",