@xano/cli 0.0.26 → 0.0.28

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.
Files changed (110) hide show
  1. package/dist/base-command.d.ts +3 -1
  2. package/dist/base-command.js +12 -5
  3. package/dist/commands/auth/index.d.ts +21 -0
  4. package/dist/commands/auth/index.js +533 -0
  5. package/dist/commands/branch/create/index.d.ts +17 -0
  6. package/dist/commands/branch/create/index.js +164 -0
  7. package/dist/commands/branch/delete/index.d.ts +18 -0
  8. package/dist/commands/branch/delete/index.js +156 -0
  9. package/dist/commands/branch/edit/index.d.ts +19 -0
  10. package/dist/commands/branch/edit/index.js +166 -0
  11. package/dist/commands/branch/get/index.d.ts +16 -0
  12. package/dist/commands/branch/get/index.js +135 -0
  13. package/dist/commands/branch/list/index.d.ts +18 -0
  14. package/dist/commands/branch/list/index.js +138 -0
  15. package/dist/commands/branch/set-live/index.d.ts +18 -0
  16. package/dist/commands/branch/set-live/index.js +155 -0
  17. package/dist/commands/function/create/index.d.ts +7 -6
  18. package/dist/commands/function/create/index.js +55 -55
  19. package/dist/commands/function/edit/index.d.ts +11 -10
  20. package/dist/commands/function/edit/index.js +155 -162
  21. package/dist/commands/function/get/index.d.ts +6 -5
  22. package/dist/commands/function/get/index.js +55 -60
  23. package/dist/commands/function/list/index.d.ts +6 -5
  24. package/dist/commands/function/list/index.js +52 -52
  25. package/dist/commands/profile/create/index.d.ts +6 -6
  26. package/dist/commands/profile/create/index.js +37 -37
  27. package/dist/commands/profile/delete/index.d.ts +2 -2
  28. package/dist/commands/profile/delete/index.js +9 -9
  29. package/dist/commands/profile/edit/index.d.ts +8 -7
  30. package/dist/commands/profile/edit/index.js +48 -48
  31. package/dist/commands/profile/get-default/index.js +1 -1
  32. package/dist/commands/profile/list/index.d.ts +2 -2
  33. package/dist/commands/profile/list/index.js +9 -9
  34. package/dist/commands/profile/me/index.d.ts +4 -3
  35. package/dist/commands/profile/me/index.js +21 -21
  36. package/dist/commands/profile/project/index.js +1 -1
  37. package/dist/commands/profile/set-default/index.js +1 -1
  38. package/dist/commands/profile/token/index.js +1 -1
  39. package/dist/commands/profile/wizard/index.d.ts +5 -4
  40. package/dist/commands/profile/wizard/index.js +142 -108
  41. package/dist/commands/run/env/delete/index.d.ts +3 -2
  42. package/dist/commands/run/env/delete/index.js +10 -10
  43. package/dist/commands/run/env/get/index.d.ts +3 -2
  44. package/dist/commands/run/env/get/index.js +11 -11
  45. package/dist/commands/run/env/list/index.d.ts +3 -2
  46. package/dist/commands/run/env/list/index.js +17 -19
  47. package/dist/commands/run/env/set/index.d.ts +3 -2
  48. package/dist/commands/run/env/set/index.js +5 -5
  49. package/dist/commands/run/exec/index.d.ts +19 -8
  50. package/dist/commands/run/exec/index.js +186 -108
  51. package/dist/commands/run/info/index.d.ts +5 -4
  52. package/dist/commands/run/info/index.js +27 -27
  53. package/dist/commands/run/projects/create/index.d.ts +4 -3
  54. package/dist/commands/run/projects/create/index.js +23 -23
  55. package/dist/commands/run/projects/delete/index.d.ts +3 -2
  56. package/dist/commands/run/projects/delete/index.js +10 -10
  57. package/dist/commands/run/projects/list/index.d.ts +3 -2
  58. package/dist/commands/run/projects/list/index.js +12 -12
  59. package/dist/commands/run/projects/update/index.d.ts +4 -3
  60. package/dist/commands/run/projects/update/index.js +21 -21
  61. package/dist/commands/run/secrets/delete/index.d.ts +3 -2
  62. package/dist/commands/run/secrets/delete/index.js +10 -10
  63. package/dist/commands/run/secrets/get/index.d.ts +3 -2
  64. package/dist/commands/run/secrets/get/index.js +11 -11
  65. package/dist/commands/run/secrets/list/index.d.ts +3 -2
  66. package/dist/commands/run/secrets/list/index.js +22 -24
  67. package/dist/commands/run/secrets/set/index.d.ts +4 -3
  68. package/dist/commands/run/secrets/set/index.js +16 -16
  69. package/dist/commands/run/sessions/delete/index.d.ts +3 -2
  70. package/dist/commands/run/sessions/delete/index.js +10 -10
  71. package/dist/commands/run/sessions/get/index.d.ts +3 -2
  72. package/dist/commands/run/sessions/get/index.js +11 -11
  73. package/dist/commands/run/sessions/list/index.d.ts +3 -2
  74. package/dist/commands/run/sessions/list/index.js +11 -11
  75. package/dist/commands/run/sessions/start/index.d.ts +3 -2
  76. package/dist/commands/run/sessions/start/index.js +11 -11
  77. package/dist/commands/run/sessions/stop/index.d.ts +3 -2
  78. package/dist/commands/run/sessions/stop/index.js +11 -11
  79. package/dist/commands/run/sink/get/index.d.ts +3 -2
  80. package/dist/commands/run/sink/get/index.js +11 -11
  81. package/dist/commands/static_host/build/create/index.d.ts +5 -4
  82. package/dist/commands/static_host/build/create/index.js +33 -33
  83. package/dist/commands/static_host/build/get/index.d.ts +5 -4
  84. package/dist/commands/static_host/build/get/index.js +20 -20
  85. package/dist/commands/static_host/build/list/index.d.ts +4 -3
  86. package/dist/commands/static_host/build/list/index.js +31 -31
  87. package/dist/commands/static_host/list/index.d.ts +4 -3
  88. package/dist/commands/static_host/list/index.js +31 -31
  89. package/dist/commands/workspace/create/index.d.ts +14 -0
  90. package/dist/commands/workspace/create/index.js +131 -0
  91. package/dist/commands/workspace/delete/index.d.ts +20 -0
  92. package/dist/commands/workspace/delete/index.js +141 -0
  93. package/dist/commands/workspace/edit/index.d.ts +22 -0
  94. package/dist/commands/workspace/edit/index.js +176 -0
  95. package/dist/commands/workspace/get/index.d.ts +18 -0
  96. package/dist/commands/workspace/get/index.js +136 -0
  97. package/dist/commands/workspace/list/index.d.ts +3 -2
  98. package/dist/commands/workspace/list/index.js +15 -15
  99. package/dist/commands/workspace/pull/index.d.ts +6 -4
  100. package/dist/commands/workspace/pull/index.js +123 -63
  101. package/dist/commands/workspace/push/index.d.ts +2 -0
  102. package/dist/commands/workspace/push/index.js +16 -5
  103. package/dist/help.d.ts +1 -1
  104. package/dist/lib/base-run-command.d.ts +6 -6
  105. package/dist/lib/base-run-command.js +8 -6
  106. package/dist/lib/run-http-client.d.ts +24 -18
  107. package/dist/lib/run-http-client.js +96 -61
  108. package/dist/lib/run-types.d.ts +80 -80
  109. package/oclif.manifest.json +2041 -843
  110. package/package.json +1 -1
@@ -3,29 +3,6 @@ import * as fs from 'node:fs';
3
3
  import BaseRunCommand from '../../../lib/base-run-command.js';
4
4
  export default class RunInfo extends BaseRunCommand {
5
5
  static args = {};
6
- static flags = {
7
- ...BaseRunCommand.baseFlags,
8
- file: Flags.string({
9
- char: 'f',
10
- description: 'Path or URL to file containing XanoScript code',
11
- required: false,
12
- exclusive: ['stdin'],
13
- }),
14
- stdin: Flags.boolean({
15
- char: 's',
16
- description: 'Read XanoScript code from stdin',
17
- required: false,
18
- default: false,
19
- exclusive: ['file'],
20
- }),
21
- output: Flags.string({
22
- char: 'o',
23
- description: 'Output format',
24
- required: false,
25
- default: 'summary',
26
- options: ['summary', 'json'],
27
- }),
28
- };
29
6
  static description = 'Get information about a XanoScript document (type, inputs, env vars)';
30
7
  static examples = [
31
8
  `$ xano run info -f script.xs
@@ -48,10 +25,33 @@ Document Info:
48
25
  { "type": "job", "input": { "name": {...} }, "env": ["API_KEY"] }
49
26
  `,
50
27
  ];
28
+ static flags = {
29
+ ...BaseRunCommand.baseFlags,
30
+ file: Flags.string({
31
+ char: 'f',
32
+ description: 'Path or URL to file containing XanoScript code',
33
+ exclusive: ['stdin'],
34
+ required: false,
35
+ }),
36
+ output: Flags.string({
37
+ char: 'o',
38
+ default: 'summary',
39
+ description: 'Output format',
40
+ options: ['summary', 'json'],
41
+ required: false,
42
+ }),
43
+ stdin: Flags.boolean({
44
+ char: 's',
45
+ default: false,
46
+ description: 'Read XanoScript code from stdin',
47
+ exclusive: ['file'],
48
+ required: false,
49
+ }),
50
+ };
51
51
  async run() {
52
52
  const { flags } = await this.parse(RunInfo);
53
53
  // Initialize with project required
54
- await this.initRunCommandWithProject(flags.profile);
54
+ await this.initRunCommandWithProject(flags.profile, flags.verbose);
55
55
  // Read XanoScript content
56
56
  let xanoscript;
57
57
  if (flags.file) {
@@ -112,6 +112,9 @@ Document Info:
112
112
  }
113
113
  }
114
114
  }
115
+ isUrl(str) {
116
+ return str.startsWith('http://') || str.startsWith('https://');
117
+ }
115
118
  outputSummary(result) {
116
119
  this.log('Document Info:');
117
120
  this.log(` Type: ${result.type}`);
@@ -139,9 +142,6 @@ Document Info:
139
142
  this.log(' (none)');
140
143
  }
141
144
  }
142
- isUrl(str) {
143
- return str.startsWith('http://') || str.startsWith('https://');
144
- }
145
145
  async readStdin() {
146
146
  return new Promise((resolve, reject) => {
147
147
  const chunks = [];
@@ -1,13 +1,14 @@
1
1
  import BaseRunCommand from '../../../../lib/base-run-command.js';
2
2
  export default class RunProjectsCreate extends BaseRunCommand {
3
3
  static args: {};
4
+ static description: string;
5
+ static examples: string[];
4
6
  static flags: {
5
- name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
6
7
  description: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
9
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
12
  };
10
- static description: string;
11
- static examples: string[];
12
13
  run(): Promise<void>;
13
14
  }
@@ -2,27 +2,6 @@ import { Flags } from '@oclif/core';
2
2
  import BaseRunCommand from '../../../../lib/base-run-command.js';
3
3
  export default class RunProjectsCreate extends BaseRunCommand {
4
4
  static args = {};
5
- static flags = {
6
- ...BaseRunCommand.baseFlags,
7
- name: Flags.string({
8
- char: 'n',
9
- description: 'Project name',
10
- required: true,
11
- }),
12
- description: Flags.string({
13
- char: 'd',
14
- description: 'Project description',
15
- required: false,
16
- default: '',
17
- }),
18
- output: Flags.string({
19
- char: 'o',
20
- description: 'Output format',
21
- required: false,
22
- default: 'summary',
23
- options: ['summary', 'json'],
24
- }),
25
- };
26
5
  static description = 'Create a new project';
27
6
  static examples = [
28
7
  `$ xano run projects create -n "My Project"
@@ -39,13 +18,34 @@ Project created successfully!
39
18
  { "id": "abc123-def456-ghi789", "name": "My Project", ... }
40
19
  `,
41
20
  ];
21
+ static flags = {
22
+ ...BaseRunCommand.baseFlags,
23
+ description: Flags.string({
24
+ char: 'd',
25
+ default: '',
26
+ description: 'Project description',
27
+ required: false,
28
+ }),
29
+ name: Flags.string({
30
+ char: 'n',
31
+ description: 'Project name',
32
+ required: true,
33
+ }),
34
+ output: Flags.string({
35
+ char: 'o',
36
+ default: 'summary',
37
+ description: 'Output format',
38
+ options: ['summary', 'json'],
39
+ required: false,
40
+ }),
41
+ };
42
42
  async run() {
43
43
  const { flags } = await this.parse(RunProjectsCreate);
44
44
  // Initialize (no project required for creating projects)
45
- await this.initRunCommand(flags.profile);
45
+ await this.initRunCommand(flags.profile, flags.verbose);
46
46
  const input = {
47
- name: flags.name,
48
47
  description: flags.description || '',
48
+ name: flags.name,
49
49
  };
50
50
  try {
51
51
  const url = this.httpClient.buildUrl('/project');
@@ -3,11 +3,12 @@ export default class RunProjectsDelete extends BaseRunCommand {
3
3
  static args: {
4
4
  projectId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
5
  };
6
+ static description: string;
7
+ static examples: string[];
6
8
  static flags: {
7
9
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
12
  };
10
- static description: string;
11
- static examples: string[];
12
13
  run(): Promise<void>;
13
14
  }
@@ -7,15 +7,6 @@ export default class RunProjectsDelete 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
- };
19
10
  static description = 'Delete a project';
20
11
  static examples = [
21
12
  `$ xano run projects delete abc123-def456
@@ -26,10 +17,19 @@ Project deleted successfully!
26
17
  Project deleted successfully!
27
18
  `,
28
19
  ];
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(RunProjectsDelete);
31
31
  // Initialize (no project required)
32
- await this.initRunCommand(flags.profile);
32
+ await this.initRunCommand(flags.profile, flags.verbose);
33
33
  // Confirm deletion unless --force is used
34
34
  if (!flags.force) {
35
35
  const readline = await import('node:readline');
@@ -1,12 +1,13 @@
1
1
  import BaseRunCommand from '../../../../lib/base-run-command.js';
2
2
  export default class RunProjectsList extends BaseRunCommand {
3
3
  static args: {};
4
+ static description: string;
5
+ static examples: string[];
4
6
  static flags: {
5
7
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
6
8
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
10
  };
8
- static description: string;
9
- static examples: string[];
10
11
  run(): Promise<void>;
11
12
  private outputTable;
12
13
  }
@@ -2,16 +2,6 @@ import { Flags } from '@oclif/core';
2
2
  import BaseRunCommand from '../../../../lib/base-run-command.js';
3
3
  export default class RunProjectsList 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
- };
15
5
  static description = 'List all projects';
16
6
  static examples = [
17
7
  `$ xano run projects list
@@ -25,10 +15,20 @@ xyz789-uvw456-rst123 Test Project public
25
15
  ]
26
16
  `,
27
17
  ];
18
+ static flags = {
19
+ ...BaseRunCommand.baseFlags,
20
+ output: Flags.string({
21
+ char: 'o',
22
+ default: 'table',
23
+ description: 'Output format',
24
+ options: ['table', 'json'],
25
+ required: false,
26
+ }),
27
+ };
28
28
  async run() {
29
29
  const { flags } = await this.parse(RunProjectsList);
30
30
  // Initialize (no project required for listing projects)
31
- await this.initRunCommand(flags.profile);
31
+ await this.initRunCommand(flags.profile, flags.verbose);
32
32
  try {
33
33
  const url = this.httpClient.buildUrl('/project');
34
34
  const projects = await this.httpClient.get(url);
@@ -59,7 +59,7 @@ xyz789-uvw456-rst123 Test Project public
59
59
  for (const project of projects) {
60
60
  const id = project.id.padEnd(36);
61
61
  const name = project.name.slice(0, 24).padEnd(25);
62
- const access = project.access;
62
+ const { access } = project;
63
63
  this.log(`${id} ${name} ${access}`);
64
64
  }
65
65
  }
@@ -3,13 +3,14 @@ export default class RunProjectsUpdate extends BaseRunCommand {
3
3
  static args: {
4
4
  projectId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
5
  };
6
+ static description: string;
7
+ static examples: string[];
6
8
  static flags: {
7
- name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
9
  description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
11
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
12
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
14
  };
12
- static description: string;
13
- static examples: string[];
14
15
  run(): Promise<void>;
15
16
  }
@@ -7,26 +7,6 @@ export default class RunProjectsUpdate extends BaseRunCommand {
7
7
  required: true,
8
8
  }),
9
9
  };
10
- static flags = {
11
- ...BaseRunCommand.baseFlags,
12
- name: Flags.string({
13
- char: 'n',
14
- description: 'New project name',
15
- required: false,
16
- }),
17
- description: Flags.string({
18
- char: 'd',
19
- description: 'New project description',
20
- required: false,
21
- }),
22
- output: Flags.string({
23
- char: 'o',
24
- description: 'Output format',
25
- required: false,
26
- default: 'summary',
27
- options: ['summary', 'json'],
28
- }),
29
- };
30
10
  static description = 'Update a project';
31
11
  static examples = [
32
12
  `$ xano run projects update abc123-def456 -n "New Name"
@@ -43,10 +23,30 @@ Project updated successfully!
43
23
  { "id": "abc123-def456", "name": "New Name", ... }
44
24
  `,
45
25
  ];
26
+ static flags = {
27
+ ...BaseRunCommand.baseFlags,
28
+ description: Flags.string({
29
+ char: 'd',
30
+ description: 'New project description',
31
+ required: false,
32
+ }),
33
+ name: Flags.string({
34
+ char: 'n',
35
+ description: 'New project name',
36
+ required: false,
37
+ }),
38
+ output: Flags.string({
39
+ char: 'o',
40
+ default: 'summary',
41
+ description: 'Output format',
42
+ options: ['summary', 'json'],
43
+ required: false,
44
+ }),
45
+ };
46
46
  async run() {
47
47
  const { args, flags } = await this.parse(RunProjectsUpdate);
48
48
  // Initialize (no project required)
49
- await this.initRunCommand(flags.profile);
49
+ await this.initRunCommand(flags.profile, flags.verbose);
50
50
  // Check if any update flags were provided
51
51
  if (!flags.name && flags.description === undefined) {
52
52
  this.error('At least one of --name or --description must be provided');
@@ -3,11 +3,12 @@ export default class RunSecretsDelete extends BaseRunCommand {
3
3
  static args: {
4
4
  name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
5
  };
6
+ static description: string;
7
+ static examples: string[];
6
8
  static flags: {
7
9
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
12
  };
10
- static description: string;
11
- static examples: string[];
12
13
  run(): Promise<void>;
13
14
  }
@@ -7,15 +7,6 @@ export default class RunSecretsDelete 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
- };
19
10
  static description = 'Delete a secret';
20
11
  static examples = [
21
12
  `$ xano run secrets delete docker-registry
@@ -26,10 +17,19 @@ Secret 'docker-registry' deleted successfully!
26
17
  Secret 'docker-registry' deleted successfully!
27
18
  `,
28
19
  ];
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(RunSecretsDelete);
31
31
  // Initialize with project required
32
- await this.initRunCommandWithProject(flags.profile);
32
+ await this.initRunCommandWithProject(flags.profile, flags.verbose);
33
33
  // Confirm deletion unless --force is used
34
34
  if (!flags.force) {
35
35
  const readline = await import('node:readline');
@@ -3,11 +3,12 @@ export default class RunSecretsGet extends BaseRunCommand {
3
3
  static args: {
4
4
  name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
5
  };
6
+ static description: string;
7
+ static examples: string[];
6
8
  static flags: {
7
9
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
12
  };
10
- static description: string;
11
- static examples: string[];
12
13
  run(): Promise<void>;
13
14
  }
@@ -7,16 +7,6 @@ export default class RunSecretsGet 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: 'value',
17
- options: ['value', 'json'],
18
- }),
19
- };
20
10
  static description = 'Get a secret value';
21
11
  static examples = [
22
12
  `$ xano run secrets get docker-registry
@@ -26,10 +16,20 @@ export default class RunSecretsGet extends BaseRunCommand {
26
16
  { "name": "docker-registry", "type": "kubernetes.io/dockerconfigjson", "value": "..." }
27
17
  `,
28
18
  ];
19
+ static flags = {
20
+ ...BaseRunCommand.baseFlags,
21
+ output: Flags.string({
22
+ char: 'o',
23
+ default: 'value',
24
+ description: 'Output format',
25
+ options: ['value', 'json'],
26
+ required: false,
27
+ }),
28
+ };
29
29
  async run() {
30
30
  const { args, flags } = await this.parse(RunSecretsGet);
31
31
  // Initialize with project required
32
- await this.initRunCommandWithProject(flags.profile);
32
+ await this.initRunCommandWithProject(flags.profile, flags.verbose);
33
33
  try {
34
34
  const url = this.httpClient.buildProjectUrl('/secret', { name: args.name });
35
35
  const result = await this.httpClient.get(url);
@@ -1,11 +1,12 @@
1
1
  import BaseRunCommand from '../../../../lib/base-run-command.js';
2
2
  export default class RunSecretsList extends BaseRunCommand {
3
3
  static args: {};
4
+ static description: string;
5
+ static examples: string[];
4
6
  static flags: {
5
7
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
6
8
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
10
  };
8
- static description: string;
9
- static examples: string[];
10
11
  run(): Promise<void>;
11
12
  }
@@ -2,16 +2,6 @@ import { Flags } from '@oclif/core';
2
2
  import BaseRunCommand from '../../../../lib/base-run-command.js';
3
3
  export default class RunSecretsList 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
- };
15
5
  static description = 'List all secret keys';
16
6
  static examples = [
17
7
  `$ xano run secrets list
@@ -23,30 +13,38 @@ service-account kubernetes.io/service-account-token -
23
13
  { "secrets": [{ "name": "docker-registry", "type": "kubernetes.io/dockerconfigjson", "repo": "ghcr.io" }] }
24
14
  `,
25
15
  ];
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(RunSecretsList);
28
28
  // Initialize with project required
29
- await this.initRunCommandWithProject(flags.profile);
29
+ await this.initRunCommandWithProject(flags.profile, flags.verbose);
30
30
  try {
31
31
  const url = this.httpClient.buildProjectUrl('/secret/key');
32
32
  const result = await this.httpClient.get(url);
33
33
  if (flags.output === 'json') {
34
34
  this.outputJson(result);
35
35
  }
36
+ else if (result.secrets.length === 0) {
37
+ this.log('No secrets found.');
38
+ }
36
39
  else {
37
- if (result.secrets.length === 0) {
38
- this.log('No secrets found.');
39
- }
40
- else {
41
- // Print header
42
- this.log('NAME TYPE REPO');
43
- this.log('-'.repeat(80));
44
- for (const secret of result.secrets) {
45
- const name = secret.name.slice(0, 24).padEnd(24);
46
- const type = secret.type.padEnd(37);
47
- const repo = secret.repo || '-';
48
- this.log(`${name} ${type} ${repo}`);
49
- }
40
+ // Print header
41
+ this.log('NAME TYPE REPO');
42
+ this.log('-'.repeat(80));
43
+ for (const secret of result.secrets) {
44
+ const name = secret.name.slice(0, 24).padEnd(24);
45
+ const type = secret.type.padEnd(37);
46
+ const repo = secret.repo || '-';
47
+ this.log(`${name} ${type} ${repo}`);
50
48
  }
51
49
  }
52
50
  }
@@ -3,13 +3,14 @@ export default class RunSecretsSet extends BaseRunCommand {
3
3
  static args: {
4
4
  name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
5
  };
6
+ static description: string;
7
+ static examples: string[];
6
8
  static flags: {
9
+ repo: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
10
  type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
11
  value: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
- repo: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
12
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
14
  };
12
- static description: string;
13
- static examples: string[];
14
15
  run(): Promise<void>;
15
16
  }
@@ -7,38 +7,38 @@ export default class RunSecretsSet extends BaseRunCommand {
7
7
  required: true,
8
8
  }),
9
9
  };
10
+ static description = 'Set a secret';
11
+ static examples = [
12
+ `$ xano run secrets set docker-registry -t dockerconfigjson -v '{"auths":{"ghcr.io":{"auth":"..."}}}' -r ghcr.io
13
+ Secret 'docker-registry' set successfully!
14
+ `,
15
+ `$ xano run secrets set service-key -t service-account-token -v 'token-value-here'
16
+ Secret 'service-key' set successfully!
17
+ `,
18
+ ];
10
19
  static flags = {
11
20
  ...BaseRunCommand.baseFlags,
21
+ repo: Flags.string({
22
+ char: 'r',
23
+ description: 'Repository (for dockerconfigjson type)',
24
+ required: false,
25
+ }),
12
26
  type: Flags.string({
13
27
  char: 't',
14
28
  description: 'Secret type',
15
- required: true,
16
29
  options: ['dockerconfigjson', 'service-account-token'],
30
+ required: true,
17
31
  }),
18
32
  value: Flags.string({
19
33
  char: 'v',
20
34
  description: 'Secret value',
21
35
  required: true,
22
36
  }),
23
- repo: Flags.string({
24
- char: 'r',
25
- description: 'Repository (for dockerconfigjson type)',
26
- required: false,
27
- }),
28
37
  };
29
- static description = 'Set a secret';
30
- static examples = [
31
- `$ xano run secrets set docker-registry -t dockerconfigjson -v '{"auths":{"ghcr.io":{"auth":"..."}}}' -r ghcr.io
32
- Secret 'docker-registry' set successfully!
33
- `,
34
- `$ xano run secrets set service-key -t service-account-token -v 'token-value-here'
35
- Secret 'service-key' set successfully!
36
- `,
37
- ];
38
38
  async run() {
39
39
  const { args, flags } = await this.parse(RunSecretsSet);
40
40
  // Initialize with project required
41
- await this.initRunCommandWithProject(flags.profile);
41
+ await this.initRunCommandWithProject(flags.profile, flags.verbose);
42
42
  // Map short type to full type
43
43
  const typeMap = {
44
44
  'dockerconfigjson': 'kubernetes.io/dockerconfigjson',
@@ -3,11 +3,12 @@ export default class RunSessionsDelete 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[];
6
8
  static flags: {
7
9
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
12
  };
10
- static description: string;
11
- static examples: string[];
12
13
  run(): Promise<void>;
13
14
  }