Giter VIP home page Giter VIP logo

nestjs-shell's People

Contributors

bmstefanski avatar dependabot[bot] avatar kamranpoladov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nestjs-shell's Issues

Compatibility with NestJS version 7

Issue type:

question
bug report
feature request

documentation issue

nestjs-shell version
1.0.7

[Nest CLI]
Nest CLI Version : 7.5.1

[Nest Platform Information]
platform-express version : 7.4.4
sequelize version : 0.1.1
common version : 7.4.4
core version : 7.4.4

Excepted behavior

no warning message when install nestjs-shell
Actual behavior or outcome (for issue)

npm WARN [email protected] requires a peer of @nestjs/common@^6.7.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @nestjs/core@^6.7.2 but none is installed. You must install peer dependencies yourself.

When I install nestjs-config npm i nestjs-shell I get a npm warning message as I mentioned above. Are there any plans to upgrade the lib for compatibility with NestJS version 7 ?

Prompt message isn't displayed on first line

Expected Behavior

The prompt message should appear once the shell is bootstrapped

Current Behavior

The prompt message appears only after either newline or backspace is hit.

image

Note that there is no red arrow on the first line (before .screenfetch) but only upcoming ones

Possible Solution

Add

rl.emit('line');

after

rl.on('line', async (input) => onLine(input).then(() => rl.prompt())).on('close', () => process.exit())

in order to emit 'line' immediately after bootstrap

Steps to Reproduce

Run the application as intended since this issue literally appears in README.md meaning that it exists as is

Environment

Node.js version 14.17.0

Possible Implementation

I can submit a PR with suggested changes if this is accepted as a valid issue

Interface completer

Hey, can you allow us more control over the behaviour of the interface? Passing Partial<ReadLineOptions> through shellFacade.bootstrap or have it return the readline interface?

My end goal is the implemented the following which would allow for an auto complete functionality

completer: (line: string) => {
    const commands = this.shellFacade.getAllCommands();
    const filteredCommands = commands
      .map((command) => command.name)
      .filter((command) => command.startsWith(line));

    return [filteredCommands, line];
  },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.