bridgepreflight 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +189 -65
  3. package/package.json +8 -3
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Godsfavour Jesse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction...
package/README.md CHANGED
@@ -6,118 +6,242 @@
6
6
  <!------------------------------ ------------------------------------>
7
7
  BridgePreflight
8
8
 
9
- AI-native infrastructure readiness scanner for Node & TypeScript projects.
9
+ The Deployment Risk Intelligence Platform
10
10
 
11
- BridgePreflight analyzes your repository before code merges and assigns a Preflight Readiness Score (0–100) — automatically blocking pull requests that introduce risk.
11
+ BridgePreflight is a production-readiness scanner that analyzes your codebase before deployment and generates a structured Deployment Risk Score.
12
12
  <!------------------------------ ------------------------------------>
13
13
 
14
14
 
15
15
  <!------------------------------ ------------------------------------>
16
- The Problem
17
- Teams merge code that:
18
- Has no tests
19
- Breaks the build
20
- Lacks documentation
21
- Has weak repository hygiene
16
+ It identifies critical infrastructure weakness such as:
17
+ Broken or missing builds
18
+ Unsafe environment variable usage
19
+ Runtime incompatibility risks
20
+ Localhost leakage
21
+ Missing lockfiles or Node version enforcement
22
22
  Issues are discovered too late — during staging or production.
23
23
 
24
- BridgePreflight moves detection earlier directly into CI.
24
+ BridgePreflight runs locally or in CI to prevent high-risk deployments before they happen.
25
25
  <!------------------------------ ------------------------------------>
26
26
 
27
27
 
28
28
 
29
29
  <!------------------------------ ------------------------------------>
30
- What BridgePreflight Does
31
- BridgePreflight scans your repository and:
32
- • Generates an Infrastructure Readiness Score
33
- Classifies readiness (Ready / Caution / Critical)
34
- Identifies top risk factors
35
- Automatically fails PRs if score < 70
36
- Posts a structured risk summary comment on pull requests
37
- It integrates directly into GitHub Actions for seamless enforcement.
38
- <!------------------------------ ------------------------------------>
30
+ The Problem
31
+ Modern teams ship fast.
32
+
33
+ But deployments often fail because:
34
+ Runtime versions are inconsistent
35
+ Enviroment variables are misconfigured
36
+ Builds silently pass with warnings
37
+ Localhost endpoints leak into production
38
+ • Dependency locking is missing
39
+ These issues are rarely caught early.
39
40
 
41
+ They surface in staging - or worse - in production
42
+ <!------------------------------ ------------------------------------>
40
43
 
41
44
 
42
45
  <!------------------------------ ------------------------------------>
43
- How It Works
44
- BridgePreflight evaluates:
45
- • Test presence and structure
46
- • Build configuration
47
- • CI workflow setup
48
- • Documentation presence
49
- • Repository hygiene
50
- Each category contributes weighted points to the final score.
46
+ The Solution
47
+ Bridgepreflight introduces Deployment Risk Intelligence directly into your development workflow.
51
48
 
52
- If the score falls below the threshold:
53
- The CI pipeline fails
54
- The merge button is blocked
55
- A risk summary is posted on the PR
49
+ instead of guessing whether a repository is safe to deploy, you get:
50
+ A quantified Deployment Risk Sore
51
+ Structured analyzer breakdown
52
+ Severity classification (Healthy/ Low/ Medium/ High/ Critical)
53
+ • Clear remediation signals
54
+ You move from reactive debugging to proactive risk prevention.
56
55
  <!------------------------------ ------------------------------------>
57
56
 
58
57
 
59
58
  <!------------------------------ ------------------------------------>
60
- Installation (Local Usage)
61
- npm install
62
- npm run build
63
- node dist/cli.js scan
59
+ What BridgePreflight Analyzes (v1.0.0)
60
+ Current analyzers include:
64
61
 
62
+ 1. Build Check
63
+ • Verifies package.json
64
+ • Ensures build script exists
65
+ • Detects TypeScript without proper build configuration
66
+ • Captures build-time warnings
65
67
 
66
- For machine-readable output:
67
- node dist/cli.js scan --json
68
+ 2. Environment Variables Check
69
+ Detects unsafe process.env usage
70
+ • Flags missing configuration hygiene
71
+ • Identifies potential production misconfiguration risks
72
+
73
+ 3. Runtime Compatibility Check
74
+ • Verifies Node engine specification
75
+ • Detects missing .nvmrc or .node-version
76
+ • Ensures lockfile presence
77
+
78
+ 4. Localhost Leak Check
79
+ • Scans for localhost and 127.0.0.1 usage
80
+ • Prevents accidental production endpoint leakage
68
81
  <!------------------------------ ------------------------------------>
69
82
 
70
83
 
84
+
71
85
  <!------------------------------ ------------------------------------>
72
- GitHub Actions Integration
73
- Place this file in:
74
- .github/workflows/bridgepreflight.yml
86
+ Installation
87
+
88
+ Global Installation (Recommended)
89
+ • npm install -g bridgepreflight
75
90
 
91
+ Run:
92
+ • bridgepreflight scan
76
93
 
77
- BridgePreflight will:
78
- Run on every push to main
79
- • Run on every pull request
80
- • Automatically fail if readiness < 70
81
- • Comment with risk breakdown
94
+ Or without global install:
95
+ npx bridgepreflight scan
82
96
  <!------------------------------ ------------------------------------>
83
97
 
84
98
 
85
99
  <!------------------------------ ------------------------------------>
86
100
  Example Output
87
- {
88
- "totalScore": 82,
89
- "readiness": "Ready",
90
- "results": [
91
- { "name": "Test Check", "severity": "healthy" },
92
- { "name": "Build Check", "severity": "warning" }
93
- ]
94
- }
101
+ Running BridgePreflight scan...
102
+
103
+ ✅ Build Check: HEALTHY (50/50)
104
+ ❌ Environment Variables Check: HIGH (10/30)
105
+ Localhost Leak Check: LOW (16/20)
106
+ Runtime Compatibility Check: HIGH (6/20)
107
+
108
+ -----------------------------
109
+ Total Score: 79/120 (65.8%)
110
+ Readiness: High Risk
111
+ -----------------------------
112
+
113
+ Top Risk Factors:
114
+ • Environment Variables Check
115
+ • Runtime Compatibility Check
116
+ <!------------------------------ ------------------------------------>
117
+
118
+
119
+ <!------------------------------ ------------------------------------>
120
+ JSON Output
121
+ For machine-readable output:
122
+
123
+ bridgepreflight scan --json
124
+
125
+ This enables CI integration and automated risk gating.
95
126
  <!------------------------------ ------------------------------------>
96
127
 
97
128
 
98
129
  <!------------------------------ ------------------------------------>
99
- Why BridgePreflight Matters
100
- BridgePreflight transforms infrastructure quality into a measurable metric.
130
+ Scoring Model
131
+ BridgePreflight uses a weighted scoring model.
132
+
133
+ Each analyzer contributes to a maximum composite score (currently 120 points).
101
134
 
102
- It acts as:
103
- A DevOps gatekeeper
104
- A pre-merge risk detection layer
105
- A credibility signal for repositories
106
- Instead of hoping code is safe — you measure it.
135
+ Severity is calculated proportionally:
136
+ Healthy
137
+ Low
138
+ Medium
139
+ High
140
+ • Critical
141
+
142
+ The scoring model is deterministic and transparent.
143
+ <!------------------------------ ------------------------------------>
144
+
145
+
146
+ <!------------------------------ ------------------------------------>
147
+ CI Integration (Coming Next Phase)
148
+ BridgePreflight is designed to be CI-ready.
149
+
150
+ Upcoming native integrations:
151
+ • Pull request gating
152
+ • GitHub Actions workflow templates
153
+ • Exit-code enforcement
154
+ • Team policy thresholds
107
155
  <!------------------------------ ------------------------------------>
108
156
 
109
157
 
110
158
  <!------------------------------ ------------------------------------>
111
159
  Roadmap
160
+ BridgePreflight is evolving into a full Deployment Risk Intelligence Platform.
161
+
162
+ Phase 1 (Current)
163
+ • Local CLI scanning
164
+ • Weighted risk scoring
165
+ • Deterministic analyzer engine
166
+
167
+ Phase 2
112
168
  • Configurable scoring weights
113
- • Plugin-based analyzer system
114
- Historical score tracking
115
- • SaaS dashboard
116
- AI-based remediation suggestions
169
+ • Plugin-based analyzer architecture
170
+ CI enforcement modes (--strict, --ci)
171
+
172
+ Phase 3
173
+ • Historical risk tracking
174
+ • GitHub integration
175
+ • PR blocking with threshold enforcement
176
+
177
+ Phase 4
178
+ • Cloud dashboard
179
+ • Team-level risk insights
180
+ • Policy enforcement
181
+ • Enterprise compliance modules
182
+ <!------------------------------ ------------------------------------>
183
+
184
+
185
+
186
+ <!------------------------------ ------------------------------------>
187
+ Contributing
188
+ BridgePreflight is currently in early-stage evolution.
189
+
190
+ Contributions are welcome in the following areas:
191
+
192
+ • Analyzer improvements
193
+ • Performance optimization
194
+ • Additional infrastructure checks
195
+ • Documentation refinement
196
+ • CI templates
197
+
198
+ To contribute:
199
+ 1. Fork the repository
200
+ 2. Create a feature branch
201
+ 3.Submit a pull request with clear reasoning
202
+
203
+ All contributions should preserve deterministic scoring logic and architecture stability.
204
+ <!------------------------------ ------------------------------------>
205
+
206
+
207
+
208
+ <!------------------------------ ------------------------------------>
209
+ Versioning
210
+ BridgePreflight follows semantic versioning:
211
+
212
+ MAJOR.MINOR.PATCH
213
+
214
+ • MAJOR - Breaking changes
215
+ • MINOR - New analyzers or features
216
+ • PATCH - Bug fixes and improvements
217
+
218
+ GitHub releases are tagged accordingly
219
+ • git tag v1.0.0
220
+ • git push --tags
221
+
222
+ This aligns repository versions with npm releases.
223
+ <!------------------------------ ------------------------------------>
224
+
225
+
226
+
117
227
  <!------------------------------ ------------------------------------>
228
+ License
229
+ MIT License
118
230
 
231
+ Bridgepreflight is open-core infrastructure software.
119
232
 
233
+ Future cloud components may be distributed under seperate licensing.
120
234
  <!------------------------------ ------------------------------------>
121
- 📄 License
122
- MIT
235
+
236
+
237
+
238
+ <!------------------------------ ------------------------------------>
239
+ Vision
240
+ BridgePreflight is not just a CLI tool.
241
+
242
+ It is the foundation of a Deployment Risk Intelligence Platform — designed to help teams measure, manage, and reduce infrastructure risk before code reaches production.
243
+
244
+ Infrastructure reliability should be measurable.
245
+
246
+ BridgePreflight makes it measurable.
123
247
  <!------------------------------ ------------------------------------>
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "bridgepreflight",
3
- "version": "1.0.0",
4
- "description": "AI-native production readiness scanner for developers",
3
+ "version": "1.0.1",
4
+ "description": "Deployment Risk Intelligence CLI for Node.js projects. Detect build, runtime, and configuration risks before production.",
5
5
  "bin": {
6
- "bridgepreflight": "./dist/cli.js"
6
+ "bridgepreflight": "dist/cli.js"
7
7
  },
8
8
  "files": [
9
9
  "dist"
@@ -15,6 +15,11 @@
15
15
  },
16
16
  "keywords": [
17
17
  "devtools",
18
+ "risk",
19
+ "infrastructure",
20
+ "nodejs",
21
+ "preflight",
22
+ "runtime",
18
23
  "ci",
19
24
  "production",
20
25
  "deployment",