mongoose-repl
Advanced tools
Comparing version 0.1.5 to 0.1.6
// Generated by CoffeeScript 1.6.3 | ||
var CoffeeScript, format_error, inspect, mongoose, node_repl, util, vm, writer, _, | ||
var CoffeeScript, format_error, history, inspect, mongoose, node_repl, util, vm, writer, _, | ||
__slice = [].slice; | ||
@@ -17,2 +17,4 @@ | ||
history = require('repl.history'); | ||
_.mixin({ | ||
@@ -60,3 +62,2 @@ map_values: function(obj, f_val) { | ||
writer: writer, | ||
terminal: false, | ||
"eval": function(cmd, context, filename, cb) { | ||
@@ -98,2 +99,3 @@ var err, js, res; | ||
}); | ||
history(repl, "" + process.env.HOME + "/.mongoose_history"); | ||
return repl.on('exit', function() { | ||
@@ -100,0 +102,0 @@ repl.outputStream.write('\n'); |
{ | ||
"name": "mongoose-repl", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A Mongo REPL with the full power of Mongoose", | ||
@@ -20,2 +20,3 @@ "engines": { | ||
"mongoose": "~3.5.15", | ||
"repl.history": "~0.1.1", | ||
"underscore": "~1.5.1" | ||
@@ -22,0 +23,0 @@ }, |
@@ -17,2 +17,8 @@ # mongoose-repl | ||
Some other nice features: | ||
- Tab completion | ||
- Command history | ||
- Colored printing of values | ||
## Installation | ||
@@ -28,3 +34,3 @@ | ||
$ mongoose localhost/test | ||
$ mongoose localhost/test | ||
Connecting to: localhost | ||
@@ -43,3 +49,3 @@ Using db: test | ||
{ domain: null, | ||
_events: | ||
_events: | ||
{ close: [Function], | ||
@@ -88,6 +94,8 @@ error: [Function], | ||
## Command History | ||
### Globals | ||
We leave REPL history to the experts: [rlwrap](http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap). Install it using your favorite package manager, and then alias `mongoose` like so: | ||
`mongoose-repl` exposes some helpful global functions and objects in the REPL context: | ||
alias mongoose='rlwrap mongoose' | ||
- `conn` - the Mongoose connection object | ||
- `ObjectId` - because sometimes you just need it | ||
- `inspect` - a colorful variadic pretty printer |
Sorry, the diff of this file is not supported yet
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
98
13933
5
12
140
+ Addedrepl.history@~0.1.1
+ Addedrepl.history@0.1.4(transitive)