-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/v9 #18
Feature/v9 #18
Conversation
Updated to use yaml instead of json updated pluginClient definitions for more consistent inits Updated templates for new platform Removing default service plugins from final npm package
Added more tests Added more documentation on methods Updated templates -1
…rom initial tests
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #18 +/- ##
============================================
- Coverage 61.87% 30.30% -31.58%
============================================
Files 15 34 +19
Lines 522 1376 +854
Branches 59 235 +176
============================================
+ Hits 323 417 +94
- Misses 199 959 +760 ☔ View full report in Codecov by Sentry. |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
…fter tsc chore(package.json): update file paths in files array to point to build directory chore(service.ts): change IPluginDefinition enum to PluginDefinitions object chore(colours.ts): change ConsoleColours enum to CONSOLE_COLOURS object fix(plugin.ts): change import statement for ConsoleColours enum feat(plugin.ts): add LOG_LEVELS constant and LogLevels type fix(config.ts): change import statements for PluginDefinitions and PluginDefinition types refactor(plugins.ts): change interface names to match updated interface names refactor(serviceBase.ts): change enum to const enum and add type for enum values refactor(services.ts): change interface names to match updated interface names fix(plugin.ts): import LOG_LEVELS constant from log-default plugin fix(plugin.ts): change parameter type from number to LogLevels in fakeLogFunc function
Changed config to be yaml instead of json Changed config format for simpler configuration Changed config format for multi-plugin services running concurrently with different names for monilith deployments Multi-log handler functionality added Logs can filter between different log plugins - allowing for log/plugin direction logging/stats - eg: logs to graylog but stats to grafana Added multi-events ability as well - you can route specific plugins/events over specific event plugins Starting migration away from sec.config.ts definitions for config of plugins More type-safety built into all elements callable methods are now a type safe object on the service - and a function to call them that is type linked events are now in the events object on the BSB service class for a cleaner plugin. init and run can be sync/async initial setup of a BSB plugin invoked abstract classes for more type-safety Split logging/events/plugins/services from SB into extendable classes for unique cases where the standard classes do not work the way you need them too - so you can extend and change what is needed without hacking around the problem Initial setup speed from from +1s to ~40ms Included cleanups during the setup to optimize memory usage config plugins are simplified even more for less data transfer from the config plugin to other services/ or the BSB itself Plugin search algorithim now uses defined info in config instead of trying to search for plugins - initial setup will require PDK for easier configuration prepped for zod - config validation prepped for future expansion with interoperability between languages with zod for input and output data from events. client setup is minified as well for simpler use clients get their own logging defition so you can identify what is creating logs PI data in logs are removed since it is more complex to handle in client code - so rather just control the data coming into logs better logging is now sync - but pushed to an events bus which then pushes to the logging plugins config plugin is disposed after use for memory and safety Plugin constructors now just have a single object passed in just to make it easier to setup/create a plugin Added more comments/ts info to functions to make use easier Simplified the setup of plugins for logging/events/config/services and moved them to their own classes Overall big cleanup and optimize as well as additional features for more flexibility in deployments
…ervice-default2X, and service-default3X plugins feat(base.ts): import BSBServiceConfig from serviceConfig feat(base.ts): change BSBConfigDefinition to BSBConfigType feat(base.ts): add BSBConfigDefinition type alias for BSBServiceConfig<z.AnyZodObject> feat(config.ts): add run() function to BSBConfigRef class feat(events.ts): add run() function to BSBEventsRef class feat(logging.ts): add run() function to BSBLoggingRef class feat(serviceConfig.ts): create BSBServiceConfig abstract class feat(serviceConfig.ts): create BSBServiceConfigRef class refactor(index.ts): update import path for serviceConfig refactor(serviceConfig.ts): move serviceConfig interface to base folder and rename to BSBServiceConfig chore(interfaces.ts): add ExtendedConfig interface to extend logging, events, and services config interfaces chore(interfaces.ts): update logging, events, and services config interfaces to include ExtendedConfig chore(plugin.ts): remove unused run method in Plugin class chore(plugin.ts): update return value of getConfig method in Plugin class to handle undefined config chore(plugin.ts): remove unused run method in Plugin class chore(plugin.ts): remove unused dispose method in Plugin class chore(plugin.ts): remove unused run method in Plugin class chore(plugin.ts): remove unused dispose method in Plugin class chore(plugin.ts): remove unused run method in Plugin class chore(plugin.ts): remove unused dispose method in Plugin class chore(plugin.ts): remove unused run method in Plugin class chore(plugin.ts): remove unused dispose method in Plugin class chore(plugin.ts): remove unused run method in Plugin class chore(plugin.ts): remove fix(config.ts): change variable names from loggerPackage to configPackage and loggerPlugin to configPluginName feat(config.ts): add support for process.env.BSB_LOGGER_PLUGIN and process.env.BSB_LOGGER_PLUGIN_PACKAGE environment variables fix(config.ts): update log messages to use the new variable names fix(config.ts): update plugin loading to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new variable names fix(config.ts): update log messages to use the new fix(plugins.ts): fix import statement for BSBServiceConfig fix(plugins.ts): fix variable name from installerFile to configDefFile fix(plugins.ts): fix variable name from importedConfig.Config to importedConfig.ConfigRef fix(plugins.ts): fix variable name from serviceConfigDef to serviceConfig fix(plugins.ts): fix condition for importing serviceConfig fix(plugins.ts): fix error message for missing Config class in sec-config.ts/js fix(serviceBase.ts): add missing await statements for logging and events fix(services.ts): fix import statement for SmartFunctionCallAsync and SmartFunctionCallSync fix(services.ts): fix indentation fix(services.ts): fix variable name from pluginConfig to newPlugin.serviceConfig fix(services.ts): fix condition for parsing pluginConfig fix(services.ts): fix log level for adding service plugin fix(services.ts): fix log level for constructing service plugin client fix(services.ts):
Important Auto Review SkippedAuto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit's AI:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
More type-safety added Fixed SB client references General fixes/updates other stuff... + cleanups
No description provided.