@mongosh/shell-evaluator
Advanced tools
Comparing version 0.0.1-alpha.11 to 0.0.1-alpha.12
@@ -59,4 +59,29 @@ "use strict"; | ||
ShellEvaluator.prototype.help = function () { | ||
this.bus.emit('cmd:help'); | ||
return new shell_api_1.Help({ 'help': 'shell-api.help.description', 'docs': 'https://docs.mongodb.com/manual/reference/method', 'attr': [{ 'name': 'use', 'description': 'shell-api.help.help.use' }, { 'name': 'it', 'description': 'shell-api.help.help.it' }, { 'name': '.exit', 'description': 'shell-api.help.help.exit' }, { 'name': 'show', 'description': 'shell-api.help.help.show-dbs' }] }); | ||
this.bus.emit('mongosh:help'); | ||
return new shell_api_1.Help({ | ||
help: 'shell-api.help.description', | ||
docs: 'https://docs.mongodb.com/manual/reference/method', | ||
attr: [ | ||
{ | ||
name: 'use', | ||
description: 'shell-api.help.help.use' | ||
}, | ||
{ | ||
name: 'it', | ||
description: 'shell-api.help.help.it' | ||
}, | ||
{ | ||
name: 'show databases', | ||
description: 'shell-api.help.help.show-databases' | ||
}, | ||
{ | ||
name: 'show collections', | ||
description: 'shell-api.help.help.show-collections' | ||
}, | ||
{ | ||
name: '.exit', | ||
description: 'shell-api.help.help.exit' | ||
} | ||
] | ||
}); | ||
}; | ||
@@ -96,2 +121,3 @@ ShellEvaluator.prototype.isShellApiType = function (evaluationResult) { | ||
rewrittenInput = this.asyncWriter.compile(input); | ||
this.bus.emit('mongosh:rewrittenAsyncInput', { original: input.trim(), rewritten: rewrittenInput.trim() }); | ||
return [2, originalEval(rewrittenInput, context, filename)]; | ||
@@ -131,3 +157,3 @@ } | ||
this.mapper.context = contextObject; | ||
this.bus.emit('setCtx', this.mapper.context.db); | ||
this.bus.emit('mongosh:setCtx', { method: 'setCtx', arguments: { db: this.mapper.context.db } }); | ||
}; | ||
@@ -134,0 +160,0 @@ return ShellEvaluator; |
{ | ||
"name": "@mongosh/shell-evaluator", | ||
"version": "0.0.1-alpha.11", | ||
"version": "0.0.1-alpha.12", | ||
"description": "MongoDB Top Level API Package", | ||
@@ -29,6 +29,6 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@mongosh/async-rewriter": "^0.0.1-alpha.11", | ||
"@mongosh/mapper": "^0.0.1-alpha.11", | ||
"@mongosh/service-provider-core": "^0.0.1-alpha.11", | ||
"@mongosh/shell-api": "^0.0.1-alpha.11" | ||
"@mongosh/async-rewriter": "^0.0.1-alpha.12", | ||
"@mongosh/mapper": "^0.0.1-alpha.12", | ||
"@mongosh/service-provider-core": "^0.0.1-alpha.12", | ||
"@mongosh/shell-api": "^0.0.1-alpha.12" | ||
}, | ||
@@ -39,3 +39,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "0353cfe8b7d560910acdf48ef91b5944184a6bcb" | ||
"gitHead": "a1274954b1ebbc654260b5c0ecf61f9f38b178fc" | ||
} |
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
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
27428
236