-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade fastify dependency to v3 * add dependabot config * add dependabot config * Update .dependabot/config.yml Co-Authored-By: Matteo Collina <matteo.collina@gmail.com> * add build status badge * remove tslint, change request.req to request.raw and reply.res to reply.raw * update version * Update index.js * Update package.json Co-authored-by: Matteo Collina <matteo.collina@gmail.com>
- Loading branch information
Showing
10 changed files
with
76 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: 1 | ||
update_configs: | ||
- package_manager: "javascript" | ||
directory: "/" | ||
update_schedule: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: CI workflow | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install Dependencies | ||
run: npm install --ignore-scripts | ||
- name: Test | ||
run: npm test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,38 @@ | ||
// Definitions by: Jannik <https://github.com/jannikkeye> | ||
// Leo <https://github.com/leomelzer> | ||
/// <reference types="node" /> | ||
import * as fastify from 'fastify'; | ||
import { Plugin } from "fastify"; | ||
import { Server, IncomingMessage, ServerResponse } from "http"; | ||
import { Http2SecureServer, Http2Server, Http2ServerRequest, Http2ServerResponse } from "http2"; | ||
import * as https from "https"; | ||
|
||
type HttpServer = Server | Http2Server | Http2SecureServer | https.Server; | ||
type HttpRequest = IncomingMessage | Http2ServerRequest; | ||
type HttpResponse = ServerResponse | Http2ServerResponse; | ||
import { FastifyPlugin, FastifyReply, RawServerBase } from 'fastify' | ||
|
||
declare module "fastify" { | ||
interface FastifyReply<HttpResponse> { | ||
sendFile(filename: string, rootPath?: string): FastifyReply<HttpResponse>; | ||
interface FastifyReplyInterface { | ||
sendFile(filename: string, rootPath?: string): FastifyReply; | ||
} | ||
} | ||
|
||
declare function fastifyStatic(): fastify.Plugin< | ||
Server, | ||
IncomingMessage, | ||
ServerResponse, | ||
{ | ||
root: string; | ||
prefix?: string; | ||
prefixAvoidTrailingSlash?: boolean; | ||
serve?: boolean; | ||
decorateReply?: boolean; | ||
schemaHide?: boolean; | ||
setHeaders?: (...args: any[]) => void; | ||
redirect?: boolean; | ||
wildcard?: boolean | string; | ||
export interface FastifyStaticOptions { | ||
root: string; | ||
prefix?: string; | ||
prefixAvoidTrailingSlash?: boolean; | ||
serve?: boolean; | ||
decorateReply?: boolean; | ||
schemaHide?: boolean; | ||
setHeaders?: (...args: any[]) => void; | ||
redirect?: boolean; | ||
wildcard?: boolean | string; | ||
|
||
// Passed on to `send` | ||
acceptRanges?: boolean; | ||
cacheControl?: boolean; | ||
dotfiles?: boolean; | ||
etag?: boolean; | ||
extensions?: string[]; | ||
immutable?: boolean; | ||
index?: string[]; | ||
lastModified?: boolean; | ||
maxAge?: string | number; | ||
} | ||
>; | ||
|
||
declare namespace fastifyStatic { | ||
interface FastifyStaticOptions {} | ||
// Passed on to `send` | ||
acceptRanges?: boolean; | ||
cacheControl?: boolean; | ||
dotfiles?: boolean; | ||
etag?: boolean; | ||
extensions?: string[]; | ||
immutable?: boolean; | ||
index?: string[]; | ||
lastModified?: boolean; | ||
maxAge?: string | number; | ||
} | ||
|
||
export = fastifyStatic; | ||
declare const fastifyStatic: FastifyPlugin<FastifyStaticOptions> | ||
|
||
export default fastifyStatic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.