@andrian.yablonskyy/thub-agent 1.0.19 → 1.0.21
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/package.json +1 -1
- package/src/cli.js +5 -4
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
18
|
const { Command } = require('commander'),
|
|
19
|
-
{
|
|
20
|
-
|
|
19
|
+
{
|
|
20
|
+
ApiClient, EXIT_CODES, ACTIVE_JOB_STATES, exitCodeForJobState, PACKAGES, fetchLatestVersion, isNewer, isValidVersion, formatDateTime
|
|
21
|
+
} = require('@andrian.yablonskyy/thub-common'),
|
|
21
22
|
{ resolveConnection, resolveGroup, resolveUser, writeConfigFile, readConfigFile } = require('./config'),
|
|
22
23
|
{ parseDurationSec } = require('./duration'),
|
|
23
24
|
{ followJob } = require('./streaming'),
|
|
@@ -156,7 +157,7 @@ program
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
console.log(`Job ${job.id} — ${job.state}${job.resource ? ' on ' + job.resource.name : ''}`);
|
|
159
|
-
console.log(`Created: ${job.created_at}`);
|
|
160
|
+
console.log(`Created: ${formatDateTime(job.created_at)}`);
|
|
160
161
|
|
|
161
162
|
if (ACTIVE_JOB_STATES.has(job.state)){
|
|
162
163
|
const code = await followJob(c, jobId, { fromSeq: 0, waitMode: false });
|
|
@@ -230,7 +231,7 @@ program
|
|
|
230
231
|
['SOURCE', (j) => j.source],
|
|
231
232
|
['USER', (j) => j.spec.user || '-'],
|
|
232
233
|
['STATE', (j) => j.state],
|
|
233
|
-
['CREATED', (j) => j.created_at]
|
|
234
|
+
['CREATED', (j) => formatDateTime(j.created_at)]
|
|
234
235
|
]);
|
|
235
236
|
}
|
|
236
237
|
catch (err){
|