@xano/cli 0.0.95 → 1.0.0

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 (236) hide show
  1. package/README.md +133 -66
  2. package/dist/base-command.d.ts +41 -1
  3. package/dist/base-command.js +92 -3
  4. package/dist/commands/auth/index.d.ts +1 -0
  5. package/dist/commands/auth/index.js +16 -11
  6. package/dist/commands/branch/create/index.d.ts +4 -1
  7. package/dist/commands/branch/create/index.js +22 -21
  8. package/dist/commands/branch/delete/index.d.ts +1 -0
  9. package/dist/commands/branch/delete/index.js +1 -4
  10. package/dist/commands/branch/edit/index.d.ts +1 -0
  11. package/dist/commands/branch/edit/index.js +1 -4
  12. package/dist/commands/branch/get/index.d.ts +1 -0
  13. package/dist/commands/branch/get/index.js +1 -4
  14. package/dist/commands/branch/list/index.d.ts +2 -6
  15. package/dist/commands/branch/list/index.js +13 -17
  16. package/dist/commands/branch/set_live/index.d.ts +1 -0
  17. package/dist/commands/branch/set_live/index.js +1 -4
  18. package/dist/commands/function/create/index.d.ts +1 -0
  19. package/dist/commands/function/create/index.js +1 -2
  20. package/dist/commands/function/edit/index.d.ts +1 -0
  21. package/dist/commands/function/edit/index.js +1 -2
  22. package/dist/commands/function/get/index.d.ts +1 -0
  23. package/dist/commands/function/get/index.js +1 -4
  24. package/dist/commands/function/list/index.d.ts +1 -0
  25. package/dist/commands/function/list/index.js +1 -4
  26. package/dist/commands/platform/get/index.d.ts +1 -0
  27. package/dist/commands/platform/get/index.js +1 -4
  28. package/dist/commands/platform/list/index.d.ts +1 -0
  29. package/dist/commands/platform/list/index.js +1 -4
  30. package/dist/commands/profile/create/index.d.ts +1 -0
  31. package/dist/commands/profile/create/index.js +12 -6
  32. package/dist/commands/profile/delete/index.d.ts +1 -0
  33. package/dist/commands/profile/delete/index.js +8 -4
  34. package/dist/commands/profile/edit/index.d.ts +1 -0
  35. package/dist/commands/profile/edit/index.js +3 -6
  36. package/dist/commands/profile/get/index.d.ts +3 -0
  37. package/dist/commands/profile/get/index.js +12 -5
  38. package/dist/commands/profile/list/index.d.ts +1 -0
  39. package/dist/commands/profile/list/index.js +8 -4
  40. package/dist/commands/profile/me/index.d.ts +1 -0
  41. package/dist/commands/profile/me/index.js +22 -6
  42. package/dist/commands/profile/set/index.d.ts +3 -0
  43. package/dist/commands/profile/set/index.js +12 -6
  44. package/dist/commands/profile/token/index.d.ts +3 -0
  45. package/dist/commands/profile/token/index.js +12 -5
  46. package/dist/commands/profile/wizard/index.d.ts +1 -0
  47. package/dist/commands/profile/wizard/index.js +16 -12
  48. package/dist/commands/profile/workspace/index.d.ts +3 -0
  49. package/dist/commands/profile/workspace/index.js +12 -5
  50. package/dist/commands/profile/workspace/set/index.d.ts +1 -0
  51. package/dist/commands/profile/workspace/set/index.js +2 -4
  52. package/dist/commands/release/create/index.d.ts +4 -1
  53. package/dist/commands/release/create/index.js +12 -14
  54. package/dist/commands/release/delete/index.d.ts +1 -0
  55. package/dist/commands/release/delete/index.js +1 -4
  56. package/dist/commands/release/deploy/index.d.ts +20 -0
  57. package/dist/commands/release/deploy/index.js +137 -0
  58. package/dist/commands/release/edit/index.d.ts +1 -0
  59. package/dist/commands/release/edit/index.js +1 -4
  60. package/dist/commands/release/export/index.d.ts +1 -0
  61. package/dist/commands/release/export/index.js +1 -3
  62. package/dist/commands/release/get/index.d.ts +1 -0
  63. package/dist/commands/release/get/index.js +1 -4
  64. package/dist/commands/release/import/index.d.ts +1 -0
  65. package/dist/commands/release/import/index.js +1 -3
  66. package/dist/commands/release/list/index.d.ts +1 -0
  67. package/dist/commands/release/list/index.js +1 -4
  68. package/dist/commands/release/pull/index.d.ts +2 -3
  69. package/dist/commands/release/pull/index.js +19 -18
  70. package/dist/commands/release/push/index.d.ts +2 -3
  71. package/dist/commands/release/push/index.js +19 -22
  72. package/dist/commands/sandbox/delete/index.d.ts +13 -0
  73. package/dist/commands/sandbox/delete/index.js +71 -0
  74. package/dist/commands/sandbox/env/delete/index.d.ts +15 -0
  75. package/dist/commands/sandbox/env/delete/index.js +89 -0
  76. package/dist/commands/sandbox/env/get/index.d.ts +13 -0
  77. package/dist/commands/sandbox/env/get/index.js +65 -0
  78. package/dist/commands/sandbox/env/get_all/index.d.ts +14 -0
  79. package/dist/commands/sandbox/env/get_all/index.js +78 -0
  80. package/dist/commands/sandbox/env/list/index.d.ts +12 -0
  81. package/dist/commands/sandbox/env/list/index.js +67 -0
  82. package/dist/commands/sandbox/env/set/index.d.ts +14 -0
  83. package/dist/commands/sandbox/env/set/index.js +74 -0
  84. package/dist/commands/sandbox/env/set_all/index.d.ts +14 -0
  85. package/dist/commands/sandbox/env/set_all/index.js +86 -0
  86. package/dist/commands/sandbox/get/index.d.ts +12 -0
  87. package/dist/commands/sandbox/get/index.js +63 -0
  88. package/dist/commands/sandbox/impersonate/index.d.ts +5 -0
  89. package/dist/commands/sandbox/impersonate/index.js +5 -0
  90. package/dist/commands/sandbox/license/get/index.d.ts +14 -0
  91. package/dist/commands/sandbox/license/get/index.js +78 -0
  92. package/dist/commands/sandbox/license/set/index.d.ts +15 -0
  93. package/dist/commands/sandbox/license/set/index.js +95 -0
  94. package/dist/commands/sandbox/pull/index.d.ts +16 -0
  95. package/dist/commands/sandbox/pull/index.js +185 -0
  96. package/dist/commands/sandbox/push/index.d.ts +26 -0
  97. package/dist/commands/sandbox/push/index.js +196 -0
  98. package/dist/commands/sandbox/reset/index.d.ts +13 -0
  99. package/dist/commands/sandbox/reset/index.js +71 -0
  100. package/dist/commands/sandbox/review/index.d.ts +14 -0
  101. package/dist/commands/sandbox/review/index.js +94 -0
  102. package/dist/commands/sandbox/unit_test/list/index.d.ts +14 -0
  103. package/dist/commands/sandbox/unit_test/list/index.js +91 -0
  104. package/dist/commands/sandbox/unit_test/run/index.d.ts +15 -0
  105. package/dist/commands/sandbox/unit_test/run/index.js +79 -0
  106. package/dist/commands/sandbox/unit_test/run_all/index.d.ts +14 -0
  107. package/dist/commands/sandbox/unit_test/run_all/index.js +171 -0
  108. package/dist/commands/sandbox/workflow_test/list/index.d.ts +13 -0
  109. package/dist/commands/sandbox/workflow_test/list/index.js +84 -0
  110. package/dist/commands/sandbox/workflow_test/run/index.d.ts +18 -0
  111. package/dist/commands/sandbox/workflow_test/run/index.js +77 -0
  112. package/dist/commands/sandbox/workflow_test/run_all/index.d.ts +13 -0
  113. package/dist/commands/sandbox/workflow_test/run_all/index.js +157 -0
  114. package/dist/commands/static_host/build/create/index.d.ts +1 -0
  115. package/dist/commands/static_host/build/create/index.js +1 -3
  116. package/dist/commands/static_host/build/get/index.d.ts +1 -0
  117. package/dist/commands/static_host/build/get/index.js +1 -4
  118. package/dist/commands/static_host/build/list/index.d.ts +1 -0
  119. package/dist/commands/static_host/build/list/index.js +1 -4
  120. package/dist/commands/static_host/list/index.d.ts +1 -0
  121. package/dist/commands/static_host/list/index.js +1 -4
  122. package/dist/commands/tenant/backup/create/index.d.ts +1 -0
  123. package/dist/commands/tenant/backup/create/index.js +1 -4
  124. package/dist/commands/tenant/backup/delete/index.d.ts +1 -0
  125. package/dist/commands/tenant/backup/delete/index.js +1 -4
  126. package/dist/commands/tenant/backup/export/index.d.ts +1 -0
  127. package/dist/commands/tenant/backup/export/index.js +1 -3
  128. package/dist/commands/tenant/backup/import/index.d.ts +1 -0
  129. package/dist/commands/tenant/backup/import/index.js +1 -3
  130. package/dist/commands/tenant/backup/list/index.d.ts +1 -0
  131. package/dist/commands/tenant/backup/list/index.js +1 -4
  132. package/dist/commands/tenant/backup/restore/index.d.ts +1 -0
  133. package/dist/commands/tenant/backup/restore/index.js +1 -4
  134. package/dist/commands/tenant/cluster/create/index.d.ts +1 -0
  135. package/dist/commands/tenant/cluster/create/index.js +1 -3
  136. package/dist/commands/tenant/cluster/delete/index.d.ts +1 -0
  137. package/dist/commands/tenant/cluster/delete/index.js +1 -4
  138. package/dist/commands/tenant/cluster/edit/index.d.ts +1 -0
  139. package/dist/commands/tenant/cluster/edit/index.js +1 -4
  140. package/dist/commands/tenant/cluster/get/index.d.ts +1 -0
  141. package/dist/commands/tenant/cluster/get/index.js +1 -4
  142. package/dist/commands/tenant/cluster/license/get/index.d.ts +1 -0
  143. package/dist/commands/tenant/cluster/license/get/index.js +1 -3
  144. package/dist/commands/tenant/cluster/license/set/index.d.ts +1 -0
  145. package/dist/commands/tenant/cluster/license/set/index.js +1 -3
  146. package/dist/commands/tenant/cluster/list/index.d.ts +1 -0
  147. package/dist/commands/tenant/cluster/list/index.js +1 -4
  148. package/dist/commands/tenant/create/index.d.ts +1 -1
  149. package/dist/commands/tenant/create/index.js +1 -8
  150. package/dist/commands/tenant/delete/index.d.ts +1 -0
  151. package/dist/commands/tenant/delete/index.js +1 -4
  152. package/dist/commands/tenant/deploy_platform/index.d.ts +1 -0
  153. package/dist/commands/tenant/deploy_platform/index.js +1 -3
  154. package/dist/commands/tenant/deploy_release/index.d.ts +1 -0
  155. package/dist/commands/tenant/deploy_release/index.js +1 -4
  156. package/dist/commands/tenant/edit/index.d.ts +1 -0
  157. package/dist/commands/tenant/edit/index.js +1 -4
  158. package/dist/commands/tenant/env/delete/index.d.ts +1 -0
  159. package/dist/commands/tenant/env/delete/index.js +1 -4
  160. package/dist/commands/tenant/env/get/index.d.ts +1 -0
  161. package/dist/commands/tenant/env/get/index.js +1 -4
  162. package/dist/commands/tenant/env/get_all/index.d.ts +1 -0
  163. package/dist/commands/tenant/env/get_all/index.js +1 -3
  164. package/dist/commands/tenant/env/list/index.d.ts +1 -0
  165. package/dist/commands/tenant/env/list/index.js +1 -4
  166. package/dist/commands/tenant/env/set/index.d.ts +1 -0
  167. package/dist/commands/tenant/env/set/index.js +1 -4
  168. package/dist/commands/tenant/env/set_all/index.d.ts +1 -0
  169. package/dist/commands/tenant/env/set_all/index.js +1 -3
  170. package/dist/commands/tenant/get/index.d.ts +1 -0
  171. package/dist/commands/tenant/get/index.js +3 -6
  172. package/dist/commands/tenant/impersonate/index.d.ts +1 -0
  173. package/dist/commands/tenant/impersonate/index.js +1 -4
  174. package/dist/commands/tenant/license/get/index.d.ts +1 -0
  175. package/dist/commands/tenant/license/get/index.js +1 -3
  176. package/dist/commands/tenant/license/set/index.d.ts +1 -0
  177. package/dist/commands/tenant/license/set/index.js +1 -3
  178. package/dist/commands/tenant/list/index.d.ts +1 -0
  179. package/dist/commands/tenant/list/index.js +3 -6
  180. package/dist/commands/tenant/pull/index.d.ts +2 -3
  181. package/dist/commands/tenant/pull/index.js +20 -21
  182. package/dist/commands/tenant/push/index.d.ts +2 -22
  183. package/dist/commands/tenant/push/index.js +7 -259
  184. package/dist/commands/tenant/unit_test/list/index.d.ts +16 -0
  185. package/dist/commands/tenant/unit_test/list/index.js +115 -0
  186. package/dist/commands/tenant/unit_test/run/index.d.ts +17 -0
  187. package/dist/commands/tenant/unit_test/run/index.js +103 -0
  188. package/dist/commands/tenant/unit_test/run_all/index.d.ts +16 -0
  189. package/dist/commands/tenant/unit_test/run_all/index.js +190 -0
  190. package/dist/commands/tenant/workflow_test/list/index.d.ts +15 -0
  191. package/dist/commands/tenant/workflow_test/list/index.js +108 -0
  192. package/dist/commands/tenant/workflow_test/run/index.d.ts +20 -0
  193. package/dist/commands/tenant/workflow_test/run/index.js +101 -0
  194. package/dist/commands/tenant/workflow_test/run_all/index.d.ts +15 -0
  195. package/dist/commands/tenant/workflow_test/run_all/index.js +176 -0
  196. package/dist/commands/unit_test/list/index.d.ts +1 -0
  197. package/dist/commands/unit_test/list/index.js +1 -4
  198. package/dist/commands/unit_test/run/index.d.ts +1 -0
  199. package/dist/commands/unit_test/run/index.js +1 -4
  200. package/dist/commands/unit_test/run_all/index.d.ts +1 -0
  201. package/dist/commands/unit_test/run_all/index.js +1 -4
  202. package/dist/commands/update/index.d.ts +1 -0
  203. package/dist/commands/workflow_test/delete/index.d.ts +1 -0
  204. package/dist/commands/workflow_test/delete/index.js +1 -4
  205. package/dist/commands/workflow_test/get/index.d.ts +1 -0
  206. package/dist/commands/workflow_test/get/index.js +1 -4
  207. package/dist/commands/workflow_test/list/index.d.ts +1 -0
  208. package/dist/commands/workflow_test/list/index.js +1 -4
  209. package/dist/commands/workflow_test/run/index.d.ts +1 -0
  210. package/dist/commands/workflow_test/run/index.js +1 -4
  211. package/dist/commands/workflow_test/run_all/index.d.ts +1 -0
  212. package/dist/commands/workflow_test/run_all/index.js +1 -4
  213. package/dist/commands/workspace/create/index.d.ts +1 -0
  214. package/dist/commands/workspace/create/index.js +1 -4
  215. package/dist/commands/workspace/delete/index.d.ts +2 -6
  216. package/dist/commands/workspace/delete/index.js +17 -16
  217. package/dist/commands/workspace/edit/index.d.ts +3 -6
  218. package/dist/commands/workspace/edit/index.js +31 -25
  219. package/dist/commands/workspace/get/index.d.ts +2 -6
  220. package/dist/commands/workspace/get/index.js +23 -25
  221. package/dist/commands/workspace/git/pull/index.d.ts +2 -3
  222. package/dist/commands/workspace/git/pull/index.js +18 -17
  223. package/dist/commands/workspace/list/index.d.ts +2 -0
  224. package/dist/commands/workspace/list/index.js +15 -11
  225. package/dist/commands/workspace/pull/index.d.ts +2 -3
  226. package/dist/commands/workspace/pull/index.js +21 -24
  227. package/dist/commands/workspace/push/index.d.ts +7 -16
  228. package/dist/commands/workspace/push/index.js +85 -674
  229. package/dist/help.d.ts +2 -1
  230. package/dist/help.js +39 -1
  231. package/dist/utils/multidoc-push.d.ts +63 -0
  232. package/dist/utils/multidoc-push.js +690 -0
  233. package/dist/utils/reference-checker.d.ts +57 -0
  234. package/dist/utils/reference-checker.js +232 -0
  235. package/oclif.manifest.json +5631 -2297
  236. package/package.json +17 -2
@@ -1,8 +1,6 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class UnitTestRun extends BaseCommand {
8
6
  static args = {
@@ -100,8 +98,7 @@ Result: PASS
100
98
  }
101
99
  }
102
100
  loadCredentials() {
103
- const configDir = path.join(os.homedir(), '.xano');
104
- const credentialsPath = path.join(configDir, 'credentials.yaml');
101
+ const credentialsPath = this.getCredentialsPath();
105
102
  if (!fs.existsSync(credentialsPath)) {
106
103
  this.error(`Credentials file not found at ${credentialsPath}\n` +
107
104
  `Create a profile using 'xano profile create'`);
@@ -7,6 +7,7 @@ export default class UnitTestRunAll extends BaseCommand {
7
7
  'obj-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
8
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
9
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
13
  };
@@ -1,8 +1,6 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class UnitTestRunAll extends BaseCommand {
8
6
  static description = 'Run all unit tests in a workspace';
@@ -195,8 +193,7 @@ Results: 2 passed, 1 failed
195
193
  }
196
194
  }
197
195
  loadCredentials() {
198
- const configDir = path.join(os.homedir(), '.xano');
199
- const credentialsPath = path.join(configDir, 'credentials.yaml');
196
+ const credentialsPath = this.getCredentialsPath();
200
197
  if (!fs.existsSync(credentialsPath)) {
201
198
  this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
202
199
  }
@@ -5,6 +5,7 @@ export default class Update extends BaseCommand {
5
5
  static flags: {
6
6
  beta: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
7
  check: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
9
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
10
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
11
  };
@@ -12,6 +12,7 @@ export default class WorkflowTestDelete extends BaseCommand {
12
12
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
14
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
16
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
17
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
18
  };
@@ -2,8 +2,6 @@ import { Args, Flags } from '@oclif/core';
2
2
  import * as readline from 'node:readline';
3
3
  import * as yaml from 'js-yaml';
4
4
  import * as fs from 'node:fs';
5
- import * as os from 'node:os';
6
- import * as path from 'node:path';
7
5
  import BaseCommand from '../../../base-command.js';
8
6
  export default class WorkflowTestDelete extends BaseCommand {
9
7
  static args = {
@@ -109,8 +107,7 @@ Deleted workflow test 1
109
107
  });
110
108
  }
111
109
  loadCredentials() {
112
- const configDir = path.join(os.homedir(), '.xano');
113
- const credentialsPath = path.join(configDir, 'credentials.yaml');
110
+ const credentialsPath = this.getCredentialsPath();
114
111
  if (!fs.existsSync(credentialsPath)) {
115
112
  this.error(`Credentials file not found at ${credentialsPath}\n` +
116
113
  `Create a profile using 'xano profile create'`);
@@ -12,6 +12,7 @@ export default class WorkflowTestGet extends BaseCommand {
12
12
  'include-draft': import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
14
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
16
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
17
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
18
  };
@@ -1,8 +1,6 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkflowTestGet extends BaseCommand {
8
6
  static args = {
@@ -121,8 +119,7 @@ Workflow Test: my-test (ID: 1)
121
119
  }
122
120
  }
123
121
  loadCredentials() {
124
- const configDir = path.join(os.homedir(), '.xano');
125
- const credentialsPath = path.join(configDir, 'credentials.yaml');
122
+ const credentialsPath = this.getCredentialsPath();
126
123
  if (!fs.existsSync(credentialsPath)) {
127
124
  this.error(`Credentials file not found at ${credentialsPath}\n` +
128
125
  `Create a profile using 'xano profile create'`);
@@ -6,6 +6,7 @@ export default class WorkflowTestList extends BaseCommand {
6
6
  branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
7
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
8
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
12
  };
@@ -1,8 +1,6 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkflowTestList extends BaseCommand {
8
6
  static description = 'List all workflow tests in a workspace';
@@ -108,8 +106,7 @@ Workflow tests in workspace 5:
108
106
  }
109
107
  }
110
108
  loadCredentials() {
111
- const configDir = path.join(os.homedir(), '.xano');
112
- const credentialsPath = path.join(configDir, 'credentials.yaml');
109
+ const credentialsPath = this.getCredentialsPath();
113
110
  if (!fs.existsSync(credentialsPath)) {
114
111
  this.error(`Credentials file not found at ${credentialsPath}\n` +
115
112
  `Create a profile using 'xano profile create'`);
@@ -11,6 +11,7 @@ export default class WorkflowTestRun extends BaseCommand {
11
11
  static flags: {
12
12
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
13
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
16
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
17
  };
@@ -1,8 +1,6 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkflowTestRun extends BaseCommand {
8
6
  static args = {
@@ -98,8 +96,7 @@ Result: PASS (1.234s)
98
96
  }
99
97
  }
100
98
  loadCredentials() {
101
- const configDir = path.join(os.homedir(), '.xano');
102
- const credentialsPath = path.join(configDir, 'credentials.yaml');
99
+ const credentialsPath = this.getCredentialsPath();
103
100
  if (!fs.existsSync(credentialsPath)) {
104
101
  this.error(`Credentials file not found at ${credentialsPath}\n` +
105
102
  `Create a profile using 'xano profile create'`);
@@ -6,6 +6,7 @@ export default class WorkflowTestRunAll extends BaseCommand {
6
6
  branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
7
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
8
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
12
  };
@@ -1,8 +1,6 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkflowTestRunAll extends BaseCommand {
8
6
  static description = 'Run all workflow tests in a workspace';
@@ -183,8 +181,7 @@ Results: 2 passed, 1 failed (2.691s total)
183
181
  }
184
182
  }
185
183
  loadCredentials() {
186
- const configDir = path.join(os.homedir(), '.xano');
187
- const credentialsPath = path.join(configDir, 'credentials.yaml');
184
+ const credentialsPath = this.getCredentialsPath();
188
185
  if (!fs.existsSync(credentialsPath)) {
189
186
  this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
190
187
  }
@@ -8,6 +8,7 @@ export default class WorkspaceCreate extends BaseCommand {
8
8
  static flags: {
9
9
  description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
10
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
13
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
14
  };
@@ -1,8 +1,6 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkspaceCreate extends BaseCommand {
8
6
  static args = {
@@ -109,8 +107,7 @@ Created workspace: my-app (ID: 456)
109
107
  }
110
108
  }
111
109
  loadCredentials() {
112
- const configDir = path.join(os.homedir(), '.xano');
113
- const credentialsPath = path.join(configDir, 'credentials.yaml');
110
+ const credentialsPath = this.getCredentialsPath();
114
111
  // Check if credentials file exists
115
112
  if (!fs.existsSync(credentialsPath)) {
116
113
  this.error(`Credentials file not found at ${credentialsPath}\n` +
@@ -1,16 +1,12 @@
1
1
  import BaseCommand from '../../../base-command.js';
2
2
  export default class WorkspaceDelete extends BaseCommand {
3
- static args: {
4
- workspace_id: import("@oclif/core/interfaces").Arg<number, {
5
- max?: number;
6
- min?: number;
7
- }>;
8
- };
9
3
  static description: string;
10
4
  static examples: string[];
11
5
  static flags: {
12
6
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
7
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
10
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
11
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
12
  };
@@ -1,26 +1,18 @@
1
- import { Args, Flags } from '@oclif/core';
1
+ import { Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkspaceDelete extends BaseCommand {
8
- static args = {
9
- workspace_id: Args.integer({
10
- description: 'Workspace ID to delete',
11
- required: true,
12
- }),
13
- };
14
6
  static description = 'Delete a workspace via the Xano Metadata API. Cannot delete workspaces with active tenants.';
15
7
  static examples = [
16
- `$ xano workspace delete 123
8
+ `$ xano workspace delete -w 123
17
9
  Are you sure you want to delete workspace 123? This action cannot be undone. (y/N) y
18
10
  Deleted workspace 123
19
11
  `,
20
- `$ xano workspace delete 123 --force
12
+ `$ xano workspace delete -w 123 --force
21
13
  Deleted workspace 123
22
14
  `,
23
- `$ xano workspace delete 123 -f -o json
15
+ `$ xano workspace delete -w 123 -f -o json
24
16
  {
25
17
  "deleted": true,
26
18
  "workspace_id": 123
@@ -42,9 +34,14 @@ Deleted workspace 123
42
34
  options: ['summary', 'json'],
43
35
  required: false,
44
36
  }),
37
+ workspace: Flags.string({
38
+ char: 'w',
39
+ description: 'Workspace ID to delete (uses profile workspace if not provided)',
40
+ required: false,
41
+ }),
45
42
  };
46
43
  async run() {
47
- const { args, flags } = await this.parse(WorkspaceDelete);
44
+ const { flags } = await this.parse(WorkspaceDelete);
48
45
  // Get profile name (default or from flag/env)
49
46
  const profileName = flags.profile || this.getDefaultProfile();
50
47
  // Load credentials
@@ -62,7 +59,12 @@ Deleted workspace 123
62
59
  if (!profile.access_token) {
63
60
  this.error(`Profile '${profileName}' is missing access_token`);
64
61
  }
65
- const workspaceId = args.workspace_id;
62
+ // Get workspace ID from flag or profile
63
+ const workspaceId = flags.workspace || profile.workspace;
64
+ if (!workspaceId) {
65
+ this.error('No workspace ID provided. Use -w flag or set one in your profile.\n' +
66
+ 'Usage: xano workspace delete -w <workspace_id>');
67
+ }
66
68
  // Confirmation prompt unless --force is used
67
69
  if (!flags.force) {
68
70
  const confirmed = await this.confirm(`Are you sure you want to delete workspace ${workspaceId}? This action cannot be undone.`);
@@ -118,8 +120,7 @@ Deleted workspace 123
118
120
  });
119
121
  }
120
122
  loadCredentials() {
121
- const configDir = path.join(os.homedir(), '.xano');
122
- const credentialsPath = path.join(configDir, 'credentials.yaml');
123
+ const credentialsPath = this.getCredentialsPath();
123
124
  // Check if credentials file exists
124
125
  if (!fs.existsSync(credentialsPath)) {
125
126
  this.error(`Credentials file not found at ${credentialsPath}\n` +
@@ -1,19 +1,16 @@
1
1
  import BaseCommand from '../../../base-command.js';
2
2
  export default class WorkspaceEdit extends BaseCommand {
3
- static args: {
4
- workspace_id: import("@oclif/core/interfaces").Arg<number | undefined, {
5
- max?: number;
6
- min?: number;
7
- }>;
8
- };
9
3
  static description: string;
10
4
  static examples: string[];
11
5
  static flags: {
6
+ 'allow-push': import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
7
  description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
8
  name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
9
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
10
  'require-token': import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
11
  swagger: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
14
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
15
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
16
  };
@@ -1,31 +1,23 @@
1
- import { Args, Flags } from '@oclif/core';
1
+ import { Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkspaceEdit extends BaseCommand {
8
- static args = {
9
- workspace_id: Args.integer({
10
- description: 'Workspace ID to edit (uses profile workspace if not provided)',
11
- required: false,
12
- }),
13
- };
14
6
  static description = 'Edit an existing workspace via the Xano Metadata API';
15
7
  static examples = [
16
- `$ xano workspace edit 123 --name "new-name"
8
+ `$ xano workspace edit -w 123 --name "new-name"
17
9
  Updated workspace: new-name (ID: 123)
18
10
  `,
19
11
  `$ xano workspace edit --name "updated-workspace" --description "Updated description"
20
12
  Updated workspace: updated-workspace (ID: 123)
21
13
  Description: Updated description
22
14
  `,
23
- `$ xano workspace edit 123 --swagger --require-token
15
+ `$ xano workspace edit -w 123 --swagger --require-token
24
16
  Updated workspace: my-workspace (ID: 123)
25
17
  Swagger: enabled
26
18
  Require Token: true
27
19
  `,
28
- `$ xano workspace edit 123 --no-swagger -o json
20
+ `$ xano workspace edit -w 123 --no-swagger -o json
29
21
  {
30
22
  "id": 123,
31
23
  "name": "my-workspace",
@@ -35,6 +27,11 @@ Updated workspace: my-workspace (ID: 123)
35
27
  ];
36
28
  static flags = {
37
29
  ...BaseCommand.baseFlags,
30
+ 'allow-push': Flags.boolean({
31
+ allowNo: true,
32
+ description: 'Enable or disable direct CLI push to this workspace (not applicable on Free plan)',
33
+ required: false,
34
+ }),
38
35
  description: Flags.string({
39
36
  char: 'd',
40
37
  description: 'New description for the workspace',
@@ -62,9 +59,14 @@ Updated workspace: my-workspace (ID: 123)
62
59
  description: 'Enable or disable swagger documentation',
63
60
  required: false,
64
61
  }),
62
+ workspace: Flags.string({
63
+ char: 'w',
64
+ description: 'Workspace ID (uses profile workspace if not provided)',
65
+ required: false,
66
+ }),
65
67
  };
66
68
  async run() {
67
- const { args, flags } = await this.parse(WorkspaceEdit);
69
+ const { flags } = await this.parse(WorkspaceEdit);
68
70
  // Get profile name (default or from flag/env)
69
71
  const profileName = flags.profile || this.getDefaultProfile();
70
72
  // Load credentials
@@ -82,11 +84,11 @@ Updated workspace: my-workspace (ID: 123)
82
84
  if (!profile.access_token) {
83
85
  this.error(`Profile '${profileName}' is missing access_token`);
84
86
  }
85
- // Get workspace ID from args or profile
86
- const workspaceId = args.workspace_id || profile.workspace;
87
+ // Get workspace ID from flag or profile
88
+ const workspaceId = flags.workspace || profile.workspace;
87
89
  if (!workspaceId) {
88
- this.error('No workspace ID provided. Either pass a workspace ID as an argument or set one in your profile.\n' +
89
- 'Usage: xano workspace edit <workspace_id> [flags]');
90
+ this.error('No workspace ID provided. Use -w flag or set one in your profile.\n' +
91
+ 'Usage: xano workspace edit -w <workspace_id> [flags]');
90
92
  }
91
93
  // Build request body - only include fields that were specified
92
94
  const body = {};
@@ -102,9 +104,12 @@ Updated workspace: my-workspace (ID: 123)
102
104
  if (flags['require-token'] !== undefined) {
103
105
  body.documentation = { require_token: flags['require-token'] };
104
106
  }
107
+ if (flags['allow-push'] !== undefined) {
108
+ body.preferences = { allow_push: flags['allow-push'] };
109
+ }
105
110
  // Check if at least one field is being updated
106
111
  if (Object.keys(body).length === 0) {
107
- this.error('No fields specified to update. Use --name, --description, --swagger, or --require-token flags.\n' +
112
+ this.error('No fields specified to update. Use --name, --description, --swagger, --require-token, or --allow-push flags.\n' +
108
113
  'Example: xano workspace edit 123 --name "new-name"');
109
114
  }
110
115
  // Construct the API URL
@@ -114,8 +119,8 @@ Updated workspace: my-workspace (ID: 123)
114
119
  const response = await this.verboseFetch(apiUrl, {
115
120
  body: JSON.stringify(body),
116
121
  headers: {
117
- 'accept': 'application/json',
118
- 'Authorization': `Bearer ${profile.access_token}`,
122
+ accept: 'application/json',
123
+ Authorization: `Bearer ${profile.access_token}`,
119
124
  'Content-Type': 'application/json',
120
125
  },
121
126
  method: 'PUT',
@@ -124,7 +129,7 @@ Updated workspace: my-workspace (ID: 123)
124
129
  const errorText = await response.text();
125
130
  this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
126
131
  }
127
- const workspace = await response.json();
132
+ const workspace = (await response.json());
128
133
  // Output results
129
134
  if (flags.output === 'json') {
130
135
  this.log(JSON.stringify(workspace, null, 2));
@@ -141,6 +146,9 @@ Updated workspace: my-workspace (ID: 123)
141
146
  if (workspace.documentation?.require_token !== undefined) {
142
147
  this.log(` Require Token: ${workspace.documentation.require_token}`);
143
148
  }
149
+ if (workspace.preferences?.allow_push !== undefined) {
150
+ this.log(` Allow Push: ${workspace.preferences.allow_push}`);
151
+ }
144
152
  }
145
153
  }
146
154
  catch (error) {
@@ -153,12 +161,10 @@ Updated workspace: my-workspace (ID: 123)
153
161
  }
154
162
  }
155
163
  loadCredentials() {
156
- const configDir = path.join(os.homedir(), '.xano');
157
- const credentialsPath = path.join(configDir, 'credentials.yaml');
164
+ const credentialsPath = this.getCredentialsPath();
158
165
  // Check if credentials file exists
159
166
  if (!fs.existsSync(credentialsPath)) {
160
- this.error(`Credentials file not found at ${credentialsPath}\n` +
161
- `Create a profile using 'xano profile create'`);
167
+ this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
162
168
  }
163
169
  // Read credentials file
164
170
  try {
@@ -1,15 +1,11 @@
1
1
  import BaseCommand from '../../../base-command.js';
2
2
  export default class WorkspaceGet extends BaseCommand {
3
- static args: {
4
- workspace_id: import("@oclif/core/interfaces").Arg<number | undefined, {
5
- max?: number;
6
- min?: number;
7
- }>;
8
- };
9
3
  static description: string;
10
4
  static examples: string[];
11
5
  static flags: {
12
6
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
9
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
10
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
11
  };
@@ -1,19 +1,11 @@
1
- import { Args, Flags } from '@oclif/core';
1
+ import { Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
4
  import BaseCommand from '../../../base-command.js';
7
5
  export default class WorkspaceGet extends BaseCommand {
8
- static args = {
9
- workspace_id: Args.integer({
10
- description: 'Workspace ID to get details for (uses profile workspace if not provided)',
11
- required: false,
12
- }),
13
- };
14
6
  static description = 'Get details of a specific workspace from the Xano Metadata API';
15
7
  static examples = [
16
- `$ xano workspace get 123
8
+ `$ xano workspace get -w 123
17
9
  Workspace: my-workspace (ID: 123)
18
10
  Description: My workspace description
19
11
  Created: 2024-01-15
@@ -25,7 +17,7 @@ Workspace: my-workspace (ID: 123)
25
17
  "description": "My workspace description"
26
18
  }
27
19
  `,
28
- `$ xano workspace get 456 -p production -o json
20
+ `$ xano workspace get -w 456 -p production -o json
29
21
  {
30
22
  "id": 456,
31
23
  "name": "production-workspace"
@@ -41,9 +33,14 @@ Workspace: my-workspace (ID: 123)
41
33
  options: ['summary', 'json'],
42
34
  required: false,
43
35
  }),
36
+ workspace: Flags.string({
37
+ char: 'w',
38
+ description: 'Workspace ID (uses profile workspace if not provided)',
39
+ required: false,
40
+ }),
44
41
  };
45
42
  async run() {
46
- const { args, flags } = await this.parse(WorkspaceGet);
43
+ const { flags } = await this.parse(WorkspaceGet);
47
44
  // Get profile name (default or from flag/env)
48
45
  const profileName = flags.profile || this.getDefaultProfile();
49
46
  // Load credentials
@@ -61,11 +58,11 @@ Workspace: my-workspace (ID: 123)
61
58
  if (!profile.access_token) {
62
59
  this.error(`Profile '${profileName}' is missing access_token`);
63
60
  }
64
- // Get workspace ID from args or profile
65
- const workspaceId = args.workspace_id || profile.workspace;
61
+ // Get workspace ID from flag or profile
62
+ const workspaceId = flags.workspace || profile.workspace;
66
63
  if (!workspaceId) {
67
- this.error('No workspace ID provided. Either pass a workspace ID as an argument or set one in your profile.\n' +
68
- 'Usage: xano workspace get <workspace_id>');
64
+ this.error('No workspace ID provided. Use -w flag or set one in your profile.\n' +
65
+ 'Usage: xano workspace get -w <workspace_id>');
69
66
  }
70
67
  // Construct the API URL
71
68
  const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}`;
@@ -73,8 +70,8 @@ Workspace: my-workspace (ID: 123)
73
70
  try {
74
71
  const response = await this.verboseFetch(apiUrl, {
75
72
  headers: {
76
- 'accept': 'application/json',
77
- 'Authorization': `Bearer ${profile.access_token}`,
73
+ accept: 'application/json',
74
+ Authorization: `Bearer ${profile.access_token}`,
78
75
  },
79
76
  method: 'GET',
80
77
  }, flags.verbose, profile.access_token);
@@ -82,7 +79,7 @@ Workspace: my-workspace (ID: 123)
82
79
  const errorText = await response.text();
83
80
  this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
84
81
  }
85
- const workspace = await response.json();
82
+ const workspace = (await response.json());
86
83
  // Output results
87
84
  if (flags.output === 'json') {
88
85
  this.log(JSON.stringify(workspace, null, 2));
@@ -94,13 +91,16 @@ Workspace: my-workspace (ID: 123)
94
91
  this.log(` Description: ${workspace.description}`);
95
92
  }
96
93
  if (workspace.created_at) {
97
- const createdDate = new Date(workspace.created_at * 1000).toISOString().split('T')[0];
94
+ const createdDate = new Date(workspace.created_at).toISOString().split('T')[0];
98
95
  this.log(` Created: ${createdDate}`);
99
96
  }
100
97
  if (workspace.updated_at) {
101
- const updatedDate = new Date(workspace.updated_at * 1000).toISOString().split('T')[0];
98
+ const updatedDate = new Date(workspace.updated_at).toISOString().split('T')[0];
102
99
  this.log(` Updated: ${updatedDate}`);
103
100
  }
101
+ if (workspace.preferences?.allow_push !== undefined) {
102
+ this.log(` Allow Push: ${workspace.preferences.allow_push}`);
103
+ }
104
104
  }
105
105
  }
106
106
  catch (error) {
@@ -113,12 +113,10 @@ Workspace: my-workspace (ID: 123)
113
113
  }
114
114
  }
115
115
  loadCredentials() {
116
- const configDir = path.join(os.homedir(), '.xano');
117
- const credentialsPath = path.join(configDir, 'credentials.yaml');
116
+ const credentialsPath = this.getCredentialsPath();
118
117
  // Check if credentials file exists
119
118
  if (!fs.existsSync(credentialsPath)) {
120
- this.error(`Credentials file not found at ${credentialsPath}\n` +
121
- `Create a profile using 'xano profile create'`);
119
+ this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
122
120
  }
123
121
  // Read credentials file
124
122
  try {
@@ -1,15 +1,14 @@
1
1
  import BaseCommand from '../../../../base-command.js';
2
2
  export default class GitPull extends BaseCommand {
3
- static args: {
4
- directory: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
- };
6
3
  static description: string;
7
4
  static examples: string[];
8
5
  static flags: {
9
6
  branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ directory: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
8
  path: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
9
  repo: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
10
  token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
12
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
13
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
14
  };