{ "id": "169090", "key": "DAEMON-90", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-05-28T15:04:15.000+0000", "created": "2017-07-24T20:01:47.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "cb-next" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2020-05-28T15:04:15.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15050", "name": "appcd-core", "description": "Core daemon logic: config, plugin loader, logging, dispatcher" } ], "description": "It would be great to allow plugins to expose hooks that other plugins could tie into.\r\n\r\nh4. What is a hook?\r\n\r\nA hook is a routine that is encapsulated by an event emitter where each hook listener can interact with the hook's inputs and outputs.\r\n\r\nh4. How does this work?\r\n\r\nPlugins 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.\r\n\r\nh4. How does this compare to the Titanium CLI's hook support?\r\n\r\nThe Titanium CLI hooks allow for both event hooks and function hooks. The Appc Daemon will only allow event hooks.\r\n\r\nThe Titanium CLI hooked functions allow multiple arguments. The Appc Daemon only allow a single optional argument which would be an object.\r\n\r\nThe 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.", "attachment": [], "flagged": false, "summary": "Implement hook support", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 1194, "state": "closed", "name": "2020 Sprint 9", "startDate": "2020-04-24T17:09:51.572Z", "endDate": "2020-05-08T17:09:00.000Z", "completeDate": "2020-05-08T15:40:07.869Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455576", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "After analyzing the use case for a new general hook system, there really isn't a need. The Titanium appcd plugin can have it's own hook system, but that doesn't need to be a global system apart of appcd.\r\n\r\nFor auth, the Titanium plugin can just call the AMPLIFY service as any other component would.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2020-05-28T15:04:15.000+0000", "updated": "2020-05-28T15:04:15.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }