badgr-cli 1.1.4 → 1.1.5
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/README.md +12 -14
- package/package.json +2 -2
- package/src/api.js +28 -0
- package/src/badgr.js +1 -1
- package/src/commands/artifacts.js +5 -3
- package/src/commands/batch.js +6 -5
- package/src/commands/billing.js +3 -3
- package/src/commands/capacity.js +2 -2
- package/src/commands/deploy.js +2 -2
- package/src/commands/diagnose.js +276 -87
- package/src/commands/down.js +69 -14
- package/src/commands/embed.js +2 -2
- package/src/commands/heartbeat.js +3 -3
- package/src/commands/job.js +14 -3
- package/src/commands/login.js +4 -1
- package/src/commands/logs.js +35 -18
- package/src/commands/pull.js +4 -3
- package/src/commands/rerun.js +5 -3
- package/src/commands/restart.js +5 -3
- package/src/commands/run.js +5 -23
- package/src/commands/sbatch.js +2 -1
- package/src/commands/serve.js +82 -15
- package/src/commands/shell.js +2 -2
- package/src/commands/status.js +57 -13
- package/src/commands/test-run.js +2 -2
- package/src/commands/train.js +3 -3
- package/src/commands/transcribe.js +2 -2
- package/src/commands/up.js +2 -1
- package/src/config.js +19 -0
- package/src/deploymentLog.js +45 -0
- package/src/errors.js +7 -3
- package/src/fallback.js +51 -31
- package/src/onboarding.js +63 -4
- package/src/progress.js +5 -2
package/src/progress.js
CHANGED
|
@@ -33,11 +33,14 @@ export function clearBlock(lineCount) {
|
|
|
33
33
|
// `badgr serve` (deployment) and `badgr run` (job): elapsed time, a status
|
|
34
34
|
// word, an *estimated* spend (never presented as confirmed while billing is
|
|
35
35
|
// still live), and the exact commands to inspect logs or stop billing.
|
|
36
|
-
export function renderLiveBlock(chalk, { stageLine, elapsedSec, statusWord, spend, id }) {
|
|
36
|
+
export function renderLiveBlock(chalk, { stageLine, elapsedSec, statusWord, spend, id, maxCost }) {
|
|
37
|
+
const spendLine = maxCost
|
|
38
|
+
? ` Estimated spend: ~$${spend.toFixed(2)} / $${maxCost.toFixed(2)}`
|
|
39
|
+
: ` Estimated spend: ~$${spend.toFixed(2)}`;
|
|
37
40
|
return [
|
|
38
41
|
chalk.dim(`${stageLine} ${elapsedSec}s elapsed`),
|
|
39
42
|
chalk.dim(` Status: ${statusWord}`),
|
|
40
|
-
chalk.dim(
|
|
43
|
+
chalk.dim(spendLine),
|
|
41
44
|
chalk.dim(` Logs: badgr logs ${id}`),
|
|
42
45
|
chalk.dim(` Stop billing: badgr down ${id}`),
|
|
43
46
|
];
|