Gathering detailed insights and metrics for @hashicorp/netlify-to-nextjs-redirect-exporter
Gathering detailed insights and metrics for @hashicorp/netlify-to-nextjs-redirect-exporter
Gathering detailed insights and metrics for @hashicorp/netlify-to-nextjs-redirect-exporter
Gathering detailed insights and metrics for @hashicorp/netlify-to-nextjs-redirect-exporter
npm install @hashicorp/netlify-to-nextjs-redirect-exporter
67.7
Supply Chain
78.4
Quality
83
Maintenance
100
Vulnerability
81.3
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Stars
22 Commits
2 Forks
5 Watching
10 Branches
38 Contributors
Updated on 13 Aug 2024
TypeScript (52.93%)
JavaScript (47.07%)
Cumulative downloads
Total Downloads
Last day
150%
15
Compared to previous day
Last week
41.8%
78
Compared to previous week
Last month
-2.6%
263
Compared to previous month
Last year
-25.2%
2,691
Compared to previous year
6
A Node.js library and CLI that converts a Netlify _redirects
file into compatible Next.js redirect/rewrite rules
1npm i @hashicorp/netlify-to-nextjs-redirect-exporter
1// next.config.js 2import { parseNetlifyRedirects } from "@hashicorp/netlify-to-nextjs-redirect-exporter"; 3 4const contents = fs.readFileSync("/path/to/_redirects/file", "utf8"); 5 6// `parseNetlifyRedirects()` will return an object with two keys: 7// `rewrites` and `redirects`, each containing an array of corresponding rules 8const { rewrites, redirects } = parseNetlifyRedirects(contents); 9 10module.exports = { 11 async rewrites() return rewrites 12 async redirects() return redirects 13}
Using the export-netlify-redirects
CLI will create two files: rewrites.next.js
and redirects.next.js
,
each containing an array of corresponding rules.
1$ ./node_modules/.bin/export-netlify-redirects ./_redirects 2 3Writing redirects file to redirects.next.js... 4Writing rewrites file to rewrites.next.js... 5Done.
1npm i 2npm run watch
1npm t
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
all dependencies are pinned
Details
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
30 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More