
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
mongodb-ace-autocompleter
Advanced tools
Ace Editor Autocompleter for MongoDB Queries & Agg Pipelines
Provides MongoDB custom ACE Editor auto-completers
Provides completions within the context of an individual aggregation pipeline stage:
import ace from 'ace-builds';
import { StageAutoCompleter } from 'mongodb-ace-autocompleter';
// Get the basic text completer from Ace for fallback suggestions.
import tools from 'ace-builds/src-noconflict/ext-language_tools';
const textCompleter = tools.textCompleter;
// For auto completion of agg pipeline stages, pass the server version,
// the text completer, the processed schema fields, and the stage operator.
const stageAutoCompleter = new StageAutoCompleter(
'3.6.0',
textCompleter,
[{
name: 'name',
value: 'name',
score: 1,
meta: 'field',
version: '0.0.0'
}],
'$match'
);
tools.setCompleters([ stageAutoCompleter ]);
Provides completions within the context of a find(query)
:
import ace from 'ace-builds';
import { QueryAutoCompleter } from 'mongodb-ace-autocompleter';
// Get the basic text completer from Ace for fallback suggestions.
import tools from 'ace-builds/src-noconflict/ext-language_tools';
const textCompleter = tools.textCompleter;
// For auto completion of queries, pass the server version,
// the text completer, and the processed schema fields
const queryAutoCompleter = new QueryAutoCompleter(
'3.6.0',
textCompleter,
[{
name: 'name',
value: 'name',
score: 1,
meta: 'field',
version: '0.0.0'
}]
);
tools.setCompleters([ queryAutoCompleter ]);
mongodb-js/ace-mode
MongoDB highlighting rules for ACE Editor.mongodb-js/ace-theme
CSS highlighting styles for multiline ACE Editor.mongodb-js/ace-theme-query
CSS highlighting styles for ACE Editor as single line input.mongodb-js/stage-validator
Aggregation Pipeline Stage grammar.Utility function to convert from the fields returned from the field store to the Ace friendly format. (Can be done in a reducer in the app).
const process = (fields) => {
return Object.keys(fields).map((key) => {
const field = key.indexOf('.') > -1 ? `"${key}"` : key;
return {
name: key,
value: field,
score: 1,
meta: 'field',
version: '0.0.0'
};
});
};
npm run release
Apache 2.0
FAQs
Ace Editor Autocompleter for MongoDB Queries & Agg Pipelines
The npm package mongodb-ace-autocompleter receives a total of 77 weekly downloads. As such, mongodb-ace-autocompleter popularity was classified as not popular.
We found that mongodb-ace-autocompleter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 29 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.