proof-of-commitment 1.12.0 → 1.12.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.
- package/index.js +21 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* proof-of-commitment CLI v1.12.
|
|
3
|
+
* proof-of-commitment CLI v1.12.1
|
|
4
4
|
* Scores npm/PyPI/Cargo/Go packages on behavioral commitment signals.
|
|
5
5
|
* Usage: npx proof-of-commitment [packages...] [options]
|
|
6
6
|
*/
|
|
@@ -180,10 +180,23 @@ function printTable(results, { totalScanned, totalCritical, lockfile } = {}) {
|
|
|
180
180
|
|
|
181
181
|
// Footer with web link + CI integration CTA
|
|
182
182
|
const topPkgs = results.slice(0, 10).map(r => r.name).join(',');
|
|
183
|
-
|
|
183
|
+
const utm = 'utm_source=cli&utm_medium=audit';
|
|
184
|
+
console.log(clr(c.cyan, `\n 🔗 Full report: ${WEB}?packages=${encodeURIComponent(topPkgs)}&${utm}`));
|
|
184
185
|
console.log(clr(c.cyan, ` 🤖 GitHub Action: github.com/piiiico/commit-action — block CRITICAL packages in CI`));
|
|
185
186
|
console.log(clr(c.dim, ` 📋 Add to this project: `) + clr(c.cyan, `poc init`) + clr(c.dim, ` — creates workflow + README badge`));
|
|
186
187
|
|
|
188
|
+
// Per-package profile URLs — drive traffic to permanent, indexable pages
|
|
189
|
+
const ecoPath = { npm: 'npm', pypi: 'pypi', cargo: 'cargo', golang: 'go' };
|
|
190
|
+
const profilePkgs = results.slice(0, 5).filter(r => r.name && ecoPath[r.ecosystem || 'npm']);
|
|
191
|
+
if (profilePkgs.length > 0) {
|
|
192
|
+
console.log(clr(c.dim, `\n 📄 Package profiles:`));
|
|
193
|
+
for (const r of profilePkgs) {
|
|
194
|
+
const eco = ecoPath[r.ecosystem || 'npm'];
|
|
195
|
+
const name = encodeURIComponent(r.name).replace(/%40/g, '@').replace(/%2F/g, '/');
|
|
196
|
+
console.log(clr(c.dim, ` getcommit.dev/${eco}/${name}`));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
187
200
|
// Contextual upsell — show when findings make monitoring relevant
|
|
188
201
|
if (effectiveCritical > 0) {
|
|
189
202
|
// Check for API key synchronously via env (fast path)
|
|
@@ -193,7 +206,7 @@ function printTable(results, { totalScanned, totalCritical, lockfile } = {}) {
|
|
|
193
206
|
clr(c.cyan, `poc watch ${results.find(r => hasCritical(r.riskFlags))?.name || results[0]?.name}`));
|
|
194
207
|
} else {
|
|
195
208
|
console.log(clr(c.dim, `\n 📊 Monitor ${effectiveCritical === 1 ? 'this' : 'these ' + effectiveCritical} CRITICAL ${effectiveCritical === 1 ? 'package' : 'packages'} — get alerted when scores change.`));
|
|
196
|
-
console.log(clr(c.dim, ' Get a free API key: ') + clr(c.cyan, 'https://getcommit.dev/get-started'));
|
|
209
|
+
console.log(clr(c.dim, ' Get a free API key: ') + clr(c.cyan, 'https://getcommit.dev/get-started?utm_source=cli'));
|
|
197
210
|
console.log(clr(c.dim, ' Then run: ') + clr(c.cyan, 'poc login'));
|
|
198
211
|
}
|
|
199
212
|
}
|
|
@@ -202,7 +215,7 @@ function printTable(results, { totalScanned, totalCritical, lockfile } = {}) {
|
|
|
202
215
|
|
|
203
216
|
function printHelp() {
|
|
204
217
|
console.log(`
|
|
205
|
-
${clr(c.bold, 'proof-of-commitment')} v1.12.
|
|
218
|
+
${clr(c.bold, 'proof-of-commitment')} v1.12.1 — supply chain risk scorer
|
|
206
219
|
|
|
207
220
|
${clr(c.bold, 'Usage:')}
|
|
208
221
|
npx proof-of-commitment Auto-detect manifest in current dir
|
|
@@ -785,7 +798,7 @@ async function cmdLogin(keyArg) {
|
|
|
785
798
|
console.log(clr(c.dim, ' poc watchlist View monitored packages'));
|
|
786
799
|
console.log(clr(c.dim, ' poc unwatch <package> Remove from monitoring'));
|
|
787
800
|
} else {
|
|
788
|
-
console.log(clr(c.dim, ' Upgrade to Pro for monitoring + alerts: https://getcommit.dev/pricing'));
|
|
801
|
+
console.log(clr(c.dim, ' Upgrade to Pro for monitoring + alerts: https://getcommit.dev/pricing?utm_source=cli'));
|
|
789
802
|
}
|
|
790
803
|
console.log();
|
|
791
804
|
}
|
|
@@ -864,7 +877,7 @@ async function cmdWatch(pkg, ecosystem) {
|
|
|
864
877
|
const key = await readApiKey();
|
|
865
878
|
if (!key) {
|
|
866
879
|
console.error(clr(c.red, 'No API key found. Set COMMIT_API_KEY or add api_key=<key> to ~/.commit/config'));
|
|
867
|
-
console.error(clr(c.dim, 'Get a key at https://getcommit.dev/pricing'));
|
|
880
|
+
console.error(clr(c.dim, 'Get a key at https://getcommit.dev/pricing?utm_source=cli'));
|
|
868
881
|
process.exit(1);
|
|
869
882
|
}
|
|
870
883
|
|
|
@@ -1129,7 +1142,7 @@ ${rows}
|
|
|
1129
1142
|
<div class="footer">
|
|
1130
1143
|
<span>Generated by <a href="${WEB}" target="_blank">proof-of-commitment</a></span>
|
|
1131
1144
|
<span><a href="https://github.com/piiiico/commit-action" target="_blank">GitHub Action</a></span>
|
|
1132
|
-
<span><a href="https://getcommit.dev/pricing" target="_blank">Commit Pro</a></span>
|
|
1145
|
+
<span><a href="https://getcommit.dev/pricing?utm_source=cli&utm_medium=report" target="_blank">Commit Pro</a></span>
|
|
1133
1146
|
</div>
|
|
1134
1147
|
<script>
|
|
1135
1148
|
function copyMd() {
|
|
@@ -1385,7 +1398,7 @@ jobs:
|
|
|
1385
1398
|
console.log(clr(c.white, ' 2. Push to trigger the existing workflow'));
|
|
1386
1399
|
}
|
|
1387
1400
|
console.log(clr(c.dim, `\n Want daily monitoring + alerts? Get a free key:`));
|
|
1388
|
-
console.log(clr(c.cyan, ' https://getcommit.dev/get-started'));
|
|
1401
|
+
console.log(clr(c.cyan, ' https://getcommit.dev/get-started?utm_source=cli'));
|
|
1389
1402
|
console.log(clr(c.dim, ' Then run: ') + clr(c.cyan, 'poc login') + clr(c.dim, ' + ') + clr(c.cyan, 'poc watch <package>\n'));
|
|
1390
1403
|
}
|
|
1391
1404
|
|