@xano/cli 0.0.82-beta.6 → 0.0.84
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/workspace/push/index.js +22 -0
- package/oclif.manifest.json +1713 -1713
- package/package.json +1 -1
|
@@ -250,6 +250,28 @@ Truncate all table records before importing
|
|
|
250
250
|
// Check if the server returned a valid dry-run response
|
|
251
251
|
if (preview && preview.summary) {
|
|
252
252
|
this.renderPreview(preview, shouldDelete, workspaceId, flags.verbose);
|
|
253
|
+
// Check for critical errors that must block the push
|
|
254
|
+
const criticalOps = preview.operations.filter((op) => op.details?.includes('exception:') || op.details?.includes('mvp:placeholder'));
|
|
255
|
+
if (criticalOps.length > 0) {
|
|
256
|
+
this.log('');
|
|
257
|
+
this.log(ux.colorize('red', ux.colorize('bold', '=== CRITICAL ERRORS ===')));
|
|
258
|
+
this.log('');
|
|
259
|
+
this.log(ux.colorize('red', 'The following items contain syntax errors or unresolved placeholder statements'));
|
|
260
|
+
this.log(ux.colorize('red', 'that would corrupt data if pushed. These must be resolved first:'));
|
|
261
|
+
this.log('');
|
|
262
|
+
for (const op of criticalOps) {
|
|
263
|
+
this.log(` ${ux.colorize('red', 'BLOCKED'.padEnd(16))} ${op.type.padEnd(18)} ${op.name}`);
|
|
264
|
+
if (op.details) {
|
|
265
|
+
this.log(` ${' '.repeat(16)} ${' '.repeat(18)} ${ux.colorize('dim', op.details)}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
this.log('');
|
|
269
|
+
this.log(ux.colorize('red', `Push blocked: ${criticalOps.length} critical error(s) found.`));
|
|
270
|
+
if (!flags.force) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
this.log(ux.colorize('yellow', 'Proceeding anyway due to --force flag.'));
|
|
274
|
+
}
|
|
253
275
|
// Check if there are any actual changes (exclude deletes when --delete is off)
|
|
254
276
|
const hasChanges = Object.values(preview.summary).some((c) => c.created > 0 || c.updated > 0 || (shouldDelete && c.deleted > 0) || c.truncated > 0);
|
|
255
277
|
// Detect if local files contain records that would be imported
|