Provide ShellApi properties under distinct global name

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • 2
    • None

      Right now, we copy a number of ShellApi properties and methods over to the global object in mongosh (e.g. config, connect, quit, sleep etc.).

      This is usually fine, but can become problematic when accidentally overwriting these variables. (This slack thread mentions config = db.runCommand({storageGetConfig: 1}) as an example, which makes the config inaccessible.)

      It would probably be a good idea to also make this object available as e.g. mongosh or under a similar name in the global scope so that it remains accessible.

              Assignee:
              Unassigned
              Reporter:
              Anna Henningsen
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: