
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@sirou/next
Advanced tools
Next.js adapter for Sirou — App Router, Pages Router, middleware, and server utilities
The Next.js adapter for Sirou. Supports both the App Router (Next.js 13+) and the Pages Router, providing type-safe navigation, middleware utilities, and server-side route helpers.
npm install @sirou/next @sirou/core
Create a client component to provide the router context:
// app/providers.tsx
"use client";
import { SirouNextProvider } from "@sirou/next";
import { routes } from "@/routes";
export function Providers({ children }: { children: React.ReactNode }) {
return <SirouNextProvider config={routes}>{children}</SirouNextProvider>;
}
// app/layout.tsx
import { Providers } from "./providers";
export default function RootLayout({ children }) {
return (
<html>
<body>
<Providers>{children}</Providers>
</body>
</html>
);
}
SirouNextProviderContext provider for App Router. Wraps next/navigation internally.
useSirouNextRouter()Returns the Sirou router instance backed by next/navigation.
"use client";
import { useSirouNextRouter } from "@sirou/next";
const router = useSirouNextRouter<typeof routes>();
router.go("dashboard");
buildUrl(routeName, params?)Server-safe URL builder. Can be used in Server Components, generateMetadata, and API routes.
import { buildUrl } from "@sirou/next";
// In generateMetadata
export async function generateMetadata({ params }) {
return {
alternates: {
canonical: buildUrl("products.details", { productId: params.id }),
},
};
}
createSirouMiddleware(config)Creates a Next.js middleware function that runs Sirou guards on the edge.
// middleware.ts
import { createSirouMiddleware } from "@sirou/next";
import { routes } from "./routes";
export const middleware = createSirouMiddleware(routes, {
guards: {
auth: async ({ request }) => {
const token = request.cookies.get("token");
if (!token) return { allowed: false, redirect: "/login" };
return { allowed: true };
},
},
});
export const config = {
matcher: ["/dashboard/:path*"],
};
SirouLink (Next.js)Type-safe link component using next/link under the hood.
import { SirouLink } from "@sirou/next";
<SirouLink to="user" params={{ id: "abc" }} prefetch>
View Profile
</SirouLink>;
MIT
FAQs
Next.js adapter for Sirou — App Router, Pages Router, middleware, and server utilities
We found that @sirou/next demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.