@zenifra/cli 0.6.0 → 0.6.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/bin/zenifra.mjs +3 -3
- package/package.json +1 -1
package/bin/zenifra.mjs
CHANGED
|
@@ -3321,7 +3321,7 @@ function formatBrlFromCents(value) {
|
|
|
3321
3321
|
return formatBrl(Number.isFinite(number) ? number / 100 : 0);
|
|
3322
3322
|
}
|
|
3323
3323
|
|
|
3324
|
-
function formatJobBrlFromCents(value) {
|
|
3324
|
+
function formatJobBrlFromCents(value, maximumFractionDigits = 4) {
|
|
3325
3325
|
if (value === undefined || value === null || value === '') return '-';
|
|
3326
3326
|
const number = Number(value);
|
|
3327
3327
|
if (!Number.isFinite(number)) return '-';
|
|
@@ -3329,7 +3329,7 @@ function formatJobBrlFromCents(value) {
|
|
|
3329
3329
|
style: 'currency',
|
|
3330
3330
|
currency: 'BRL',
|
|
3331
3331
|
minimumFractionDigits: 2,
|
|
3332
|
-
maximumFractionDigits
|
|
3332
|
+
maximumFractionDigits,
|
|
3333
3333
|
}).format(number / 100);
|
|
3334
3334
|
}
|
|
3335
3335
|
|
|
@@ -3508,7 +3508,7 @@ function printJobCatalog(plans) {
|
|
|
3508
3508
|
process.stdout.write('Jobs agendados' + String.fromCharCode(10));
|
|
3509
3509
|
printTable(asArray(plans), [
|
|
3510
3510
|
{ label: 'Plano', value: (plan) => plan.plan || plan.id || '-' },
|
|
3511
|
-
{ label: 'Por minuto', value: (plan) => formatJobBrlFromCents(plan.price_per_minute) },
|
|
3511
|
+
{ label: 'Por minuto', value: (plan) => formatJobBrlFromCents(plan.price_per_minute, 6) },
|
|
3512
3512
|
{ label: 'Features', value: (plan) => asArray(plan.features).join(', ') || '-' },
|
|
3513
3513
|
]);
|
|
3514
3514
|
}
|