{"id":22428377,"url":"https://github.com/momsfriendlydevco/mfdc-repl","last_synced_at":"2025-03-27T06:43:42.314Z","repository":{"id":57296091,"uuid":"46839404","full_name":"MomsFriendlyDevCo/mfdc-repl","owner":"MomsFriendlyDevCo","description":"Internal MFDC REPL CLI","archived":false,"fork":false,"pushed_at":"2018-02-21T23:32:35.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T12:50:55.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MomsFriendlyDevCo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-25T05:25:46.000Z","updated_at":"2016-12-08T00:23:09.000Z","dependencies_parsed_at":"2022-08-27T12:20:45.626Z","dependency_job_id":null,"html_url":"https://github.com/MomsFriendlyDevCo/mfdc-repl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmfdc-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmfdc-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmfdc-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmfdc-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MomsFriendlyDevCo","download_url":"https://codeload.github.com/MomsFriendlyDevCo/mfdc-repl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798538,"owners_count":20673901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T20:14:35.684Z","updated_at":"2025-03-27T06:43:42.295Z","avatar_url":"https://github.com/MomsFriendlyDevCo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MFDC-REPL\n=========\n[MFDC's](http://mfdc.biz) own internal REPL command line interface.\n\nThis project provides the executable `mrepl` which has the following functionality over regular REPL:\n\n* **Babel pre-compiler** (`babel` plugin) - All code is automatically compiled via [BabelJS](http://babeljs.io) before it is run - making things like arrow functions available on older Node releases\n* **Lodash** (`lodash` plugin) - lodash is provided as `lodash`, `l` and `__`\n* **Moment** (`moment` plugin) - moment is provided as `moment`\n* **Mongoose project support** (`mongoose` plugin) - If the files `./config/index.js`, `./config/db.js` and `./models/index.js` are found they are loaded in that order (with `./models/index.js` expected to return an object containing the available compiled schemas. Models are then provided in the `db` object. e.g. `db.users.find()` will return all users.\n* **STDIN slurping** (`stdin` plugin) - Any piped input into the program is provied as the `input` variable. Automatic decoding of the variable will be attempted by `JSON.parse()` otherwise it will be a raw string.\n* **History saving** - History saing is enabled by default\n\n\n\n\nInstallation\n------------\nSimply run the following:\n\n\tsudo npm install -g @momsfriendlydevco/repl\n\nYou should now be able to run the REPL interface with:\n\n\tmrepl\n\n\nPlugins\n=======\nPlugins are provided in the `plugins/` folder within the main script file.\n\nEach plugin is a simple JavaScript file which is expected to expose a function taking a callback and the main `app` argument. Each plugin can decorate the properties of the program and return the callback when finished.\n\n\nSome usefully exposed properties:\n\n| Property path        | Type    | Default         | Description                                                           |\n|----------------------|---------|-----------------|-----------------------------------------------------------------------|\n| `app`                | Object  | Complex         | The main application object - an instance of a `commander` definition |\n| `app.verbose`        | Number  | 0               | Verbosity level                                                       |\n| `app.plugin`         | Array   | `['./plugins']` | Globs to search for plugins                                           |\n| `app.repl`           | Object  | Complex         | Repl options when creating the interface                              |\n| `app.repl.globals`   | Object  | `{}`            | Any exported globals that should be available inside the REPL session |\n| `app.repl.eval`      | Array   | `[]`            | Array of evaluation functions to run. Each Eval is run as a compose pipeline with the final output being returned to the REPL session |\n| `inspect.depth`      | Number  | 2               | How deeply to examine objects when printing results to the console    |\n| `inspect.colors`     | Boolean | `true`          | Whether colors are enabled when printing results to the console       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomsfriendlydevco%2Fmfdc-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmomsfriendlydevco%2Fmfdc-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomsfriendlydevco%2Fmfdc-repl/lists"}