@blockyfy/stg-cli 0.4.0 → 0.4.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/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2305,10 +2305,15 @@ async function isWithinLimits() {
|
|
|
2305
2305
|
const v = getCachedValidation();
|
|
2306
2306
|
if (!v) return { allowed: true };
|
|
2307
2307
|
if (v.mutationsRemaining !== -1 && v.mutationsRemaining <= 0) {
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2308
|
+
const fresh = await validateKey({ force: true }).catch(() => null);
|
|
2309
|
+
const check = fresh ?? v;
|
|
2310
|
+
if (check.mutationsRemaining !== -1 && check.mutationsRemaining <= 0) {
|
|
2311
|
+
return {
|
|
2312
|
+
allowed: false,
|
|
2313
|
+
reason: `Monthly mutation limit reached (${check.mutationsUsed}/${check.monthlyMutationLimit}). See ${PUBLISH_PACKAGE_URL}`
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
return { allowed: true };
|
|
2312
2317
|
}
|
|
2313
2318
|
return { allowed: true };
|
|
2314
2319
|
}
|