Installations
npm install nginx-config-ast
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.12.0
NPM Version
5.4.1
Score
73.1
Supply Chain
82.3
Quality
75.3
Maintenance
100
Vulnerability
100
License
Contributors
Unable to fetch Contributors
Languages
TypeScript (60.11%)
JavaScript (39.89%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Norech
Download Statistics
Total Downloads
1,826
Last Day
1
Last Week
12
Last Month
35
Last Year
182
GitHub Statistics
9 Stars
14 Commits
1 Forks
1 Branches
1 Contributors
Bundle Size
8.64 kB
Minified
3.23 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.7
Package Id
nginx-config-ast@0.0.7
Unpacked Size
90.81 kB
Size
24.02 kB
File Count
9
NPM Version
5.4.1
Node Version
8.12.0
Total Downloads
Cumulative downloads
Total Downloads
1,826
Last day
0%
1
Compared to previous day
Last week
300%
12
Compared to previous week
Last month
105.9%
35
Compared to previous month
Last year
11.7%
182
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
7
NGINX Config AST
A parser and code generator for NGINX configuration files
Usage:
1var parser = require('nginx-config-ast'); 2 3var config = ` 4 server { 5 listen 80; 6 7 server_name example.com; 8 location / { 9 root /etc/nginx/html; 10 try_files $uri $uri/ $uri.html =404; 11 } 12 } 13`; 14 15// You can convert the configuration into an abstract tree (AST) 16var ast = parser.generateAST(config); 17 18// You can also convert the AST back to a configuration 19var code = parser.generateConfig(ast); 20
Methods
isConfigValid (config)
Checks if the configuration is valid and returns a boolean.
Arguments
config
: string - Code of a NGINX configuration file
generateAST (config, options)
Generates and returns an abstract tree for specified configuration code.
Arguments
config
: string - Code of a NGINX configuration fileoptions
: objectnoComments
: boolean - Strips all comments from the AST
generateConfig (ast)
Generates and returns configuration code from an abstract tree.
Arguments
ast
: object - Abstract tree for an NGINX configuration- See src/parser.d.ts for typings
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/14 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
22 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
Score
1.3
/10
Last Scanned on 2025-02-03
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