@hubspot/cli 7.7.19-experimental.2 → 7.7.20-experimental.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 (296) hide show
  1. package/api/__tests__/migrate.test.d.ts +1 -0
  2. package/api/__tests__/migrate.test.js +183 -0
  3. package/commands/__tests__/account.test.d.ts +1 -0
  4. package/commands/__tests__/account.test.js +74 -0
  5. package/commands/__tests__/auth.test.d.ts +1 -0
  6. package/commands/__tests__/auth.test.js +43 -0
  7. package/commands/__tests__/cms.test.d.ts +1 -0
  8. package/commands/__tests__/cms.test.js +49 -0
  9. package/commands/__tests__/config.test.d.ts +1 -0
  10. package/commands/__tests__/config.test.js +49 -0
  11. package/commands/__tests__/create.test.d.ts +1 -0
  12. package/commands/__tests__/create.test.js +38 -0
  13. package/commands/__tests__/customObject.test.d.ts +1 -0
  14. package/commands/__tests__/customObject.test.js +54 -0
  15. package/commands/__tests__/doctor.test.d.ts +1 -0
  16. package/commands/__tests__/doctor.test.js +139 -0
  17. package/commands/__tests__/feedback.test.d.ts +1 -0
  18. package/commands/__tests__/feedback.test.js +62 -0
  19. package/commands/__tests__/fetch.test.d.ts +1 -0
  20. package/commands/__tests__/fetch.test.js +56 -0
  21. package/commands/__tests__/filemanager.test.d.ts +1 -0
  22. package/commands/__tests__/filemanager.test.js +50 -0
  23. package/commands/__tests__/function.test.d.ts +1 -0
  24. package/commands/__tests__/function.test.js +51 -0
  25. package/commands/__tests__/getStarted.test.d.ts +1 -0
  26. package/commands/__tests__/getStarted.test.js +170 -0
  27. package/commands/__tests__/hubdb.test.d.ts +1 -0
  28. package/commands/__tests__/hubdb.test.js +55 -0
  29. package/commands/__tests__/init.test.d.ts +1 -0
  30. package/commands/__tests__/init.test.js +47 -0
  31. package/commands/__tests__/lint.test.d.ts +1 -0
  32. package/commands/__tests__/lint.test.js +38 -0
  33. package/commands/__tests__/list.test.d.ts +1 -0
  34. package/commands/__tests__/list.test.js +47 -0
  35. package/commands/__tests__/logs.test.d.ts +1 -0
  36. package/commands/__tests__/logs.test.js +70 -0
  37. package/commands/__tests__/mcp.test.d.ts +1 -0
  38. package/commands/__tests__/mcp.test.js +51 -0
  39. package/commands/__tests__/mv.test.d.ts +1 -0
  40. package/commands/__tests__/mv.test.js +84 -0
  41. package/commands/__tests__/open.test.d.ts +1 -0
  42. package/commands/__tests__/open.test.js +96 -0
  43. package/commands/__tests__/project.test.d.ts +1 -0
  44. package/commands/__tests__/project.test.js +100 -0
  45. package/commands/__tests__/remove.test.d.ts +1 -0
  46. package/commands/__tests__/remove.test.js +77 -0
  47. package/commands/__tests__/sandbox.test.d.ts +1 -0
  48. package/commands/__tests__/sandbox.test.js +49 -0
  49. package/commands/__tests__/secret.test.d.ts +1 -0
  50. package/commands/__tests__/secret.test.js +54 -0
  51. package/commands/__tests__/testAccount.test.d.ts +1 -0
  52. package/commands/__tests__/testAccount.test.js +60 -0
  53. package/commands/__tests__/theme.test.d.ts +1 -0
  54. package/commands/__tests__/theme.test.js +52 -0
  55. package/commands/account/__tests__/auth.test.d.ts +1 -0
  56. package/commands/account/__tests__/auth.test.js +31 -0
  57. package/commands/account/__tests__/clean.test.d.ts +1 -0
  58. package/commands/account/__tests__/clean.test.js +33 -0
  59. package/commands/account/__tests__/createOverride.test.d.ts +1 -0
  60. package/commands/account/__tests__/createOverride.test.js +37 -0
  61. package/commands/account/__tests__/info.test.d.ts +1 -0
  62. package/commands/account/__tests__/info.test.js +33 -0
  63. package/commands/account/__tests__/list.test.d.ts +1 -0
  64. package/commands/account/__tests__/list.test.js +33 -0
  65. package/commands/account/__tests__/remove.test.d.ts +1 -0
  66. package/commands/account/__tests__/remove.test.js +41 -0
  67. package/commands/account/__tests__/removeOverride.d.ts +1 -0
  68. package/commands/account/__tests__/removeOverride.js +30 -0
  69. package/commands/account/__tests__/rename.test.d.ts +1 -0
  70. package/commands/account/__tests__/rename.test.js +47 -0
  71. package/commands/account/__tests__/use.test.d.ts +1 -0
  72. package/commands/account/__tests__/use.test.js +37 -0
  73. package/commands/app/__tests__/migrate.test.d.ts +1 -0
  74. package/commands/app/__tests__/migrate.test.js +129 -0
  75. package/commands/app/secret/__tests__/add.test.d.ts +1 -0
  76. package/commands/app/secret/__tests__/add.test.js +33 -0
  77. package/commands/app/secret/__tests__/delete.test.d.ts +1 -0
  78. package/commands/app/secret/__tests__/delete.test.js +33 -0
  79. package/commands/app/secret/__tests__/list.test.d.ts +1 -0
  80. package/commands/app/secret/__tests__/list.test.js +30 -0
  81. package/commands/app/secret/__tests__/update.test.d.ts +1 -0
  82. package/commands/app/secret/__tests__/update.test.js +33 -0
  83. package/commands/app.js +1 -6
  84. package/commands/customObject/__tests__/create.test.d.ts +1 -0
  85. package/commands/customObject/__tests__/create.test.js +45 -0
  86. package/commands/customObject/__tests__/schema.test.d.ts +1 -0
  87. package/commands/customObject/__tests__/schema.test.js +58 -0
  88. package/commands/customObject/schema/__tests__/create.test.d.ts +1 -0
  89. package/commands/customObject/schema/__tests__/create.test.js +33 -0
  90. package/commands/customObject/schema/__tests__/delete.test.d.ts +1 -0
  91. package/commands/customObject/schema/__tests__/delete.test.js +47 -0
  92. package/commands/customObject/schema/__tests__/fetch-all.test.d.ts +1 -0
  93. package/commands/customObject/schema/__tests__/fetch-all.test.js +46 -0
  94. package/commands/customObject/schema/__tests__/fetch.test.d.ts +1 -0
  95. package/commands/customObject/schema/__tests__/fetch.test.js +50 -0
  96. package/commands/customObject/schema/__tests__/list.test.d.ts +1 -0
  97. package/commands/customObject/schema/__tests__/list.test.js +34 -0
  98. package/commands/customObject/schema/__tests__/update.test.d.ts +1 -0
  99. package/commands/customObject/schema/__tests__/update.test.js +45 -0
  100. package/commands/fetch.js +0 -1
  101. package/commands/filemanager/__tests__/fetch.test.d.ts +1 -0
  102. package/commands/filemanager/__tests__/fetch.test.js +37 -0
  103. package/commands/filemanager/__tests__/upload.test.d.ts +1 -0
  104. package/commands/filemanager/__tests__/upload.test.js +35 -0
  105. package/commands/hubdb/__tests__/clear.test.d.ts +1 -0
  106. package/commands/hubdb/__tests__/clear.test.js +33 -0
  107. package/commands/hubdb/__tests__/create.test.d.ts +1 -0
  108. package/commands/hubdb/__tests__/create.test.js +33 -0
  109. package/commands/hubdb/__tests__/delete.test.d.ts +1 -0
  110. package/commands/hubdb/__tests__/delete.test.js +33 -0
  111. package/commands/hubdb/__tests__/fetch.test.d.ts +1 -0
  112. package/commands/hubdb/__tests__/fetch.test.js +33 -0
  113. package/commands/hubdb/__tests__/list.test.d.ts +1 -0
  114. package/commands/hubdb/__tests__/list.test.js +101 -0
  115. package/commands/logs.js +0 -1
  116. package/commands/mcp/__tests__/setup.test.d.ts +1 -0
  117. package/commands/mcp/__tests__/setup.test.js +31 -0
  118. package/commands/mcp/__tests__/start.test.d.ts +1 -0
  119. package/commands/mcp/__tests__/start.test.js +32 -0
  120. package/commands/project/__tests__/add.test.d.ts +1 -0
  121. package/commands/project/__tests__/add.test.js +48 -0
  122. package/commands/project/__tests__/create.test.d.ts +1 -0
  123. package/commands/project/__tests__/create.test.js +45 -0
  124. package/commands/project/__tests__/deploy.test.d.ts +1 -0
  125. package/commands/project/__tests__/deploy.test.js +344 -0
  126. package/commands/project/__tests__/devUnifiedFlow.test.d.ts +1 -0
  127. package/commands/project/__tests__/devUnifiedFlow.test.js +419 -0
  128. package/commands/project/__tests__/download.test.d.ts +1 -0
  129. package/commands/project/__tests__/download.test.js +44 -0
  130. package/commands/project/__tests__/fixtures/exampleProject.json +33 -0
  131. package/commands/project/__tests__/installDeps.test.d.ts +1 -0
  132. package/commands/project/__tests__/installDeps.test.js +180 -0
  133. package/commands/project/__tests__/listBuilds.test.d.ts +1 -0
  134. package/commands/project/__tests__/listBuilds.test.js +43 -0
  135. package/commands/project/__tests__/logs.test.d.ts +1 -0
  136. package/commands/project/__tests__/logs.test.js +246 -0
  137. package/commands/project/__tests__/migrate.test.d.ts +1 -0
  138. package/commands/project/__tests__/migrate.test.js +116 -0
  139. package/commands/project/__tests__/migrateApp.test.d.ts +1 -0
  140. package/commands/project/__tests__/migrateApp.test.js +87 -0
  141. package/commands/project/__tests__/open.test.d.ts +1 -0
  142. package/commands/project/__tests__/open.test.js +44 -0
  143. package/commands/project/__tests__/profile.test.d.ts +1 -0
  144. package/commands/project/__tests__/profile.test.js +47 -0
  145. package/commands/project/__tests__/upload.test.d.ts +1 -0
  146. package/commands/project/__tests__/upload.test.js +48 -0
  147. package/commands/project/__tests__/watch.test.d.ts +1 -0
  148. package/commands/project/__tests__/watch.test.js +40 -0
  149. package/commands/project/dev/unifiedFlow.js +1 -1
  150. package/commands/sandbox/__tests__/create.test.d.ts +1 -0
  151. package/commands/sandbox/__tests__/create.test.js +36 -0
  152. package/commands/sandbox/__tests__/delete.test.d.ts +1 -0
  153. package/commands/sandbox/__tests__/delete.test.js +36 -0
  154. package/commands/secret/__tests__/addSecret.test.d.ts +1 -0
  155. package/commands/secret/__tests__/addSecret.test.js +34 -0
  156. package/commands/secret/__tests__/deleteSecret.test.d.ts +1 -0
  157. package/commands/secret/__tests__/deleteSecret.test.js +46 -0
  158. package/commands/secret/__tests__/listSecret.test.d.ts +1 -0
  159. package/commands/secret/__tests__/listSecret.test.js +34 -0
  160. package/commands/secret/__tests__/updateSecret.test.d.ts +1 -0
  161. package/commands/secret/__tests__/updateSecret.test.js +34 -0
  162. package/commands/testAccount/__tests__/create.test.d.ts +1 -0
  163. package/commands/testAccount/__tests__/create.test.js +38 -0
  164. package/commands/testAccount/__tests__/createConfig.test.d.ts +1 -0
  165. package/commands/testAccount/__tests__/createConfig.test.js +40 -0
  166. package/commands/testAccount/__tests__/delete.test.d.ts +1 -0
  167. package/commands/testAccount/__tests__/delete.test.js +36 -0
  168. package/commands/testAccount/create.js +24 -14
  169. package/commands/theme/__tests__/generate-selectors.test.d.ts +1 -0
  170. package/commands/theme/__tests__/generate-selectors.test.js +33 -0
  171. package/commands/theme/__tests__/marketplace-validate.test.d.ts +1 -0
  172. package/commands/theme/__tests__/marketplace-validate.test.js +41 -0
  173. package/commands/theme/__tests__/preview.test.d.ts +1 -0
  174. package/commands/theme/__tests__/preview.test.js +65 -0
  175. package/lang/en.d.ts +6 -65
  176. package/lang/en.js +6 -65
  177. package/lib/__tests__/accountTypes.test.d.ts +1 -0
  178. package/lib/__tests__/accountTypes.test.js +100 -0
  179. package/lib/__tests__/buildAccount.test.d.ts +1 -0
  180. package/lib/__tests__/buildAccount.test.js +231 -0
  181. package/lib/__tests__/commonOpts.test.d.ts +1 -0
  182. package/lib/__tests__/commonOpts.test.js +87 -0
  183. package/lib/__tests__/dependencyManagement.test.d.ts +1 -0
  184. package/lib/__tests__/dependencyManagement.test.js +180 -0
  185. package/lib/__tests__/developerTestAccounts.test.d.ts +1 -0
  186. package/lib/__tests__/developerTestAccounts.test.js +180 -0
  187. package/lib/__tests__/hasFeature.test.d.ts +1 -0
  188. package/lib/__tests__/hasFeature.test.js +37 -0
  189. package/lib/__tests__/npm.test.d.ts +1 -0
  190. package/lib/__tests__/npm.test.js +62 -0
  191. package/lib/__tests__/oauth.test.d.ts +1 -0
  192. package/lib/__tests__/oauth.test.js +113 -0
  193. package/lib/__tests__/parsing.test.d.ts +1 -0
  194. package/lib/__tests__/parsing.test.js +36 -0
  195. package/lib/__tests__/polling.test.d.ts +1 -0
  196. package/lib/__tests__/polling.test.js +78 -0
  197. package/lib/__tests__/process.test.d.ts +1 -0
  198. package/lib/__tests__/process.test.js +90 -0
  199. package/lib/__tests__/projectProfiles.test.d.ts +1 -0
  200. package/lib/__tests__/projectProfiles.test.js +134 -0
  201. package/lib/__tests__/sandboxSync.test.d.ts +1 -0
  202. package/lib/__tests__/sandboxSync.test.js +131 -0
  203. package/lib/__tests__/sandboxes.test.d.ts +1 -0
  204. package/lib/__tests__/sandboxes.test.js +148 -0
  205. package/lib/__tests__/serverlessLogs.test.d.ts +1 -0
  206. package/lib/__tests__/serverlessLogs.test.js +154 -0
  207. package/lib/__tests__/usageTracking.test.d.ts +1 -0
  208. package/lib/__tests__/usageTracking.test.js +171 -0
  209. package/lib/__tests__/validation.test.d.ts +1 -0
  210. package/lib/__tests__/validation.test.js +145 -0
  211. package/lib/__tests__/yargsUtils.test.d.ts +1 -0
  212. package/lib/__tests__/yargsUtils.test.js +74 -0
  213. package/lib/app/__tests__/migrate.test.d.ts +1 -0
  214. package/lib/app/__tests__/migrate.test.js +495 -0
  215. package/lib/app/__tests__/migrate_legacy.test.d.ts +1 -0
  216. package/lib/app/__tests__/migrate_legacy.test.js +136 -0
  217. package/lib/buildAccount.d.ts +1 -7
  218. package/lib/buildAccount.js +4 -54
  219. package/lib/doctor/Diagnosis.js +11 -11
  220. package/lib/doctor/Doctor.js +42 -42
  221. package/lib/doctor/__tests__/Diagnosis.test.d.ts +1 -0
  222. package/lib/doctor/__tests__/Diagnosis.test.js +87 -0
  223. package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.d.ts +1 -0
  224. package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.js +172 -0
  225. package/lib/doctor/__tests__/Doctor.test.d.ts +1 -0
  226. package/lib/doctor/__tests__/Doctor.test.js +398 -0
  227. package/lib/mcp/setup.js +18 -2
  228. package/lib/middleware/__test__/configMiddleware.test.js +12 -12
  229. package/lib/middleware/__test__/gitMiddleware.test.js +4 -4
  230. package/lib/middleware/__test__/notificationsMiddleware.test.js +2 -2
  231. package/lib/middleware/__test__/requestMiddleware.test.js +2 -2
  232. package/lib/middleware/__test__/yargsChecksMiddleware.test.js +7 -7
  233. package/lib/middleware/notificationsMiddleware.js +16 -13
  234. package/lib/projects/__tests__/AppDevModeInterface.test.d.ts +1 -0
  235. package/lib/projects/__tests__/AppDevModeInterface.test.js +517 -0
  236. package/lib/projects/__tests__/LocalDevProcess.test.d.ts +1 -0
  237. package/lib/projects/__tests__/LocalDevProcess.test.js +314 -0
  238. package/lib/projects/__tests__/LocalDevWebsocketServer.test.d.ts +1 -0
  239. package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +175 -0
  240. package/lib/projects/__tests__/ProjectLogsManager.test.d.ts +1 -0
  241. package/lib/projects/__tests__/ProjectLogsManager.test.js +191 -0
  242. package/lib/projects/__tests__/buildAndDeploy.test.d.ts +1 -0
  243. package/lib/projects/__tests__/buildAndDeploy.test.js +25 -0
  244. package/lib/projects/__tests__/components.test.d.ts +1 -0
  245. package/lib/projects/__tests__/components.test.js +186 -0
  246. package/lib/projects/__tests__/projects.test.d.ts +1 -0
  247. package/lib/projects/__tests__/projects.test.js +89 -0
  248. package/lib/projects/__tests__/structure.test.d.ts +1 -0
  249. package/lib/projects/__tests__/structure.test.js +249 -0
  250. package/lib/projects/add/__tests__/legacyAddComponent.test.d.ts +1 -0
  251. package/lib/projects/add/__tests__/legacyAddComponent.test.js +206 -0
  252. package/lib/projects/add/__tests__/v3AddComponent.test.d.ts +1 -0
  253. package/lib/projects/add/__tests__/v3AddComponent.test.js +190 -0
  254. package/lib/projects/create/__tests__/legacy.test.d.ts +1 -0
  255. package/lib/projects/create/__tests__/legacy.test.js +126 -0
  256. package/lib/projects/create/__tests__/v3.test.d.ts +1 -0
  257. package/lib/projects/create/__tests__/v3.test.js +80 -0
  258. package/lib/projects/localDev/DevServerManager.js +0 -1
  259. package/lib/projects/localDev/helpers.d.ts +1 -1
  260. package/lib/projects/localDev/helpers.js +2 -2
  261. package/lib/projects/structure.d.ts +2 -2
  262. package/lib/projects/upload.d.ts +1 -2
  263. package/lib/projects/upload.js +0 -1
  264. package/lib/prompts/__tests__/downloadProjectPrompt.test.d.ts +1 -0
  265. package/lib/prompts/__tests__/downloadProjectPrompt.test.js +30 -0
  266. package/lib/prompts/__tests__/projectsLogsPrompt.test.d.ts +1 -0
  267. package/lib/prompts/__tests__/projectsLogsPrompt.test.js +42 -0
  268. package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +10 -9
  269. package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +43 -81
  270. package/lib/schema.js +5 -1
  271. package/lib/ui/SpinniesManager.js +0 -1
  272. package/lib/ui/supportHyperlinks.js +2 -2
  273. package/lib/ui/supportsColor.js +2 -2
  274. package/lib/utils/hasFlag.d.ts +1 -0
  275. package/lib/utils/hasFlag.js +15 -0
  276. package/lib/yargsUtils.d.ts +2 -1
  277. package/lib/yargsUtils.js +3 -13
  278. package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.d.ts +1 -0
  279. package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.js +152 -0
  280. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.d.ts +1 -0
  281. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +129 -0
  282. package/mcp-server/tools/project/__tests__/DeployProject.test.d.ts +1 -0
  283. package/mcp-server/tools/project/__tests__/DeployProject.test.js +120 -0
  284. package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.d.ts +1 -0
  285. package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.js +127 -0
  286. package/mcp-server/tools/project/__tests__/UploadProjectTools.test.d.ts +1 -0
  287. package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +108 -0
  288. package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.d.ts +1 -0
  289. package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.js +111 -0
  290. package/mcp-server/utils/__tests__/command.test.d.ts +1 -0
  291. package/mcp-server/utils/__tests__/command.test.js +47 -0
  292. package/mcp-server/utils/__tests__/project.test.d.ts +1 -0
  293. package/mcp-server/utils/__tests__/project.test.js +81 -0
  294. package/package.json +8 -8
  295. package/commands/app/install.d.ts +0 -8
  296. package/commands/app/install.js +0 -127
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const commonOpts_1 = require("../../lib/commonOpts");
8
+ vi.mock('../../lib/commonOpts');
9
+ const optionsSpy = vi
10
+ .spyOn(yargs_1.default, 'options')
11
+ .mockReturnValue(yargs_1.default);
12
+ const conflictsSpy = vi
13
+ .spyOn(yargs_1.default, 'conflicts')
14
+ .mockReturnValue(yargs_1.default);
15
+ // Import this last so mocks apply
16
+ const logs_1 = __importDefault(require("../logs"));
17
+ describe('commands/logs', () => {
18
+ describe('command', () => {
19
+ it('should have the correct command structure', () => {
20
+ expect(logs_1.default.command).toEqual('logs [endpoint]');
21
+ });
22
+ });
23
+ describe('describe', () => {
24
+ it('should provide a description', () => {
25
+ expect(logs_1.default.describe).toBeDefined();
26
+ });
27
+ });
28
+ describe('builder', () => {
29
+ it('should support the correct positional arguments', () => {
30
+ logs_1.default.builder(yargs_1.default);
31
+ expect(yargs_1.default.positional).toHaveBeenCalledTimes(1);
32
+ expect(yargs_1.default.positional).toHaveBeenCalledWith('endpoint', expect.objectContaining({ type: 'string' }));
33
+ });
34
+ it('should support the correct options', () => {
35
+ logs_1.default.builder(yargs_1.default);
36
+ expect(optionsSpy).toHaveBeenCalledTimes(1);
37
+ expect(optionsSpy).toHaveBeenCalledWith({
38
+ latest: expect.objectContaining({
39
+ alias: 'l',
40
+ type: 'boolean',
41
+ }),
42
+ compact: expect.objectContaining({
43
+ type: 'boolean',
44
+ }),
45
+ follow: expect.objectContaining({
46
+ alias: ['f'],
47
+ type: 'boolean',
48
+ }),
49
+ limit: expect.objectContaining({
50
+ type: 'number',
51
+ }),
52
+ });
53
+ expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
54
+ expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
55
+ expect(commonOpts_1.addAccountOptions).toHaveBeenCalledTimes(1);
56
+ expect(commonOpts_1.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
57
+ expect(commonOpts_1.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
58
+ expect(commonOpts_1.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
59
+ });
60
+ it('should set the correct conflicts', () => {
61
+ logs_1.default.builder(yargs_1.default);
62
+ expect(conflictsSpy).toHaveBeenCalledTimes(1);
63
+ expect(conflictsSpy).toHaveBeenCalledWith('follow', 'limit');
64
+ });
65
+ it('should provide examples', () => {
66
+ logs_1.default.builder(yargs_1.default);
67
+ expect(yargs_1.default.example).toHaveBeenCalledTimes(1);
68
+ });
69
+ });
70
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const start_1 = __importDefault(require("../mcp/start"));
8
+ const setup_1 = __importDefault(require("../mcp/setup"));
9
+ const mcp_1 = __importDefault(require("../mcp"));
10
+ vi.mock('../mcp/start');
11
+ vi.mock('../mcp/setup');
12
+ vi.mock('../../lib/commonOpts');
13
+ const commandSpy = vi
14
+ .spyOn(yargs_1.default, 'command')
15
+ .mockReturnValue(yargs_1.default);
16
+ const demandCommandSpy = vi
17
+ .spyOn(yargs_1.default, 'demandCommand')
18
+ .mockReturnValue(yargs_1.default);
19
+ describe('commands/mcp', () => {
20
+ describe('command', () => {
21
+ it('should have the correct command structure', () => {
22
+ expect(mcp_1.default.command).toEqual('mcp');
23
+ });
24
+ });
25
+ describe('describe', () => {
26
+ it('should provide a description', () => {
27
+ expect(mcp_1.default.describe).toBeUndefined();
28
+ });
29
+ });
30
+ describe('builder', () => {
31
+ beforeEach(() => {
32
+ commandSpy.mockClear();
33
+ demandCommandSpy.mockClear();
34
+ });
35
+ const subcommands = [start_1.default, setup_1.default];
36
+ it('should demand the command takes one positional argument', () => {
37
+ mcp_1.default.builder(yargs_1.default);
38
+ expect(demandCommandSpy).toHaveBeenCalledTimes(1);
39
+ expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
40
+ });
41
+ it('should add the correct number of sub commands', () => {
42
+ mcp_1.default.builder(yargs_1.default);
43
+ expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
44
+ });
45
+ it.each(subcommands)('should attach the %s subcommand', module => {
46
+ mcp_1.default.builder(yargs_1.default);
47
+ expect(module).toBeDefined();
48
+ expect(commandSpy).toHaveBeenCalledWith(module);
49
+ });
50
+ });
51
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const yargs_1 = __importDefault(require("yargs"));
40
+ const commonOpts = __importStar(require("../../lib/commonOpts"));
41
+ const mv_1 = __importDefault(require("../mv"));
42
+ vi.mock('../../lib/commonOpts');
43
+ const positionalSpy = vi
44
+ .spyOn(yargs_1.default, 'positional')
45
+ .mockReturnValue(yargs_1.default);
46
+ describe('commands/mv', () => {
47
+ describe('command', () => {
48
+ it('should have the correct command structure', () => {
49
+ expect(mv_1.default.command).toBe('mv <srcPath> <destPath>');
50
+ });
51
+ });
52
+ describe('describe', () => {
53
+ it('should provide a description', () => {
54
+ expect(mv_1.default.describe).toBeDefined();
55
+ });
56
+ });
57
+ describe('builder', () => {
58
+ it('should support the correct options', () => {
59
+ mv_1.default.builder(yargs_1.default);
60
+ expect(commonOpts.addGlobalOptions).toHaveBeenCalledTimes(1);
61
+ expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(yargs_1.default);
62
+ expect(commonOpts.addConfigOptions).toHaveBeenCalledTimes(1);
63
+ expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
64
+ expect(commonOpts.addAccountOptions).toHaveBeenCalledTimes(1);
65
+ expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
66
+ expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
67
+ expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
68
+ });
69
+ it('should add the srcPath positional argument', () => {
70
+ mv_1.default.builder(yargs_1.default);
71
+ expect(positionalSpy).toHaveBeenCalledWith('srcPath', {
72
+ describe: 'Remote hubspot path',
73
+ type: 'string',
74
+ });
75
+ });
76
+ it('should add the destPath positional argument', () => {
77
+ mv_1.default.builder(yargs_1.default);
78
+ expect(positionalSpy).toHaveBeenCalledWith('destPath', {
79
+ describe: 'Remote hubspot path',
80
+ type: 'string',
81
+ });
82
+ });
83
+ });
84
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const yargs_1 = __importDefault(require("yargs"));
40
+ const open_1 = __importDefault(require("../open"));
41
+ const commonOpts = __importStar(require("../../lib/commonOpts"));
42
+ vi.mock('../../lib/commonOpts');
43
+ // Spies are now safe to create since the methods exist on the mock
44
+ const positionalSpy = vi.spyOn(mockYargs, 'positional');
45
+ const optionSpy = vi.spyOn(mockYargs, 'option');
46
+ const exampleSpy = vi.spyOn(mockYargs, 'example');
47
+ describe('commands/open', () => {
48
+ describe('command', () => {
49
+ it('should have the correct command structure', () => {
50
+ expect(open_1.default.command).toBe('open [shortcut]');
51
+ });
52
+ });
53
+ describe('describe', () => {
54
+ it('should provide a description', () => {
55
+ expect(open_1.default.describe).toBeDefined();
56
+ });
57
+ });
58
+ describe('builder', () => {
59
+ it('should support the correct options', () => {
60
+ open_1.default.builder(yargs_1.default);
61
+ expect(commonOpts.addGlobalOptions).toHaveBeenCalledTimes(1);
62
+ expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(yargs_1.default);
63
+ expect(commonOpts.addConfigOptions).toHaveBeenCalledTimes(1);
64
+ expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
65
+ expect(commonOpts.addAccountOptions).toHaveBeenCalledTimes(1);
66
+ expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
67
+ expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
68
+ expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
69
+ });
70
+ it('should add the shortcut positional argument', () => {
71
+ open_1.default.builder(yargs_1.default);
72
+ expect(positionalSpy).toHaveBeenCalledWith('[shortcut]', {
73
+ describe: expect.any(String),
74
+ type: 'string',
75
+ });
76
+ });
77
+ it('should add the list option', () => {
78
+ open_1.default.builder(yargs_1.default);
79
+ expect(optionSpy).toHaveBeenCalledWith('list', {
80
+ alias: 'l',
81
+ describe: expect.any(String),
82
+ type: 'boolean',
83
+ });
84
+ });
85
+ it('should add examples', () => {
86
+ open_1.default.builder(yargs_1.default);
87
+ expect(exampleSpy).toHaveBeenCalledWith([
88
+ ['$0 open'],
89
+ ['$0 open --list'],
90
+ ['$0 open settings'],
91
+ ['$0 open settings/navigation'],
92
+ ['$0 open sn'],
93
+ ]);
94
+ });
95
+ });
96
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const deploy_1 = __importDefault(require("../project/deploy"));
8
+ const create_1 = __importDefault(require("../project/create"));
9
+ const upload_1 = __importDefault(require("../project/upload"));
10
+ const listBuilds_1 = __importDefault(require("../project/listBuilds"));
11
+ const logs_1 = __importDefault(require("../project/logs"));
12
+ const watch_1 = __importDefault(require("../project/watch"));
13
+ const download_1 = __importDefault(require("../project/download"));
14
+ const open_1 = __importDefault(require("../project/open"));
15
+ const dev_1 = __importDefault(require("../project/dev"));
16
+ const add_1 = __importDefault(require("../project/add"));
17
+ const migrateApp_1 = __importDefault(require("../project/migrateApp"));
18
+ const migrate_1 = __importDefault(require("../project/migrate"));
19
+ const cloneApp_1 = __importDefault(require("../project/cloneApp"));
20
+ const installDeps_1 = __importDefault(require("../project/installDeps"));
21
+ const validate_1 = __importDefault(require("../project/validate"));
22
+ const profile_1 = __importDefault(require("../project/profile"));
23
+ const project_1 = __importDefault(require("../project"));
24
+ vi.mock('../project/deploy');
25
+ vi.mock('../project/create');
26
+ vi.mock('../project/upload');
27
+ vi.mock('../project/listBuilds');
28
+ vi.mock('../project/logs');
29
+ vi.mock('../project/watch');
30
+ vi.mock('../project/download');
31
+ vi.mock('../project/open');
32
+ vi.mock('../project/dev');
33
+ vi.mock('../project/add');
34
+ vi.mock('../project/migrateApp', () => ({
35
+ default: {},
36
+ }));
37
+ vi.mock('../project/cloneApp', () => ({
38
+ default: {},
39
+ }));
40
+ vi.mock('../project/migrate', () => ({
41
+ default: {},
42
+ }));
43
+ vi.mock('../project/installDeps');
44
+ vi.mock('../project/profile');
45
+ vi.mock('../../lib/commonOpts');
46
+ const commandSpy = vi
47
+ .spyOn(yargs_1.default, 'command')
48
+ .mockReturnValue(yargs_1.default);
49
+ const demandCommandSpy = vi
50
+ .spyOn(yargs_1.default, 'demandCommand')
51
+ .mockReturnValue(yargs_1.default);
52
+ describe('commands/project', () => {
53
+ describe('command', () => {
54
+ it('should have the correct command structure', () => {
55
+ expect(project_1.default.command).toEqual(['project', 'projects']);
56
+ });
57
+ });
58
+ describe('describe', () => {
59
+ it('should contain the beta tag', () => {
60
+ expect(project_1.default.describe).toContain('[BETA]');
61
+ });
62
+ it('should provide a description', () => {
63
+ expect(project_1.default.describe).toBeDefined();
64
+ });
65
+ });
66
+ describe('builder', () => {
67
+ const subcommands = [
68
+ create_1.default,
69
+ add_1.default,
70
+ watch_1.default,
71
+ dev_1.default,
72
+ upload_1.default,
73
+ deploy_1.default,
74
+ logs_1.default,
75
+ listBuilds_1.default,
76
+ download_1.default,
77
+ open_1.default,
78
+ migrateApp_1.default,
79
+ migrate_1.default,
80
+ cloneApp_1.default,
81
+ installDeps_1.default,
82
+ profile_1.default,
83
+ validate_1.default,
84
+ ];
85
+ it('should demand the command takes one positional argument', () => {
86
+ project_1.default.builder(yargs_1.default);
87
+ expect(demandCommandSpy).toHaveBeenCalledTimes(1);
88
+ expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
89
+ });
90
+ it('should add the correct number of sub commands', () => {
91
+ project_1.default.builder(yargs_1.default);
92
+ expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
93
+ });
94
+ it.each(subcommands)('should attach the %s subcommand', module => {
95
+ project_1.default.builder(yargs_1.default);
96
+ expect(module).toBeDefined();
97
+ expect(commandSpy).toHaveBeenCalledWith(module);
98
+ });
99
+ });
100
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const yargs_1 = __importDefault(require("yargs"));
40
+ const commonOpts = __importStar(require("../../lib/commonOpts"));
41
+ const remove_1 = __importDefault(require("../remove"));
42
+ vi.mock('../../lib/commonOpts');
43
+ const positionalSpy = vi
44
+ .spyOn(yargs_1.default, 'positional')
45
+ .mockReturnValue(yargs_1.default);
46
+ describe('commands/remove', () => {
47
+ describe('command', () => {
48
+ it('should have the correct command structure', () => {
49
+ expect(remove_1.default.command).toBe('remove <path>');
50
+ });
51
+ });
52
+ describe('describe', () => {
53
+ it('should provide a description', () => {
54
+ expect(remove_1.default.describe).toBeDefined();
55
+ });
56
+ });
57
+ describe('builder', () => {
58
+ it('should support the correct options', () => {
59
+ remove_1.default.builder(yargs_1.default);
60
+ expect(commonOpts.addGlobalOptions).toHaveBeenCalledTimes(1);
61
+ expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(yargs_1.default);
62
+ expect(commonOpts.addConfigOptions).toHaveBeenCalledTimes(1);
63
+ expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
64
+ expect(commonOpts.addAccountOptions).toHaveBeenCalledTimes(1);
65
+ expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
66
+ expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
67
+ expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
68
+ });
69
+ it('should add the path positional argument', () => {
70
+ remove_1.default.builder(yargs_1.default);
71
+ expect(positionalSpy).toHaveBeenCalledWith('path', {
72
+ describe: expect.any(String),
73
+ type: 'string',
74
+ });
75
+ });
76
+ });
77
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const create_1 = __importDefault(require("../sandbox/create"));
8
+ const delete_1 = __importDefault(require("../sandbox/delete"));
9
+ const sandbox_1 = __importDefault(require("../sandbox"));
10
+ vi.mock('../sandbox/create');
11
+ vi.mock('../sandbox/delete');
12
+ const commandSpy = vi
13
+ .spyOn(yargs_1.default, 'command')
14
+ .mockReturnValue(yargs_1.default);
15
+ const demandCommandSpy = vi
16
+ .spyOn(yargs_1.default, 'demandCommand')
17
+ .mockReturnValue(yargs_1.default);
18
+ describe('commands/sandbox', () => {
19
+ describe('command', () => {
20
+ it('should have the correct command structure', () => {
21
+ expect(sandbox_1.default.command).toEqual(['sandbox', 'sandboxes']);
22
+ });
23
+ });
24
+ describe('describe', () => {
25
+ it('should provide a description', () => {
26
+ expect(sandbox_1.default.describe).toBeDefined();
27
+ });
28
+ });
29
+ describe('builder', () => {
30
+ beforeEach(() => {
31
+ commandSpy.mockClear();
32
+ demandCommandSpy.mockClear();
33
+ });
34
+ const subcommands = [create_1.default, delete_1.default];
35
+ it('should demand the command takes one positional argument', () => {
36
+ sandbox_1.default.builder(yargs_1.default);
37
+ expect(demandCommandSpy).toHaveBeenCalledTimes(1);
38
+ expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
39
+ });
40
+ it('should add the correct number of sub commands', () => {
41
+ sandbox_1.default.builder(yargs_1.default);
42
+ expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
43
+ });
44
+ it.each(subcommands)('should attach the %s subcommand', module => {
45
+ sandbox_1.default.builder(yargs_1.default);
46
+ expect(commandSpy).toHaveBeenCalledWith(module);
47
+ });
48
+ });
49
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const addSecret_1 = __importDefault(require("../secret/addSecret"));
8
+ const deleteSecret_1 = __importDefault(require("../secret/deleteSecret"));
9
+ const listSecret_1 = __importDefault(require("../secret/listSecret"));
10
+ const updateSecret_1 = __importDefault(require("../secret/updateSecret"));
11
+ const secret_1 = __importDefault(require("../secret"));
12
+ vi.mock('../secret/addSecret');
13
+ vi.mock('../secret/deleteSecret');
14
+ vi.mock('../secret/listSecret');
15
+ vi.mock('../secret/updateSecret');
16
+ vi.mock('../../lib/commonOpts');
17
+ const commandSpy = vi
18
+ .spyOn(yargs_1.default, 'command')
19
+ .mockReturnValue(yargs_1.default);
20
+ const demandCommandSpy = vi
21
+ .spyOn(yargs_1.default, 'demandCommand')
22
+ .mockReturnValue(yargs_1.default);
23
+ describe('commands/account', () => {
24
+ describe('command', () => {
25
+ it('should have the correct command structure', () => {
26
+ expect(secret_1.default.command).toEqual(['secret', 'secrets']);
27
+ });
28
+ });
29
+ describe('describe', () => {
30
+ it('should provide a description', () => {
31
+ expect(secret_1.default.describe).toBeDefined();
32
+ });
33
+ });
34
+ describe('builder', () => {
35
+ beforeEach(() => {
36
+ commandSpy.mockClear();
37
+ demandCommandSpy.mockClear();
38
+ });
39
+ const subcommands = [addSecret_1.default, deleteSecret_1.default, listSecret_1.default, updateSecret_1.default];
40
+ it('should demand the command takes one positional argument', () => {
41
+ secret_1.default.builder(yargs_1.default);
42
+ expect(demandCommandSpy).toHaveBeenCalledTimes(1);
43
+ expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
44
+ });
45
+ it('should add the correct number of sub commands', () => {
46
+ secret_1.default.builder(yargs_1.default);
47
+ expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
48
+ });
49
+ it.each(subcommands)('should attach the %s subcommand', module => {
50
+ secret_1.default.builder(yargs_1.default);
51
+ expect(commandSpy).toHaveBeenCalledWith(module);
52
+ });
53
+ });
54
+ });
@@ -0,0 +1 @@
1
+ export {};