@lbu/server
Advanced tools
Comparing version 0.0.34 to 0.0.35
@@ -42,2 +42,4 @@ // Original types from @types/koa & @types/koa-compose | ||
import { Logger } from "@lbu/insight"; | ||
import { AxiosInstance } from "axios"; | ||
import { EventEmitter } from "events"; | ||
@@ -48,3 +50,2 @@ import { Files } from "formidable"; | ||
import * as url from "url"; | ||
import { Logger } from "@lbu/insight"; | ||
@@ -977,3 +978,9 @@ /** | ||
*/ | ||
renew?: boolean; // Type definitions for koa-session 5.10 // Project: https://github.com/koajs/session // Definitions by: Yu Hsin Lu <https://github.com/kerol2r20> // Tomek Łaziuk <https://github.com/tlaziuk> // Hiroshi Ioka <https://github.com/hirochachacha> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 | ||
renew?: boolean; // Type definitions for koa-session 5.10 // Project: | ||
// https://github.com/koajs/session // Definitions by: Yu Hsin Lu | ||
// <https://github.com/kerol2r20> // Tomek Łaziuk | ||
// <https://github.com/tlaziuk> // Hiroshi Ioka | ||
// <https://github.com/hirochachacha> // Definitions: | ||
// https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript | ||
// Version: 2.8 | ||
@@ -1002,24 +1009,17 @@ /** | ||
// From koa-body/index.d.ts https://github.com/dlau/koa-body/tree/a6ca8c78015e326154269d272410a11bf40e1a07 | ||
// The MIT License (MIT) | ||
// | ||
// Copyright (c) 2014 Charlike Mike Reagent <mameto_100@mail.bg> and Daryl Lau <daryl@weak.io> | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
// From koa-body/index.d.ts | ||
// https://github.com/dlau/koa-body/tree/a6ca8c78015e326154269d272410a11bf40e1a07 The MIT | ||
// License (MIT) Copyright (c) 2014 Charlike Mike Reagent <mameto_100@mail.bg> and Daryl Lau | ||
// <daryl@weak.io> Permission is hereby granted, free of charge, to any person obtaining a | ||
// copy of this software and associated documentation files (the "Software"), to deal in the | ||
// Software without restriction, including without limitation the rights to use, copy, modify, | ||
// merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | ||
// persons to whom the Software is furnished to do so, subject to the following conditions: | ||
// The above copyright notice and this permission notice shall be included in all copies or | ||
// substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY | ||
// OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
@@ -1031,3 +1031,4 @@ /** | ||
/** | ||
* {Integer} Limits the amount of memory all fields together (except files) can allocate in bytes. If this value is exceeded, an 'error' event is emitted. The default size is 20MB. | ||
* {Integer} Limits the amount of memory all fields together (except files) can allocate in | ||
* bytes. If this value is exceeded, an 'error' event is emitted. The default size is 20MB. | ||
*/ | ||
@@ -1037,3 +1038,4 @@ maxFileSize?: number; | ||
/** | ||
* {Integer} Limits the number of fields that the querystring parser will decode, default 1000 | ||
* {Integer} Limits the number of fields that the querystring parser will decode, default | ||
* 1000 | ||
*/ | ||
@@ -1043,4 +1045,5 @@ maxFields?: number; | ||
/** | ||
* {Integer} Limits the amount of memory all fields together (except files) can allocate in bytes. | ||
* If this value is exceeded, an 'error' event is emitted, default 2mb (2 * 1024 * 1024) | ||
* {Integer} Limits the amount of memory all fields together (except files) can allocate in | ||
* bytes. If this value is exceeded, an 'error' event is emitted, default 2mb (2 * 1024 * | ||
* 1024) | ||
*/ | ||
@@ -1055,3 +1058,4 @@ maxFieldsSize?: number; | ||
/** | ||
* {Boolean} Files written to uploadDir will include the extensions of the original files, default false | ||
* {Boolean} Files written to uploadDir will include the extensions of the original files, | ||
* default false | ||
*/ | ||
@@ -1061,3 +1065,4 @@ keepExtensions?: boolean; | ||
/** | ||
* {String} If you want checksums calculated for incoming files, set this to either 'sha1' or 'md5', default false | ||
* {String} If you want checksums calculated for incoming files, set this to either 'sha1' | ||
* or 'md5', default false | ||
*/ | ||
@@ -1072,4 +1077,5 @@ hash?: string; | ||
/** | ||
* {Function} Special callback on file begin. The function is executed directly by formidable. | ||
* It can be used to rename files before saving them to disk. See https://github.com/felixge/node-formidable#filebegin | ||
* {Function} Special callback on file begin. The function is executed directly by | ||
* formidable. It can be used to rename files before saving them to disk. See | ||
* https://github.com/felixge/node-formidable#filebegin | ||
*/ | ||
@@ -1164,3 +1170,4 @@ onFileBegin?: (name: string, file: any) => void; | ||
/** | ||
* {Function} Custom error handle, if throw an error, you can customize the response - onError(error, context), default will throw | ||
* {Function} Custom error handle, if throw an error, you can customize the response - | ||
* onError(error, context), default will throw | ||
*/ | ||
@@ -1181,3 +1188,4 @@ onError?: (err: Error, ctx: Context) => void; | ||
/** | ||
* {String[]} What HTTP methods to enable body parsing for; should be used in preference to strict mode. | ||
* {String[]} What HTTP methods to enable body parsing for; should be used in preference to | ||
* strict mode. | ||
* | ||
@@ -1354,1 +1362,15 @@ * GET, HEAD, and DELETE requests have no defined semantics for the request body, | ||
export function session(app: Application, options: SessionOptions): Middleware; | ||
/** | ||
* Calls app.listen on a random port and sets the correct baseURL on the provided axios | ||
* instance | ||
*/ | ||
export function createTestAppAndClient( | ||
app: Application, | ||
axios: AxiosInstance, | ||
): Promise<void>; | ||
/** | ||
* Stops the server created with `createTestAppAndClient` | ||
*/ | ||
export function closeTestApp(app: Application): void | Promise<void>; |
@@ -11,1 +11,2 @@ import compose from "koa-compose"; | ||
} from "./src/middleware/index.js"; | ||
export { closeTestApp, createTestAppAndClient } from "./src/testing.js"; |
{ | ||
"name": "@lbu/server", | ||
"version": "0.0.34", | ||
"version": "0.0.35", | ||
"description": "Koa server and common middleware", | ||
@@ -19,4 +19,4 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@lbu/insight": "0.0.34", | ||
"@lbu/stdlib": "0.0.34", | ||
"@lbu/insight": "0.0.35", | ||
"@lbu/stdlib": "0.0.35", | ||
"keygrip": "1.1.0", | ||
@@ -42,3 +42,3 @@ "koa": "2.13.0", | ||
}, | ||
"gitHead": "377f90ac9855b0202b0a5cb6f39f620e811fe21c" | ||
"gitHead": "4b370a030904a3017431211e9bdfa47aa4e7335d" | ||
} |
52844
17
1687
+ Added@lbu/insight@0.0.35(transitive)
+ Added@lbu/stdlib@0.0.35(transitive)
- Removed@lbu/insight@0.0.34(transitive)
- Removed@lbu/stdlib@0.0.34(transitive)
Updated@lbu/insight@0.0.35
Updated@lbu/stdlib@0.0.35