
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.
enum Menus {
Main = "main",
Settings = "settings",
}
interface User {
name: string;
selectedMenu: Menus;
}
export interface BotContext {
user: User;
}
const gotoMenuAction = createParametarizedAction<BotContext, Menus>(
"goto menu",
async (menu, { send }, { user }) => {
user.selectedMenu = menu;
await send(`Welcome to ${menu}`);
}
);
const setRandomUsername = createAction<BotContext>(
"set random username",
async ({ send }, { user }) => {
const getRandomInt = (max: number) => Math.floor(Math.random() * max);
const randomName = ["Fish", "Sticks", "Kanye West", "Toivo", "SunBoy"];
user.name = randomName[getRandomInt(4)];
await send(`Your name is ${user.name}`);
}
);
const SettingsMenu: R1IO.FC<BotContext> = async () => (
<menu>
<row>
<button label={`Get random username`} onClick={setRandomUsername()} />
</row>
<row>
<button onClick={gotoMenuAction(Menus.Settings)}>Goto main menu</button>
</row>
</menu>
);
const MainMenu: R1IO.FC<BotContext> = ({ user }) => (
<menu>
<row>
<button label={`Hello ${user.name}`} />
</row>
<row>
<button onClick={gotoMenuAction(Menus.Settings)}>
Goto settings menu
</button>
</row>
</menu>
);
const user: User = {
name: "Dmitriy",
selectedMenu: Menus.Main,
};
const router = createRouter<BotContext, Menus>(
{
[Menus.Main]: { build: MainMenu },
[Menus.Settings]: { build: SettingsMenu },
},
({ user }) => user.selectedMenu
);
export const RootMiddleware = createMiddleware(router, async () => ({ user }));
yarn add r1-io
or
npm i r1-io
yarn add vk-io@4.4.0
or
npm i r1-io@4.4.0
tsconfig.json{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "R1IO.createElement",
"jsxFragmentFactory": "R1IO.Fragment"
}
}
const MainMenu: R1IO.FC<BotContext> = ({ user }) => (
<menu>
<row>
<button label={`Hello ${user.name}`} />
</row>
<row>
<button onClick={gotoMenuAction(Menus.Settings)}>
Goto settings menu
</button>
</row>
</menu>
);
const MainMenu: R1IO.FC<BotContext> = async ({ user }) => {
await delay(2000);
<menu>
<row>
<button label={`Hello ${user.name}`} />
</row>
</menu>;
};
FAQs
Simple jsx based library for creation of vk bots, based on vk-io
We found that r1-io 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
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.