@stage5/lumine 0.3.50 → 0.3.51
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/lib/admin.js +4 -1
- package/lib/rewards.js +4 -1
- package/package.json +1 -1
package/lib/admin.js
CHANGED
|
@@ -6135,7 +6135,7 @@ export function formatRewardRuleLine(rule) {
|
|
|
6135
6135
|
return parts.join(" · ");
|
|
6136
6136
|
}
|
|
6137
6137
|
|
|
6138
|
-
function printRewardReviewResult({ operation, data }) {
|
|
6138
|
+
export function printRewardReviewResult({ operation, data }) {
|
|
6139
6139
|
if (operation.name === "reward-review.list") {
|
|
6140
6140
|
const reviews = Array.isArray(data.reviews) ? data.reviews : [];
|
|
6141
6141
|
console.log(
|
|
@@ -6195,6 +6195,9 @@ function printRewardReviewResult({ operation, data }) {
|
|
|
6195
6195
|
console.log("WARNING: the app's own reward check (rewards.verify.js) failed its self-test:");
|
|
6196
6196
|
for (const finding of review.appCheckFindings) console.log(` - ${finding}`);
|
|
6197
6197
|
}
|
|
6198
|
+
// rules only a timer checks: the same warning the creator saw before sending
|
|
6199
|
+
for (const warning of Array.isArray(review.timerOnlyWarnings) ? review.timerOnlyWarnings : [])
|
|
6200
|
+
console.log(`WARNING: ${warning}`);
|
|
6198
6201
|
if (review.isLatest === false)
|
|
6199
6202
|
console.log(
|
|
6200
6203
|
"WARNING: a newer request exists for this app; decide on the latest one.",
|
package/lib/rewards.js
CHANGED
|
@@ -68,7 +68,7 @@ async function checkDeclaration({
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
function printDeclaration(result, { prefix = "" } = {}) {
|
|
71
|
+
export function printDeclaration(result, { prefix = "" } = {}) {
|
|
72
72
|
const rules = Array.isArray(result?.rules) ? result.rules : [];
|
|
73
73
|
if (result?.ok) {
|
|
74
74
|
console.log(
|
|
@@ -87,6 +87,9 @@ function printDeclaration(result, { prefix = "" } = {}) {
|
|
|
87
87
|
`${prefix} ${rule.id}: ${rule.title} · ${rule.xp} XP + ${rule.coins} Coins · ${what}`,
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
|
+
// rules only a timer checks (the server's warning; never blocks)
|
|
91
|
+
for (const warning of result.warnings || [])
|
|
92
|
+
console.log(`${prefix}WARNING: ${warning}`);
|
|
90
93
|
if (result.nextStep) console.log(`${prefix}${result.nextStep}`);
|
|
91
94
|
return;
|
|
92
95
|
}
|