@xano/cli 0.0.95-beta.25 → 0.0.95-beta.26
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/utils/multidoc-push.js +15 -2
- package/oclif.manifest.json +2011 -2011
- package/package.json +1 -1
|
@@ -346,7 +346,7 @@ export async function executePush(ctx, target, flags) {
|
|
|
346
346
|
method: 'POST',
|
|
347
347
|
}, flags.verbose, accessToken);
|
|
348
348
|
if (!dryRunResponse.ok) {
|
|
349
|
-
await handleDryRunError(dryRunResponse, command, flags);
|
|
349
|
+
await handleDryRunError(dryRunResponse, command, flags, target);
|
|
350
350
|
// If we get here, the user confirmed to proceed without preview
|
|
351
351
|
}
|
|
352
352
|
else {
|
|
@@ -585,9 +585,22 @@ export async function executePush(ctx, target, flags) {
|
|
|
585
585
|
log(`Pushed ${pushedCount} documents to ${target.label} from ${relative(process.cwd(), inputDir) || inputDir} in ${elapsed}s`);
|
|
586
586
|
}
|
|
587
587
|
// ── Error Handlers ──────────────────────────────────────────────────────────
|
|
588
|
-
async function handleDryRunError(response, command, flags) {
|
|
588
|
+
async function handleDryRunError(response, command, flags, target) {
|
|
589
589
|
const log = command.log.bind(command);
|
|
590
590
|
if (response.status === 404) {
|
|
591
|
+
const errorText = await response.text();
|
|
592
|
+
try {
|
|
593
|
+
const errorJson = JSON.parse(errorText);
|
|
594
|
+
if (errorJson.message) {
|
|
595
|
+
command.error(errorJson.message);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
catch {
|
|
599
|
+
// Not JSON
|
|
600
|
+
}
|
|
601
|
+
if (target.supportsBranches) {
|
|
602
|
+
command.error('Workspace not found. Check the workspace ID and try again.');
|
|
603
|
+
}
|
|
591
604
|
log('');
|
|
592
605
|
log(ux.colorize('dim', 'Push preview not yet available on this instance.'));
|
|
593
606
|
log('');
|