Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@tv2media/server-core-integration
Advanced tools
This library is used to connect to the Sofie Server Core from other Node processes.
This is a part of the Sofie TV News Studio Automation System.
Note: This library does not follow semver. It is recommended to add it in your package json like "@sofie-automation/server-core-integration": "~1.16.0"
matching the version of sofie core you are running
import { CoreConnection, PeripheralDeviceAPI } from '@sofie-automation/server-core-integration'
// Set up our basic credentials:
let core = new CoreConnection({
deviceId: 'device01', // Unique id
deviceToken: 'mySecretToken', // secret token, used to authenticate this device
deviceType: PeripheralDeviceAPI.DeviceType.PLAYOUT,
deviceName: 'My peripheral device',
})
core.on('error', console.log)
// Initiate connection to Core:
core
.init({
host: '127.0.0.1',
port: 3000,
})
.then(() => {
// Connection has been established
console.log('Connected!')
// Set device status:
return core.setStatus({
statusCode: PeripheralDeviceAPI.StatusCode.GOOD,
messages: ['Everything is awesome!'],
})
})
.catch((err) => {
console.log(err)
})
This library is developed as part of Sofie Server Core. See there for more instructions
yarn build
yarn test
yarn watch
This library has a self-contained DDP client that can be used independently of the rest of the module.
import { DDPClient, DDPConnectorOptions } from 'tv-automation-server-integration'
let options: DDPConnectorOptions = {
host: '127.0.0.1',
port: 5432
}
let ddp = new DDPClient(options)
ddp.on('connected', /* ... */ )
ddp.connect((err: any) => {
if (err) {
/* ... handle error ... */
return
}
let subId = ddp.subscribe('expectedMediaItems')
ddp.observe('expectedMediaItems', /* added cb */, /* changed cb */, /* removed cb */)
/* ... then later ... */
ddp.unsub(subId)
ddp.close()
})
See the documentation on the DDP client class for more details.
FAQs
Library for connecting to Core
We found that @tv2media/server-core-integration demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.