• Type: New Feature
    • Status: Resolved
    • Priority: None
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: appcd-core
    • Labels:
    • Story Points:
    • Sprint:
      2020 Sprint 9


      It would be great to allow plugins to expose hooks that other plugins could tie into.

      What is a hook?

      A hook is a routine that is encapsulated by an event emitter where each hook listener can interact with the hook's inputs and outputs.

      How does this work?

      Plugins can wrap various logic in a named hook. The result is a function that when called is passed an object of params. When a hook is invoked, an event is dispatched to all listeners in series and waits until they finish before continuing.

      How does this compare to the Titanium CLI's hook support?

      The Titanium CLI hooks allow for both event hooks and function hooks. The Appc Daemon will only allow event hooks.

      The Titanium CLI hooked functions allow multiple arguments. The Appc Daemon only allow a single optional argument which would be an object.

      The Titanium CLI allowed any data types for the arguments. The Appc Daemon only allows serializable data such as undefined, null, strings, numbers, booleans, arrays, and object literals. Object instances (those with contexts) and functions are not permitted.


          Issue Links



              • Assignee:
                cbarber Chris Barber
                cbarber Chris Barber
              • Watchers:
                2 Start watching this issue


                • Created:

                  Git Integration