@hubspot/cli 7.8.12-experimental.1 → 7.9.0-beta.1
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.
- package/commands/__tests__/cms.test.js +44 -1
- package/commands/__tests__/customObject.test.js +22 -1
- package/commands/__tests__/project.test.js +2 -0
- package/commands/account/auth.js +1 -0
- package/commands/auth.js +1 -0
- package/commands/{__tests__/remove.test.js → cms/__tests__/delete.test.js} +8 -8
- package/commands/{__tests__ → cms/__tests__}/fetch.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/function.test.js +7 -3
- package/commands/{__tests__ → cms/__tests__}/lint.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/list.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/mv.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/theme.test.js +9 -2
- package/commands/cms/app/create.d.ts +9 -0
- package/commands/cms/app/create.js +82 -0
- package/commands/cms/app.d.ts +3 -0
- package/commands/cms/app.js +17 -0
- package/commands/cms/delete.d.ts +6 -0
- package/commands/cms/delete.js +43 -0
- package/commands/cms/fetch.d.ts +12 -0
- package/commands/cms/fetch.js +79 -0
- package/commands/{__tests__ → cms/function/__tests__}/logs.test.js +4 -5
- package/commands/cms/function/create.d.ts +12 -0
- package/commands/cms/function/create.js +84 -0
- package/commands/cms/function/deploy.d.ts +6 -0
- package/commands/cms/function/deploy.js +89 -0
- package/commands/cms/function/list.d.ts +6 -0
- package/commands/cms/function/list.js +60 -0
- package/commands/cms/function/logs.d.ts +10 -0
- package/commands/cms/function/logs.js +135 -0
- package/commands/cms/function/server.d.ts +10 -0
- package/commands/cms/function/server.js +69 -0
- package/commands/cms/function.d.ts +3 -0
- package/commands/cms/function.js +27 -0
- package/commands/cms/lint.d.ts +6 -0
- package/commands/cms/lint.js +83 -0
- package/commands/cms/list.d.ts +6 -0
- package/commands/cms/list.js +96 -0
- package/commands/cms/module/create.d.ts +11 -0
- package/commands/cms/module/create.js +84 -0
- package/commands/cms/module/marketplace-validate.d.ts +6 -0
- package/commands/cms/module/marketplace-validate.js +45 -0
- package/commands/cms/module.d.ts +3 -0
- package/commands/cms/module.js +17 -0
- package/commands/cms/mv.d.ts +7 -0
- package/commands/cms/mv.js +60 -0
- package/commands/cms/template/create.d.ts +9 -0
- package/commands/cms/template/create.js +72 -0
- package/commands/cms/template.d.ts +3 -0
- package/commands/cms/template.js +17 -0
- package/commands/{theme → cms/theme}/__tests__/marketplace-validate.test.js +2 -2
- package/commands/{theme → cms/theme}/__tests__/preview.test.js +2 -2
- package/commands/cms/theme/create.d.ts +6 -0
- package/commands/cms/theme/create.js +58 -0
- package/commands/cms/theme/generate-selectors.d.ts +6 -0
- package/commands/cms/theme/generate-selectors.js +171 -0
- package/commands/cms/theme/marketplace-validate.d.ts +6 -0
- package/commands/cms/theme/marketplace-validate.js +46 -0
- package/commands/cms/theme/preview.d.ts +12 -0
- package/commands/cms/theme/preview.js +224 -0
- package/commands/cms/theme.d.ts +3 -0
- package/commands/cms/theme.js +25 -0
- package/commands/cms/upload.d.ts +12 -0
- package/commands/cms/upload.js +212 -0
- package/commands/cms/watch.d.ts +14 -0
- package/commands/cms/watch.js +138 -0
- package/commands/cms/webpack/create.d.ts +6 -0
- package/commands/cms/webpack/create.js +58 -0
- package/commands/cms/webpack.d.ts +3 -0
- package/commands/cms/webpack.js +17 -0
- package/commands/cms.js +26 -0
- package/commands/create.js +4 -2
- package/commands/customObject/{schema/__tests__/create.test.js → __tests__/createSchema.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/delete.test.js → __tests__/deleteSchema.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/fetch-all.test.js → __tests__/fetch-all-schemas.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/fetch.test.js → __tests__/fetchSchema.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/list.test.js → __tests__/listSchemas.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/update.test.js → __tests__/updateSchema.test.js} +5 -5
- package/commands/customObject/createSchema.d.ts +6 -0
- package/commands/customObject/createSchema.js +56 -0
- package/commands/customObject/deleteSchema.d.ts +7 -0
- package/commands/customObject/deleteSchema.js +69 -0
- package/commands/customObject/fetchAllSchemas.d.ts +6 -0
- package/commands/customObject/fetchAllSchemas.js +57 -0
- package/commands/customObject/fetchSchema.d.ts +7 -0
- package/commands/customObject/fetchSchema.js +67 -0
- package/commands/customObject/listSchemas.d.ts +4 -0
- package/commands/customObject/listSchemas.js +35 -0
- package/commands/customObject/schema/create.d.ts +4 -6
- package/commands/customObject/schema/create.js +13 -36
- package/commands/customObject/schema/delete.d.ts +4 -7
- package/commands/customObject/schema/delete.js +15 -50
- package/commands/customObject/schema/fetch-all.d.ts +4 -6
- package/commands/customObject/schema/fetch-all.js +14 -41
- package/commands/customObject/schema/fetch.d.ts +4 -7
- package/commands/customObject/schema/fetch.js +14 -49
- package/commands/customObject/schema/list.d.ts +4 -4
- package/commands/customObject/schema/list.js +10 -19
- package/commands/customObject/schema/update.d.ts +4 -7
- package/commands/customObject/schema/update.js +15 -50
- package/commands/customObject/schema.js +4 -2
- package/commands/customObject/updateSchema.d.ts +7 -0
- package/commands/customObject/updateSchema.js +71 -0
- package/commands/customObject.js +16 -1
- package/commands/feedback.js +1 -1
- package/commands/fetch.d.ts +4 -12
- package/commands/fetch.js +19 -46
- package/commands/function/deploy.d.ts +4 -6
- package/commands/function/deploy.js +14 -71
- package/commands/function/list.d.ts +4 -6
- package/commands/function/list.js +14 -40
- package/commands/function/server.d.ts +4 -10
- package/commands/function/server.js +22 -29
- package/commands/function.d.ts +2 -4
- package/commands/function.js +25 -14
- package/commands/lint.d.ts +4 -6
- package/commands/lint.js +13 -65
- package/commands/list.d.ts +4 -6
- package/commands/list.js +13 -74
- package/commands/logs.d.ts +4 -10
- package/commands/logs.js +24 -87
- package/commands/module/marketplace-validate.d.ts +4 -6
- package/commands/module/marketplace-validate.js +15 -27
- package/commands/module.d.ts +2 -2
- package/commands/module.js +17 -15
- package/commands/mv.d.ts +4 -7
- package/commands/mv.js +13 -39
- package/commands/project/__tests__/add.test.js +12 -12
- package/commands/project/__tests__/devUnifiedFlow.test.js +32 -0
- package/commands/project/__tests__/list.test.js +31 -0
- package/commands/project/__tests__/migrate.test.js +1 -0
- package/commands/project/add.d.ts +2 -2
- package/commands/project/add.js +3 -2
- package/commands/project/create.js +1 -1
- package/commands/project/dev/deprecatedFlow.js +2 -2
- package/commands/project/dev/index.js +5 -5
- package/commands/project/dev/unifiedFlow.js +8 -3
- package/commands/project/download.js +5 -2
- package/commands/project/installDeps.d.ts +2 -2
- package/commands/project/installDeps.js +1 -0
- package/commands/project/list.d.ts +4 -0
- package/commands/project/list.js +62 -0
- package/commands/project/migrate.js +5 -2
- package/commands/project.js +2 -0
- package/commands/remove.d.ts +4 -6
- package/commands/remove.js +12 -24
- package/commands/testAccount/create.js +2 -2
- package/commands/testAccount/delete.js +1 -1
- package/commands/theme/generate-selectors.d.ts +4 -6
- package/commands/theme/generate-selectors.js +14 -152
- package/commands/theme/marketplace-validate.d.ts +4 -6
- package/commands/theme/marketplace-validate.js +14 -25
- package/commands/theme/preview.d.ts +4 -12
- package/commands/theme/preview.js +18 -180
- package/commands/theme.d.ts +2 -2
- package/commands/theme.js +19 -13
- package/commands/upload.d.ts +4 -12
- package/commands/upload.js +19 -169
- package/commands/watch.d.ts +4 -14
- package/commands/watch.js +23 -88
- package/lang/en.d.ts +561 -425
- package/lang/en.js +563 -427
- package/lang/en.lyaml +2 -2
- package/lib/__tests__/buildAccount.test.js +2 -2
- package/lib/__tests__/http.test.js +40 -0
- package/lib/buildAccount.d.ts +2 -2
- package/lib/buildAccount.js +7 -7
- package/lib/configMigrate.js +88 -9
- package/lib/constants.d.ts +9 -0
- package/lib/constants.js +9 -0
- package/lib/generateSelectors.js +1 -1
- package/lib/http.d.ts +1 -0
- package/lib/http.js +26 -0
- package/lib/middleware/autoUpdateMiddleware.d.ts +2 -1
- package/lib/middleware/autoUpdateMiddleware.js +12 -2
- package/lib/middleware/commandTargetingUtils.d.ts +1 -1
- package/lib/middleware/commandTargetingUtils.js +16 -20
- package/lib/projects/__tests__/AppDevModeInterface.test.js +95 -109
- package/lib/projects/__tests__/DevServerManager.test.d.ts +1 -0
- package/lib/projects/__tests__/DevServerManager.test.js +183 -0
- package/lib/projects/__tests__/LocalDevProcess.test.js +6 -5
- package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +6 -6
- package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.d.ts +1 -0
- package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.js +161 -0
- package/lib/projects/__tests__/deploy.test.js +9 -9
- package/lib/projects/__tests__/upload.test.js +2 -2
- package/lib/projects/add/__tests__/v2AddComponent.test.d.ts +1 -0
- package/lib/projects/add/__tests__/{v3AddComponent.test.js → v2AddComponent.test.js} +35 -35
- package/lib/projects/add/{v3AddComponent.d.ts → v2AddComponent.d.ts} +1 -1
- package/lib/projects/add/{v3AddComponent.js → v2AddComponent.js} +5 -5
- package/lib/projects/create/__tests__/v2.test.d.ts +1 -0
- package/lib/projects/create/__tests__/{v3.test.js → v2.test.js} +2 -2
- package/lib/projects/create/index.js +2 -2
- package/lib/projects/create/{v3.d.ts → v2.d.ts} +3 -3
- package/lib/projects/create/{v3.js → v2.js} +3 -3
- package/lib/projects/deploy.d.ts +1 -1
- package/lib/projects/deploy.js +2 -2
- package/lib/projects/localDev/AppDevModeInterface.d.ts +10 -3
- package/lib/projects/localDev/AppDevModeInterface.js +132 -105
- package/lib/projects/localDev/DevServerManager.d.ts +10 -29
- package/lib/projects/localDev/DevServerManager.js +20 -76
- package/lib/projects/localDev/DevServerManager_DEPRECATED.d.ts +40 -0
- package/lib/projects/localDev/DevServerManager_DEPRECATED.js +120 -0
- package/lib/projects/localDev/{LocalDevManager.js → LocalDevManager_DEPRECATED.js} +6 -6
- package/lib/projects/localDev/LocalDevProcess.js +3 -2
- package/lib/projects/localDev/LocalDevState.d.ts +3 -0
- package/lib/projects/localDev/LocalDevState.js +9 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +4 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.js +39 -6
- package/lib/projects/localDev/UIExtensionsDevModeInterface.d.ts +13 -0
- package/lib/projects/localDev/UIExtensionsDevModeInterface.js +37 -0
- package/lib/projects/localDev/helpers/account.d.ts +1 -1
- package/lib/projects/localDev/helpers/account.js +2 -2
- package/lib/projects/localDev/helpers/process.d.ts +1 -0
- package/lib/projects/localDev/helpers/process.js +15 -0
- package/lib/projects/localDev/helpers/project.js +2 -3
- package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +3 -0
- package/lib/projects/localDev/localDevWebsocketServerUtils.js +9 -0
- package/lib/projects/urls.d.ts +0 -1
- package/lib/projects/urls.js +0 -3
- package/lib/prompts/__tests__/projectAddPrompt.test.js +10 -10
- package/lib/prompts/installAppPrompt.d.ts +1 -6
- package/lib/prompts/installAppPrompt.js +1 -6
- package/lib/prompts/projectAddPrompt.d.ts +2 -2
- package/lib/prompts/projectAddPrompt.js +1 -1
- package/lib/theme/__tests__/migrate.test.js +4 -4
- package/lib/ui/index.d.ts +2 -0
- package/lib/ui/index.js +8 -0
- package/lib/ui/uiMessages.d.ts +5 -0
- package/lib/ui/uiMessages.js +5 -0
- package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -2
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +1 -1
- package/package.json +6 -5
- package/types/Cms.d.ts +6 -6
- package/lib/projects/localDev/DevServerManagerV2.d.ts +0 -22
- package/lib/projects/localDev/DevServerManagerV2.js +0 -81
- /package/commands/{customObject/schema → cms}/__tests__/delete.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/fetch.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/function.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/lint.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/list.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/mv.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/theme.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/function/__tests__}/logs.test.d.ts +0 -0
- /package/commands/{theme → cms/theme}/__tests__/generate-selectors.test.d.ts +0 -0
- /package/commands/{theme → cms/theme}/__tests__/generate-selectors.test.js +0 -0
- /package/commands/{theme → cms/theme}/__tests__/marketplace-validate.test.d.ts +0 -0
- /package/commands/{theme → cms/theme}/__tests__/preview.test.d.ts +0 -0
- /package/commands/{__tests__/remove.test.d.ts → customObject/__tests__/createSchema.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/create.test.d.ts → __tests__/deleteSchema.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/fetch-all.test.d.ts → __tests__/fetch-all-schemas.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/fetch.test.d.ts → __tests__/fetchSchema.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/list.test.d.ts → __tests__/listSchemas.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/update.test.d.ts → __tests__/updateSchema.test.d.ts} +0 -0
- /package/{lib/projects/add/__tests__/v3AddComponent.test.d.ts → commands/project/__tests__/list.test.d.ts} +0 -0
- /package/lib/{projects/create/__tests__/v3.test.d.ts → __tests__/http.test.d.ts} +0 -0
- /package/{commands/create → lib/cmsAssets}/api-sample.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/api-sample.js +0 -0
- /package/{commands/create → lib/cmsAssets}/app.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/app.js +0 -0
- /package/{commands/create → lib/cmsAssets}/function.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/function.js +0 -0
- /package/{commands/create → lib/cmsAssets}/index.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/index.js +0 -0
- /package/{commands/create → lib/cmsAssets}/module.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/module.js +0 -0
- /package/{commands/create → lib/cmsAssets}/react-app.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/react-app.js +0 -0
- /package/{commands/create → lib/cmsAssets}/template.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/template.js +0 -0
- /package/{commands/create → lib/cmsAssets}/vue-app.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/vue-app.js +0 -0
- /package/{commands/create → lib/cmsAssets}/webpack-serverless.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/webpack-serverless.js +0 -0
- /package/{commands/create → lib/cmsAssets}/website-theme.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/website-theme.js +0 -0
- /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
|
|
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
|
-
|
|
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 (
|
|
125
|
-
|
|
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);
|
package/lib/ui/uiMessages.d.ts
CHANGED
|
@@ -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;
|
package/lib/ui/uiMessages.js
CHANGED
|
@@ -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/
|
|
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.
|
|
3
|
+
"version": "7.9.0-beta.1",
|
|
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.
|
|
10
|
-
"@hubspot/project-parsing-lib": "0.10.
|
|
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.
|
|
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": "
|
|
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
|
|
11
|
-
dest
|
|
12
|
-
name
|
|
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
|
|
28
|
-
dest
|
|
29
|
-
getInternalVersion
|
|
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
|
|
File without changes
|
/package/commands/{__tests__/remove.test.d.ts → customObject/__tests__/createSchema.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/commands/customObject/{schema/__tests__/fetch.test.d.ts → __tests__/fetchSchema.test.d.ts}
RENAMED
|
File without changes
|
/package/commands/customObject/{schema/__tests__/list.test.d.ts → __tests__/listSchemas.test.d.ts}
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|