content-grade 1.0.21 → 1.0.23
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/bin/content-grade.js +22 -3
- package/dist/landing.html +3 -3
- package/package.json +1 -1
package/bin/content-grade.js
CHANGED
|
@@ -169,6 +169,22 @@ function showFreeTierCTA(count) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
// Single-line usage counter appended after every command run.
|
|
173
|
+
// count = total runs used today (after this run).
|
|
174
|
+
function showUsageFooter(count) {
|
|
175
|
+
if (isProUser()) return;
|
|
176
|
+
const limit = TIER_LIMITS.free;
|
|
177
|
+
const remaining = Math.max(0, limit - count);
|
|
178
|
+
blank();
|
|
179
|
+
if (remaining === 0) {
|
|
180
|
+
console.log(` ${RD}[ ${count}/${limit} free runs used today · limit reached — upgrade for unlimited: ${UPGRADE_LINKS.free} ]${R}`);
|
|
181
|
+
} else if (remaining === 1) {
|
|
182
|
+
console.log(` ${YL}[ ${count}/${limit} free runs used today · 1 remaining — upgrade for unlimited: ${UPGRADE_LINKS.free} ]${R}`);
|
|
183
|
+
} else {
|
|
184
|
+
console.log(` ${D}[ ${count}/${limit} free runs used today — upgrade for unlimited: ${UPGRADE_LINKS.free} ]${R}`);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
172
188
|
// Block a run before it starts if the free tier is exhausted.
|
|
173
189
|
// Returns true (blocked) and prints a visually distinct upgrade prompt.
|
|
174
190
|
// Returns false if the user may proceed.
|
|
@@ -630,7 +646,7 @@ async function cmdAnalyze(filePath) {
|
|
|
630
646
|
hr();
|
|
631
647
|
console.log(` ${D}Pro active · Next: ${CY}content-grade batch ./posts/${R}${D} to analyze a whole directory${R}`);
|
|
632
648
|
} else {
|
|
633
|
-
|
|
649
|
+
showUsageFooter(usageCount);
|
|
634
650
|
}
|
|
635
651
|
|
|
636
652
|
// CI exit code — shown after full output so user sees the score before exit
|
|
@@ -791,7 +807,7 @@ async function cmdHeadline(text) {
|
|
|
791
807
|
blank();
|
|
792
808
|
if (!isProUser()) {
|
|
793
809
|
const usageCount = incrementUsage();
|
|
794
|
-
|
|
810
|
+
showUsageFooter(usageCount);
|
|
795
811
|
}
|
|
796
812
|
}
|
|
797
813
|
|
|
@@ -1010,8 +1026,9 @@ async function cmdActivate() {
|
|
|
1010
1026
|
}, null, 2), 'utf8');
|
|
1011
1027
|
|
|
1012
1028
|
const tierLimit = TIER_LIMITS[activatedTier] || TIER_LIMITS.free;
|
|
1029
|
+
const tierLimitDisplay = tierLimit === Infinity ? 'unlimited' : `${tierLimit}`;
|
|
1013
1030
|
blank();
|
|
1014
|
-
ok(`${(TIER_NAMES[activatedTier] || activatedTier).split(' —')[0]} activated! Your daily limit is now ${
|
|
1031
|
+
ok(`${(TIER_NAMES[activatedTier] || activatedTier).split(' —')[0]} activated! Your daily limit is now ${tierLimitDisplay} analyses.`);
|
|
1015
1032
|
blank();
|
|
1016
1033
|
console.log(` ${B}Try it:${R}`);
|
|
1017
1034
|
console.log(` ${CY} content-grade batch ./posts/${R} ${D}# analyze all files${R}`);
|
|
@@ -1169,6 +1186,8 @@ async function cmdBatch(dirPath) {
|
|
|
1169
1186
|
blank();
|
|
1170
1187
|
|
|
1171
1188
|
if (_jsonMode) process.stdout.write(JSON.stringify(results, null, 2) + '\n');
|
|
1189
|
+
|
|
1190
|
+
if (!isProUser() && results.length) showUsageFooter(getUsage().count);
|
|
1172
1191
|
}
|
|
1173
1192
|
|
|
1174
1193
|
// ── Start command ─────────────────────────────────────────────────────────────
|
package/dist/landing.html
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@type": "Offer",
|
|
37
37
|
"price": "0",
|
|
38
38
|
"priceCurrency": "USD",
|
|
39
|
-
"description": "Free: 3 analyses/day. Pro: $9/mo,
|
|
39
|
+
"description": "Free: 3 analyses/day. Pro: $9/mo, unlimited/day. Business: $29/mo, 100/day. Team: $79/mo, 500/day."
|
|
40
40
|
},
|
|
41
41
|
"featureList": [
|
|
42
42
|
"Headline analyzer with framework-based scoring",
|
|
@@ -1231,10 +1231,10 @@
|
|
|
1231
1231
|
<div class="plan-badge">Most popular</div>
|
|
1232
1232
|
<div class="plan-name">PRO</div>
|
|
1233
1233
|
<div class="plan-price">$9<span>/mo</span></div>
|
|
1234
|
-
<div class="plan-period">
|
|
1234
|
+
<div class="plan-period">Unlimited analyses/day · billed monthly</div>
|
|
1235
1235
|
<a href="https://buy.stripe.com/4gM14p87GeCh9vn9ks8k80a" class="plan-cta" target="_blank" rel="noopener">Get Pro →</a>
|
|
1236
1236
|
<ul class="plan-features">
|
|
1237
|
-
<li><span class="check">✓</span> <strong>
|
|
1237
|
+
<li><span class="check">✓</span> <strong>Unlimited analyses/day</strong> — no daily cap</li>
|
|
1238
1238
|
<li><span class="check">✓</span> All 6 tools (CLI + dashboard)</li>
|
|
1239
1239
|
<li><span class="check">✓</span> License key for CLI activation</li>
|
|
1240
1240
|
<li><span class="check">✓</span> Batch mode — analyze whole directories</li>
|
package/package.json
CHANGED