@xano/cli 0.0.71-beta.2 → 0.0.73-beta.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.
@@ -193,7 +193,19 @@ Truncate all table records before importing
193
193
  }, flags.verbose, profile.access_token);
194
194
  if (!dryRunResponse.ok) {
195
195
  if (dryRunResponse.status === 404) {
196
- // Dry-run endpoint not available on this instance
196
+ // Check if the workspace itself doesn't exist
197
+ const wsCheckUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}`;
198
+ const wsCheckResponse = await this.verboseFetch(wsCheckUrl, {
199
+ headers: {
200
+ accept: 'application/json',
201
+ Authorization: `Bearer ${profile.access_token}`,
202
+ },
203
+ method: 'GET',
204
+ }, flags.verbose, profile.access_token);
205
+ if (!wsCheckResponse.ok) {
206
+ this.error(`Workspace ${workspaceId} not found on this instance.`);
207
+ }
208
+ // Workspace exists — dry-run endpoint just not available
197
209
  this.log('');
198
210
  this.log(ux.colorize('dim', 'Push preview not yet available on this instance.'));
199
211
  this.log('');
@@ -267,6 +279,10 @@ Truncate all table records before importing
267
279
  this.log('\nPush cancelled.');
268
280
  return;
269
281
  }
282
+ // Re-throw oclif errors (e.g. from this.error()) so they exit properly
283
+ if (error instanceof Error && 'oclif' in error) {
284
+ throw error;
285
+ }
270
286
  // If dry-run fails unexpectedly, proceed without preview
271
287
  this.log('');
272
288
  this.log(ux.colorize('dim', 'Push preview not yet available on this instance.'));