@xano/cli 0.0.95-beta.23 → 0.0.95-beta.25
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/README.md +78 -53
- package/dist/commands/release/pull/index.d.ts +1 -3
- package/dist/commands/release/pull/index.js +18 -15
- package/dist/commands/release/push/index.d.ts +1 -3
- package/dist/commands/release/push/index.js +18 -19
- package/dist/commands/sandbox/pull/index.d.ts +1 -3
- package/dist/commands/sandbox/pull/index.js +15 -12
- package/dist/commands/sandbox/push/index.d.ts +11 -6
- package/dist/commands/sandbox/push/index.js +149 -136
- package/dist/commands/tenant/pull/index.d.ts +1 -3
- package/dist/commands/tenant/pull/index.js +19 -18
- package/dist/commands/workspace/git/pull/index.d.ts +1 -3
- package/dist/commands/workspace/git/pull/index.js +18 -17
- package/dist/commands/workspace/pull/index.d.ts +1 -3
- package/dist/commands/workspace/pull/index.js +20 -21
- package/dist/commands/workspace/push/index.d.ts +6 -18
- package/dist/commands/workspace/push/index.js +85 -747
- package/dist/utils/multidoc-push.d.ts +63 -0
- package/dist/utils/multidoc-push.js +674 -0
- package/dist/utils/reference-checker.js +2 -2
- package/oclif.manifest.json +2121 -2015
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import { type BadIndex, type BadReference } from './reference-checker.js';
|
|
3
|
+
export interface PushFlags {
|
|
4
|
+
delete: boolean;
|
|
5
|
+
'dry-run': boolean;
|
|
6
|
+
env: boolean;
|
|
7
|
+
exclude?: string[];
|
|
8
|
+
force: boolean;
|
|
9
|
+
guids: boolean;
|
|
10
|
+
include?: string[];
|
|
11
|
+
records: boolean;
|
|
12
|
+
sync: boolean;
|
|
13
|
+
transaction: boolean;
|
|
14
|
+
truncate: boolean;
|
|
15
|
+
verbose: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface PushTarget {
|
|
18
|
+
/** Build the dry-run URL. Return null if dry-run is not supported for this target. */
|
|
19
|
+
buildDryRunUrl: (queryParams: URLSearchParams) => null | string;
|
|
20
|
+
/** Build the actual push URL */
|
|
21
|
+
buildPushUrl: (queryParams: URLSearchParams) => string;
|
|
22
|
+
/** CLI version string */
|
|
23
|
+
cliVersion: string;
|
|
24
|
+
/** Instance origin URL (e.g., "https://x123-abcd-1234.xano.io") */
|
|
25
|
+
instanceOrigin: string;
|
|
26
|
+
/** Human-readable label for log messages (e.g., "sandbox environment", "workspace 40") */
|
|
27
|
+
label: string;
|
|
28
|
+
/** Does this target support branches? */
|
|
29
|
+
supportsBranches: boolean;
|
|
30
|
+
/** Does this target support the partial query param? */
|
|
31
|
+
supportsPartial: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PushContext {
|
|
34
|
+
accessToken: string;
|
|
35
|
+
branch: string;
|
|
36
|
+
command: Command;
|
|
37
|
+
inputDir: string;
|
|
38
|
+
verboseFetch: (url: string, options: RequestInit, verbose: boolean, authToken?: string) => Promise<Response>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Recursively collect all .xs files from a directory, sorted for deterministic ordering.
|
|
42
|
+
*/
|
|
43
|
+
export declare function collectFiles(dir: string): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Apply include/exclude glob filters to a file list. Logs filter results.
|
|
46
|
+
* Returns the filtered file list.
|
|
47
|
+
*/
|
|
48
|
+
export declare function applyFilters(files: string[], inputDir: string, include: string[] | undefined, exclude: string[] | undefined, log: (msg: string) => void): string[];
|
|
49
|
+
/**
|
|
50
|
+
* Read .xs files into document entries, skipping empty files.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readDocuments(files: string[]): Array<{
|
|
53
|
+
content: string;
|
|
54
|
+
filePath: string;
|
|
55
|
+
}>;
|
|
56
|
+
export declare function renderBadReferences(badRefs: BadReference[], log: (msg: string) => void): void;
|
|
57
|
+
export declare function renderBadIndexes(badIndexes: BadIndex[], log: (msg: string) => void): void;
|
|
58
|
+
export declare function confirm(message: string): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Execute a multidoc push with preview, validation, partial mode, and GUID sync.
|
|
61
|
+
* Shared by both sandbox:push and workspace:push commands.
|
|
62
|
+
*/
|
|
63
|
+
export declare function executePush(ctx: PushContext, target: PushTarget, flags: PushFlags): Promise<void>;
|