@nometria-ai/nom 0.2.3 → 0.2.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/package.json +1 -1
- package/src/commands/deploy.js +7 -3
package/package.json
CHANGED
package/src/commands/deploy.js
CHANGED
|
@@ -111,16 +111,20 @@ export async function deploy(flags) {
|
|
|
111
111
|
const deployStatus = statusResult.data?.deploymentStatus;
|
|
112
112
|
const instanceState = statusResult.data?.instanceState;
|
|
113
113
|
const topStatus = statusResult.status;
|
|
114
|
+
// Display status: prefer deploymentStatus (accurate), fall back to instanceState
|
|
114
115
|
const st = deployStatus || instanceState || topStatus || 'unknown';
|
|
115
116
|
deploySpinner.update(`${isResync ? 'Resyncing' : 'Deploying'} — ${st}`);
|
|
116
117
|
|
|
117
|
-
//
|
|
118
|
-
|
|
118
|
+
// Only trust deploymentStatus for completion — instanceState='running' just means
|
|
119
|
+
// EC2 booted, and topStatus='deployed' just means the record exists in DB.
|
|
120
|
+
// The sync script calls report_status("running") only after everything finishes.
|
|
121
|
+
const isDone = deployStatus === 'completed' || deployStatus === 'running';
|
|
122
|
+
if (isDone) {
|
|
119
123
|
finalStatus = statusResult;
|
|
120
124
|
deploySpinner.succeed(isResync ? 'Resynced successfully' : 'Deployed successfully');
|
|
121
125
|
break;
|
|
122
126
|
}
|
|
123
|
-
if (st === 'failed') {
|
|
127
|
+
if (deployStatus === 'failed' || st === 'failed') {
|
|
124
128
|
deploySpinner.fail(`${isResync ? 'Resync' : 'Deploy'} failed: ${statusResult.data?.errorMessage || 'unknown error'}`);
|
|
125
129
|
process.exit(1);
|
|
126
130
|
}
|