
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@cheep/transport
Advanced tools
[@cheep/transport](https://www.npmjs.com/package/@cheep/transport) will help you to build Event Driven applications with 💯 type safety.
@cheep/transport will help you to build Event Driven applications with 💯 type safety.
Basic (dynamic) example:
import { MemoryTransport } from '@cheep/transport'
// creating transport object
const transport = new MemoryTransport()
// initialization is async process
await transport.init()
// register listeners for specific routes
transport.on('PING', async () => 'PONG')
// start listening messages
await transport.start()
// RPC call on the PING route
const result = await transport.execute({
route: 'PING',
payload: {},
})
// result will be 'PONG'
expect(result).toBe('PONG')
// stop listening messages
await transport.stop()
// dispose will call stop as well if necessary
await transport.dispose()
Basic (Type Safed) Example:
import {
MemoryTransport,
createTransportHandler,
createTransportApi,
ApiWithExecutableKeys,
} from '@cheep/transport'
/**
* Define api type
*/
type Api = {
Command: {
User: {
login: (props: {
username: string
password: string
}): Promise<boolean>
}
}
}
type UserApi = ApiWithExecutableKeys<Api, 'Command'>
/**
* Use UserApi for type safety
*/
const transport = new MemoryTransport()
const handler = createTransportHandler<UserApi>(transport)
const api = createTransportApi<UserApi>(transport)
await transport.init()
// register listeners
handler.on(
x => x.Command.User.login,
(_, payload) => {
return payload.username === payload.password
},
)
await transport.start()
// RPC call on the PING route
const result = await api.execute.Command.User.login({
username: 'Me',
password: 'Me',
})
expect(result).toBe('PONG')
await transport.dispose()
FAQs
This library was generated with [Nx](https://nx.dev).
The npm package @cheep/transport receives a total of 0 weekly downloads. As such, @cheep/transport popularity was classified as not popular.
We found that @cheep/transport demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.