@nometria-ai/nom 0.2.3 → 0.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nometria-ai/nom",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Deploy any project to any cloud from your terminal. One command, zero config.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -111,16 +111,19 @@ 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
- // "completed"/"running" from deploymentStatus/instanceState, or "deployed" from top-level
118
- if (st === 'completed' || st === 'running' || topStatus === 'deployed' || instanceState === 'running') {
118
+ // Only trust deploymentStatus for completion instanceState='running' just means
119
+ // EC2 booted, not that the deploy script finished.
120
+ const isDone = deployStatus === 'completed' || deployStatus === 'running' || topStatus === 'deployed';
121
+ if (isDone) {
119
122
  finalStatus = statusResult;
120
123
  deploySpinner.succeed(isResync ? 'Resynced successfully' : 'Deployed successfully');
121
124
  break;
122
125
  }
123
- if (st === 'failed') {
126
+ if (deployStatus === 'failed' || st === 'failed') {
124
127
  deploySpinner.fail(`${isResync ? 'Resync' : 'Deploy'} failed: ${statusResult.data?.errorMessage || 'unknown error'}`);
125
128
  process.exit(1);
126
129
  }