Skip to content

Commit 86ac326

Browse files
lerouxbaddaleax
andauthored
feat: Shell API autocomplete type definitions MONGOSH-2031 MONGOSH-2032 MONGOSH-2173 (#2434)
* [Do Not Merge] PoC for shell-api autocomplete type definitions ```sh cd packages/shell-api && \ npm run compile && \ npx api-extractor run ; \ npx ts-node bin/api-postprocess.ts ; \ cat lib/api-processed.d.ts ``` * fixup: add index signature support * fixup * more bundled packages * add rs, sh, sp generics * fix tests * hopefully fix the api export * something went wrong with the package-lock.json file * don't include the REPLACEME boilerplate which will be added on the outside * workaround possible false positive error * no idea why it added that * we should probably run api-generate automatically * add missing deps * add the ShellApi and ShellBson globals to the shell api * remove comment * linebreak * add help comments to the extracted/generated shell-api * strip down api.ts * remove commented code * no idea * remove TODO * keep bson separate so we can ship it once * generate and export a file that just exports the api as a string * CollectionWithSchema, DatabaseWithSchema * remove _typeLaunder() * more generics * api extractor warnings cause errors * export the new types * Update packages/shell-api/src/mongo.spec.ts Co-authored-by: Anna Henningsen <[email protected]> * Fix type assertions to be to collection and database with schema * api-generate as part of compile * Update packages/shell-api/bin/api-postprocess.ts Co-authored-by: Anna Henningsen <[email protected]> * add some logging as documentation --------- Co-authored-by: Anna Henningsen <[email protected]>
1 parent 7848c42 commit 86ac326

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+968
-182
lines changed

package-lock.json

Lines changed: 320 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)