
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
oxyzen-sdk
Advanced tools
package.json
"dependencies": {
"oxyzen-sdk": "^0.0.17"
},
let _ozSDK;
async function initSDK(onAdapterStateChanged) {
if (_ozSDK) return;
OzLogger.i('OzSDK.init');
// eslint-disable-next-line require-atomic-updates
_ozSDK = await OzSDK.init(OZLogLevel.enum('info')); //info/error/warn
_ozSDK.on('error', (e) => _runErrorCB(e));
_ozSDK.on('onAdapterStateChanged', async (available) => {
if (available) {
// if (ozDeviceMap.size > 0) _startReconnectTimer();
} else {
_runErrorCB(OZError.enum('ble_power_off'));
await stopScan();
//NOTE: 在ozDeviceMap中保留,不删除,用于设备重连
ozDeviceMap.forEach(device => device.disconnect(false));
}
if (onAdapterStateChanged) onAdapterStateChanged(available);
});
if (_ozSDK.adapter.available) onAdapterStateChanged(true);
OzLogger.i('OzSDK.init done');
};
(async function main() {
OzLogger.i('------------- Example Main -------------');
await initSDK(async (adapterAvailable) => {
if (adapterAvailable) await startScan();
});
})();
_ozSDK.startScan(async device => {
console.log(`found device, [${p.name}] ${p.address}`);
});
device.listener = exampleListener;
await device.connect();
// disconnect device
await device.disconnect();
async function disposeSDK(cb) {
disconnectAll();
await OzSDK.dispose();
_ozSDK = null;
if (cb) cb();
};
// when exit application, disconnect all devices & clean resources
process.on('SIGINT', async () => {
OzLogger.i({ message: `SIGINT signal received.` });
await disposeSDK();
OzLogger.i('End program');
process.exit(0);
});
async function disconnectAll() {
ozDeviceMap.forEach(device => device.disconnect());
ozDeviceMap.clear();
await stopScan();
}
// 头环连接状态
const CONNECTIVITY = createEnum({
connecting: 0,
connected: 1,
disconnecting: 2,
disconnected: 3,
});
// 佩戴状态,电极与皮肤接触良好
// 佩戴方向,检测是否佩戴反
const ORIENTATION = createEnum({
unknown: 0,
normal: 1, //头环戴正
upsideDown: 2, //头环戴反
});
device.listener = exampleListener;
device.startIMU();
class ZenliteDevice {
id,
name,
connectivity,
connect()
disconnect()
pair(cb)
startEEG(cb)
stopEEG(cb)
startIMU(cb)
stopIMU(cb)
startPPG(cb)
stopPPG(cb)
shutdown(cb)
// @param name length should be 4 ~ 18
setDeviceName(name, cb)
}
FAQs
OxyZenSdk for NodeJS
The npm package oxyzen-sdk receives a total of 1 weekly downloads. As such, oxyzen-sdk popularity was classified as not popular.
We found that oxyzen-sdk 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.