Socket
Socket
Sign inDemoInstall

fastify-cli

Package Overview
Dependencies
Maintainers
18
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-cli - npm Package Compare versions

Comparing version 5.5.1 to 5.6.0

templates/eject-esm/server.js

6

eject.js

@@ -28,3 +28,7 @@ 'use strict'

} else {
template = 'eject'
if (opts.esm) {
template = 'eject-esm'
} else {
template = 'eject'
}
}

@@ -31,0 +35,0 @@

@@ -9,3 +9,6 @@ Usage: fastify eject

--esm
use the ESM template
--lang=ts, --lang=typescript
use the TypeScript template

3

lib/watch/index.js

@@ -42,4 +42,3 @@ 'use strict'

const childEvent = { childEvent: event }
const env = Object.assign({}, process.env, childEvent, require('dotenv').config().parsed)
const env = Object.assign({}, require('dotenv').config().parsed, process.env, childEvent)
const _child = cp.fork(forkPath, args, {

@@ -46,0 +45,0 @@ env,

{
"name": "fastify-cli",
"version": "5.5.1",
"version": "5.6.0",
"description": "Run a fastify route with one command!",

@@ -5,0 +5,0 @@ "main": "cli.js",

@@ -18,3 +18,3 @@ 'use strict'

const appTemplateDir = path.join(__dirname, '..', 'templates', 'eject')
const { eject } = require('../eject')
const { eject, cli } = require('../eject')
const expected = {}

@@ -69,2 +69,12 @@

test('should finish successfully with cli', async (t) => {
try {
process.chdir(workdir)
await cli([])
await verifyCopy(t, expected)
} catch (err) {
t.error(err)
}
})
function verifyCopy (t, expected) {

@@ -71,0 +81,0 @@ return new Promise((resolve, reject) => {

@@ -645,3 +645,3 @@ /* global GLOBAL_MODULE_1, GLOBAL_MODULE_2 */

t.equal(r2.response.statusCode, 200)
t.same(JSON.parse(r2.body), { hello: 'planet' })
t.same(JSON.parse(r2.body), { hello: 'world' }) /* world because when making a restart the server still passes the arguments that change the environment variable */

@@ -648,0 +648,0 @@ await fastifyEmitter.stop()

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