Comparing version 9.0.0 to 9.0.1
@@ -85,2 +85,12 @@ #!/usr/bin/env node | ||
const { isNaN } = Number | ||
const port = Number(flags.port) | ||
if (isNaN(port) || (!isNaN(port) && (port < 1 || port >= 2 ** 16))) { | ||
logError( | ||
`Port option must be a number. Supplied: ${flags.port}`, | ||
'invalid-server-port' | ||
) | ||
process.exit(1) | ||
} | ||
const loadedModule = handle(file) | ||
@@ -87,0 +97,0 @@ const server = serve(loadedModule) |
@@ -6,4 +6,4 @@ // Native | ||
// Packages | ||
const contentType = require('content-type') | ||
const getRawBody = require('raw-body') | ||
const typer = require('media-typer') | ||
const { readable } = require('is-stream') | ||
@@ -126,3 +126,3 @@ | ||
if (encoding === undefined) { | ||
encoding = typer.parse(type).parameters.charset | ||
encoding = contentType.parse(type).parameters.charset | ||
} | ||
@@ -129,0 +129,0 @@ |
{ | ||
"name": "micro", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"description": "Asynchronous HTTP microservices", | ||
@@ -44,11 +44,11 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"ava": "0.22.0", | ||
"coveralls": "2.13.1", | ||
"eslint-config-prettier": "2.4.0", | ||
"ava": "0.23.0", | ||
"coveralls": "3.0.0", | ||
"eslint-config-prettier": "2.7.0", | ||
"husky": "0.14.3", | ||
"lint-staged": "4.1.3", | ||
"nyc": "11.2.1", | ||
"prettier": "1.6.1", | ||
"request": "2.81.0", | ||
"request-promise": "4.2.1", | ||
"lint-staged": "4.3.0", | ||
"nyc": "11.3.0", | ||
"prettier": "1.7.4", | ||
"request": "2.83.0", | ||
"request-promise": "4.2.2", | ||
"resumer": "0.0.0", | ||
@@ -60,4 +60,4 @@ "test-listen": "1.0.2", | ||
"dependencies": { | ||
"content-type": "1.0.4", | ||
"is-stream": "1.1.0", | ||
"media-typer": "0.3.0", | ||
"mri": "1.1.0", | ||
@@ -64,0 +64,0 @@ "raw-body": "2.3.2" |
@@ -89,3 +89,3 @@ <img src="https://raw.githubusercontent.com/zeit/art/6451bc300e00312d970527274f316f9b2c07a27e/micro/logo.png" width="50"/> | ||
```bash | ||
npm install -g async-to-gen | ||
npm install --save async-to-gen | ||
``` | ||
@@ -92,0 +92,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22141
263
+ Addedcontent-type@1.0.4
+ Addedcontent-type@1.0.4(transitive)
- Removedmedia-typer@0.3.0
- Removedmedia-typer@0.3.0(transitive)