Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MONGOSH-956: Open external editor #1097

Merged
merged 22 commits into from
Sep 21, 2021
Merged

Conversation

alenakhineika
Copy link
Contributor

Open an external editor from mongosh.

@alenakhineika alenakhineika force-pushed the MONGOSH-956-open-external-editor branch from f62071d to 11bcf4d Compare September 10, 2021 08:51
packages/types/src/index.ts Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
@alenakhineika alenakhineika force-pushed the MONGOSH-956-open-external-editor branch from 7cdaa99 to 10c4761 Compare September 10, 2021 10:33
@alenakhineika alenakhineika force-pushed the MONGOSH-956-open-external-editor branch from 52ff504 to 69e9766 Compare September 14, 2021 14:48
packages/cli-repl/src/cli-repl.ts Outdated Show resolved Hide resolved
packages/cli-repl/src/setup-logger-and-telemetry.ts Outdated Show resolved Hide resolved
packages/editor/.eslintrc.js Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
@alenakhineika alenakhineika force-pushed the MONGOSH-956-open-external-editor branch from eea96c3 to 39fae63 Compare September 15, 2021 15:46
@alenakhineika alenakhineika marked this pull request as ready for review September 16, 2021 12:26
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/editor/src/editor.ts Show resolved Hide resolved
packages/editor/src/editor.ts Show resolved Hide resolved
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
@alenakhineika alenakhineika force-pushed the MONGOSH-956-open-external-editor branch from 96bb6b1 to d6da9e2 Compare September 20, 2021 09:42
@alenakhineika alenakhineika force-pushed the MONGOSH-956-open-external-editor branch from 7a9e7bc to 73a5017 Compare September 21, 2021 08:58
packages/editor/src/editor.ts Outdated Show resolved Hide resolved
packages/shell-api/src/database.spec.ts Outdated Show resolved Hide resolved
@alenakhineika alenakhineika merged commit 1cb832b into main Sep 21, 2021
@alenakhineika alenakhineika deleted the MONGOSH-956-open-external-editor branch September 21, 2021 12:57
alenakhineika added a commit that referenced this pull request Sep 21, 2021
* feat: open external editor MONGOSH-956

* feat: reopen past content in the editor and log info

* feat: open user specified editor

* refactor: spawn child async

* refactor: reduce complexity

* feat: convert content to a single line and put into input stream

* refactor: rename internalState to instanceState

* feat: open code in editor

* build: rebase from master and compile

* test: add some basic unit tests

* refactor: pass data as function args instead of storing it as class props

* build: rebase from master and resolve conflicts

* refactor: check for identifier instead of statement

* fix: reopen the last content for empty edit command

* feat: accept a raw input in editor

* fix: properly handle raw empty editor case

* docs: add read me

* docs: add comments

* fix: read and delete a temp file

* refactor: remove ShellApiErrorsWrapper

* refactor: add mode to writeFile

* test: return expectedError as any

test: add editor to the list of expected available config options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants