Git Product home page Git Product logo

Comments (4)

derekbekoe avatar derekbekoe commented on July 23, 2024 1

You can pass in your own Command Invoker here. With this, you shouldn't have to clone a lot of the code.

Also, support for validators was added in #21.

Closing but let me know if there is still are large block of code you have to clone just for a small change.

from knack.

tjprescott avatar tjprescott commented on July 23, 2024

If you run any commands that return a list, you'll get

{
  "currentPage": [],
  "nextLink": ""
}

You have to subclass CommandInvoker and largely clone this logic in order to make it work with lists. It would be better to have some kind of hook method that could be passed in or at least overwritten in the subclass in order to provide this handling without having to duplicate the core logic.

from knack.

tjprescott avatar tjprescott commented on July 23, 2024

Actually, you can't even subclass the Invoker. I had to monkey patch over it.

from knack.

tjprescott avatar tjprescott commented on July 23, 2024

Additionally, the Knack invoker has no support for validators, so I need to monkey patch the CommandInvoker.execute method to reintroduce this functionality.

from knack.

Related Issues (20)

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.