
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@actyx/os-sdk
Advanced tools
This is a JavaScript and TypeScript SDK for building ActyxOS apps. Currently, it wraps the ActyxOS Event Service and Console Service APIs in a simple client that can be used from within JavaScript and TypeScript apps.
For more information about ActyxOS, please check out our developer documentation at https://developer.actyx.com/.
import { Client, Subscription } from '@actyx/os-sdk'
const ActyxOS = Client()
// callback style
ActyxOS.eventService.subscribe({
subscriptions: Subscription.everything(),
onEvent: event => {
console.log('got event', event)
}
})
// stream style
const eventStream = ActyxOS.eventService.subscribeStream({
subscriptions: Subscription.everything(),
})
for await (const event of eventStream) {
console.log('got event', event)
}
import { Client, EventDraft } from '@actyx/os-sdk'
const ActyxOS = Client()
// callback style
ActyxOS.eventService.publish({
eventDrafts: EventDraft.make('mySemantics', 'myName', { foo: 'bar' }),
onDone: () => {
console.log(`Published`)
}
})
// promise style
await ActyxOS.eventService.publishPromise({
eventDrafts: EventDraft.make('mySemantics', 'myName', { foo: 'bar' }),
})
For simple logging needs, use the SimpleLogger which you can configure once
and then use to log messages and, optionally, additional data:
import { Client } from '@actyx/os-sdk'
const ActyxOS = Client()
const logger: SimpleLogger = ActyxOS.consoleService.SimpleLogger({
logName: 'myLogger',
producerName: 'com.example.app1',
producerVersion: '1.0.0'
})
logger.debug('this is a DEBUG message')
logger.warn('this is a WARNING message')
logger.info('this is an INFO message')
logger.error('this is an ERROR message')
logger.debug('This is a message with additional data', {foo: 'bar'})
For more advanced, custom logging needs, use the log function directly:
import { Client } from '@actyx/os-sdk'
const ActyxOS = Client()
ActyxOS.consoleService.log({
entry: {
logName: 'myCustomLogger',
message: 'this is a WARNING message',
severity: LogSeverity.WARN,
producer: {
name: 'com.example.app1',
version: '1.0.0'
},
additionalData: {
foo: 'bar',
bar: {
foo: true,
}
},
labels: {
'com.example.app1.auth.username': 'john.doe',
'com.example.app1.model.events': '10000',
}
},
// Callback on successful logging
onLogged: () => {
// Do something
},
// Callback on error logging
onError: err => {
console.error(`error logging: ${err}`)
}
})
There also is a corresponding version that returns a Promise:
import { Client } from '@actyx/os-sdk'
const ActyxOS = Client()
await ActyxOS.consoleService.logPromise({ /* log entry */ })
Install via npm using
npm install @actyx/os-sdk
You can access the Typedoc documentation at https://developer.actyx.com/@actyx/os-sdk/.
If you have questions about or issues with the ActyxOS SDK, join our Discord chat or email us at developer@actyx.io.
You can override the default client options by passing options (ApiClientOpts) when creating the client. If you only want to override specific options, use the default options (DefaultClientOpts) as shown in the following example:
import { Client, DefaultClientOpts } from '@actyx/os-sdk'
const clientOpts = DefaultClientOpts()
clientOpts.Endpoints.EventService.BaseUrl = 'http://10.2.3.23:4454/api'
const CustomActyxOS = Client(clientOpts)
npm run buildnpm run testRUN_INTEGRATION_TESTS=1 npm run testnpm run lint and npm run lint:fixnpm publishFAQs
ActyxOS Javascript/Typescript SDK
We found that @actyx/os-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.