@nometria-ai/nom 0.2.9 → 0.2.10

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.9",
3
+ "version": "0.2.10",
4
4
  "description": "Deploy any project to any cloud from your terminal. One command, zero config.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -134,8 +134,10 @@ export async function deploy(flags) {
134
134
  apiKey,
135
135
  body: { app_id: deployId },
136
136
  });
137
- const deployStatus = statusResult.data?.deploymentStatus;
138
- const instanceState = statusResult.data?.instanceState;
137
+ // statusResult is already unwrapped by apiRequest (raw.data),
138
+ // so fields are at top level, not nested under .data
139
+ const deployStatus = statusResult.deploymentStatus || statusResult.data?.deploymentStatus;
140
+ const instanceState = statusResult.instanceState || statusResult.data?.instanceState;
139
141
  const topStatus = statusResult.status;
140
142
  // Display status: prefer deploymentStatus (accurate), fall back to instanceState
141
143
  const st = deployStatus || instanceState || topStatus || 'unknown';
@@ -151,7 +153,7 @@ export async function deploy(flags) {
151
153
  break;
152
154
  }
153
155
  if (deployStatus === 'failed' || st === 'failed') {
154
- deploySpinner.fail(`${isResync ? 'Resync' : 'Deploy'} failed: ${statusResult.data?.errorMessage || 'unknown error'}`);
156
+ deploySpinner.fail(`${isResync ? 'Resync' : 'Deploy'} failed: ${statusResult.errorMessage || statusResult.data?.errorMessage || 'unknown error'}`);
155
157
  process.exit(1);
156
158
  }
157
159
 
@@ -175,7 +177,7 @@ export async function deploy(flags) {
175
177
  }
176
178
 
177
179
  // Step 7: Print result
178
- const url = finalStatus.data?.deployUrl || finalStatus.url || `https://${deployId}.ownmy.app`;
180
+ const url = finalStatus.deployUrl || finalStatus.data?.deployUrl || finalStatus.url || `https://${deployId}.ownmy.app`;
179
181
  console.log(`
180
182
  Live at: ${url}
181
183
  Dashboard: https://nometria.com/AppDetails?app_id=${deployId}