@solidactions/cli 1.0.0 → 1.1.0
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/commands/deploy.js +1 -1
- package/dist/commands/run-view.js +19 -7
- package/package.json +1 -1
package/dist/commands/deploy.js
CHANGED
|
@@ -312,7 +312,7 @@ async function deploy(projectName, sourcePath, options = {}) {
|
|
|
312
312
|
});
|
|
313
313
|
// Dockerfile always at archive root, referencing tenantcode/
|
|
314
314
|
const universalDockerfile = [
|
|
315
|
-
'FROM node:
|
|
315
|
+
'FROM node:24-alpine',
|
|
316
316
|
'WORKDIR /app',
|
|
317
317
|
'COPY tenantcode/package.json tenantcode/package-lock.json* ./',
|
|
318
318
|
'RUN npm install',
|
|
@@ -16,16 +16,18 @@ async function runView(runId, options) {
|
|
|
16
16
|
});
|
|
17
17
|
const runData = runResponse.data;
|
|
18
18
|
// Build timeline
|
|
19
|
+
// Duration = container start → container stop (not triggered → stop)
|
|
19
20
|
const triggeredAt = runData.triggered_at || runData.created_at;
|
|
20
21
|
const sessionStartedMs = runData.session_started_at_epoch_ms;
|
|
21
22
|
const sessionCompletedMs = runData.session_completed_at_epoch_ms;
|
|
22
|
-
const
|
|
23
|
-
|
|
23
|
+
const durationMs = (sessionStartedMs && sessionCompletedMs)
|
|
24
|
+
? sessionCompletedMs - sessionStartedMs
|
|
25
|
+
: null;
|
|
24
26
|
const timeline = {
|
|
25
27
|
triggered: triggeredAt || null,
|
|
26
28
|
started: sessionStartedMs ? new Date(sessionStartedMs).toISOString() : null,
|
|
27
29
|
completed: sessionCompletedMs ? new Date(sessionCompletedMs).toISOString() : null,
|
|
28
|
-
|
|
30
|
+
durationMs,
|
|
29
31
|
};
|
|
30
32
|
// --logs: fetch and display raw logs
|
|
31
33
|
if (options.logs) {
|
|
@@ -127,7 +129,7 @@ function displayFullView(runData, timeline, steps, logsData) {
|
|
|
127
129
|
console.log(` Status: ${statusColor(status)}${chalk_1.default.gray(exitStr)}`);
|
|
128
130
|
console.log(` Trigger: ${chalk_1.default.gray(runData.triggered_by || '-')}`);
|
|
129
131
|
// Timeline
|
|
130
|
-
displayTimeline(runData, timeline);
|
|
132
|
+
displayTimeline(runData, timeline, steps);
|
|
131
133
|
// Steps
|
|
132
134
|
if (steps.length > 0) {
|
|
133
135
|
console.log('');
|
|
@@ -170,17 +172,27 @@ function displayFullView(runData, timeline, steps, logsData) {
|
|
|
170
172
|
}
|
|
171
173
|
console.log('');
|
|
172
174
|
}
|
|
173
|
-
function displayTimeline(runData, timeline) {
|
|
175
|
+
function displayTimeline(runData, timeline, steps = []) {
|
|
174
176
|
const formatTs = (iso) => {
|
|
175
177
|
if (!iso)
|
|
176
178
|
return '-';
|
|
177
179
|
const d = new Date(iso);
|
|
178
180
|
return d.toLocaleString();
|
|
179
181
|
};
|
|
180
|
-
|
|
182
|
+
// Compute startup: triggered → first step start
|
|
183
|
+
let startupMs = null;
|
|
184
|
+
if (timeline.triggered && steps.length > 0 && steps[0].startedAt) {
|
|
185
|
+
const triggeredMs = new Date(timeline.triggered).getTime();
|
|
186
|
+
const firstStepMs = new Date(steps[0].startedAt).getTime();
|
|
187
|
+
startupMs = firstStepMs - triggeredMs;
|
|
188
|
+
}
|
|
189
|
+
console.log(` Created: ${chalk_1.default.gray(formatTs(timeline.triggered))}`);
|
|
181
190
|
console.log(` Started: ${chalk_1.default.gray(formatTs(timeline.started))}`);
|
|
182
191
|
console.log(` Completed: ${chalk_1.default.gray(formatTs(timeline.completed))}`);
|
|
183
|
-
|
|
192
|
+
if (startupMs !== null && startupMs > 0) {
|
|
193
|
+
console.log(` Startup: ${chalk_1.default.gray(formatDuration(startupMs))}`);
|
|
194
|
+
}
|
|
195
|
+
console.log(` Duration: ${chalk_1.default.gray(timeline.durationMs ? formatDuration(timeline.durationMs) : '-')}`);
|
|
184
196
|
}
|
|
185
197
|
function displayStepsTable(steps, indent = ' ') {
|
|
186
198
|
if (steps.length === 0) {
|