New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

micro-dev

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-dev - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

6

bin/micro-dev.js

@@ -19,3 +19,4 @@ #!/usr/bin/env node

host: '::',
port: 3000
port: 3000,
limit: '1mb'
},

@@ -31,3 +32,4 @@ alias: {

v: 'version',
i: 'ignore'
i: 'ignore',
l: 'limit'
},

@@ -34,0 +36,0 @@ unknown(flag) {

@@ -14,2 +14,5 @@ // Packages

${g('-L, --poll')} Poll for code changes rather than using events
${g(
'-l, --limit'
)} Size limit for JSON parsing (string like '1mb', or bytes)
${g('-i --ignore <dir>')} Ignore watching a file, directory, or glob

@@ -16,0 +19,0 @@ ${g('-s, --silent')} Disable requests log

@@ -35,3 +35,3 @@ // Packages

const logRequest = async ({ req, start, requestIndex }) => {
const logRequest = async ({ req, start, requestIndex, limit }) => {
logLine(`> #${requestIndex} ${chalk.bold(req.method)} ${req.url}`, start)

@@ -41,3 +41,3 @@

try {
const parsedJson = await json(req)
const parsedJson = await json(req, { limit })
jsome(parsedJson)

@@ -93,3 +93,3 @@ console.log('')

const initLog = (req, res) => {
const initLog = (req, res, limit) => {
const start = new Date()

@@ -100,3 +100,3 @@ const requestIndex = ++requestCounter

const reqBodyReady = logRequest({ req, start, requestIndex })
const reqBodyReady = logRequest({ req, start, requestIndex, limit })

@@ -127,4 +127,4 @@ const end = res.end

module.exports = fn => async (req, res) => {
initLog(req, res)
module.exports = (fn, limit) => async (req, res) => {
initLog(req, res, limit)

@@ -131,0 +131,0 @@ try {

@@ -20,3 +20,3 @@ // Packages

// And then load the files
const module = flags.silent ? getModule(file) : log(getModule(file))
const module = flags.silent ? getModule(file) : log(getModule(file), flags.limit)
const server = serve(module)

@@ -23,0 +23,0 @@

{
"name": "micro-dev",
"version": "1.3.0",
"version": "1.4.0",
"files": [

@@ -46,7 +46,7 @@ "bin",

"clipboardy": "1.1.4",
"debounce": "1.0.2",
"debounce": "1.1.0",
"get-port": "3.2.0",
"ip": "1.1.5",
"jsome": "2.3.26",
"micro": "9.0.0",
"micro": "9.0.1",
"mri": "1.1.0",

@@ -58,8 +58,8 @@ "pkg-up": "2.0.0",

"devDependencies": {
"eslint-config-prettier": "2.6.0",
"eslint-config-prettier": "2.7.0",
"husky": "0.14.3",
"lint-staged": "4.3.0",
"prettier": "1.7.4",
"prettier": "1.8.1",
"xo": "0.18.2"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc