
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@idrinth-api-bench/react-file-based-routes
Advanced tools
A simple file based routing library, that does not force itself on you.
This is a small library used to teach the default react routers file based routing and optimise the output as far as that is possible without server side rendering. It is meant for mostly static pages, where the overhead of nextjs of vike is not required.
A page is by default any ìndex.tsx within the src/pages folder. The folder name will be taken as the page url, with two exceptions by default:
All rules can be configured in an .idrinth-react-file-based-routes.json file, options are currently:
interface Configuration {
sitemap?: {
domain?: string,
build?: boolean,
},
runtime?: {
reloadWaitMs: number
},
routes?: {
build?: boolean,
type?: 'tsx'|'jsx',
overridePathMappings?: {
[filesystemPath: string]: string,
},
},
htmlMinify?: {
collapseBooleanAttributes?: boolean,
conservativeCollapse?: boolean,
collapseWhitespace?: boolean,
removeAttributeQuotes?: boolean,
removeComments?: boolean,
},
fileBuilder?: {
buildIndex?: boolean,
minifyPages?: boolean,
appendPageChunk?: boolean,
preLoadCSS?: boolean,
preloadStartDelay?: number,
},
fileFinder?: {
fileName?: string,
pagesRoot?: string,
distJSRoot?: string,
},
}
If you prefer using a cli format, --{group}.{setting}=abc will set string settings to abc, while booleans can be flipped by just using --{group}.{setting}. For example for api-bench, that uses the defaults, you can set the domain by using --sitemap.domain=idrinth-api-ben.ch. The setting fileFinder.overridePathMappings can not be configured via the cli.
Default options are overwritten first by the file based settings and then by the command line settings.
You will need to do three things for the complete package:
irfbrgr or react-file-based-routes-generate-routes) in you package.json as afterInstall and early in your build process to generate the routes.tsx and the sitemapìrfbrgf or react-file-based-routes-generate-folders) in your package.json as a late build step to optimise the index.html filessrc/routes.tsx, so that you can use createBrowserRouter or similar functions to create your router. It requires getting a Loader element passed to it - any react element will doFAQs
A simple file based routing library, that does not force itself on you.
The npm package @idrinth-api-bench/react-file-based-routes receives a total of 0 weekly downloads. As such, @idrinth-api-bench/react-file-based-routes popularity was classified as not popular.
We found that @idrinth-api-bench/react-file-based-routes 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.