@hubspot/cli 8.0.0-beta.0 → 8.0.0-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.
- package/commands/cms/__tests__/fetch.test.js +2 -1
- package/commands/cms/fetch.js +2 -1
- package/commands/project/__tests__/create.test.js +1 -1
- package/commands/project/__tests__/dev.test.js +39 -8
- package/commands/project/dev/index.js +18 -15
- package/commands/testAccount/create.js +1 -1
- package/lang/en.d.ts +12 -1
- package/lang/en.js +25 -14
- package/lib/errorHandlers/__tests__/index.test.d.ts +1 -0
- package/lib/errorHandlers/__tests__/index.test.js +278 -0
- package/lib/errorHandlers/index.js +11 -2
- package/lib/projects/__tests__/components.test.js +1 -1
- package/lib/projects/__tests__/upload.test.js +10 -0
- package/lib/projects/__tests__/workspaceArchive.test.d.ts +1 -0
- package/lib/projects/__tests__/workspaceArchive.test.js +237 -0
- package/lib/projects/components.js +1 -1
- package/lib/projects/upload.js +9 -0
- package/lib/projects/workspaces.d.ts +35 -0
- package/lib/projects/workspaces.js +216 -0
- package/mcp-server/tools/project/AddFeatureToProjectTool.js +2 -2
- package/mcp-server/tools/project/CreateProjectTool.js +2 -2
- package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.js +2 -2
- package/mcp-server/tools/project/GetApplicationInfoTool.js +3 -3
- package/mcp-server/tools/project/UploadProjectTools.js +5 -2
- package/mcp-server/tools/project/__tests__/AddFeatureToProjectTool.test.js +1 -1
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +1 -1
- package/mcp-server/tools/project/__tests__/GetApiUsagePatternsByAppIdTool.test.js +1 -1
- package/mcp-server/tools/project/__tests__/GetApplicationInfoTool.test.js +3 -3
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +12 -0
- package/package.json +3 -3
- package/types/Cms.d.ts +1 -1
- package/types/Cms.js +2 -0
|
@@ -101,12 +101,13 @@ describe('commands/cms/fetch', () => {
|
|
|
101
101
|
await fetchCommand.handler(args);
|
|
102
102
|
expect(trackCommandUsageSpy).toHaveBeenCalledWith('fetch', { mode: 'publish' }, 123456);
|
|
103
103
|
});
|
|
104
|
-
it('should fetch file successfully', async () => {
|
|
104
|
+
it('should fetch file successfully with increased timeout', async () => {
|
|
105
105
|
await fetchCommand.handler(args);
|
|
106
106
|
expect(downloadFileOrFolderSpy).toHaveBeenCalledWith(123456, '/remote/path/file.js', './local/path', 'publish', expect.objectContaining({
|
|
107
107
|
assetVersion: undefined,
|
|
108
108
|
staging: undefined,
|
|
109
109
|
overwrite: undefined,
|
|
110
|
+
timeout: 60000,
|
|
110
111
|
}));
|
|
111
112
|
});
|
|
112
113
|
it('should use default dest if not provided', async () => {
|
package/commands/cms/fetch.js
CHANGED
|
@@ -24,11 +24,12 @@ async function handler(options) {
|
|
|
24
24
|
trackCommandUsage('fetch', { mode: cmsPublishMode }, derivedAccountId);
|
|
25
25
|
const { assetVersion, staging, overwrite } = options;
|
|
26
26
|
try {
|
|
27
|
-
// Fetch and write file/folder.
|
|
27
|
+
// Fetch and write file/folder with increased timeout for large themes.
|
|
28
28
|
await downloadFileOrFolder(derivedAccountId, src, resolveLocalPath(dest), cmsPublishMode, {
|
|
29
29
|
assetVersion: assetVersion !== undefined ? `${assetVersion}` : assetVersion,
|
|
30
30
|
staging,
|
|
31
31
|
overwrite,
|
|
32
|
+
timeout: 60_000,
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
catch (err) {
|
|
@@ -79,7 +79,7 @@ describe('commands/project/create', () => {
|
|
|
79
79
|
projectCreateCommand.builder(yargsMock);
|
|
80
80
|
const optionsCall = optionsSpy.mock.calls[0][0];
|
|
81
81
|
expect(optionsCall.auth).toEqual(expect.objectContaining({
|
|
82
|
-
describe: 'Authentication model for the
|
|
82
|
+
describe: 'Authentication model for the app.',
|
|
83
83
|
type: 'string',
|
|
84
84
|
choices: ['oauth', 'static'],
|
|
85
85
|
}));
|
|
@@ -2,6 +2,8 @@ import * as configLib from '@hubspot/local-dev-lib/config';
|
|
|
2
2
|
import * as projectConfigLib from '../../../lib/projects/config.js';
|
|
3
3
|
import * as platformVersionLib from '../../../lib/projects/platformVersion.js';
|
|
4
4
|
import * as projectProfilesLib from '../../../lib/projects/projectProfiles.js';
|
|
5
|
+
import * as projectParsingProfiles from '@hubspot/project-parsing-lib/profiles';
|
|
6
|
+
import * as promptUtilsLib from '../../../lib/prompts/promptUtils.js';
|
|
5
7
|
import * as usageTrackingLib from '../../../lib/usageTracking.js';
|
|
6
8
|
import * as errorHandlers from '../../../lib/errorHandlers/index.js';
|
|
7
9
|
import { uiLogger } from '../../../lib/ui/logger.js';
|
|
@@ -10,9 +12,11 @@ import * as deprecatedFlowLib from '../dev/deprecatedFlow.js';
|
|
|
10
12
|
import * as unifiedFlowLib from '../dev/unifiedFlow.js';
|
|
11
13
|
import projectDevCommand from '../dev/index.js';
|
|
12
14
|
vi.mock('@hubspot/local-dev-lib/config');
|
|
15
|
+
vi.mock('@hubspot/project-parsing-lib/profiles');
|
|
13
16
|
vi.mock('../../../lib/projects/config.js');
|
|
14
17
|
vi.mock('../../../lib/projects/platformVersion.js');
|
|
15
18
|
vi.mock('../../../lib/projects/projectProfiles.js');
|
|
19
|
+
vi.mock('../../../lib/prompts/promptUtils.js');
|
|
16
20
|
vi.mock('../../../lib/errorHandlers/index.js');
|
|
17
21
|
vi.mock('../../../lib/ui/index.js');
|
|
18
22
|
vi.mock('../dev/deprecatedFlow.js');
|
|
@@ -23,6 +27,8 @@ const validateProjectConfigSpy = vi.spyOn(projectConfigLib, 'validateProjectConf
|
|
|
23
27
|
const isV2ProjectSpy = vi.spyOn(platformVersionLib, 'isV2Project');
|
|
24
28
|
const loadProfileSpy = vi.spyOn(projectProfilesLib, 'loadProfile');
|
|
25
29
|
const enforceProfileUsageSpy = vi.spyOn(projectProfilesLib, 'enforceProfileUsage');
|
|
30
|
+
const getAllHsProfilesSpy = vi.spyOn(projectParsingProfiles, 'getAllHsProfiles');
|
|
31
|
+
const listPromptSpy = vi.spyOn(promptUtilsLib, 'listPrompt');
|
|
26
32
|
const trackCommandUsageSpy = vi.spyOn(usageTrackingLib, 'trackCommandUsage');
|
|
27
33
|
const logErrorSpy = vi.spyOn(errorHandlers, 'logError');
|
|
28
34
|
const deprecatedProjectDevFlowSpy = vi.spyOn(deprecatedFlowLib, 'deprecatedProjectDevFlow');
|
|
@@ -46,6 +52,8 @@ describe('commands/project/dev', () => {
|
|
|
46
52
|
deprecatedProjectDevFlowSpy.mockResolvedValue(undefined);
|
|
47
53
|
unifiedProjectDevFlowSpy.mockResolvedValue(undefined);
|
|
48
54
|
enforceProfileUsageSpy.mockResolvedValue(undefined);
|
|
55
|
+
getAllHsProfilesSpy.mockResolvedValue([]);
|
|
56
|
+
listPromptSpy.mockResolvedValue('dev');
|
|
49
57
|
});
|
|
50
58
|
describe('command', () => {
|
|
51
59
|
it('should have the correct command structure', () => {
|
|
@@ -96,7 +104,11 @@ describe('commands/project/dev', () => {
|
|
|
96
104
|
},
|
|
97
105
|
projectDir: null,
|
|
98
106
|
});
|
|
99
|
-
|
|
107
|
+
// Make process.exit actually throw to stop execution
|
|
108
|
+
processExitSpy.mockImplementation((code) => {
|
|
109
|
+
throw new Error(`process.exit called with ${code}`);
|
|
110
|
+
});
|
|
111
|
+
await expect(projectDevCommand.handler(args)).rejects.toThrow('process.exit called');
|
|
100
112
|
expect(uiLogger.error).toHaveBeenCalledWith(expect.stringContaining('project'));
|
|
101
113
|
expect(processExitSpy).toHaveBeenCalledWith(EXIT_CODES.ERROR);
|
|
102
114
|
});
|
|
@@ -160,18 +172,37 @@ describe('commands/project/dev', () => {
|
|
|
160
172
|
expect(logErrorSpy).toHaveBeenCalledWith(error);
|
|
161
173
|
expect(processExitSpy).toHaveBeenCalledWith(EXIT_CODES.ERROR);
|
|
162
174
|
});
|
|
163
|
-
it('should
|
|
175
|
+
it('should prompt for profile selection when profiles exist and no profile is specified', async () => {
|
|
176
|
+
getAllHsProfilesSpy.mockResolvedValue(['dev', 'prod']);
|
|
177
|
+
listPromptSpy.mockResolvedValue('dev');
|
|
178
|
+
loadProfileSpy.mockReturnValue({
|
|
179
|
+
accountId: 789012,
|
|
180
|
+
variables: {},
|
|
181
|
+
});
|
|
164
182
|
await projectDevCommand.handler(args);
|
|
165
|
-
expect(
|
|
183
|
+
expect(getAllHsProfilesSpy).toHaveBeenCalledWith('/test/project/src');
|
|
184
|
+
expect(listPromptSpy).toHaveBeenCalledWith(expect.any(String), {
|
|
185
|
+
choices: ['dev', 'prod'],
|
|
186
|
+
});
|
|
187
|
+
expect(loadProfileSpy).toHaveBeenCalledWith({
|
|
166
188
|
name: 'test-project',
|
|
167
189
|
srcDir: 'src',
|
|
168
190
|
platformVersion: 'v2',
|
|
169
|
-
}, '/test/project');
|
|
191
|
+
}, '/test/project', 'dev');
|
|
192
|
+
expect(trackCommandUsageSpy).toHaveBeenCalledWith('project-dev', {}, 789012);
|
|
170
193
|
});
|
|
171
|
-
it('should exit if profile
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
194
|
+
it('should exit if profile loading fails after selection', async () => {
|
|
195
|
+
getAllHsProfilesSpy.mockResolvedValue(['dev', 'prod']);
|
|
196
|
+
listPromptSpy.mockResolvedValue('dev');
|
|
197
|
+
const error = new Error('Failed to load profile');
|
|
198
|
+
loadProfileSpy.mockImplementation(() => {
|
|
199
|
+
throw error;
|
|
200
|
+
});
|
|
201
|
+
// Make process.exit actually throw to stop execution
|
|
202
|
+
processExitSpy.mockImplementation((code) => {
|
|
203
|
+
throw new Error(`process.exit called with ${code}`);
|
|
204
|
+
});
|
|
205
|
+
await expect(projectDevCommand.handler(args)).rejects.toThrow('process.exit called');
|
|
175
206
|
expect(logErrorSpy).toHaveBeenCalledWith(error);
|
|
176
207
|
expect(processExitSpy).toHaveBeenCalledWith(EXIT_CODES.ERROR);
|
|
177
208
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { trackCommandUsage } from '../../../lib/usageTracking.js';
|
|
2
2
|
import { getConfigAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
3
|
+
import { getAllHsProfiles, } from '@hubspot/project-parsing-lib/profiles';
|
|
3
4
|
import { getProjectConfig, validateProjectConfig, } from '../../../lib/projects/config.js';
|
|
4
5
|
import { EXIT_CODES } from '../../../lib/enums/exitCodes.js';
|
|
5
6
|
import { uiLine } from '../../../lib/ui/index.js';
|
|
@@ -7,10 +8,12 @@ import { deprecatedProjectDevFlow } from './deprecatedFlow.js';
|
|
|
7
8
|
import { unifiedProjectDevFlow } from './unifiedFlow.js';
|
|
8
9
|
import { isV2Project } from '../../../lib/projects/platformVersion.js';
|
|
9
10
|
import { makeYargsBuilder } from '../../../lib/yargsUtils.js';
|
|
10
|
-
import { loadProfile
|
|
11
|
+
import { loadProfile } from '../../../lib/projects/projectProfiles.js';
|
|
11
12
|
import { commands } from '../../../lang/en.js';
|
|
12
13
|
import { uiLogger } from '../../../lib/ui/logger.js';
|
|
13
14
|
import { logError } from '../../../lib/errorHandlers/index.js';
|
|
15
|
+
import path from 'path';
|
|
16
|
+
import { listPrompt } from '../../../lib/prompts/promptUtils.js';
|
|
14
17
|
const command = 'dev';
|
|
15
18
|
const describe = commands.project.dev.describe;
|
|
16
19
|
function validateAccountFlags(testingAccount, projectAccount, userProvidedAccount, useV2) {
|
|
@@ -62,27 +65,27 @@ async function handler(args) {
|
|
|
62
65
|
else if (userProvidedAccount && derivedAccountId) {
|
|
63
66
|
targetProjectAccountId = derivedAccountId;
|
|
64
67
|
}
|
|
68
|
+
// Determine profile name: from flag or prompt
|
|
65
69
|
if (!targetProjectAccountId && isV2Project(projectConfig.platformVersion)) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
process.exit(EXIT_CODES.ERROR);
|
|
70
|
+
let profileName = args.profile;
|
|
71
|
+
if (!profileName) {
|
|
72
|
+
const existingProfiles = await getAllHsProfiles(path.join(projectDir, projectConfig.srcDir));
|
|
73
|
+
if (existingProfiles.length !== 0) {
|
|
74
|
+
profileName = await listPrompt(commands.project.dev.prompts.selectProfile, {
|
|
75
|
+
choices: existingProfiles,
|
|
76
|
+
});
|
|
74
77
|
}
|
|
75
|
-
targetProjectAccountId = profile.accountId;
|
|
76
|
-
uiLogger.log('');
|
|
77
|
-
uiLogger.log(commands.project.dev.logs.profileProjectAccountExplanation(targetProjectAccountId, args.profile));
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
// A profile must be specified if this project has profiles configured
|
|
79
|
+
if (profileName) {
|
|
81
80
|
try {
|
|
82
|
-
|
|
81
|
+
profile = loadProfile(projectConfig, projectDir, profileName);
|
|
82
|
+
targetProjectAccountId = profile.accountId;
|
|
83
|
+
uiLogger.log('');
|
|
84
|
+
uiLogger.log(commands.project.dev.logs.profileProjectAccountExplanation(targetProjectAccountId, profileName));
|
|
83
85
|
}
|
|
84
86
|
catch (error) {
|
|
85
87
|
logError(error);
|
|
88
|
+
uiLine();
|
|
86
89
|
process.exit(EXIT_CODES.ERROR);
|
|
87
90
|
}
|
|
88
91
|
}
|
|
@@ -114,7 +114,7 @@ async function handler(args) {
|
|
|
114
114
|
process.exit(EXIT_CODES.ERROR);
|
|
115
115
|
}
|
|
116
116
|
SpinniesManager.succeed('createTestAccount', {
|
|
117
|
-
text: commands.testAccount.create.polling.success(testAccountConfig.accountName, resultJson.accountId),
|
|
117
|
+
text: commands.testAccount.create.polling.success(testAccountConfig.accountName, resultJson.accountId, derivedAccountId),
|
|
118
118
|
});
|
|
119
119
|
if (formatOutputAsJson) {
|
|
120
120
|
uiLogger.json(resultJson);
|
package/lang/en.d.ts
CHANGED
|
@@ -1369,6 +1369,9 @@ export declare const commands: {
|
|
|
1369
1369
|
examples: {
|
|
1370
1370
|
default: string;
|
|
1371
1371
|
};
|
|
1372
|
+
prompts: {
|
|
1373
|
+
selectProfile: string;
|
|
1374
|
+
};
|
|
1372
1375
|
options: {
|
|
1373
1376
|
profile: string;
|
|
1374
1377
|
projectAccount: string;
|
|
@@ -2160,7 +2163,7 @@ export declare const commands: {
|
|
|
2160
2163
|
polling: {
|
|
2161
2164
|
start: (testAccountName: string) => string;
|
|
2162
2165
|
syncing: string;
|
|
2163
|
-
success: (testAccountName: string, testAccountId: number) => string;
|
|
2166
|
+
success: (testAccountName: string, testAccountId: number, parentAccountId: number) => string;
|
|
2164
2167
|
createFailure: string;
|
|
2165
2168
|
};
|
|
2166
2169
|
options: {
|
|
@@ -3129,6 +3132,14 @@ export declare const lib: {
|
|
|
3129
3132
|
fileFiltered: (filename: string) => string;
|
|
3130
3133
|
legacyFileDetected: (filename: string, platformVersion: string) => string;
|
|
3131
3134
|
projectDoesNotExist: (accountId: number) => string;
|
|
3135
|
+
workspaceIncluded: (workspaceDir: string, archivePath: string) => string;
|
|
3136
|
+
fileDependencyIncluded: (packageName: string, localPath: string, archivePath: string) => string;
|
|
3137
|
+
malformedPackageJson: (packageJsonPath: string, error: string) => string;
|
|
3138
|
+
workspaceCollision: (archivePath: string, workspaceDir: string, existingWorkspace: string) => string;
|
|
3139
|
+
fileDependencyAlreadyIncluded: (packageName: string, archivePath: string) => string;
|
|
3140
|
+
updatingPackageJsonWorkspaces: (packageJsonPath: string) => string;
|
|
3141
|
+
updatedWorkspaces: (workspaces: string) => string;
|
|
3142
|
+
updatedFileDependency: (packageName: string, relativePath: string) => string;
|
|
3132
3143
|
};
|
|
3133
3144
|
};
|
|
3134
3145
|
importData: {
|
package/lang/en.js
CHANGED
|
@@ -1219,7 +1219,7 @@ export const commands = {
|
|
|
1219
1219
|
windsurf: 'Windsurf',
|
|
1220
1220
|
vsCode: 'VSCode',
|
|
1221
1221
|
args: {
|
|
1222
|
-
client: 'Target
|
|
1222
|
+
client: 'Target apps to configure',
|
|
1223
1223
|
docsSearch: 'Should the docs search mcp server be installed',
|
|
1224
1224
|
},
|
|
1225
1225
|
success: (derivedTargets) => `You can now use the HubSpot CLI MCP Server in ${derivedTargets.join(', ')}. ${chalk.bold('You may need to restart these tools to apply the changes')}.`,
|
|
@@ -1261,7 +1261,7 @@ export const commands = {
|
|
|
1261
1261
|
},
|
|
1262
1262
|
prompts: {
|
|
1263
1263
|
targets: '[--client] Which tools would you like to add the HubSpot CLI MCP server to?',
|
|
1264
|
-
targetsRequired: 'Must choose at least one
|
|
1264
|
+
targetsRequired: 'Must choose at least one app to configure.',
|
|
1265
1265
|
},
|
|
1266
1266
|
},
|
|
1267
1267
|
start: {
|
|
@@ -1385,6 +1385,9 @@ export const commands = {
|
|
|
1385
1385
|
examples: {
|
|
1386
1386
|
default: 'Start local dev for the current project',
|
|
1387
1387
|
},
|
|
1388
|
+
prompts: {
|
|
1389
|
+
selectProfile: '[--profile] Select a profile to use for local development',
|
|
1390
|
+
},
|
|
1388
1391
|
options: {
|
|
1389
1392
|
profile: 'The profile to target during local dev',
|
|
1390
1393
|
projectAccount: 'The id of the account to upload your project to. Must be used with --testing-account. Supported on platform versions 2025.2 and newer.',
|
|
@@ -1438,7 +1441,7 @@ export const commands = {
|
|
|
1438
1441
|
describe: 'How the app will be distributed.',
|
|
1439
1442
|
},
|
|
1440
1443
|
auth: {
|
|
1441
|
-
describe: 'Authentication model for the
|
|
1444
|
+
describe: 'Authentication model for the app.',
|
|
1442
1445
|
},
|
|
1443
1446
|
features: {
|
|
1444
1447
|
describe: `Features to include in the project. Only valid if project-base is ${PROJECT_WITH_APP}`,
|
|
@@ -1536,13 +1539,13 @@ export const commands = {
|
|
|
1536
1539
|
describe: "The path to the component type's location within the hubspot-project-components Github repo: https://github.com/HubSpot/hubspot-project-components",
|
|
1537
1540
|
},
|
|
1538
1541
|
distribution: {
|
|
1539
|
-
describe: 'The distribution method for the
|
|
1542
|
+
describe: 'The distribution method for the app.',
|
|
1540
1543
|
},
|
|
1541
1544
|
auth: {
|
|
1542
|
-
describe: 'The authentication type for the
|
|
1545
|
+
describe: 'The authentication type for the app.',
|
|
1543
1546
|
},
|
|
1544
1547
|
features: {
|
|
1545
|
-
describe: 'Which features to include with the
|
|
1548
|
+
describe: 'Which features to include with the app.',
|
|
1546
1549
|
},
|
|
1547
1550
|
},
|
|
1548
1551
|
creatingComponent: (projectName) => `Adding feature(s) to app [${chalk.bold(projectName)}]\n`,
|
|
@@ -2183,7 +2186,7 @@ export const commands = {
|
|
|
2183
2186
|
polling: {
|
|
2184
2187
|
start: (testAccountName) => `Creating test account "${chalk.bold(testAccountName)}"...`,
|
|
2185
2188
|
syncing: 'Test account created! Syncing account data... (may take a few minutes - you can exit and the sync will continue)',
|
|
2186
|
-
success: (testAccountName, testAccountId) => `Test account "${chalk.bold(testAccountName)}" successfully created with id
|
|
2189
|
+
success: (testAccountName, testAccountId, parentAccountId) => `Test account "${chalk.bold(testAccountName)}" successfully created with id ${chalk.bold(testAccountId)} under parent account ${uiAccountDescription(parentAccountId)}`,
|
|
2187
2190
|
createFailure: 'Failed to create test account.',
|
|
2188
2191
|
},
|
|
2189
2192
|
options: {
|
|
@@ -2206,7 +2209,7 @@ export const commands = {
|
|
|
2206
2209
|
},
|
|
2207
2210
|
createConfig: {
|
|
2208
2211
|
describe: 'Create a test account config file.',
|
|
2209
|
-
pathPrompt: '[--path] Enter the name of the
|
|
2212
|
+
pathPrompt: '[--path] Enter the name of the test account config file: ',
|
|
2210
2213
|
errors: {
|
|
2211
2214
|
pathError: 'Path is required',
|
|
2212
2215
|
pathFormatError: 'Path must end with .json',
|
|
@@ -2997,7 +3000,7 @@ export const lib = {
|
|
|
2997
3000
|
privateApp: `This project contains a private app. Local development of private apps is not supported in developer accounts. Change your default account using ${uiCommandReference('hs account use')}, or link a new account with ${uiAuthCommandReference()}.`,
|
|
2998
3001
|
},
|
|
2999
3002
|
validateAccountOption: {
|
|
3000
|
-
invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an
|
|
3003
|
+
invalidPublicAppAccount: `This project contains a public app. The "--account" flag must point to a developer test account to develop this project locally. Alternatively, change your default account to an app developer account using ${uiCommandReference('hs account use')} and run ${uiCommandReference('hs project dev')} to set up a new developer test account.`,
|
|
3001
3004
|
invalidPrivateAppAccount: `This project contains a private app. The account specified with the "--account" flag points to a developer account, which do not support the local development of private apps. Update the "--account" flag to point to a standard, sandbox, or developer test account, or change your default account by running ${uiCommandReference('hs account use')}.`,
|
|
3002
3005
|
nonSandboxWarning: `Testing in a sandbox is strongly recommended. To switch the target account, select an option below or run ${uiCommandReference('hs account use')} before running the command again.`,
|
|
3003
3006
|
publicAppNonDeveloperTestAccountWarning: `Local development of public apps is only supported in ${chalk.bold('developer test accounts')}.`,
|
|
@@ -3059,7 +3062,7 @@ export const lib = {
|
|
|
3059
3062
|
prompt: {
|
|
3060
3063
|
marketPlaceDistribution: 'On the HubSpot marketplace',
|
|
3061
3064
|
privateDistribution: 'Privately',
|
|
3062
|
-
distribution: '[--distribution] Choose how to distribute your
|
|
3065
|
+
distribution: '[--distribution] Choose how to distribute your app:',
|
|
3063
3066
|
auth: '[--auth] Choose your authentication type:',
|
|
3064
3067
|
staticAuth: 'Static Auth',
|
|
3065
3068
|
oauth: 'OAuth',
|
|
@@ -3152,6 +3155,14 @@ export const lib = {
|
|
|
3152
3155
|
fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
|
|
3153
3156
|
legacyFileDetected: (filename, platformVersion) => `The ${chalk.bold(filename)} file is not supported on platform version ${chalk.bold(platformVersion)} and will be ignored.`,
|
|
3154
3157
|
projectDoesNotExist: (accountId) => `Upload cancelled. Run ${uiCommandReference('hs project upload')} again to create the project in ${uiAccountDescription(accountId)}.`,
|
|
3158
|
+
workspaceIncluded: (workspaceDir, archivePath) => `Including workspace: ${workspaceDir} → ${archivePath}`,
|
|
3159
|
+
fileDependencyIncluded: (packageName, localPath, archivePath) => `Including file: dependency ${packageName}: ${localPath} → ${archivePath}`,
|
|
3160
|
+
malformedPackageJson: (packageJsonPath, error) => `Skipping malformed package.json at ${packageJsonPath}: ${error}`,
|
|
3161
|
+
workspaceCollision: (archivePath, workspaceDir, existingWorkspace) => `Workspace collision: ${archivePath} from ${workspaceDir} and ${existingWorkspace}`,
|
|
3162
|
+
fileDependencyAlreadyIncluded: (packageName, archivePath) => `file: dependency ${packageName} already included as workspace: ${archivePath}`,
|
|
3163
|
+
updatingPackageJsonWorkspaces: (packageJsonPath) => `Updating package.json workspaces in archive: ${packageJsonPath}`,
|
|
3164
|
+
updatedWorkspaces: (workspaces) => ` Updated workspaces: ${workspaces}`,
|
|
3165
|
+
updatedFileDependency: (packageName, relativePath) => ` Updated dependencies.${packageName}: file:${relativePath}`,
|
|
3155
3166
|
},
|
|
3156
3167
|
},
|
|
3157
3168
|
importData: {
|
|
@@ -3386,10 +3397,10 @@ export const lib = {
|
|
|
3386
3397
|
keepingCurrentDefault: (accountName) => `Account "${accountName}" will continue to be the default account`,
|
|
3387
3398
|
},
|
|
3388
3399
|
createDeveloperTestAccountConfigPrompt: {
|
|
3389
|
-
namePrompt: (withFlag = true) => `${withFlag ? '[--name] ' : ''}Enter the name of the
|
|
3390
|
-
descriptionPrompt: (withFlag = true) => `${withFlag ? '[--description] ' : ''}Enter the description of the
|
|
3400
|
+
namePrompt: (withFlag = true) => `${withFlag ? '[--name] ' : ''}Enter the name of the test account:`,
|
|
3401
|
+
descriptionPrompt: (withFlag = true) => `${withFlag ? '[--description] ' : ''}Enter the description of the test account:`,
|
|
3391
3402
|
useDefaultAccountLevelsPrompt: {
|
|
3392
|
-
message: 'Would you like to create a default
|
|
3403
|
+
message: 'Would you like to create a default test account, or customize your own?',
|
|
3393
3404
|
default: 'Default (All Hubs, ENTERPRISE)',
|
|
3394
3405
|
manual: 'Customize my own',
|
|
3395
3406
|
},
|
|
@@ -3405,7 +3416,7 @@ export const lib = {
|
|
|
3405
3416
|
errors: {
|
|
3406
3417
|
allHubsRequired: 'Select a tier for each hub',
|
|
3407
3418
|
tiersError: 'Cannot have more than one tier per hub',
|
|
3408
|
-
nameRequired: 'The name may not be blank. Please add a name for the
|
|
3419
|
+
nameRequired: 'The name may not be blank. Please add a name for the test account.',
|
|
3409
3420
|
},
|
|
3410
3421
|
},
|
|
3411
3422
|
accountNamePrompt: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|