bridgepreflight 1.0.0 → 1.0.2

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.
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,245 @@
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
112
- Configurable scoring weights
113
- • Plugin-based analyzer system
114
- Historical score tracking
115
- SaaS dashboard
116
- AI-based remediation suggestions
160
+ BridgePreflight is evolving into a comprehensive Deployment Risk Intelligence Platform.
161
+
162
+ Phase 1 - Deterministic CLI (Current)
163
+ Local development risk scanning
164
+ Weighted analyzer scoring
165
+ • JSON output for CI integration
166
+ • Structured severity classification
167
+
168
+ Phase 2 - Policy & Enforcement
169
+ • Configurable scoring thresholds
170
+ • Strict CI mode (--strict, --ci)
171
+ • COnfigurable analyzer toggling
172
+ • Exit-code enforcement policies
173
+
174
+ Phase 3 - Ecosystem Integration
175
+ • Native GitHub Action
176
+ • Pull request risk annotations
177
+ • Historical score comparison
178
+ • Team-level threshold configuration
179
+
180
+ Phase 4 - Platform Expansion
181
+ • Risk history tracking
182
+ • Deployment trend analysis
183
+ • Team dashboards
184
+ • Enterprise compliance modules
185
+ <!------------------------------ ------------------------------------>
186
+
187
+
188
+
189
+ <!------------------------------ ------------------------------------>
190
+ Contributing
191
+ BridgePreflight is currently in early-stage evolution.
192
+
193
+ Contributions are welcome in the following areas:
194
+
195
+ • Analyzer improvements
196
+ • Performance optimization
197
+ • Additional infrastructure checks
198
+ • Documentation refinement
199
+ • CI templates
200
+
201
+ To contribute:
202
+ 1. Fork the repository
203
+ 2. Create a feature branch
204
+ 3.Submit a pull request with clear reasoning
205
+
206
+ All contributions should preserve deterministic scoring logic and architecture stability.
207
+ <!------------------------------ ------------------------------------>
208
+
209
+
210
+
211
+ <!------------------------------ ------------------------------------>
212
+ Versioning
213
+ BridgePreflight follows semantic versioning:
214
+
215
+ MAJOR.MINOR.PATCH
216
+
217
+ • MAJOR - Breaking changes
218
+ • MINOR - New analyzers or features
219
+ • PATCH - Bug fixes and improvements
220
+
221
+ GitHub releases are tagged accordingly
222
+ • git tag v1.0.0
223
+ • git push --tags
224
+
225
+ This aligns repository versions with npm releases.
226
+ <!------------------------------ ------------------------------------>
227
+
228
+
229
+
117
230
  <!------------------------------ ------------------------------------>
231
+ License
232
+ MIT License
118
233
 
234
+ Bridgepreflight is open-core infrastructure software.
119
235
 
236
+ Future cloud components may be distributed under seperate licensing.
120
237
  <!------------------------------ ------------------------------------>
121
- 📄 License
122
- MIT
238
+
239
+
240
+
241
+ <!------------------------------ ------------------------------------>
242
+ Vision
243
+ BridgePreflight is not just a CLI tool.
244
+
245
+ It is the foundation of a Deployment Risk Intelligence Platform — designed to help teams measure, manage, and reduce infrastructure risk before code reaches production.
246
+
247
+ Infrastructure reliability should be measurable.
248
+
249
+ BridgePreflight makes it measurable.
123
250
  <!------------------------------ ------------------------------------>
package/dist/cli.js CHANGED
@@ -62,7 +62,7 @@ program
62
62
  .option("--json", "Output results as JSON (for CI pipelines)")
63
63
  .description("Run production safety checks")
64
64
  .action(async (options) => {
65
- console.log(chalk_1.default.blue("\nWelcome to BridgePreflight — AI-native infrastructure readiness scanner\n"));
65
+ console.log(chalk_1.default.blue("\nWelcome to BridgePreflight — The Deployment Risk Intelligence Platform \n"));
66
66
  const ciMode = (0, ci_1.isCI)();
67
67
  if (!ciMode) {
68
68
  const accessGranted = await (0, projectUtils_1.askProjectAccess)();
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.2",
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",
@@ -38,6 +43,6 @@
38
43
  "typescript": "^5.9.3"
39
44
  },
40
45
  "engines": {
41
- "node": ">=18"
46
+ "node": ">=20"
42
47
  }
43
48
  }