Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

haobrien
Copy link

📣 For new features and bugfixes, please create an issue first  

✔️ Checklist

Please review our Contributor Docs for more details

  • Fixes Add a simple Stratum plugin for example purposes #9 ; Updates CONTRIBUTION.md doc
  • I have run npm version [patch, minor, major] (considering (semantic versioning)[https://semver.org/#summary)) for a new release if needed
  • If the package version changed, this PR's title is prefixed with release([VERSION]):
  • I have added typedoc-style comments to my changes to improve the developer experience

⏩ Next steps:

  • Please ensure that all the automated pipeline steps pass
  • Once your PR is opened, CODEOWNERS will be requested as reviewers. At least one review from a CODEOWNER is required to merge your PR
  • Once approved, a CODEOWNER will merge your changes and perform any other necessary release tasks

@haobrien haobrien requested a review from a team as a code owner November 25, 2024 20:34
*/
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
async publish(_content: any, snapshot: StratumSnapshot) {
console.log(snapshot.data);
Copy link
Contributor

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.

Copy link
Author

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();
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a simple Stratum plugin for example purposes
2 participants