@hubspot/cli 7.8.12-experimental.1 → 7.9.0-beta.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 (272) hide show
  1. package/commands/__tests__/cms.test.js +44 -1
  2. package/commands/__tests__/customObject.test.js +22 -1
  3. package/commands/__tests__/project.test.js +2 -0
  4. package/commands/account/auth.js +1 -0
  5. package/commands/auth.js +1 -0
  6. package/commands/{__tests__/remove.test.js → cms/__tests__/delete.test.js} +8 -8
  7. package/commands/{__tests__ → cms/__tests__}/fetch.test.js +3 -3
  8. package/commands/{__tests__ → cms/__tests__}/function.test.js +7 -3
  9. package/commands/{__tests__ → cms/__tests__}/lint.test.js +3 -3
  10. package/commands/{__tests__ → cms/__tests__}/list.test.js +3 -3
  11. package/commands/{__tests__ → cms/__tests__}/mv.test.js +3 -3
  12. package/commands/{__tests__ → cms/__tests__}/theme.test.js +9 -2
  13. package/commands/cms/app/create.d.ts +9 -0
  14. package/commands/cms/app/create.js +82 -0
  15. package/commands/cms/app.d.ts +3 -0
  16. package/commands/cms/app.js +17 -0
  17. package/commands/cms/delete.d.ts +6 -0
  18. package/commands/cms/delete.js +43 -0
  19. package/commands/cms/fetch.d.ts +12 -0
  20. package/commands/cms/fetch.js +79 -0
  21. package/commands/{__tests__ → cms/function/__tests__}/logs.test.js +4 -5
  22. package/commands/cms/function/create.d.ts +12 -0
  23. package/commands/cms/function/create.js +84 -0
  24. package/commands/cms/function/deploy.d.ts +6 -0
  25. package/commands/cms/function/deploy.js +89 -0
  26. package/commands/cms/function/list.d.ts +6 -0
  27. package/commands/cms/function/list.js +60 -0
  28. package/commands/cms/function/logs.d.ts +10 -0
  29. package/commands/cms/function/logs.js +135 -0
  30. package/commands/cms/function/server.d.ts +10 -0
  31. package/commands/cms/function/server.js +69 -0
  32. package/commands/cms/function.d.ts +3 -0
  33. package/commands/cms/function.js +27 -0
  34. package/commands/cms/lint.d.ts +6 -0
  35. package/commands/cms/lint.js +83 -0
  36. package/commands/cms/list.d.ts +6 -0
  37. package/commands/cms/list.js +96 -0
  38. package/commands/cms/module/create.d.ts +11 -0
  39. package/commands/cms/module/create.js +84 -0
  40. package/commands/cms/module/marketplace-validate.d.ts +6 -0
  41. package/commands/cms/module/marketplace-validate.js +45 -0
  42. package/commands/cms/module.d.ts +3 -0
  43. package/commands/cms/module.js +17 -0
  44. package/commands/cms/mv.d.ts +7 -0
  45. package/commands/cms/mv.js +60 -0
  46. package/commands/cms/template/create.d.ts +9 -0
  47. package/commands/cms/template/create.js +72 -0
  48. package/commands/cms/template.d.ts +3 -0
  49. package/commands/cms/template.js +17 -0
  50. package/commands/{theme → cms/theme}/__tests__/marketplace-validate.test.js +2 -2
  51. package/commands/{theme → cms/theme}/__tests__/preview.test.js +2 -2
  52. package/commands/cms/theme/create.d.ts +6 -0
  53. package/commands/cms/theme/create.js +58 -0
  54. package/commands/cms/theme/generate-selectors.d.ts +6 -0
  55. package/commands/cms/theme/generate-selectors.js +171 -0
  56. package/commands/cms/theme/marketplace-validate.d.ts +6 -0
  57. package/commands/cms/theme/marketplace-validate.js +46 -0
  58. package/commands/cms/theme/preview.d.ts +12 -0
  59. package/commands/cms/theme/preview.js +224 -0
  60. package/commands/cms/theme.d.ts +3 -0
  61. package/commands/cms/theme.js +25 -0
  62. package/commands/cms/upload.d.ts +12 -0
  63. package/commands/cms/upload.js +212 -0
  64. package/commands/cms/watch.d.ts +14 -0
  65. package/commands/cms/watch.js +138 -0
  66. package/commands/cms/webpack/create.d.ts +6 -0
  67. package/commands/cms/webpack/create.js +58 -0
  68. package/commands/cms/webpack.d.ts +3 -0
  69. package/commands/cms/webpack.js +17 -0
  70. package/commands/cms.js +26 -0
  71. package/commands/create.js +4 -2
  72. package/commands/customObject/{schema/__tests__/create.test.js → __tests__/createSchema.test.js} +5 -5
  73. package/commands/customObject/{schema/__tests__/delete.test.js → __tests__/deleteSchema.test.js} +5 -5
  74. package/commands/customObject/{schema/__tests__/fetch-all.test.js → __tests__/fetch-all-schemas.test.js} +5 -5
  75. package/commands/customObject/{schema/__tests__/fetch.test.js → __tests__/fetchSchema.test.js} +5 -5
  76. package/commands/customObject/{schema/__tests__/list.test.js → __tests__/listSchemas.test.js} +5 -5
  77. package/commands/customObject/{schema/__tests__/update.test.js → __tests__/updateSchema.test.js} +5 -5
  78. package/commands/customObject/createSchema.d.ts +6 -0
  79. package/commands/customObject/createSchema.js +56 -0
  80. package/commands/customObject/deleteSchema.d.ts +7 -0
  81. package/commands/customObject/deleteSchema.js +69 -0
  82. package/commands/customObject/fetchAllSchemas.d.ts +6 -0
  83. package/commands/customObject/fetchAllSchemas.js +57 -0
  84. package/commands/customObject/fetchSchema.d.ts +7 -0
  85. package/commands/customObject/fetchSchema.js +67 -0
  86. package/commands/customObject/listSchemas.d.ts +4 -0
  87. package/commands/customObject/listSchemas.js +35 -0
  88. package/commands/customObject/schema/create.d.ts +4 -6
  89. package/commands/customObject/schema/create.js +13 -36
  90. package/commands/customObject/schema/delete.d.ts +4 -7
  91. package/commands/customObject/schema/delete.js +15 -50
  92. package/commands/customObject/schema/fetch-all.d.ts +4 -6
  93. package/commands/customObject/schema/fetch-all.js +14 -41
  94. package/commands/customObject/schema/fetch.d.ts +4 -7
  95. package/commands/customObject/schema/fetch.js +14 -49
  96. package/commands/customObject/schema/list.d.ts +4 -4
  97. package/commands/customObject/schema/list.js +10 -19
  98. package/commands/customObject/schema/update.d.ts +4 -7
  99. package/commands/customObject/schema/update.js +15 -50
  100. package/commands/customObject/schema.js +4 -2
  101. package/commands/customObject/updateSchema.d.ts +7 -0
  102. package/commands/customObject/updateSchema.js +71 -0
  103. package/commands/customObject.js +16 -1
  104. package/commands/feedback.js +1 -1
  105. package/commands/fetch.d.ts +4 -12
  106. package/commands/fetch.js +19 -46
  107. package/commands/function/deploy.d.ts +4 -6
  108. package/commands/function/deploy.js +14 -71
  109. package/commands/function/list.d.ts +4 -6
  110. package/commands/function/list.js +14 -40
  111. package/commands/function/server.d.ts +4 -10
  112. package/commands/function/server.js +22 -29
  113. package/commands/function.d.ts +2 -4
  114. package/commands/function.js +25 -14
  115. package/commands/lint.d.ts +4 -6
  116. package/commands/lint.js +13 -65
  117. package/commands/list.d.ts +4 -6
  118. package/commands/list.js +13 -74
  119. package/commands/logs.d.ts +4 -10
  120. package/commands/logs.js +24 -87
  121. package/commands/module/marketplace-validate.d.ts +4 -6
  122. package/commands/module/marketplace-validate.js +15 -27
  123. package/commands/module.d.ts +2 -2
  124. package/commands/module.js +17 -15
  125. package/commands/mv.d.ts +4 -7
  126. package/commands/mv.js +13 -39
  127. package/commands/project/__tests__/add.test.js +12 -12
  128. package/commands/project/__tests__/devUnifiedFlow.test.js +32 -0
  129. package/commands/project/__tests__/list.test.js +31 -0
  130. package/commands/project/__tests__/migrate.test.js +1 -0
  131. package/commands/project/add.d.ts +2 -2
  132. package/commands/project/add.js +3 -2
  133. package/commands/project/create.js +1 -1
  134. package/commands/project/dev/deprecatedFlow.js +2 -2
  135. package/commands/project/dev/index.js +5 -5
  136. package/commands/project/dev/unifiedFlow.js +8 -3
  137. package/commands/project/download.js +5 -2
  138. package/commands/project/installDeps.d.ts +2 -2
  139. package/commands/project/installDeps.js +1 -0
  140. package/commands/project/list.d.ts +4 -0
  141. package/commands/project/list.js +62 -0
  142. package/commands/project/migrate.js +5 -2
  143. package/commands/project.js +2 -0
  144. package/commands/remove.d.ts +4 -6
  145. package/commands/remove.js +12 -24
  146. package/commands/testAccount/create.js +2 -2
  147. package/commands/testAccount/delete.js +1 -1
  148. package/commands/theme/generate-selectors.d.ts +4 -6
  149. package/commands/theme/generate-selectors.js +14 -152
  150. package/commands/theme/marketplace-validate.d.ts +4 -6
  151. package/commands/theme/marketplace-validate.js +14 -25
  152. package/commands/theme/preview.d.ts +4 -12
  153. package/commands/theme/preview.js +18 -180
  154. package/commands/theme.d.ts +2 -2
  155. package/commands/theme.js +19 -13
  156. package/commands/upload.d.ts +4 -12
  157. package/commands/upload.js +19 -169
  158. package/commands/watch.d.ts +4 -14
  159. package/commands/watch.js +23 -88
  160. package/lang/en.d.ts +560 -425
  161. package/lang/en.js +562 -427
  162. package/lang/en.lyaml +2 -2
  163. package/lib/__tests__/buildAccount.test.js +2 -2
  164. package/lib/buildAccount.d.ts +2 -2
  165. package/lib/buildAccount.js +7 -7
  166. package/lib/configMigrate.js +88 -9
  167. package/lib/constants.d.ts +9 -0
  168. package/lib/constants.js +9 -0
  169. package/lib/generateSelectors.js +1 -1
  170. package/lib/middleware/autoUpdateMiddleware.d.ts +2 -1
  171. package/lib/middleware/autoUpdateMiddleware.js +12 -2
  172. package/lib/middleware/commandTargetingUtils.d.ts +1 -1
  173. package/lib/middleware/commandTargetingUtils.js +16 -20
  174. package/lib/projects/__tests__/AppDevModeInterface.test.js +95 -109
  175. package/lib/projects/__tests__/DevServerManager.test.js +183 -0
  176. package/lib/projects/__tests__/LocalDevProcess.test.js +6 -5
  177. package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +6 -6
  178. package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.d.ts +1 -0
  179. package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.js +161 -0
  180. package/lib/projects/__tests__/deploy.test.js +9 -9
  181. package/lib/projects/__tests__/upload.test.js +2 -2
  182. package/lib/projects/add/__tests__/v2AddComponent.test.d.ts +1 -0
  183. package/lib/projects/add/__tests__/{v3AddComponent.test.js → v2AddComponent.test.js} +35 -35
  184. package/lib/projects/add/{v3AddComponent.d.ts → v2AddComponent.d.ts} +1 -1
  185. package/lib/projects/add/{v3AddComponent.js → v2AddComponent.js} +5 -5
  186. package/lib/projects/create/__tests__/v2.test.d.ts +1 -0
  187. package/lib/projects/create/__tests__/{v3.test.js → v2.test.js} +2 -2
  188. package/lib/projects/create/index.js +2 -2
  189. package/lib/projects/create/{v3.d.ts → v2.d.ts} +3 -3
  190. package/lib/projects/create/{v3.js → v2.js} +3 -3
  191. package/lib/projects/deploy.d.ts +1 -1
  192. package/lib/projects/deploy.js +2 -2
  193. package/lib/projects/localDev/AppDevModeInterface.d.ts +9 -3
  194. package/lib/projects/localDev/AppDevModeInterface.js +116 -105
  195. package/lib/projects/localDev/DevServerManager.d.ts +10 -29
  196. package/lib/projects/localDev/DevServerManager.js +20 -76
  197. package/lib/projects/localDev/DevServerManager_DEPRECATED.d.ts +40 -0
  198. package/lib/projects/localDev/DevServerManager_DEPRECATED.js +120 -0
  199. package/lib/projects/localDev/{LocalDevManager.js → LocalDevManager_DEPRECATED.js} +6 -6
  200. package/lib/projects/localDev/LocalDevProcess.js +3 -2
  201. package/lib/projects/localDev/LocalDevState.d.ts +3 -0
  202. package/lib/projects/localDev/LocalDevState.js +9 -0
  203. package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +4 -0
  204. package/lib/projects/localDev/LocalDevWebsocketServer.js +39 -6
  205. package/lib/projects/localDev/UIExtensionsDevModeInterface.d.ts +13 -0
  206. package/lib/projects/localDev/UIExtensionsDevModeInterface.js +37 -0
  207. package/lib/projects/localDev/helpers/account.d.ts +1 -1
  208. package/lib/projects/localDev/helpers/account.js +2 -2
  209. package/lib/projects/localDev/helpers/process.d.ts +1 -0
  210. package/lib/projects/localDev/helpers/process.js +15 -0
  211. package/lib/projects/localDev/helpers/project.js +2 -3
  212. package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +3 -0
  213. package/lib/projects/localDev/localDevWebsocketServerUtils.js +9 -0
  214. package/lib/projects/urls.d.ts +0 -1
  215. package/lib/projects/urls.js +0 -3
  216. package/lib/prompts/__tests__/projectAddPrompt.test.js +10 -10
  217. package/lib/prompts/installAppPrompt.d.ts +1 -6
  218. package/lib/prompts/installAppPrompt.js +1 -6
  219. package/lib/prompts/projectAddPrompt.d.ts +2 -2
  220. package/lib/prompts/projectAddPrompt.js +1 -1
  221. package/lib/theme/__tests__/migrate.test.js +4 -4
  222. package/lib/ui/index.d.ts +2 -0
  223. package/lib/ui/index.js +8 -0
  224. package/lib/ui/uiMessages.d.ts +5 -0
  225. package/lib/ui/uiMessages.js +5 -0
  226. package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -2
  227. package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +1 -1
  228. package/package.json +6 -5
  229. package/types/Cms.d.ts +6 -6
  230. package/lib/projects/localDev/DevServerManagerV2.d.ts +0 -22
  231. package/lib/projects/localDev/DevServerManagerV2.js +0 -81
  232. /package/commands/{customObject/schema → cms}/__tests__/delete.test.d.ts +0 -0
  233. /package/commands/{__tests__ → cms/__tests__}/fetch.test.d.ts +0 -0
  234. /package/commands/{__tests__ → cms/__tests__}/function.test.d.ts +0 -0
  235. /package/commands/{__tests__ → cms/__tests__}/lint.test.d.ts +0 -0
  236. /package/commands/{__tests__ → cms/__tests__}/list.test.d.ts +0 -0
  237. /package/commands/{__tests__ → cms/__tests__}/mv.test.d.ts +0 -0
  238. /package/commands/{__tests__ → cms/__tests__}/theme.test.d.ts +0 -0
  239. /package/commands/{__tests__ → cms/function/__tests__}/logs.test.d.ts +0 -0
  240. /package/commands/{theme → cms/theme}/__tests__/generate-selectors.test.d.ts +0 -0
  241. /package/commands/{theme → cms/theme}/__tests__/generate-selectors.test.js +0 -0
  242. /package/commands/{theme → cms/theme}/__tests__/marketplace-validate.test.d.ts +0 -0
  243. /package/commands/{theme → cms/theme}/__tests__/preview.test.d.ts +0 -0
  244. /package/commands/{__tests__/remove.test.d.ts → customObject/__tests__/createSchema.test.d.ts} +0 -0
  245. /package/commands/customObject/{schema/__tests__/create.test.d.ts → __tests__/deleteSchema.test.d.ts} +0 -0
  246. /package/commands/customObject/{schema/__tests__/fetch-all.test.d.ts → __tests__/fetch-all-schemas.test.d.ts} +0 -0
  247. /package/commands/customObject/{schema/__tests__/fetch.test.d.ts → __tests__/fetchSchema.test.d.ts} +0 -0
  248. /package/commands/customObject/{schema/__tests__/list.test.d.ts → __tests__/listSchemas.test.d.ts} +0 -0
  249. /package/commands/customObject/{schema/__tests__/update.test.d.ts → __tests__/updateSchema.test.d.ts} +0 -0
  250. /package/{lib/projects/add/__tests__/v3AddComponent.test.d.ts → commands/project/__tests__/list.test.d.ts} +0 -0
  251. /package/{commands/create → lib/cmsAssets}/api-sample.d.ts +0 -0
  252. /package/{commands/create → lib/cmsAssets}/api-sample.js +0 -0
  253. /package/{commands/create → lib/cmsAssets}/app.d.ts +0 -0
  254. /package/{commands/create → lib/cmsAssets}/app.js +0 -0
  255. /package/{commands/create → lib/cmsAssets}/function.d.ts +0 -0
  256. /package/{commands/create → lib/cmsAssets}/function.js +0 -0
  257. /package/{commands/create → lib/cmsAssets}/index.d.ts +0 -0
  258. /package/{commands/create → lib/cmsAssets}/index.js +0 -0
  259. /package/{commands/create → lib/cmsAssets}/module.d.ts +0 -0
  260. /package/{commands/create → lib/cmsAssets}/module.js +0 -0
  261. /package/{commands/create → lib/cmsAssets}/react-app.d.ts +0 -0
  262. /package/{commands/create → lib/cmsAssets}/react-app.js +0 -0
  263. /package/{commands/create → lib/cmsAssets}/template.d.ts +0 -0
  264. /package/{commands/create → lib/cmsAssets}/template.js +0 -0
  265. /package/{commands/create → lib/cmsAssets}/vue-app.d.ts +0 -0
  266. /package/{commands/create → lib/cmsAssets}/vue-app.js +0 -0
  267. /package/{commands/create → lib/cmsAssets}/webpack-serverless.d.ts +0 -0
  268. /package/{commands/create → lib/cmsAssets}/webpack-serverless.js +0 -0
  269. /package/{commands/create → lib/cmsAssets}/website-theme.d.ts +0 -0
  270. /package/{commands/create → lib/cmsAssets}/website-theme.js +0 -0
  271. /package/lib/projects/{create/__tests__/v3.test.d.ts → __tests__/DevServerManager.test.d.ts} +0 -0
  272. /package/lib/projects/localDev/{LocalDevManager.d.ts → LocalDevManager_DEPRECATED.d.ts} +0 -0
@@ -18,7 +18,7 @@ const mockedMigrateThemes = migrateThemes;
18
18
  const mockedConfirmPrompt = confirmPrompt;
19
19
  const mockedWriteProjectConfig = writeProjectConfig;
20
20
  const mockedEnsureProjectExists = ensureProjectExists;
21
- const mockedUseV3Api = isV2Project;
21
+ const mockedUseV2Api = isV2Project;
22
22
  const mockedFetchMigrationApps = fetchMigrationApps;
23
23
  const ACCOUNT_ID = 123;
24
24
  const PROJECT_NAME = 'Test Project';
@@ -30,7 +30,7 @@ const createLoadedProjectConfig = (name) => ({
30
30
  });
31
31
  describe('lib/theme/migrate', () => {
32
32
  beforeEach(() => {
33
- mockedUseV3Api.mockReturnValue(false);
33
+ mockedUseV2Api.mockReturnValue(false);
34
34
  });
35
35
  describe('getHasMigratableThemes', () => {
36
36
  it('should return false when no projectConfig is provided', async () => {
@@ -121,8 +121,8 @@ describe('lib/theme/migrate', () => {
121
121
  });
122
122
  });
123
123
  describe('validateMigrationAppsAndThemes', () => {
124
- it('should throw an error when themes are already migrated (v3 API)', async () => {
125
- mockedUseV3Api.mockReturnValue(true);
124
+ it('should throw an error when themes are already migrated (v2 API)', async () => {
125
+ mockedUseV2Api.mockReturnValue(true);
126
126
  const projectConfig = createLoadedProjectConfig(PROJECT_NAME);
127
127
  await expect(validateMigrationAppsAndThemes(0, projectConfig)).rejects.toThrow(lib.migrate.errors.project.themesAlreadyMigrated);
128
128
  });
package/lib/ui/index.d.ts CHANGED
@@ -24,6 +24,8 @@ export declare function uiDeprecatedTag(message: string, log?: true): undefined;
24
24
  export declare function uiDeprecatedTag(message: string, log: false): string;
25
25
  export declare function uiCommandDisabledBanner(command: string, url?: string, message?: string): void;
26
26
  export declare function uiDeprecatedDescription(message: string, command: string, url?: string): undefined;
27
+ export declare function uiCommandRenamedDescription(describe: string | false | undefined, newCommand: string): string | undefined;
27
28
  export declare function uiDeprecatedMessage(command: string, url?: string, message?: string): void;
29
+ export declare function uiCommandRelocatedMessage(newCommand: string): void;
28
30
  export declare function indent(level: number): string;
29
31
  export {};
package/lib/ui/index.js CHANGED
@@ -127,12 +127,20 @@ export function uiDeprecatedDescription(message, command, url) {
127
127
  const tag = message || uiMessages.disabledMessage(command, url);
128
128
  return uiDeprecatedTag(tag);
129
129
  }
130
+ export function uiCommandRenamedDescription(describe, newCommand) {
131
+ return uiDeprecatedTag(`${describe} ${uiMessages.commandRenamedMessage(newCommand)}`, false);
132
+ }
130
133
  export function uiDeprecatedMessage(command, url, message) {
131
134
  const tag = uiMessages.deprecatedDescription(message || '', command, url);
132
135
  uiLogger.log('');
133
136
  uiDeprecatedTag(tag);
134
137
  uiLogger.log('');
135
138
  }
139
+ export function uiCommandRelocatedMessage(newCommand) {
140
+ uiLogger.log('');
141
+ uiDeprecatedTag(uiMessages.commandRenamedMessage(newCommand));
142
+ uiLogger.log('');
143
+ }
136
144
  export function indent(level) {
137
145
  const indentation = ' ';
138
146
  return indentation.repeat(level);
@@ -4,6 +4,7 @@ export declare const uiMessages: {
4
4
  deprecatedDescription: (message: string, command: string, url?: string) => string;
5
5
  disabledMessage: (command: string, url?: string) => string;
6
6
  disabledUrlText: string;
7
+ commandRenamedMessage: (newCommand: string) => string;
7
8
  featureHighlight: {
8
9
  defaultTitle: string;
9
10
  featureKeys: {
@@ -27,6 +28,10 @@ export declare const uiMessages: {
27
28
  command: string;
28
29
  message: (command: string) => string;
29
30
  };
31
+ getStartedCommand: {
32
+ command: string;
33
+ message: (command: string) => string;
34
+ };
30
35
  helpCommand: {
31
36
  command: string;
32
37
  message: (command: string) => string;
@@ -7,6 +7,7 @@ export const uiMessages = {
7
7
  deprecatedDescription: (message, command, url) => `${message}. The ${uiCommandReference(command)} command is deprecated and will be disabled soon. ${url ? uiLink('Learn more', url) : ''}`,
8
8
  disabledMessage: (command, url) => `The ${uiCommandReference(command)} command is disabled. Run ${uiCommandReference('npm i -g @hubspot/cli@latest')} to update to the latest HubSpot CLI version. ${url ? uiLink('Learn more', url) : ''}`,
9
9
  disabledUrlText: 'See all HubSpot CLI commands here.',
10
+ commandRenamedMessage: (newCommand) => `This command has been deprecated. Please use ${uiCommandReference(newCommand)} instead.`,
10
11
  featureHighlight: {
11
12
  defaultTitle: "What's next?",
12
13
  featureKeys: {
@@ -30,6 +31,10 @@ export const uiMessages = {
30
31
  command: 'hs feedback',
31
32
  message: (command) => `${command} - Report a bug or leave feedback`,
32
33
  },
34
+ getStartedCommand: {
35
+ command: 'hs get-started',
36
+ message: (command) => `${command} - Get started with HubSpot development`,
37
+ },
33
38
  helpCommand: {
34
39
  command: 'hs help',
35
40
  message: (command) => `${command} - See a list of available commands`,
@@ -15,18 +15,18 @@ declare const inputSchemaZodObject: z.ZodObject<{
15
15
  dest?: string | undefined;
16
16
  moduleLabel?: string | undefined;
17
17
  reactType?: boolean | undefined;
18
- contentTypes?: string | undefined;
19
18
  global?: boolean | undefined;
20
19
  availableForNewContent?: boolean | undefined;
20
+ contentTypes?: string | undefined;
21
21
  userSuppliedName?: string | undefined;
22
22
  }, {
23
23
  absoluteCurrentWorkingDirectory: string;
24
24
  dest?: string | undefined;
25
25
  moduleLabel?: string | undefined;
26
26
  reactType?: boolean | undefined;
27
- contentTypes?: string | undefined;
28
27
  global?: boolean | undefined;
29
28
  availableForNewContent?: boolean | undefined;
29
+ contentTypes?: string | undefined;
30
30
  userSuppliedName?: string | undefined;
31
31
  }>;
32
32
  export type HsCreateModuleInputSchema = z.infer<typeof inputSchemaZodObject>;
@@ -6,7 +6,7 @@ vi.mock('@modelcontextprotocol/sdk/server/mcp.js');
6
6
  vi.mock('../../../utils/project');
7
7
  vi.mock('../../../utils/command');
8
8
  vi.mock('../../../../lib/constants');
9
- vi.mock('../../../../lib/projects/create/v3');
9
+ vi.mock('../../../../lib/projects/create/v2');
10
10
  vi.mock('../../../utils/toolUsageTracking');
11
11
  const mockRunCommandInDir = runCommandInDir;
12
12
  const mockAddFlag = addFlag;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.8.12-experimental.1",
3
+ "version": "7.9.0-beta.0",
4
4
  "description": "The official CLI for developing on HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "https://github.com/HubSpot/hubspot-cli",
7
7
  "type": "module",
8
8
  "dependencies": {
9
- "@hubspot/local-dev-lib": "3.20.0",
10
- "@hubspot/project-parsing-lib": "0.10.0-beta.0",
9
+ "@hubspot/local-dev-lib": "3.21.0",
10
+ "@hubspot/project-parsing-lib": "0.10.1",
11
11
  "@hubspot/serverless-dev-runtime": "7.0.6",
12
12
  "@hubspot/theme-preview-dev-server": "0.0.10",
13
- "@hubspot/ui-extensions-dev-server": "0.10.1",
13
+ "@hubspot/ui-extensions-dev-server": "0.10.2",
14
14
  "archiver": "7.0.1",
15
15
  "boxen": "8.0.1",
16
16
  "chalk": "5.4.1",
@@ -36,6 +36,7 @@
36
36
  "yargs-parser": "21.1.1"
37
37
  },
38
38
  "devDependencies": {
39
+ "@hubspot/npm-scripts": "0.0.5",
39
40
  "@types/archiver": "^6.0.3",
40
41
  "@types/cli-progress": "^3.11.6",
41
42
  "@types/express": "^5.0.0",
@@ -80,7 +81,7 @@
80
81
  "lint": "echo 'Linting is disabled for Blazar'",
81
82
  "lint:local": "eslint . && prettier --list-different './**/*.{ts,tsx,js,json}'",
82
83
  "list-all-commands": "yarn tsx ./scripts/get-all-commands.ts",
83
- "local-link": "yarn tsx ./scripts/linking.ts",
84
+ "local-link": "hubspot-linking",
84
85
  "mcp-local": "yarn tsx ./scripts/mcp-local.ts",
85
86
  "prettier:write": "prettier --write './**/*.{ts,js,json}'",
86
87
  "release": "yarn tsx ./scripts/release.ts release",
package/types/Cms.d.ts CHANGED
@@ -7,9 +7,9 @@ export declare const CONTENT_TYPES: readonly ["ANY", "LANDING_PAGE", "SITE_PAGE"
7
7
  export type ContentType = (typeof CONTENT_TYPES)[number];
8
8
  export type CreateArgs = CommonArgs & ConfigArgs & {
9
9
  branch?: string;
10
- type: string;
11
- dest: string;
12
- name: string;
10
+ type?: string;
11
+ dest?: string;
12
+ name?: string;
13
13
  internal?: boolean;
14
14
  templateType?: TemplateType;
15
15
  moduleLabel?: string;
@@ -24,9 +24,9 @@ export type CreateArgs = CommonArgs & ConfigArgs & {
24
24
  };
25
25
  export type CmsAssetOperationArgs = {
26
26
  assetType: string;
27
- name: string;
28
- dest: string;
29
- getInternalVersion: boolean;
27
+ name?: string;
28
+ dest?: string;
29
+ getInternalVersion?: boolean;
30
30
  commandArgs: CreateArgs;
31
31
  };
32
32
  export type CreatableCmsAsset = {
@@ -1,22 +0,0 @@
1
- import LocalDevState from './LocalDevState.js';
2
- import LocalDevLogger from './LocalDevLogger.js';
3
- type DevServerManagerV2ConstructorOptions = {
4
- localDevState: LocalDevState;
5
- logger: LocalDevLogger;
6
- };
7
- declare class DevServerManagerV2 {
8
- private initialized;
9
- private started;
10
- private devServers;
11
- private localDevState;
12
- constructor(options: DevServerManagerV2ConstructorOptions);
13
- private iterateDevServers;
14
- setup(): Promise<void>;
15
- start(): Promise<void>;
16
- fileChange({ filePath, event, }: {
17
- filePath: string;
18
- event: string;
19
- }): Promise<void>;
20
- cleanup(): Promise<void>;
21
- }
22
- export default DevServerManagerV2;
@@ -1,81 +0,0 @@
1
- import { logger } from '@hubspot/local-dev-lib/logger';
2
- import { startPortManagerServer, stopPortManagerServer, } from '@hubspot/local-dev-lib/portManager';
3
- import { getHubSpotApiOrigin, getHubSpotWebsiteOrigin, } from '@hubspot/local-dev-lib/urls';
4
- import { getAccountConfig } from '@hubspot/local-dev-lib/config';
5
- import AppDevModeInterface from './AppDevModeInterface.js';
6
- import { lib } from '../../../lang/en.js';
7
- class DevServerManagerV2 {
8
- initialized;
9
- started;
10
- devServers;
11
- localDevState;
12
- constructor(options) {
13
- this.initialized = false;
14
- this.started = false;
15
- this.localDevState = options.localDevState;
16
- const AppsDevServer = new AppDevModeInterface({
17
- localDevState: options.localDevState,
18
- localDevLogger: options.logger,
19
- });
20
- this.devServers = [AppsDevServer];
21
- }
22
- async iterateDevServers(callback) {
23
- await Promise.all(this.devServers.map(devServer => callback(devServer)));
24
- }
25
- async setup() {
26
- let env;
27
- const accountConfig = getAccountConfig(this.localDevState.targetTestingAccountId);
28
- if (accountConfig) {
29
- env = accountConfig.env;
30
- }
31
- await startPortManagerServer();
32
- await this.iterateDevServers(async (serverInterface) => {
33
- if (serverInterface.setup) {
34
- // @TODO: In the future, update UIE Dev Server to use LocalDevState
35
- await serverInterface.setup({
36
- components: this.localDevState.projectNodes,
37
- profileData: this.localDevState.projectProfileData,
38
- logger,
39
- urls: {
40
- api: getHubSpotApiOrigin(env),
41
- web: getHubSpotWebsiteOrigin(env),
42
- },
43
- });
44
- }
45
- });
46
- this.initialized = true;
47
- }
48
- async start() {
49
- if (this.initialized) {
50
- await this.iterateDevServers(async (serverInterface) => {
51
- if (serverInterface.start) {
52
- await serverInterface.start();
53
- }
54
- });
55
- }
56
- else {
57
- throw new Error(lib.DevServerManager.notInitialized);
58
- }
59
- this.started = true;
60
- }
61
- async fileChange({ filePath, event, }) {
62
- if (this.started) {
63
- this.iterateDevServers(async (serverInterface) => {
64
- if (serverInterface.fileChange) {
65
- await serverInterface.fileChange(filePath, event);
66
- }
67
- });
68
- }
69
- }
70
- async cleanup() {
71
- if (this.started) {
72
- await this.iterateDevServers(async (serverInterface) => {
73
- if (serverInterface.cleanup) {
74
- await serverInterface.cleanup();
75
- }
76
- });
77
- await stopPortManagerServer();
78
- }
79
- }
80
- }
81
- export default DevServerManagerV2;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes