@xano/cli 0.0.24 → 0.0.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/base-command.d.ts +1 -3
- package/dist/base-command.js +5 -12
- package/dist/commands/function/create/index.d.ts +6 -7
- package/dist/commands/function/create/index.js +55 -55
- package/dist/commands/function/edit/index.d.ts +10 -11
- package/dist/commands/function/edit/index.js +162 -155
- package/dist/commands/function/get/index.d.ts +5 -6
- package/dist/commands/function/get/index.js +60 -55
- package/dist/commands/function/list/index.d.ts +5 -6
- package/dist/commands/function/list/index.js +52 -52
- package/dist/commands/profile/create/index.d.ts +6 -6
- package/dist/commands/profile/create/index.js +37 -37
- package/dist/commands/profile/delete/index.d.ts +2 -2
- package/dist/commands/profile/delete/index.js +9 -9
- package/dist/commands/profile/edit/index.d.ts +7 -8
- package/dist/commands/profile/edit/index.js +48 -48
- package/dist/commands/profile/get-default/index.js +1 -1
- package/dist/commands/profile/list/index.d.ts +2 -2
- package/dist/commands/profile/list/index.js +9 -9
- package/dist/commands/profile/me/index.d.ts +3 -4
- package/dist/commands/profile/me/index.js +21 -21
- package/dist/commands/profile/project/index.js +1 -1
- package/dist/commands/profile/set-default/index.js +1 -1
- package/dist/commands/profile/token/index.js +1 -1
- package/dist/commands/profile/wizard/index.d.ts +4 -5
- package/dist/commands/profile/wizard/index.js +108 -142
- package/dist/commands/run/env/delete/index.d.ts +2 -3
- package/dist/commands/run/env/delete/index.js +10 -10
- package/dist/commands/run/env/get/index.d.ts +2 -3
- package/dist/commands/run/env/get/index.js +11 -11
- package/dist/commands/run/env/list/index.d.ts +2 -3
- package/dist/commands/run/env/list/index.js +19 -17
- package/dist/commands/run/env/set/index.d.ts +2 -3
- package/dist/commands/run/env/set/index.js +5 -5
- package/dist/commands/run/exec/index.d.ts +8 -19
- package/dist/commands/run/exec/index.js +108 -186
- package/dist/commands/run/info/index.d.ts +4 -5
- package/dist/commands/run/info/index.js +27 -27
- package/dist/commands/run/projects/create/index.d.ts +3 -4
- package/dist/commands/run/projects/create/index.js +23 -23
- package/dist/commands/run/projects/delete/index.d.ts +2 -3
- package/dist/commands/run/projects/delete/index.js +10 -10
- package/dist/commands/run/projects/list/index.d.ts +2 -3
- package/dist/commands/run/projects/list/index.js +12 -12
- package/dist/commands/run/projects/update/index.d.ts +3 -4
- package/dist/commands/run/projects/update/index.js +21 -21
- package/dist/commands/run/secrets/delete/index.d.ts +2 -3
- package/dist/commands/run/secrets/delete/index.js +10 -10
- package/dist/commands/run/secrets/get/index.d.ts +2 -3
- package/dist/commands/run/secrets/get/index.js +11 -11
- package/dist/commands/run/secrets/list/index.d.ts +2 -3
- package/dist/commands/run/secrets/list/index.js +24 -22
- package/dist/commands/run/secrets/set/index.d.ts +3 -4
- package/dist/commands/run/secrets/set/index.js +16 -16
- package/dist/commands/run/sessions/delete/index.d.ts +2 -3
- package/dist/commands/run/sessions/delete/index.js +10 -10
- package/dist/commands/run/sessions/get/index.d.ts +2 -3
- package/dist/commands/run/sessions/get/index.js +11 -11
- package/dist/commands/run/sessions/list/index.d.ts +2 -3
- package/dist/commands/run/sessions/list/index.js +11 -11
- package/dist/commands/run/sessions/start/index.d.ts +2 -3
- package/dist/commands/run/sessions/start/index.js +11 -11
- package/dist/commands/run/sessions/stop/index.d.ts +2 -3
- package/dist/commands/run/sessions/stop/index.js +11 -11
- package/dist/commands/run/sink/get/index.d.ts +2 -3
- package/dist/commands/run/sink/get/index.js +11 -11
- package/dist/commands/static_host/build/create/index.d.ts +4 -5
- package/dist/commands/static_host/build/create/index.js +33 -33
- package/dist/commands/static_host/build/get/index.d.ts +4 -5
- package/dist/commands/static_host/build/get/index.js +20 -20
- package/dist/commands/static_host/build/list/index.d.ts +3 -4
- package/dist/commands/static_host/build/list/index.js +31 -31
- package/dist/commands/static_host/list/index.d.ts +3 -4
- package/dist/commands/static_host/list/index.js +31 -31
- package/dist/commands/workspace/list/index.d.ts +2 -3
- package/dist/commands/workspace/list/index.js +15 -15
- package/dist/commands/workspace/pull/index.d.ts +4 -5
- package/dist/commands/workspace/pull/index.js +52 -47
- package/dist/commands/workspace/push/index.d.ts +0 -1
- package/dist/commands/workspace/push/index.js +4 -4
- package/dist/help.d.ts +1 -1
- package/dist/lib/base-run-command.d.ts +6 -6
- package/dist/lib/base-run-command.js +6 -8
- package/dist/lib/run-http-client.d.ts +18 -24
- package/dist/lib/run-http-client.js +61 -96
- package/dist/lib/run-types.d.ts +80 -80
- package/oclif.manifest.json +888 -2031
- package/package.json +5 -2
- package/dist/commands/branch/create/index.d.ts +0 -17
- package/dist/commands/branch/create/index.js +0 -164
- package/dist/commands/branch/delete/index.d.ts +0 -18
- package/dist/commands/branch/delete/index.js +0 -156
- package/dist/commands/branch/edit/index.d.ts +0 -19
- package/dist/commands/branch/edit/index.js +0 -166
- package/dist/commands/branch/get/index.d.ts +0 -16
- package/dist/commands/branch/get/index.js +0 -135
- package/dist/commands/branch/list/index.d.ts +0 -18
- package/dist/commands/branch/list/index.js +0 -138
- package/dist/commands/branch/set-live/index.d.ts +0 -18
- package/dist/commands/branch/set-live/index.js +0 -155
- package/dist/commands/workspace/create/index.d.ts +0 -14
- package/dist/commands/workspace/create/index.js +0 -131
- package/dist/commands/workspace/delete/index.d.ts +0 -20
- package/dist/commands/workspace/delete/index.js +0 -141
- package/dist/commands/workspace/edit/index.d.ts +0 -22
- package/dist/commands/workspace/edit/index.js +0 -176
- package/dist/commands/workspace/get/index.d.ts +0 -18
- package/dist/commands/workspace/get/index.js +0 -136
|
@@ -7,6 +7,15 @@ export default class RunSessionsDelete extends BaseRunCommand {
|
|
|
7
7
|
required: true,
|
|
8
8
|
}),
|
|
9
9
|
};
|
|
10
|
+
static flags = {
|
|
11
|
+
...BaseRunCommand.baseFlags,
|
|
12
|
+
force: Flags.boolean({
|
|
13
|
+
char: 'f',
|
|
14
|
+
description: 'Skip confirmation prompt',
|
|
15
|
+
required: false,
|
|
16
|
+
default: false,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
10
19
|
static description = 'Delete a session';
|
|
11
20
|
static examples = [
|
|
12
21
|
`$ xano run sessions delete abc123-def456
|
|
@@ -17,19 +26,10 @@ Session deleted successfully!
|
|
|
17
26
|
Session deleted successfully!
|
|
18
27
|
`,
|
|
19
28
|
];
|
|
20
|
-
static flags = {
|
|
21
|
-
...BaseRunCommand.baseFlags,
|
|
22
|
-
force: Flags.boolean({
|
|
23
|
-
char: 'f',
|
|
24
|
-
default: false,
|
|
25
|
-
description: 'Skip confirmation prompt',
|
|
26
|
-
required: false,
|
|
27
|
-
}),
|
|
28
|
-
};
|
|
29
29
|
async run() {
|
|
30
30
|
const { args, flags } = await this.parse(RunSessionsDelete);
|
|
31
31
|
// Initialize with project required
|
|
32
|
-
await this.initRunCommandWithProject(flags.profile
|
|
32
|
+
await this.initRunCommandWithProject(flags.profile);
|
|
33
33
|
// Confirm deletion unless --force is used
|
|
34
34
|
if (!flags.force) {
|
|
35
35
|
const readline = await import('node:readline');
|
|
@@ -3,12 +3,11 @@ export default class RunSessionsGet extends BaseRunCommand {
|
|
|
3
3
|
static args: {
|
|
4
4
|
sessionId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
6
|
static flags: {
|
|
9
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
9
|
};
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
13
12
|
run(): Promise<void>;
|
|
14
13
|
}
|
|
@@ -7,6 +7,16 @@ export default class RunSessionsGet extends BaseRunCommand {
|
|
|
7
7
|
required: true,
|
|
8
8
|
}),
|
|
9
9
|
};
|
|
10
|
+
static flags = {
|
|
11
|
+
...BaseRunCommand.baseFlags,
|
|
12
|
+
output: Flags.string({
|
|
13
|
+
char: 'o',
|
|
14
|
+
description: 'Output format',
|
|
15
|
+
required: false,
|
|
16
|
+
default: 'summary',
|
|
17
|
+
options: ['summary', 'json'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
10
20
|
static description = 'Get session details';
|
|
11
21
|
static examples = [
|
|
12
22
|
`$ xano run sessions get abc123-def456
|
|
@@ -22,20 +32,10 @@ Session Details:
|
|
|
22
32
|
{ "id": "abc123-def456", "name": "My Session", "status": "running", ... }
|
|
23
33
|
`,
|
|
24
34
|
];
|
|
25
|
-
static flags = {
|
|
26
|
-
...BaseRunCommand.baseFlags,
|
|
27
|
-
output: Flags.string({
|
|
28
|
-
char: 'o',
|
|
29
|
-
default: 'summary',
|
|
30
|
-
description: 'Output format',
|
|
31
|
-
options: ['summary', 'json'],
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
};
|
|
35
35
|
async run() {
|
|
36
36
|
const { args, flags } = await this.parse(RunSessionsGet);
|
|
37
37
|
// Initialize (no project required for session details)
|
|
38
|
-
await this.initRunCommand(flags.profile
|
|
38
|
+
await this.initRunCommand(flags.profile);
|
|
39
39
|
try {
|
|
40
40
|
const url = this.httpClient.buildSessionUrl(args.sessionId);
|
|
41
41
|
const session = await this.httpClient.get(url);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import BaseRunCommand from '../../../../lib/base-run-command.js';
|
|
2
2
|
export default class RunSessionsList extends BaseRunCommand {
|
|
3
3
|
static args: {};
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
4
|
static flags: {
|
|
7
5
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
6
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
7
|
};
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
11
10
|
run(): Promise<void>;
|
|
12
11
|
private outputTable;
|
|
13
12
|
}
|
|
@@ -2,6 +2,16 @@ import { Flags } from '@oclif/core';
|
|
|
2
2
|
import BaseRunCommand from '../../../../lib/base-run-command.js';
|
|
3
3
|
export default class RunSessionsList extends BaseRunCommand {
|
|
4
4
|
static args = {};
|
|
5
|
+
static flags = {
|
|
6
|
+
...BaseRunCommand.baseFlags,
|
|
7
|
+
output: Flags.string({
|
|
8
|
+
char: 'o',
|
|
9
|
+
description: 'Output format',
|
|
10
|
+
required: false,
|
|
11
|
+
default: 'table',
|
|
12
|
+
options: ['table', 'json'],
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
5
15
|
static description = 'List all sessions for the project';
|
|
6
16
|
static examples = [
|
|
7
17
|
`$ xano run sessions list
|
|
@@ -13,20 +23,10 @@ xyz789-uvw456-rst123 stopped 2024-01-14T09:00:00Z
|
|
|
13
23
|
{ "items": [{ "id": "abc123-def456-ghi789", "state": "running", ... }] }
|
|
14
24
|
`,
|
|
15
25
|
];
|
|
16
|
-
static flags = {
|
|
17
|
-
...BaseRunCommand.baseFlags,
|
|
18
|
-
output: Flags.string({
|
|
19
|
-
char: 'o',
|
|
20
|
-
default: 'table',
|
|
21
|
-
description: 'Output format',
|
|
22
|
-
options: ['table', 'json'],
|
|
23
|
-
required: false,
|
|
24
|
-
}),
|
|
25
|
-
};
|
|
26
26
|
async run() {
|
|
27
27
|
const { flags } = await this.parse(RunSessionsList);
|
|
28
28
|
// Initialize with project required
|
|
29
|
-
await this.initRunCommandWithProject(flags.profile
|
|
29
|
+
await this.initRunCommandWithProject(flags.profile);
|
|
30
30
|
try {
|
|
31
31
|
const url = this.httpClient.buildProjectUrl('/run/session');
|
|
32
32
|
const result = await this.httpClient.get(url);
|
|
@@ -3,12 +3,11 @@ export default class RunSessionsStart extends BaseRunCommand {
|
|
|
3
3
|
static args: {
|
|
4
4
|
sessionId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
6
|
static flags: {
|
|
9
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
9
|
};
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
13
12
|
run(): Promise<void>;
|
|
14
13
|
}
|
|
@@ -7,6 +7,16 @@ export default class RunSessionsStart extends BaseRunCommand {
|
|
|
7
7
|
required: true,
|
|
8
8
|
}),
|
|
9
9
|
};
|
|
10
|
+
static flags = {
|
|
11
|
+
...BaseRunCommand.baseFlags,
|
|
12
|
+
output: Flags.string({
|
|
13
|
+
char: 'o',
|
|
14
|
+
description: 'Output format',
|
|
15
|
+
required: false,
|
|
16
|
+
default: 'summary',
|
|
17
|
+
options: ['summary', 'json'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
10
20
|
static description = 'Start a session';
|
|
11
21
|
static examples = [
|
|
12
22
|
`$ xano run sessions start abc123-def456
|
|
@@ -18,20 +28,10 @@ Session started successfully!
|
|
|
18
28
|
{ "id": "abc123-def456", "state": "running", ... }
|
|
19
29
|
`,
|
|
20
30
|
];
|
|
21
|
-
static flags = {
|
|
22
|
-
...BaseRunCommand.baseFlags,
|
|
23
|
-
output: Flags.string({
|
|
24
|
-
char: 'o',
|
|
25
|
-
default: 'summary',
|
|
26
|
-
description: 'Output format',
|
|
27
|
-
options: ['summary', 'json'],
|
|
28
|
-
required: false,
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
31
|
async run() {
|
|
32
32
|
const { args, flags } = await this.parse(RunSessionsStart);
|
|
33
33
|
// Initialize with project required
|
|
34
|
-
await this.initRunCommandWithProject(flags.profile
|
|
34
|
+
await this.initRunCommandWithProject(flags.profile);
|
|
35
35
|
try {
|
|
36
36
|
const url = this.httpClient.buildProjectUrl(`/run/session/${args.sessionId}/start`);
|
|
37
37
|
const session = await this.httpClient.post(url, {});
|
|
@@ -3,12 +3,11 @@ export default class RunSessionsStop extends BaseRunCommand {
|
|
|
3
3
|
static args: {
|
|
4
4
|
sessionId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
6
|
static flags: {
|
|
9
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
9
|
};
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
13
12
|
run(): Promise<void>;
|
|
14
13
|
}
|
|
@@ -7,6 +7,16 @@ export default class RunSessionsStop extends BaseRunCommand {
|
|
|
7
7
|
required: true,
|
|
8
8
|
}),
|
|
9
9
|
};
|
|
10
|
+
static flags = {
|
|
11
|
+
...BaseRunCommand.baseFlags,
|
|
12
|
+
output: Flags.string({
|
|
13
|
+
char: 'o',
|
|
14
|
+
description: 'Output format',
|
|
15
|
+
required: false,
|
|
16
|
+
default: 'summary',
|
|
17
|
+
options: ['summary', 'json'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
10
20
|
static description = 'Stop a session';
|
|
11
21
|
static examples = [
|
|
12
22
|
`$ xano run sessions stop abc123-def456
|
|
@@ -18,20 +28,10 @@ Session stopped successfully!
|
|
|
18
28
|
{ "id": "abc123-def456", "state": "stopped", ... }
|
|
19
29
|
`,
|
|
20
30
|
];
|
|
21
|
-
static flags = {
|
|
22
|
-
...BaseRunCommand.baseFlags,
|
|
23
|
-
output: Flags.string({
|
|
24
|
-
char: 'o',
|
|
25
|
-
default: 'summary',
|
|
26
|
-
description: 'Output format',
|
|
27
|
-
options: ['summary', 'json'],
|
|
28
|
-
required: false,
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
31
|
async run() {
|
|
32
32
|
const { args, flags } = await this.parse(RunSessionsStop);
|
|
33
33
|
// Initialize with project required
|
|
34
|
-
await this.initRunCommandWithProject(flags.profile
|
|
34
|
+
await this.initRunCommandWithProject(flags.profile);
|
|
35
35
|
try {
|
|
36
36
|
const url = this.httpClient.buildProjectUrl(`/run/session/${args.sessionId}/stop`);
|
|
37
37
|
const session = await this.httpClient.post(url, {});
|
|
@@ -3,12 +3,11 @@ export default class RunSinkGet extends BaseRunCommand {
|
|
|
3
3
|
static args: {
|
|
4
4
|
sessionId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
6
|
static flags: {
|
|
9
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
9
|
};
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
13
12
|
run(): Promise<void>;
|
|
14
13
|
}
|
|
@@ -7,6 +7,16 @@ export default class RunSinkGet extends BaseRunCommand {
|
|
|
7
7
|
required: true,
|
|
8
8
|
}),
|
|
9
9
|
};
|
|
10
|
+
static flags = {
|
|
11
|
+
...BaseRunCommand.baseFlags,
|
|
12
|
+
output: Flags.string({
|
|
13
|
+
char: 'o',
|
|
14
|
+
description: 'Output format',
|
|
15
|
+
required: false,
|
|
16
|
+
default: 'summary',
|
|
17
|
+
options: ['summary', 'json'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
10
20
|
static description = 'Get sink data for a completed session';
|
|
11
21
|
static examples = [
|
|
12
22
|
`$ xano run sink get abc123-def456
|
|
@@ -21,20 +31,10 @@ Sink Data:
|
|
|
21
31
|
{ "tables": [...], "logs": [...] }
|
|
22
32
|
`,
|
|
23
33
|
];
|
|
24
|
-
static flags = {
|
|
25
|
-
...BaseRunCommand.baseFlags,
|
|
26
|
-
output: Flags.string({
|
|
27
|
-
char: 'o',
|
|
28
|
-
default: 'summary',
|
|
29
|
-
description: 'Output format',
|
|
30
|
-
options: ['summary', 'json'],
|
|
31
|
-
required: false,
|
|
32
|
-
}),
|
|
33
|
-
};
|
|
34
34
|
async run() {
|
|
35
35
|
const { args, flags } = await this.parse(RunSinkGet);
|
|
36
36
|
// Initialize (no project required for sink data)
|
|
37
|
-
await this.initRunCommand(flags.profile
|
|
37
|
+
await this.initRunCommand(flags.profile);
|
|
38
38
|
try {
|
|
39
39
|
const url = this.httpClient.buildSessionUrl(args.sessionId, '/sink');
|
|
40
40
|
const sinkData = await this.httpClient.get(url);
|
|
@@ -3,17 +3,16 @@ export default class StaticHostBuildCreate extends BaseCommand {
|
|
|
3
3
|
static args: {
|
|
4
4
|
static_host: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
6
|
static flags: {
|
|
9
|
-
|
|
7
|
+
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
8
|
file: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
9
|
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
13
|
};
|
|
14
|
+
static description: string;
|
|
15
|
+
static examples: string[];
|
|
17
16
|
run(): Promise<void>;
|
|
18
17
|
private loadCredentials;
|
|
19
18
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import * as yaml from 'js-yaml';
|
|
3
2
|
import * as fs from 'node:fs';
|
|
4
3
|
import * as os from 'node:os';
|
|
5
4
|
import * as path from 'node:path';
|
|
5
|
+
import * as yaml from 'js-yaml';
|
|
6
6
|
import BaseCommand from '../../../../base-command.js';
|
|
7
7
|
export default class StaticHostBuildCreate extends BaseCommand {
|
|
8
8
|
static args = {
|
|
@@ -11,6 +11,36 @@ export default class StaticHostBuildCreate extends BaseCommand {
|
|
|
11
11
|
required: true,
|
|
12
12
|
}),
|
|
13
13
|
};
|
|
14
|
+
static flags = {
|
|
15
|
+
...BaseCommand.baseFlags,
|
|
16
|
+
workspace: Flags.string({
|
|
17
|
+
char: 'w',
|
|
18
|
+
description: 'Workspace ID (optional if set in profile)',
|
|
19
|
+
required: false,
|
|
20
|
+
}),
|
|
21
|
+
file: Flags.string({
|
|
22
|
+
char: 'f',
|
|
23
|
+
description: 'Path to zip file to upload',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
name: Flags.string({
|
|
27
|
+
char: 'n',
|
|
28
|
+
description: 'Build name',
|
|
29
|
+
required: true,
|
|
30
|
+
}),
|
|
31
|
+
description: Flags.string({
|
|
32
|
+
char: 'd',
|
|
33
|
+
description: 'Build description',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
output: Flags.string({
|
|
37
|
+
char: 'o',
|
|
38
|
+
description: 'Output format',
|
|
39
|
+
required: false,
|
|
40
|
+
default: 'summary',
|
|
41
|
+
options: ['summary', 'json'],
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
14
44
|
static description = 'Create a new build for a static host';
|
|
15
45
|
static examples = [
|
|
16
46
|
`$ xano static_host:build:create default -f ./build.zip -n "v1.0.0"
|
|
@@ -33,36 +63,6 @@ Description: Production build
|
|
|
33
63
|
}
|
|
34
64
|
`,
|
|
35
65
|
];
|
|
36
|
-
static flags = {
|
|
37
|
-
...BaseCommand.baseFlags,
|
|
38
|
-
description: Flags.string({
|
|
39
|
-
char: 'd',
|
|
40
|
-
description: 'Build description',
|
|
41
|
-
required: false,
|
|
42
|
-
}),
|
|
43
|
-
file: Flags.string({
|
|
44
|
-
char: 'f',
|
|
45
|
-
description: 'Path to zip file to upload',
|
|
46
|
-
required: true,
|
|
47
|
-
}),
|
|
48
|
-
name: Flags.string({
|
|
49
|
-
char: 'n',
|
|
50
|
-
description: 'Build name',
|
|
51
|
-
required: true,
|
|
52
|
-
}),
|
|
53
|
-
output: Flags.string({
|
|
54
|
-
char: 'o',
|
|
55
|
-
default: 'summary',
|
|
56
|
-
description: 'Output format',
|
|
57
|
-
options: ['summary', 'json'],
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
workspace: Flags.string({
|
|
61
|
-
char: 'w',
|
|
62
|
-
description: 'Workspace ID (optional if set in profile)',
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
};
|
|
66
66
|
async run() {
|
|
67
67
|
const { args, flags } = await this.parse(StaticHostBuildCreate);
|
|
68
68
|
// Get profile name (default or from flag/env)
|
|
@@ -128,12 +128,12 @@ Description: Production build
|
|
|
128
128
|
// Create build via API
|
|
129
129
|
try {
|
|
130
130
|
const response = await fetch(apiUrl, {
|
|
131
|
-
|
|
131
|
+
method: 'POST',
|
|
132
132
|
headers: {
|
|
133
133
|
'accept': 'application/json',
|
|
134
134
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
135
135
|
},
|
|
136
|
-
|
|
136
|
+
body: formData,
|
|
137
137
|
});
|
|
138
138
|
if (!response.ok) {
|
|
139
139
|
const errorText = await response.text();
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import BaseCommand from '../../../../base-command.js';
|
|
2
2
|
export default class StaticHostBuildGet extends BaseCommand {
|
|
3
3
|
static args: {
|
|
4
|
-
build_id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
4
|
static_host: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
build_id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
6
|
};
|
|
7
|
-
static description: string;
|
|
8
|
-
static examples: string[];
|
|
9
7
|
static flags: {
|
|
10
|
-
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
8
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
11
|
};
|
|
12
|
+
static description: string;
|
|
13
|
+
static examples: string[];
|
|
15
14
|
run(): Promise<void>;
|
|
16
15
|
private loadCredentials;
|
|
17
16
|
}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import * as yaml from 'js-yaml';
|
|
3
2
|
import * as fs from 'node:fs';
|
|
4
3
|
import * as os from 'node:os';
|
|
5
4
|
import * as path from 'node:path';
|
|
5
|
+
import * as yaml from 'js-yaml';
|
|
6
6
|
import BaseCommand from '../../../../base-command.js';
|
|
7
7
|
export default class StaticHostBuildGet extends BaseCommand {
|
|
8
8
|
static args = {
|
|
9
|
+
static_host: Args.string({
|
|
10
|
+
description: 'Static Host name',
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
9
13
|
build_id: Args.string({
|
|
10
14
|
description: 'Build ID',
|
|
11
15
|
required: true,
|
|
12
16
|
}),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
};
|
|
18
|
+
static flags = {
|
|
19
|
+
...BaseCommand.baseFlags,
|
|
20
|
+
workspace: Flags.string({
|
|
21
|
+
char: 'w',
|
|
22
|
+
description: 'Workspace ID (optional if set in profile)',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
output: Flags.string({
|
|
26
|
+
char: 'o',
|
|
27
|
+
description: 'Output format',
|
|
28
|
+
required: false,
|
|
29
|
+
default: 'summary',
|
|
30
|
+
options: ['summary', 'json'],
|
|
16
31
|
}),
|
|
17
32
|
};
|
|
18
33
|
static description = 'Get details of a specific build for a static host';
|
|
@@ -42,21 +57,6 @@ Name: production-build
|
|
|
42
57
|
}
|
|
43
58
|
`,
|
|
44
59
|
];
|
|
45
|
-
static flags = {
|
|
46
|
-
...BaseCommand.baseFlags,
|
|
47
|
-
output: Flags.string({
|
|
48
|
-
char: 'o',
|
|
49
|
-
default: 'summary',
|
|
50
|
-
description: 'Output format',
|
|
51
|
-
options: ['summary', 'json'],
|
|
52
|
-
required: false,
|
|
53
|
-
}),
|
|
54
|
-
workspace: Flags.string({
|
|
55
|
-
char: 'w',
|
|
56
|
-
description: 'Workspace ID (optional if set in profile)',
|
|
57
|
-
required: false,
|
|
58
|
-
}),
|
|
59
|
-
};
|
|
60
60
|
async run() {
|
|
61
61
|
const { args, flags } = await this.parse(StaticHostBuildGet);
|
|
62
62
|
// Get profile name (default or from flag/env)
|
|
@@ -94,11 +94,11 @@ Name: production-build
|
|
|
94
94
|
// Fetch build from the API
|
|
95
95
|
try {
|
|
96
96
|
const response = await fetch(apiUrl, {
|
|
97
|
+
method: 'GET',
|
|
97
98
|
headers: {
|
|
98
99
|
'accept': 'application/json',
|
|
99
100
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
100
101
|
},
|
|
101
|
-
method: 'GET',
|
|
102
102
|
});
|
|
103
103
|
if (!response.ok) {
|
|
104
104
|
const errorText = await response.text();
|
|
@@ -3,16 +3,15 @@ export default class StaticHostBuildList extends BaseCommand {
|
|
|
3
3
|
static args: {
|
|
4
4
|
static_host: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
5
|
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
6
|
static flags: {
|
|
7
|
+
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
8
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
9
|
page: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
10
|
per_page: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
12
|
};
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: string[];
|
|
16
15
|
run(): Promise<void>;
|
|
17
16
|
private loadCredentials;
|
|
18
17
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import * as yaml from 'js-yaml';
|
|
3
2
|
import * as fs from 'node:fs';
|
|
4
3
|
import * as os from 'node:os';
|
|
5
4
|
import * as path from 'node:path';
|
|
5
|
+
import * as yaml from 'js-yaml';
|
|
6
6
|
import BaseCommand from '../../../../base-command.js';
|
|
7
7
|
export default class StaticHostBuildList extends BaseCommand {
|
|
8
8
|
static args = {
|
|
@@ -11,6 +11,31 @@ export default class StaticHostBuildList extends BaseCommand {
|
|
|
11
11
|
required: true,
|
|
12
12
|
}),
|
|
13
13
|
};
|
|
14
|
+
static flags = {
|
|
15
|
+
...BaseCommand.baseFlags,
|
|
16
|
+
workspace: Flags.string({
|
|
17
|
+
char: 'w',
|
|
18
|
+
description: 'Workspace ID (optional if set in profile)',
|
|
19
|
+
required: false,
|
|
20
|
+
}),
|
|
21
|
+
output: Flags.string({
|
|
22
|
+
char: 'o',
|
|
23
|
+
description: 'Output format',
|
|
24
|
+
required: false,
|
|
25
|
+
default: 'summary',
|
|
26
|
+
options: ['summary', 'json'],
|
|
27
|
+
}),
|
|
28
|
+
page: Flags.integer({
|
|
29
|
+
description: 'Page number for pagination',
|
|
30
|
+
required: false,
|
|
31
|
+
default: 1,
|
|
32
|
+
}),
|
|
33
|
+
per_page: Flags.integer({
|
|
34
|
+
description: 'Number of results per page',
|
|
35
|
+
required: false,
|
|
36
|
+
default: 50,
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
14
39
|
static description = 'List all builds for a static host';
|
|
15
40
|
static examples = [
|
|
16
41
|
`$ xano static_host:build:list default -w 40
|
|
@@ -41,31 +66,6 @@ Available builds:
|
|
|
41
66
|
]
|
|
42
67
|
`,
|
|
43
68
|
];
|
|
44
|
-
static flags = {
|
|
45
|
-
...BaseCommand.baseFlags,
|
|
46
|
-
output: Flags.string({
|
|
47
|
-
char: 'o',
|
|
48
|
-
default: 'summary',
|
|
49
|
-
description: 'Output format',
|
|
50
|
-
options: ['summary', 'json'],
|
|
51
|
-
required: false,
|
|
52
|
-
}),
|
|
53
|
-
page: Flags.integer({
|
|
54
|
-
default: 1,
|
|
55
|
-
description: 'Page number for pagination',
|
|
56
|
-
required: false,
|
|
57
|
-
}),
|
|
58
|
-
per_page: Flags.integer({
|
|
59
|
-
default: 50,
|
|
60
|
-
description: 'Number of results per page',
|
|
61
|
-
required: false,
|
|
62
|
-
}),
|
|
63
|
-
workspace: Flags.string({
|
|
64
|
-
char: 'w',
|
|
65
|
-
description: 'Workspace ID (optional if set in profile)',
|
|
66
|
-
required: false,
|
|
67
|
-
}),
|
|
68
|
-
};
|
|
69
69
|
async run() {
|
|
70
70
|
const { args, flags } = await this.parse(StaticHostBuildList);
|
|
71
71
|
// Get profile name (default or from flag/env)
|
|
@@ -111,11 +111,11 @@ Available builds:
|
|
|
111
111
|
// Fetch builds from the API
|
|
112
112
|
try {
|
|
113
113
|
const response = await fetch(apiUrl, {
|
|
114
|
+
method: 'GET',
|
|
114
115
|
headers: {
|
|
115
116
|
'accept': 'application/json',
|
|
116
117
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
117
118
|
},
|
|
118
|
-
method: 'GET',
|
|
119
119
|
});
|
|
120
120
|
if (!response.ok) {
|
|
121
121
|
const errorText = await response.text();
|
|
@@ -148,13 +148,13 @@ Available builds:
|
|
|
148
148
|
else {
|
|
149
149
|
this.log('Available builds:');
|
|
150
150
|
for (const build of builds) {
|
|
151
|
-
if (build.id
|
|
152
|
-
this.log(` - ${build.name}`);
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
151
|
+
if (build.id !== undefined) {
|
|
155
152
|
const statusInfo = build.status ? ` - Status: ${build.status}` : '';
|
|
156
153
|
this.log(` - ${build.name} (ID: ${build.id})${statusInfo}`);
|
|
157
154
|
}
|
|
155
|
+
else {
|
|
156
|
+
this.log(` - ${build.name}`);
|
|
157
|
+
}
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|