-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add browser console plugin + update CONTRIBUTING.md #23
base: main
Are you sure you want to change the base?
Conversation
*/ | ||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ | ||
async publish(_content: any, snapshot: StratumSnapshot) { | ||
console.log(snapshot.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should send more data to the console as snapshot.data
only contains the output from model.getData()
. Other metadata like the tag ID or event type within the snapshot would also be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated! Changed the getEventOutput
return value and updated the publish
method accordingly. Thought that'd better show how they relate. It'll now publish to the console something like:
BrowserConsolePlugin: {"eventType":"eventTypeName","id":1}
* Use this function to instantiate the BrowserConsolePlugin when registering | ||
* this plugin within Stratum. | ||
*/ | ||
export const BrowserConsolePluginFactory: PluginFactory<BrowserConsolePlugin> = () => new BrowserConsolePlugin(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add browser-console to the package.json
file so that it can be directly imported by consuming apps.
📣 For new features and bugfixes, please create an issue first
✔️ Checklist
Please review our Contributor Docs for more details
npm version [patch, minor, major]
(considering (semantic versioning)[https://semver.org/#summary)) for a new release if neededrelease([VERSION]):
⏩ Next steps: