@xano/cli 0.0.37 → 0.0.39

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 (114) hide show
  1. package/README.md +325 -102
  2. package/dist/commands/auth/index.d.ts +0 -2
  3. package/dist/commands/auth/index.js +2 -55
  4. package/dist/commands/profile/create/index.d.ts +0 -2
  5. package/dist/commands/profile/create/index.js +0 -15
  6. package/dist/commands/profile/edit/index.d.ts +0 -4
  7. package/dist/commands/profile/edit/index.js +7 -38
  8. package/dist/commands/profile/wizard/index.d.ts +0 -2
  9. package/dist/commands/profile/wizard/index.js +0 -106
  10. package/dist/commands/profile/{project → workspace}/index.d.ts +1 -1
  11. package/dist/commands/profile/{project → workspace}/index.js +10 -10
  12. package/dist/commands/release/delete/index.d.ts +2 -4
  13. package/dist/commands/release/delete/index.js +39 -12
  14. package/dist/commands/release/edit/index.d.ts +2 -4
  15. package/dist/commands/release/edit/index.js +31 -5
  16. package/dist/commands/release/export/index.d.ts +2 -4
  17. package/dist/commands/release/export/index.js +39 -11
  18. package/dist/commands/release/get/index.d.ts +2 -4
  19. package/dist/commands/release/get/index.js +31 -5
  20. package/dist/commands/release/pull/index.d.ts +31 -0
  21. package/dist/commands/release/pull/index.js +345 -0
  22. package/dist/commands/release/push/index.d.ts +26 -0
  23. package/dist/commands/release/push/index.js +230 -0
  24. package/dist/commands/tenant/backup/delete/index.d.ts +1 -1
  25. package/dist/commands/tenant/backup/delete/index.js +8 -9
  26. package/dist/commands/tenant/backup/export/index.d.ts +1 -1
  27. package/dist/commands/tenant/backup/export/index.js +9 -10
  28. package/dist/commands/tenant/backup/restore/index.d.ts +1 -1
  29. package/dist/commands/tenant/backup/restore/index.js +8 -9
  30. package/dist/commands/tenant/cluster/create/index.d.ts +18 -0
  31. package/dist/commands/tenant/cluster/create/index.js +149 -0
  32. package/dist/commands/{run/sessions/start → tenant/cluster/delete}/index.d.ts +9 -3
  33. package/dist/commands/tenant/cluster/delete/index.js +125 -0
  34. package/dist/commands/tenant/cluster/edit/index.d.ts +22 -0
  35. package/dist/commands/tenant/cluster/edit/index.js +128 -0
  36. package/dist/commands/{run/sessions → tenant/cluster}/get/index.d.ts +7 -3
  37. package/dist/commands/tenant/cluster/get/index.js +114 -0
  38. package/dist/commands/{run/info → tenant/cluster/license/get}/index.d.ts +10 -7
  39. package/dist/commands/tenant/cluster/license/get/index.js +118 -0
  40. package/dist/commands/tenant/cluster/license/set/index.d.ts +21 -0
  41. package/dist/commands/tenant/cluster/license/set/index.js +132 -0
  42. package/dist/commands/{run/env → tenant/cluster}/list/index.d.ts +3 -3
  43. package/dist/commands/tenant/cluster/list/index.js +109 -0
  44. package/dist/commands/tenant/create/index.d.ts +6 -3
  45. package/dist/commands/tenant/create/index.js +28 -20
  46. package/dist/commands/tenant/deploy_platform/index.d.ts +1 -1
  47. package/dist/commands/tenant/deploy_platform/index.js +8 -9
  48. package/dist/commands/tenant/deploy_release/index.d.ts +1 -1
  49. package/dist/commands/tenant/deploy_release/index.js +8 -9
  50. package/dist/commands/tenant/env/delete/index.d.ts +19 -0
  51. package/dist/commands/tenant/env/delete/index.js +139 -0
  52. package/dist/commands/{run/projects/create → tenant/env/get}/index.d.ts +7 -4
  53. package/dist/commands/tenant/env/get/index.js +113 -0
  54. package/dist/commands/{run/projects/update → tenant/env/get_all}/index.d.ts +7 -5
  55. package/dist/commands/tenant/env/get_all/index.js +123 -0
  56. package/dist/commands/{run/secrets/get → tenant/env/list}/index.d.ts +5 -3
  57. package/dist/commands/tenant/env/list/index.js +116 -0
  58. package/dist/commands/tenant/env/set/index.d.ts +18 -0
  59. package/dist/commands/tenant/env/set/index.js +122 -0
  60. package/dist/commands/tenant/env/set_all/index.d.ts +18 -0
  61. package/dist/commands/tenant/env/set_all/index.js +131 -0
  62. package/dist/commands/tenant/get/index.js +6 -5
  63. package/dist/commands/tenant/impersonate/index.d.ts +19 -0
  64. package/dist/commands/tenant/impersonate/index.js +146 -0
  65. package/dist/commands/tenant/license/get/index.d.ts +18 -0
  66. package/dist/commands/tenant/license/get/index.js +127 -0
  67. package/dist/commands/tenant/license/set/index.d.ts +19 -0
  68. package/dist/commands/tenant/license/set/index.js +141 -0
  69. package/dist/commands/tenant/list/index.js +6 -6
  70. package/dist/commands/tenant/pull/index.d.ts +31 -0
  71. package/dist/commands/tenant/pull/index.js +327 -0
  72. package/dist/commands/tenant/push/index.d.ts +24 -0
  73. package/dist/commands/tenant/push/index.js +245 -0
  74. package/oclif.manifest.json +2218 -1813
  75. package/package.json +1 -19
  76. package/dist/commands/run/env/delete/index.d.ts +0 -14
  77. package/dist/commands/run/env/delete/index.js +0 -65
  78. package/dist/commands/run/env/get/index.d.ts +0 -14
  79. package/dist/commands/run/env/get/index.js +0 -52
  80. package/dist/commands/run/env/list/index.js +0 -56
  81. package/dist/commands/run/env/set/index.d.ts +0 -14
  82. package/dist/commands/run/env/set/index.js +0 -51
  83. package/dist/commands/run/exec/index.d.ts +0 -31
  84. package/dist/commands/run/exec/index.js +0 -431
  85. package/dist/commands/run/info/index.js +0 -160
  86. package/dist/commands/run/projects/create/index.js +0 -75
  87. package/dist/commands/run/projects/delete/index.d.ts +0 -14
  88. package/dist/commands/run/projects/delete/index.js +0 -65
  89. package/dist/commands/run/projects/list/index.d.ts +0 -13
  90. package/dist/commands/run/projects/list/index.js +0 -66
  91. package/dist/commands/run/projects/update/index.js +0 -86
  92. package/dist/commands/run/secrets/delete/index.d.ts +0 -14
  93. package/dist/commands/run/secrets/delete/index.js +0 -65
  94. package/dist/commands/run/secrets/get/index.js +0 -52
  95. package/dist/commands/run/secrets/list/index.d.ts +0 -12
  96. package/dist/commands/run/secrets/list/index.js +0 -60
  97. package/dist/commands/run/secrets/set/index.d.ts +0 -16
  98. package/dist/commands/run/secrets/set/index.js +0 -74
  99. package/dist/commands/run/sessions/delete/index.d.ts +0 -14
  100. package/dist/commands/run/sessions/delete/index.js +0 -65
  101. package/dist/commands/run/sessions/get/index.js +0 -72
  102. package/dist/commands/run/sessions/list/index.d.ts +0 -13
  103. package/dist/commands/run/sessions/list/index.js +0 -64
  104. package/dist/commands/run/sessions/start/index.js +0 -56
  105. package/dist/commands/run/sessions/stop/index.d.ts +0 -14
  106. package/dist/commands/run/sessions/stop/index.js +0 -56
  107. package/dist/commands/run/sink/get/index.d.ts +0 -14
  108. package/dist/commands/run/sink/get/index.js +0 -63
  109. package/dist/lib/base-run-command.d.ts +0 -41
  110. package/dist/lib/base-run-command.js +0 -75
  111. package/dist/lib/run-http-client.d.ts +0 -64
  112. package/dist/lib/run-http-client.js +0 -171
  113. package/dist/lib/run-types.d.ts +0 -226
  114. package/dist/lib/run-types.js +0 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xano/cli",
3
3
  "description": "CLI for Xano's Metadata API",
4
- "version": "0.0.37",
4
+ "version": "0.0.39",
5
5
  "author": "Sean Montgomery",
6
6
  "bin": {
7
7
  "xano": "./bin/run.js"
@@ -71,24 +71,6 @@
71
71
  "profile": {
72
72
  "description": "Manage CLI profiles and authentication"
73
73
  },
74
- "run": {
75
- "description": "Execute XanoScript and manage Xano Run projects"
76
- },
77
- "run:env": {
78
- "description": "Manage environment variables for a project"
79
- },
80
- "run:projects": {
81
- "description": "Manage Xano Run projects"
82
- },
83
- "run:secrets": {
84
- "description": "Manage secrets for a project"
85
- },
86
- "run:sessions": {
87
- "description": "Manage Xano Run sessions"
88
- },
89
- "run:sink": {
90
- "description": "Retrieve sink data from completed sessions"
91
- },
92
74
  "static_host": {
93
75
  "description": "Manage static hosting sites"
94
76
  },
@@ -1,14 +0,0 @@
1
- import BaseRunCommand from '../../../../lib/base-run-command.js';
2
- export default class RunEnvDelete extends BaseRunCommand {
3
- static args: {
4
- name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
- };
6
- static description: string;
7
- static examples: string[];
8
- static flags: {
9
- force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
- profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
- verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- };
13
- run(): Promise<void>;
14
- }
@@ -1,65 +0,0 @@
1
- import { Args, Flags } from '@oclif/core';
2
- import BaseRunCommand from '../../../../lib/base-run-command.js';
3
- export default class RunEnvDelete extends BaseRunCommand {
4
- static args = {
5
- name: Args.string({
6
- description: 'Environment variable name',
7
- required: true,
8
- }),
9
- };
10
- static description = 'Delete an environment variable';
11
- static examples = [
12
- `$ xano run env delete API_KEY
13
- Are you sure you want to delete environment variable 'API_KEY'? (y/N)
14
- Environment variable 'API_KEY' deleted successfully!
15
- `,
16
- `$ xano run env delete API_KEY --force
17
- Environment variable 'API_KEY' deleted successfully!
18
- `,
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
- async run() {
30
- const { args, flags } = await this.parse(RunEnvDelete);
31
- // Initialize with project required
32
- await this.initRunCommandWithProject(flags.profile, flags.verbose);
33
- // Confirm deletion unless --force is used
34
- if (!flags.force) {
35
- const readline = await import('node:readline');
36
- const rl = readline.createInterface({
37
- input: process.stdin,
38
- output: process.stdout,
39
- });
40
- const confirmed = await new Promise((resolve) => {
41
- rl.question(`Are you sure you want to delete environment variable '${args.name}'? (y/N) `, (answer) => {
42
- rl.close();
43
- resolve(answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes');
44
- });
45
- });
46
- if (!confirmed) {
47
- this.log('Deletion cancelled.');
48
- return;
49
- }
50
- }
51
- try {
52
- const url = this.httpClient.buildProjectUrl('/env');
53
- await this.httpClient.delete(url, { name: args.name });
54
- this.log(`Environment variable '${args.name}' deleted successfully!`);
55
- }
56
- catch (error) {
57
- if (error instanceof Error) {
58
- this.error(`Failed to delete environment variable: ${error.message}`);
59
- }
60
- else {
61
- this.error(`Failed to delete environment variable: ${String(error)}`);
62
- }
63
- }
64
- }
65
- }
@@ -1,14 +0,0 @@
1
- import BaseRunCommand from '../../../../lib/base-run-command.js';
2
- export default class RunEnvGet extends BaseRunCommand {
3
- static args: {
4
- name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
- };
6
- static description: string;
7
- static examples: string[];
8
- static flags: {
9
- output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
- profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
- verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- };
13
- run(): Promise<void>;
14
- }
@@ -1,52 +0,0 @@
1
- import { Args, Flags } from '@oclif/core';
2
- import BaseRunCommand from '../../../../lib/base-run-command.js';
3
- export default class RunEnvGet extends BaseRunCommand {
4
- static args = {
5
- name: Args.string({
6
- description: 'Environment variable name',
7
- required: true,
8
- }),
9
- };
10
- static description = 'Get an environment variable value';
11
- static examples = [
12
- `$ xano run env get API_KEY
13
- my-secret-api-key
14
- `,
15
- `$ xano run env get API_KEY -o json
16
- { "name": "API_KEY", "value": "my-secret-api-key" }
17
- `,
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
- async run() {
30
- const { args, flags } = await this.parse(RunEnvGet);
31
- // Initialize with project required
32
- await this.initRunCommandWithProject(flags.profile, flags.verbose);
33
- try {
34
- const url = this.httpClient.buildProjectUrl('/env', { name: args.name });
35
- const result = await this.httpClient.get(url);
36
- if (flags.output === 'json') {
37
- this.outputJson(result);
38
- }
39
- else {
40
- this.log(result.value);
41
- }
42
- }
43
- catch (error) {
44
- if (error instanceof Error) {
45
- this.error(`Failed to get environment variable: ${error.message}`);
46
- }
47
- else {
48
- this.error(`Failed to get environment variable: ${String(error)}`);
49
- }
50
- }
51
- }
52
- }
@@ -1,56 +0,0 @@
1
- import { Flags } from '@oclif/core';
2
- import BaseRunCommand from '../../../../lib/base-run-command.js';
3
- export default class RunEnvList extends BaseRunCommand {
4
- static args = {};
5
- static description = 'List all environment variable keys';
6
- static examples = [
7
- `$ xano run env list
8
- Environment variables:
9
- - API_KEY
10
- - DATABASE_URL
11
- - DEBUG
12
- `,
13
- `$ xano run env list -o json
14
- { "env": ["API_KEY", "DATABASE_URL", "DEBUG"] }
15
- `,
16
- ];
17
- static flags = {
18
- ...BaseRunCommand.baseFlags,
19
- output: Flags.string({
20
- char: 'o',
21
- default: 'list',
22
- description: 'Output format',
23
- options: ['list', 'json'],
24
- required: false,
25
- }),
26
- };
27
- async run() {
28
- const { flags } = await this.parse(RunEnvList);
29
- // Initialize with project required
30
- await this.initRunCommandWithProject(flags.profile, flags.verbose);
31
- try {
32
- const url = this.httpClient.buildProjectUrl('/env/key');
33
- const result = await this.httpClient.get(url);
34
- if (flags.output === 'json') {
35
- this.outputJson(result);
36
- }
37
- else if (result.env.length === 0) {
38
- this.log('No environment variables found.');
39
- }
40
- else {
41
- this.log('Environment variables:');
42
- for (const key of result.env) {
43
- this.log(` - ${key}`);
44
- }
45
- }
46
- }
47
- catch (error) {
48
- if (error instanceof Error) {
49
- this.error(`Failed to list environment variables: ${error.message}`);
50
- }
51
- else {
52
- this.error(`Failed to list environment variables: ${String(error)}`);
53
- }
54
- }
55
- }
56
- }
@@ -1,14 +0,0 @@
1
- import BaseRunCommand from '../../../../lib/base-run-command.js';
2
- export default class RunEnvSet extends BaseRunCommand {
3
- static args: {
4
- name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
- value: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
- };
7
- static description: string;
8
- static examples: string[];
9
- static flags: {
10
- profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
- verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- };
13
- run(): Promise<void>;
14
- }
@@ -1,51 +0,0 @@
1
- import { Args } from '@oclif/core';
2
- import BaseRunCommand from '../../../../lib/base-run-command.js';
3
- export default class RunEnvSet extends BaseRunCommand {
4
- static args = {
5
- name: Args.string({
6
- description: 'Environment variable name',
7
- required: true,
8
- }),
9
- value: Args.string({
10
- description: 'Environment variable value',
11
- required: true,
12
- }),
13
- };
14
- static description = 'Set an environment variable';
15
- static examples = [
16
- `$ xano run env set API_KEY my-secret-key
17
- Environment variable 'API_KEY' set successfully!
18
- `,
19
- `$ xano run env set DATABASE_URL "postgres://user:pass@host/db"
20
- Environment variable 'DATABASE_URL' set successfully!
21
- `,
22
- ];
23
- static flags = {
24
- ...BaseRunCommand.baseFlags,
25
- };
26
- async run() {
27
- const { args, flags } = await this.parse(RunEnvSet);
28
- // Initialize with project required
29
- await this.initRunCommandWithProject(flags.profile, flags.verbose);
30
- const input = {
31
- env: {
32
- name: args.name,
33
- value: args.value,
34
- },
35
- name: args.name,
36
- };
37
- try {
38
- const url = this.httpClient.buildProjectUrl('/env');
39
- await this.httpClient.patch(url, input);
40
- this.log(`Environment variable '${args.name}' set successfully!`);
41
- }
42
- catch (error) {
43
- if (error instanceof Error) {
44
- this.error(`Failed to set environment variable: ${error.message}`);
45
- }
46
- else {
47
- this.error(`Failed to set environment variable: ${String(error)}`);
48
- }
49
- }
50
- }
51
- }
@@ -1,31 +0,0 @@
1
- import BaseRunCommand from '../../../lib/base-run-command.js';
2
- export default class RunExec extends BaseRunCommand {
3
- static args: {
4
- path: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
- };
6
- static description: string;
7
- static examples: string[];
8
- static flags: {
9
- args: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
- edit: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
- env: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
- file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
- output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
- stdin: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
- profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
- verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
- };
18
- run(): Promise<void>;
19
- /**
20
- * Recursively collect all .xs files from a directory, sorted for deterministic ordering.
21
- */
22
- private collectFiles;
23
- private editFile;
24
- private isUrl;
25
- /**
26
- * Load all .xs files from a directory and combine them into a multidoc.
27
- */
28
- private loadMultidocFromDirectory;
29
- private outputSummary;
30
- private readStdin;
31
- }