![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@curium.rocks/maestro
Advanced tools
Connects emitters to chroniclers and transceivers along with managing state of emitters
Manager of emitters and chroniclers. Intended to run as a service and house multiple emitters.
npm install --save @curium.rocks/maestro
You can view the API documentation here.
The below example shows a full configuration, load, and save handlers can be provided to dynamically fetch the latest config on save/load calls.
/***
* Create a logger facade wrapper winston
* @param {string} serviceName
* @return {LoggerFacade}
*/
function getLoggerFacade(serviceName: string): LoggerFacade {
const logger = winston.createLogger({
level: 'info',
format: winston.format.json(),
defaultMeta: { service: serviceName },
transports: [
new winston.transports.Console()
],
});
return {
info: logger.info.bind(logger),
debug: logger.debug.bind(logger),
trace: logger.silly.bind(logger),
warn: logger.warn.bind(logger),
error: logger.error.bind(logger),
critical: logger.error.bind(logger)
}
}
/**
* Get the configuraiton obj, in this case it's mostly static for demo purposes,
* but this could fetch from a file, fill properties in from a DB etc.
* @param {string} logDir log directory for json chronicler
* @param {string} logName log name for json chronicler
* @return {IMaestroConfig}
*/
function getConfig(logDir?: string, logName?: string) : IMaestroConfig {
return {
id: 'meastro-id',
name: 'meastro-name',
description: 'meastro description',
formatSettings: {
encrypted: false,
type: 'N/A'
},
connections: [{
emitters: [
'ping-pong-1'
],
chroniclers: [
'json-chronicler-1'
]
}],
factories: {
emitter: [{
factoryType: PingPongEmitter.TYPE,
factoryPath: 'PingPongEmitterFactory',
packageName: '@curium.rocks/ping-pong-emitter',
}],
chronicler: [{
factoryType: JsonChronicler.TYPE,
factoryPath: 'JsonChroniclerFactory',
packageName: '@curium.rocks/json-chronicler'
}]
},
emitters: [{
config: {
type: PingPongEmitter.TYPE,
id: 'ping-pong-1',
name: 'My Ping Pong Emitter 1',
description: "A ping pong emitter",
emitterProperties: {
interval: 250
}
}
}],
chroniclers: [{
config: {
type: JsonChronicler.TYPE,
id: 'json-chronicler-1',
name: 'Chronicler 1',
description: "A json chronicler",
chroniclerProperties: {
logDirectory: logDir || './logs',
logName: logName || 'maestro',
rotationSettings: {
seconds: 300
}
}
}
}]
}
}
const maestroOptions = {
config: getConfig(),
logger: getLoggerFacade('maestro'),
loadHandler: () => {
return Promise.resolve(getConfig());
}
}
Once you have your configuration, you can create the maestro:
const maestro = new Maestro(maestroOptions);
The meastro doesn't start automatically and you must call start, this refreshes it's configuration and starts any emitters as well.
await maestro.start();
You can add a hook to clean up gracefully on SIG INT
like so:
process.on('SIGINT', async () => {
await maestro.disposeAsync();
})
import { IMaestro, LoggerFacade, ProviderSingleton } from "@curium.rocks/data-emitter-base";
import { JsonChronicler } from "@curium.rocks/json-chronicler";
import { PingPongEmitter } from "@curium.rocks/ping-pong-emitter";
import { IMaestroConfig, Maestro } from "@curium.rocks/maestro";
import winston from "winston";
/**
* Create a logger facade wrapper winston
* @param {string} serviceName
* @return {LoggerFacade}
*/
function getLoggerFacade(serviceName: string): LoggerFacade {
const logger = winston.createLogger({
level: 'info',
format: winston.format.json(),
defaultMeta: { service: serviceName },
transports: [
new winston.transports.Console()
],
});
return {
info: logger.info.bind(logger),
debug: logger.debug.bind(logger),
trace: logger.silly.bind(logger),
warn: logger.warn.bind(logger),
error: logger.error.bind(logger),
critical: logger.error.bind(logger)
}
}
/**
* Get the configuraiton obj, in this case it's mostly static for demo purposes,
* but this could fetch from a file, fill properties in from a DB etc.
* @param {string} logDir log directory for json chronicler
* @param {string} logName log name for json chronicler
* @return {IMaestroConfig}
*/
function getConfig(logDir?: string, logName?: string) : IMaestroConfig {
return {
id: 'meastro-id',
name: 'meastro-name',
description: 'meastro description',
formatSettings: {
encrypted: false,
type: 'N/A'
},
connections: [{
emitters: [
'ping-pong-1'
],
chroniclers: [
'json-chronicler-1'
]
}],
factories: {
emitter: [{
factoryType: PingPongEmitter.TYPE,
factoryPath: 'PingPongEmitterFactory',
packageName: '@curium.rocks/ping-pong-emitter',
}],
chronicler: [{
factoryType: JsonChronicler.TYPE,
factoryPath: 'JsonChroniclerFactory',
packageName: '@curium.rocks/json-chronicler'
}]
},
emitters: [{
config: {
type: PingPongEmitter.TYPE,
id: 'ping-pong-1',
name: 'My Ping Pong Emitter 1',
description: "A ping pong emitter",
emitterProperties: {
interval: 250
}
}
}],
chroniclers: [{
config: {
type: JsonChronicler.TYPE,
id: 'json-chronicler-1',
name: 'Chronicler 1',
description: "A json chronicler",
chroniclerProperties: {
logDirectory: logDir || './logs',
logName: logName || 'maestro',
rotationSettings: {
seconds: 300
}
}
}
}]
}
}
const maestroOptions = {
config: getConfig(),
logger: getLoggerFacade('maestro'),
loadHandler: () => {
return Promise.resolve(getConfig());
}
}
ProviderSingleton.getInstance().setLoggerFacade(maestroOptions.logger);
const maestro:IMaestro = new Maestro(maestroOptions);
maestro.start();
process.on('SIGINT', async () => {
await maestro.disposeAsync();
});
For more information generate the docs using npm run doc
, documentation for each version is also attached as an artifact of the build in CI.
FAQs
Connects emitters to chroniclers and transceivers along with managing state of emitters
The npm package @curium.rocks/maestro receives a total of 15 weekly downloads. As such, @curium.rocks/maestro popularity was classified as not popular.
We found that @curium.rocks/maestro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.