Socket
Socket
Sign inDemoInstall

json-server

Package Overview
Dependencies
54
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-alpha.13 to 1.0.0-alpha.14

11

lib/bin.js

@@ -35,5 +35,11 @@ #!/usr/bin/env node

},
// Deprecated
watch: {
type: 'boolean',
short: 'w',
},
},
allowPositionals: true,
});
// --help
if (values.help || positionals.length === 0) {

@@ -49,2 +55,3 @@ console.log(`Usage: json-server [options] <file>

}
// --version
if (values.version) {

@@ -55,2 +62,6 @@ const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'));

}
// Handle --watch
if (values.watch) {
console.log(chalk.yellow('--watch/-w can be omitted, JSON Server 1+ watches for file changes by default'));
}
// App args and options

@@ -57,0 +68,0 @@ const file = positionals[0] ?? '';

9

package.json
{
"name": "json-server",
"version": "1.0.0-alpha.13",
"version": "1.0.0-alpha.14",
"description": "",
"type": "module",
"bin": "./lib/bin.js",
"bin": {
"json-server": "lib/bin.js"
},
"types": "lib",

@@ -52,5 +54,4 @@ "files": [

"sirv": "^2.0.4",
"sort-on": "^6.0.0",
"zod": "^3.22.4"
"sort-on": "^6.0.0"
}
}

@@ -37,3 +37,3 @@ > [!IMPORTANT]

```shell
$ json-server db.json
$ npx json-server db.json
```

@@ -40,0 +40,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc