@xano/cli 0.0.95-beta.25 → 0.0.95-beta.27
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/sandbox/push/index.js +1 -1
- package/dist/utils/multidoc-push.js +18 -2
- package/oclif.manifest.json +2856 -2856
- package/package.json +1 -1
|
@@ -131,7 +131,7 @@ Push and open sandbox review in the browser
|
|
|
131
131
|
instanceOrigin: profile.instance_origin,
|
|
132
132
|
label: 'sandbox environment',
|
|
133
133
|
supportsBranches: false,
|
|
134
|
-
supportsPartial:
|
|
134
|
+
supportsPartial: true,
|
|
135
135
|
};
|
|
136
136
|
const pushFlags = {
|
|
137
137
|
delete: flags.delete,
|
|
@@ -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 {
|
|
@@ -483,6 +483,9 @@ export async function executePush(ctx, target, flags) {
|
|
|
483
483
|
const parsed = parseDocument(entry.content);
|
|
484
484
|
if (!parsed)
|
|
485
485
|
return true;
|
|
486
|
+
// Workspace settings always use a fixed key in dry-run regardless of the actual name
|
|
487
|
+
if (parsed.type === 'workspace' && changedKeys.has('workspace:workspace'))
|
|
488
|
+
return true;
|
|
486
489
|
const opName = parsed.verb ? `${parsed.name} ${parsed.verb}` : parsed.name;
|
|
487
490
|
if (changedKeys.has(`${parsed.type}:${opName}`))
|
|
488
491
|
return true;
|
|
@@ -585,9 +588,22 @@ export async function executePush(ctx, target, flags) {
|
|
|
585
588
|
log(`Pushed ${pushedCount} documents to ${target.label} from ${relative(process.cwd(), inputDir) || inputDir} in ${elapsed}s`);
|
|
586
589
|
}
|
|
587
590
|
// ── Error Handlers ──────────────────────────────────────────────────────────
|
|
588
|
-
async function handleDryRunError(response, command, flags) {
|
|
591
|
+
async function handleDryRunError(response, command, flags, target) {
|
|
589
592
|
const log = command.log.bind(command);
|
|
590
593
|
if (response.status === 404) {
|
|
594
|
+
const errorText = await response.text();
|
|
595
|
+
try {
|
|
596
|
+
const errorJson = JSON.parse(errorText);
|
|
597
|
+
if (errorJson.message) {
|
|
598
|
+
command.error(errorJson.message);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
catch {
|
|
602
|
+
// Not JSON
|
|
603
|
+
}
|
|
604
|
+
if (target.supportsBranches) {
|
|
605
|
+
command.error('Workspace not found. Check the workspace ID and try again.');
|
|
606
|
+
}
|
|
591
607
|
log('');
|
|
592
608
|
log(ux.colorize('dim', 'Push preview not yet available on this instance.'));
|
|
593
609
|
log('');
|