@hubspot/cli 7.5.10-experimental.0 → 7.6.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.
- package/bin/cli.js +102 -95
- package/commands/account/auth.d.ts +5 -7
- package/commands/account/auth.js +74 -87
- package/commands/account/clean.d.ts +3 -7
- package/commands/account/clean.js +16 -9
- package/commands/account/createOverride.d.ts +3 -7
- package/commands/account/createOverride.js +23 -6
- package/commands/account/info.d.ts +3 -7
- package/commands/account/info.js +13 -5
- package/commands/account/list.d.ts +3 -7
- package/commands/account/list.js +15 -8
- package/commands/account/remove.d.ts +3 -7
- package/commands/account/remove.js +21 -9
- package/commands/account/removeOverride.d.ts +3 -7
- package/commands/account/removeOverride.js +23 -6
- package/commands/account/rename.d.ts +3 -7
- package/commands/account/rename.js +16 -9
- package/commands/account/use.d.ts +5 -9
- package/commands/account/use.js +14 -6
- package/commands/account.d.ts +3 -4
- package/commands/account.js +33 -58
- package/commands/app/migrate.d.ts +1 -2
- package/commands/app/migrate.js +7 -8
- package/commands/app/secret/add.d.ts +7 -0
- package/commands/app/secret/add.js +64 -0
- package/commands/app/secret/delete.d.ts +8 -0
- package/commands/app/secret/delete.js +87 -0
- package/commands/app/secret/list.d.ts +6 -0
- package/commands/app/secret/list.js +64 -0
- package/commands/app/secret/update.d.ts +7 -0
- package/commands/app/secret/update.js +77 -0
- package/commands/app/secret.d.ts +3 -0
- package/commands/app/secret.js +30 -0
- package/commands/app.d.ts +2 -5
- package/commands/app.js +10 -8
- package/commands/auth.d.ts +5 -7
- package/commands/auth.js +30 -29
- package/commands/cms/convertFields.d.ts +7 -1
- package/commands/cms/convertFields.js +57 -41
- package/commands/cms/getReactModule.d.ts +7 -1
- package/commands/cms/getReactModule.js +52 -34
- package/commands/cms/lighthouseScore.d.ts +8 -1
- package/commands/cms/lighthouseScore.js +129 -100
- package/commands/cms.d.ts +3 -1
- package/commands/cms.js +22 -15
- package/commands/completion.d.ts +3 -1
- package/commands/completion.js +23 -12
- package/commands/config/migrate.d.ts +3 -7
- package/commands/config/migrate.js +37 -46
- package/commands/config/set.d.ts +5 -6
- package/commands/config/set.js +38 -14
- package/commands/config.d.ts +3 -4
- package/commands/config.js +18 -44
- package/commands/create/api-sample.d.ts +3 -1
- package/commands/create/api-sample.js +34 -38
- package/commands/create/app.d.ts +3 -1
- package/commands/create/app.js +9 -7
- package/commands/create/function.d.ts +3 -1
- package/commands/create/function.js +11 -10
- package/commands/create/index.d.ts +5 -1
- package/commands/create/index.js +23 -11
- package/commands/create/module.d.ts +3 -1
- package/commands/create/module.js +14 -13
- package/commands/create/react-app.d.ts +3 -1
- package/commands/create/react-app.js +10 -7
- package/commands/create/template.d.ts +3 -1
- package/commands/create/template.js +14 -14
- package/commands/create/vue-app.d.ts +3 -1
- package/commands/create/vue-app.js +10 -7
- package/commands/create/webpack-serverless.d.ts +3 -1
- package/commands/create/webpack-serverless.js +10 -7
- package/commands/create/website-theme.d.ts +3 -1
- package/commands/create/website-theme.js +10 -9
- package/commands/create.d.ts +4 -24
- package/commands/create.js +62 -74
- package/commands/customObject/create.d.ts +4 -9
- package/commands/customObject/create.js +17 -10
- package/commands/customObject/schema/create.d.ts +4 -9
- package/commands/customObject/schema/create.js +18 -11
- package/commands/customObject/schema/delete.d.ts +4 -9
- package/commands/customObject/schema/delete.js +17 -10
- package/commands/customObject/schema/fetch-all.d.ts +4 -9
- package/commands/customObject/schema/fetch-all.js +17 -10
- package/commands/customObject/schema/fetch.d.ts +4 -9
- package/commands/customObject/schema/fetch.js +17 -10
- package/commands/customObject/schema/list.d.ts +4 -8
- package/commands/customObject/schema/list.js +17 -10
- package/commands/customObject/schema/update.d.ts +4 -9
- package/commands/customObject/schema/update.js +18 -11
- package/commands/customObject/schema.d.ts +3 -5
- package/commands/customObject/schema.js +27 -54
- package/commands/customObject.d.ts +3 -4
- package/commands/customObject.js +18 -45
- package/commands/doctor.d.ts +6 -8
- package/commands/doctor.js +30 -21
- package/commands/feedback.d.ts +4 -1
- package/commands/feedback.js +38 -47
- package/commands/fetch.d.ts +12 -1
- package/commands/fetch.js +49 -33
- package/commands/filemanager/fetch.d.ts +4 -9
- package/commands/filemanager/fetch.js +18 -11
- package/commands/filemanager/upload.d.ts +4 -9
- package/commands/filemanager/upload.js +17 -11
- package/commands/filemanager.d.ts +3 -4
- package/commands/filemanager.js +18 -41
- package/commands/function/deploy.d.ts +6 -1
- package/commands/function/deploy.js +70 -50
- package/commands/function/list.d.ts +6 -1
- package/commands/function/list.js +44 -32
- package/commands/function/server.d.ts +10 -1
- package/commands/function/server.js +49 -38
- package/commands/function.d.ts +5 -1
- package/commands/function.js +22 -10
- package/commands/getStarted.d.ts +9 -0
- package/commands/getStarted.js +227 -0
- package/commands/hubdb/clear.d.ts +4 -9
- package/commands/hubdb/clear.js +17 -10
- package/commands/hubdb/create.d.ts +4 -9
- package/commands/hubdb/create.js +17 -10
- package/commands/hubdb/delete.d.ts +4 -9
- package/commands/hubdb/delete.js +17 -10
- package/commands/hubdb/fetch.d.ts +4 -9
- package/commands/hubdb/fetch.js +17 -10
- package/commands/hubdb/list.d.ts +4 -0
- package/commands/hubdb/list.js +83 -0
- package/commands/hubdb.d.ts +3 -2
- package/commands/hubdb.js +23 -45
- package/commands/init.d.ts +3 -7
- package/commands/init.js +17 -8
- package/commands/lint.d.ts +6 -4
- package/commands/lint.js +42 -43
- package/commands/list.d.ts +3 -7
- package/commands/list.js +17 -11
- package/commands/logs.d.ts +10 -1
- package/commands/logs.js +53 -44
- package/commands/mcp/setup.d.ts +7 -0
- package/commands/mcp/setup.js +52 -0
- package/commands/mcp/start.d.ts +3 -0
- package/commands/mcp/start.js +77 -0
- package/commands/mcp.d.ts +3 -0
- package/commands/mcp.js +26 -0
- package/commands/module/marketplace-validate.d.ts +6 -1
- package/commands/module/marketplace-validate.js +39 -29
- package/commands/module.d.ts +3 -1
- package/commands/module.js +23 -10
- package/commands/mv.d.ts +3 -7
- package/commands/mv.js +17 -11
- package/commands/open.d.ts +3 -7
- package/commands/open.js +17 -11
- package/commands/project/add.d.ts +5 -2
- package/commands/project/add.js +43 -80
- package/commands/project/cloneApp.d.ts +1 -1
- package/commands/project/cloneApp.js +2 -2
- package/commands/project/create.d.ts +2 -8
- package/commands/project/create.js +84 -55
- package/commands/project/deploy.d.ts +2 -0
- package/commands/project/deploy.js +67 -13
- package/commands/project/dev/deprecatedFlow.d.ts +8 -2
- package/commands/project/dev/deprecatedFlow.js +9 -1
- package/commands/project/dev/index.d.ts +1 -4
- package/commands/project/dev/index.js +74 -72
- package/commands/project/dev/unifiedFlow.d.ts +10 -2
- package/commands/project/dev/unifiedFlow.js +74 -40
- package/commands/project/listBuilds.js +2 -5
- package/commands/project/migrate.d.ts +1 -0
- package/commands/project/migrate.js +7 -2
- package/commands/project/profile/add.js +102 -64
- package/commands/project/profile/delete.d.ts +6 -0
- package/commands/project/profile/{remove.js → delete.js} +38 -28
- package/commands/project/profile.js +2 -2
- package/commands/project/upload.js +5 -53
- package/commands/project/validate.d.ts +6 -0
- package/commands/project/validate.js +82 -0
- package/commands/project.js +2 -2
- package/commands/remove.d.ts +3 -7
- package/commands/remove.js +22 -22
- package/commands/sandbox/create.d.ts +4 -9
- package/commands/sandbox/create.js +18 -11
- package/commands/sandbox/delete.d.ts +4 -9
- package/commands/sandbox/delete.js +18 -11
- package/commands/sandbox.d.ts +3 -4
- package/commands/sandbox.js +18 -43
- package/commands/secret/addSecret.d.ts +4 -9
- package/commands/secret/addSecret.js +17 -10
- package/commands/secret/deleteSecret.d.ts +4 -9
- package/commands/secret/deleteSecret.js +17 -10
- package/commands/secret/listSecret.d.ts +4 -9
- package/commands/secret/listSecret.js +17 -10
- package/commands/secret/updateSecret.d.ts +4 -9
- package/commands/secret/updateSecret.js +17 -10
- package/commands/secret.d.ts +3 -4
- package/commands/secret.js +23 -48
- package/commands/testAccount/create.d.ts +6 -0
- package/commands/testAccount/create.js +100 -0
- package/commands/testAccount/createConfig.d.ts +10 -0
- package/commands/testAccount/createConfig.js +98 -0
- package/commands/testAccount/delete.d.ts +6 -0
- package/commands/testAccount/delete.js +48 -0
- package/commands/testAccount.d.ts +3 -0
- package/commands/testAccount.js +28 -0
- package/commands/theme/generate-selectors.d.ts +3 -7
- package/commands/theme/generate-selectors.js +20 -15
- package/commands/theme/marketplace-validate.d.ts +4 -9
- package/commands/theme/marketplace-validate.js +22 -17
- package/commands/theme/preview.d.ts +4 -9
- package/commands/theme/preview.js +32 -26
- package/commands/theme.d.ts +3 -4
- package/commands/theme.js +22 -47
- package/commands/upload.d.ts +12 -1
- package/commands/upload.js +116 -134
- package/commands/watch.d.ts +14 -1
- package/commands/watch.js +74 -75
- package/lang/en.d.ts +1092 -683
- package/lang/en.js +898 -494
- package/lang/en.lyaml +28 -225
- package/lib/accountTypes.js +1 -2
- package/lib/app/migrate.d.ts +23 -0
- package/lib/app/migrate.js +34 -12
- package/lib/app/migrate_legacy.js +7 -7
- package/lib/app/urls.d.ts +16 -0
- package/lib/app/urls.js +16 -0
- package/lib/commonOpts.d.ts +1 -3
- package/lib/commonOpts.js +1 -1
- package/lib/configMigrate.d.ts +2 -2
- package/lib/configMigrate.js +34 -55
- package/lib/configOptions.d.ts +4 -0
- package/lib/configOptions.js +41 -46
- package/lib/constants.d.ts +29 -0
- package/lib/constants.js +30 -1
- package/lib/dependencyManagement.d.ts +0 -5
- package/lib/dependencyManagement.js +13 -39
- package/lib/doctor/Doctor.js +3 -2
- package/lib/errorHandlers/index.js +7 -0
- package/lib/errorHandlers/suppressError.js +12 -19
- package/lib/filesystem.d.ts +1 -1
- package/lib/generateSelectors.js +3 -5
- package/lib/interpolation.d.ts +2 -3
- package/lib/lang.d.ts +2 -3
- package/lib/marketplaceValidate.d.ts +12 -2
- package/lib/marketplaceValidate.js +22 -29
- package/lib/mcp/setup.d.ts +21 -0
- package/lib/mcp/setup.js +218 -0
- package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
- package/lib/middleware/autoUpdateMiddleware.js +89 -0
- package/lib/middleware/configMiddleware.js +23 -0
- package/lib/middleware/fireAlarmMiddleware.d.ts +2 -2
- package/lib/middleware/fireAlarmMiddleware.js +12 -24
- package/lib/npm.d.ts +9 -0
- package/lib/npm.js +36 -0
- package/lib/projectProfiles.d.ts +7 -0
- package/lib/projectProfiles.js +83 -0
- package/lib/projects/add/legacyAddComponent.d.ts +5 -0
- package/lib/projects/add/legacyAddComponent.js +48 -0
- package/lib/projects/add/v3AddComponent.d.ts +8 -0
- package/lib/projects/add/v3AddComponent.js +85 -0
- package/lib/projects/buildAndDeploy.js +18 -3
- package/lib/projects/components.d.ts +2 -0
- package/lib/projects/components.js +82 -0
- package/lib/projects/create/index.d.ts +23 -0
- package/lib/projects/create/index.js +33 -0
- package/lib/projects/create/legacy.d.ts +6 -0
- package/lib/projects/{create.js → create/legacy.js} +20 -11
- package/lib/projects/create/v3.d.ts +27 -0
- package/lib/projects/create/v3.js +158 -0
- package/lib/projects/localDev/AppDevModeInterface.d.ts +30 -0
- package/lib/projects/localDev/AppDevModeInterface.js +215 -0
- package/lib/projects/localDev/DevServerManager.js +4 -3
- package/lib/projects/localDev/DevServerManagerV2.d.ts +11 -22
- package/lib/projects/localDev/DevServerManagerV2.js +21 -17
- package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
- package/lib/projects/localDev/LocalDevLogger.js +159 -0
- package/lib/projects/localDev/LocalDevManager.js +12 -5
- package/lib/projects/localDev/LocalDevProcess.d.ts +34 -0
- package/lib/projects/localDev/LocalDevProcess.js +201 -0
- package/lib/projects/localDev/LocalDevState.d.ts +50 -0
- package/lib/projects/localDev/LocalDevState.js +119 -0
- package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
- package/lib/projects/localDev/LocalDevWatcher.js +53 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +20 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.js +131 -0
- package/lib/projects/localDev/helpers.d.ts +2 -1
- package/lib/projects/localDev/helpers.js +30 -1
- package/lib/projects/upload.d.ts +3 -0
- package/lib/projects/upload.js +59 -19
- package/lib/projects/urls.d.ts +3 -0
- package/lib/projects/urls.js +17 -1
- package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +17 -0
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +96 -0
- package/lib/prompts/createProjectPrompt.d.ts +14 -5
- package/lib/prompts/createProjectPrompt.js +38 -13
- package/lib/prompts/createTemplatePrompt.d.ts +22 -4
- package/lib/prompts/installAppPrompt.d.ts +2 -0
- package/lib/prompts/installAppPrompt.js +45 -0
- package/lib/prompts/personalAccessKeyPrompt.js +35 -24
- package/lib/prompts/projectAddPrompt.d.ts +5 -1
- package/lib/prompts/projectAddPrompt.js +35 -7
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +6 -6
- package/lib/prompts/promptUtils.d.ts +4 -1
- package/lib/prompts/promptUtils.js +5 -1
- package/lib/prompts/selectAppPrompt.d.ts +2 -0
- package/lib/prompts/selectAppPrompt.js +40 -0
- package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
- package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -8
- package/lib/prompts/setAsDefaultAccountPrompt.js +10 -0
- package/lib/testUtils.d.ts +3 -3
- package/lib/testUtils.js +8 -9
- package/lib/ui/boxen.d.ts +5 -0
- package/lib/ui/boxen.js +30 -0
- package/lib/ui/index.js +4 -1
- package/lib/upload.d.ts +1 -1
- package/lib/yargsUtils.d.ts +4 -0
- package/lib/yargsUtils.js +6 -0
- package/mcp-server/server.d.ts +1 -0
- package/mcp-server/server.js +18 -0
- package/mcp-server/tools/index.d.ts +2 -0
- package/mcp-server/tools/index.js +19 -0
- package/mcp-server/tools/project/AddFeatureToProject.d.ts +29 -0
- package/mcp-server/tools/project/AddFeatureToProject.js +85 -0
- package/mcp-server/tools/project/CreateProjectTool.d.ts +35 -0
- package/mcp-server/tools/project/CreateProjectTool.js +104 -0
- package/mcp-server/tools/project/DeployProject.d.ts +20 -0
- package/mcp-server/tools/project/DeployProject.js +50 -0
- package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +17 -0
- package/mcp-server/tools/project/GuidedWalkthroughTool.js +58 -0
- package/mcp-server/tools/project/UploadProjectTools.d.ts +17 -0
- package/mcp-server/tools/project/UploadProjectTools.js +35 -0
- package/mcp-server/tools/project/ValidateProjectTool.d.ts +17 -0
- package/mcp-server/tools/project/ValidateProjectTool.js +35 -0
- package/mcp-server/tools/project/constants.d.ts +3 -0
- package/mcp-server/tools/project/constants.js +13 -0
- package/mcp-server/types.d.ts +14 -0
- package/mcp-server/types.js +17 -0
- package/mcp-server/utils/command.d.ts +3 -0
- package/mcp-server/utils/command.js +16 -0
- package/mcp-server/utils/content.d.ts +3 -0
- package/mcp-server/utils/content.js +21 -0
- package/mcp-server/utils/project.d.ts +5 -0
- package/mcp-server/utils/project.js +17 -0
- package/package.json +24 -16
- package/types/Cms.d.ts +30 -0
- package/types/Cms.js +2 -0
- package/types/LocalDev.d.ts +35 -0
- package/types/LocalDev.js +2 -0
- package/types/Projects.d.ts +19 -2
- package/types/Prompts.d.ts +0 -7
- package/types/Yargs.d.ts +7 -0
- package/commands/project/profile/remove.d.ts +0 -6
- package/lib/projects/create.d.ts +0 -5
- package/lib/projects/localDev/LocalDevManagerV2.d.ts +0 -64
- package/lib/projects/localDev/LocalDevManagerV2.js +0 -345
- package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
- package/lib/prompts/installPublicAppPrompt.js +0 -41
package/lang/en.lyaml
CHANGED
|
@@ -20,18 +20,6 @@ en:
|
|
|
20
20
|
account:
|
|
21
21
|
describe: "Commands for managing configured accounts."
|
|
22
22
|
subcommands:
|
|
23
|
-
auth:
|
|
24
|
-
describe: "Configure authentication for your HubSpot account."
|
|
25
|
-
options:
|
|
26
|
-
account:
|
|
27
|
-
describe: "HubSpot account to authenticate"
|
|
28
|
-
errors:
|
|
29
|
-
failedToUpdateConfig: "Failed to update the configuration file. Please try again."
|
|
30
|
-
migrationNotConfirmed: "Did not migrate. Use the {{ authCommand }} command to update the deprecated config at {{ deprecatedConfigPath }}."
|
|
31
|
-
mergeNotConfirmed: "Did not merge. When you are ready to merge the deprecated config file with the global config file, run the {{ authCommand }} or {{ migrateCommand }} command."
|
|
32
|
-
success:
|
|
33
|
-
configFileCreated: "Created config file \"{{ configPath }}\""
|
|
34
|
-
configFileUpdated: "Connected account \"{{ account }}\" and set it as the default account"
|
|
35
23
|
createOverride:
|
|
36
24
|
describe: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory."
|
|
37
25
|
success: "Default account override file created at {{ overrideFilePath }}"
|
|
@@ -39,6 +27,7 @@ en:
|
|
|
39
27
|
prompts:
|
|
40
28
|
replaceOverrideFile: "Replace existing account override file?"
|
|
41
29
|
errors:
|
|
30
|
+
globalConfigNotFound: "This command is only compatible with our new global config. Run {{ authCommand }} to get started."
|
|
42
31
|
accountNotFound: "The specified account could not be found in the config file {{ configPath }}"
|
|
43
32
|
options:
|
|
44
33
|
account:
|
|
@@ -54,6 +43,8 @@ en:
|
|
|
54
43
|
deleteOverrideFile: "Delete account override file?"
|
|
55
44
|
success: "Removed the default account override file."
|
|
56
45
|
noOverrideFile: "No default account override file found in the current working directory. No action required."
|
|
46
|
+
errors:
|
|
47
|
+
globalConfigNotFound: "This command is only compatible with our new global config. Run {{ authCommand }} to get started."
|
|
57
48
|
options:
|
|
58
49
|
force:
|
|
59
50
|
describe: "Skip confirmation prompt when removing the override file"
|
|
@@ -152,7 +143,7 @@ en:
|
|
|
152
143
|
verboseDescribe: "Configure authentication for a HubSpot account. This will update the {{ configName }} file that stores your account information.\n\nThe recommended authentication method is {{#bold}}{{ authMethod }}{{/bold}}, which uses an access token tied to a specific user account."
|
|
153
144
|
errors:
|
|
154
145
|
unsupportedAuthType: "Unsupported auth type: {{ type }}. The only supported authentication protocols are {{ supportedProtocols }}."
|
|
155
|
-
globalConfigFileExists: "
|
|
146
|
+
globalConfigFileExists: "You are using our new global configuration for account management, which is not compatible with this command. Please use {{ accountAuthCommand }} instead."
|
|
156
147
|
options:
|
|
157
148
|
authType:
|
|
158
149
|
describe: "Authentication method"
|
|
@@ -163,16 +154,6 @@ en:
|
|
|
163
154
|
config:
|
|
164
155
|
describe: "Commands for managing the CLI config file."
|
|
165
156
|
subcommands:
|
|
166
|
-
migrate:
|
|
167
|
-
describe: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}."
|
|
168
|
-
migrationAlreadyCompleted: "No {{ deprecatedConfigPath }} deprecated configuration file found. No migration necessary."
|
|
169
|
-
errors:
|
|
170
|
-
configNotFound: "A configuration file at {{ configPath }} could not be found. Please try again with a valid file path."
|
|
171
|
-
options:
|
|
172
|
-
force: "When merging a deprecated configuration file with an existing global configuration file, overwrite any conflicting values in the global config with the deprecated config values."
|
|
173
|
-
examples:
|
|
174
|
-
default: "Migrate from the deprecated {{ deprecatedConfigPath }} file to the new global config file at {{ globalConfigPath }}"
|
|
175
|
-
configFlag: "Migrate a specific config file (specified with the config flag) to the new global config file at {{ globalConfigPath }}"
|
|
176
157
|
set:
|
|
177
158
|
describe: "Set various configuration options within the hubspot.config.yml file."
|
|
178
159
|
promptMessage: "Select a config option to update"
|
|
@@ -527,7 +508,7 @@ en:
|
|
|
527
508
|
updateConfig: "To update an existing config file, use the \"hs auth\" command."
|
|
528
509
|
errors:
|
|
529
510
|
configFileExists: "The config file {{ configPath }} already exists."
|
|
530
|
-
globalConfigFileExists: "
|
|
511
|
+
globalConfigFileExists: "You are using our new global configuration for account management, which is not compatible with this command. Please use {{ accountAuthCommand }} instead."
|
|
531
512
|
lint:
|
|
532
513
|
issuesFound: "{{ count }} issues found."
|
|
533
514
|
groupName: "Linting {{ path }}"
|
|
@@ -588,19 +569,21 @@ en:
|
|
|
588
569
|
betaMessage: "HubSpot projects local development"
|
|
589
570
|
placeholderAccountSelection: "Using default account as target account (for now)"
|
|
590
571
|
learnMoreLocalDevServer: "Learn more about the projects local dev server"
|
|
591
|
-
|
|
592
|
-
|
|
572
|
+
accountTypeInformation: "Testing in a developer test account is strongly recommended, but you can use a sandbox account if your plan allows you to create one."
|
|
573
|
+
learnMoreMessage: "Visit our {{ learnMoreLink }} to learn more."
|
|
574
|
+
learnMoreLink: "docs on Developer Test and Sandbox accounts "
|
|
593
575
|
errors:
|
|
594
576
|
noProjectConfig: "No project detected. Please run this command again from a project directory."
|
|
595
577
|
noAccount: "An error occurred while reading account {{ accountId }} from your config. Run {{ authCommand }} to re-auth this account."
|
|
596
578
|
noAccountsInConfig: "No accounts found in your config. Run {{ authCommand }} to configure a HubSpot account with the CLI."
|
|
597
579
|
invalidProjectComponents: "Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development."
|
|
598
580
|
noRunnableComponents: "No supported components were found in this project. Run {{ command }} to see a list of available components and add one to your project."
|
|
599
|
-
|
|
600
|
-
profileNotFound: "Profile {{#bold}}{{ profileFilename }}{{/bold}} not found"
|
|
601
|
-
noAccountIdInProfile: "No accountId found in {{#bold}}{{ profileFilename }}{{/bold}}"
|
|
581
|
+
accountNotCombined: "Local development of Unified Apps is currently only compatible with accounts that are opted into the unified apps beta. Make sure that this account is opted in or switch accounts using {{ accountUseCommand }}."
|
|
602
582
|
examples:
|
|
603
583
|
default: "Start local dev for the current project"
|
|
584
|
+
options:
|
|
585
|
+
profile:
|
|
586
|
+
describe: "The profile to target during local dev"
|
|
604
587
|
create:
|
|
605
588
|
describe: "Create a new project."
|
|
606
589
|
errors:
|
|
@@ -711,6 +694,7 @@ en:
|
|
|
711
694
|
buildIdDoesNotExist: "Build {{ buildId }} does not exist for project {{ projectName }}. {{ linkToProject }}"
|
|
712
695
|
buildAlreadyDeployed: "Build {{ buildId }} is already deployed. {{ linkToProject}}"
|
|
713
696
|
viewProjectsBuilds: 'View project builds in HubSpot'
|
|
697
|
+
deployContainsRemovals: "- This deploy would remove the {{#bold}}{{ componentName }}{{/bold}} component. To proceed, run the deploy command with the {{ forceFlag }} flag"
|
|
714
698
|
examples:
|
|
715
699
|
default: "Deploy the latest build of the current project"
|
|
716
700
|
withOptions: "Deploy build 5 of the project my-project"
|
|
@@ -719,6 +703,10 @@ en:
|
|
|
719
703
|
describe: "Project build ID to be deployed"
|
|
720
704
|
project:
|
|
721
705
|
describe: "Project name"
|
|
706
|
+
profile:
|
|
707
|
+
describe: "The profile to target with this deploy"
|
|
708
|
+
force:
|
|
709
|
+
describe: "Skip warnings and force deploy. Use this carefully as it will bypass warnings for destructive actions."
|
|
722
710
|
listBuilds:
|
|
723
711
|
describe: "List the project's builds."
|
|
724
712
|
continueOrExitPrompt: "Press <enter> to load more, or ctrl+c to exit"
|
|
@@ -779,13 +767,8 @@ en:
|
|
|
779
767
|
readyToGoLive: "🚀 Ready to take your project live?"
|
|
780
768
|
runCommand: "Run `{{ command }}`"
|
|
781
769
|
autoDeployDisabled: "Automatic deploys are disabled for this project. Run {{ deployCommand }} to deploy this build."
|
|
782
|
-
usingProfile: "Using profile from {{#bold}}{{ profileFilename }}{{/bold}}"
|
|
783
|
-
profileTargetAccount: "Targeting {{#bold}}{{ account }}{{/bold}}"
|
|
784
|
-
profileVariables: "Applying profile variables: "
|
|
785
770
|
errors:
|
|
786
771
|
projectLockedError: "Your project is locked. This may mean that another user is running the {{#bold}}`hs project dev`{{/bold}} command for this project. If this is you, unlock the project in Projects UI."
|
|
787
|
-
noAccountIdInProfile: "No accountId found in {{#bold}}{{ profileFilename }}{{/bold}}."
|
|
788
|
-
noProfileSpecified: "You are using project profiles, but did not specify a target profile. Specify a profile using the --profile flag."
|
|
789
772
|
options:
|
|
790
773
|
forceCreate:
|
|
791
774
|
describe: "Automatically create project if it does not exist"
|
|
@@ -852,18 +835,10 @@ en:
|
|
|
852
835
|
default: "Opens the projects page for the specified account"
|
|
853
836
|
success: "Successfully opened \"{{ projectName }}\""
|
|
854
837
|
feedback:
|
|
855
|
-
describe: "Leave feedback
|
|
856
|
-
|
|
857
|
-
prompt: "What type of feedback would you like to leave?"
|
|
858
|
-
bug: "[--bug] Report a bug"
|
|
859
|
-
general: "[--general] Tell us about your experience with HubSpot's developer tools"
|
|
860
|
-
openPrompt: "Create a Github issue in your browser?"
|
|
838
|
+
describe: "Leave feedback or file a bug report."
|
|
839
|
+
openPrompt: "Open the feedback form in your browser?"
|
|
861
840
|
success: "We opened {{ url }} in your browser."
|
|
862
|
-
|
|
863
|
-
bug:
|
|
864
|
-
describe: "Open Github issues in your browser to report a bug."
|
|
865
|
-
general:
|
|
866
|
-
describe: "Open Github issues in your browser to give feedback."
|
|
841
|
+
error: "Navigate to {{ url }} to leave feedback."
|
|
867
842
|
installDeps:
|
|
868
843
|
help:
|
|
869
844
|
describe: "Install the dependencies for your project, or add a dependency to a subcomponent of a project."
|
|
@@ -878,14 +853,6 @@ en:
|
|
|
878
853
|
noProjectConfig: "No project detected. Run this command from a project directory."
|
|
879
854
|
noPackageJsonInProject: "No dependencies to install. The project {{ projectName }} folder might be missing component or subcomponent files. {{ link }}"
|
|
880
855
|
packageManagerNotInstalled: "This command depends on {{ packageManager }}, install {{#bold}}{{ link }}{{/bold}}"
|
|
881
|
-
remove:
|
|
882
|
-
describe: "Delete a file or folder from HubSpot."
|
|
883
|
-
deleted: "Deleted \"{{ path }}\" from account {{ accountId }}"
|
|
884
|
-
errors:
|
|
885
|
-
deleteFailed: "Deleting \"{{ path }}\" from account {{ accountId }} failed"
|
|
886
|
-
positionals:
|
|
887
|
-
path:
|
|
888
|
-
describe: "Remote hubspot path"
|
|
889
856
|
sandbox:
|
|
890
857
|
describe: "Commands for managing sandboxes."
|
|
891
858
|
subcommands:
|
|
@@ -983,144 +950,6 @@ en:
|
|
|
983
950
|
success:
|
|
984
951
|
update: "The secret \"{{ secretName }}\" was updated in the HubSpot account: {{ accountIdentifier }}"
|
|
985
952
|
updateExplanation: "Existing serverless functions will start using this new value within 10 seconds."
|
|
986
|
-
theme:
|
|
987
|
-
describe: "Commands for managing themes."
|
|
988
|
-
subcommands:
|
|
989
|
-
generateSelectors:
|
|
990
|
-
describe: "Automatically generates an editor-preview.json file for the given theme. The selectors this command generates are not perfect, so please edit editor-preview.json after running."
|
|
991
|
-
errors:
|
|
992
|
-
invalidPath: "Could not find directory \"{{ themePath }}\""
|
|
993
|
-
fieldsNotFound: "Unable to find theme's fields.json."
|
|
994
|
-
noSelectorsFound: "No selectors found."
|
|
995
|
-
success: "Selectors generated for {{ themePath }}, please double check the selectors generated at {{ selectorsPath }} before uploading the theme."
|
|
996
|
-
positionals:
|
|
997
|
-
path:
|
|
998
|
-
describe: "The path of the theme you'd like to generate an editor-preview.json for."
|
|
999
|
-
marketplaceValidate:
|
|
1000
|
-
describe: "Validate a theme for the marketplace."
|
|
1001
|
-
errors:
|
|
1002
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a folder in the Design Manager"
|
|
1003
|
-
logs:
|
|
1004
|
-
validatingTheme: "Validating theme \"{{ path }}\" \n"
|
|
1005
|
-
results:
|
|
1006
|
-
required: "Required validation results:"
|
|
1007
|
-
recommended: "Recommended validation results:"
|
|
1008
|
-
warnings:
|
|
1009
|
-
file: "File: {{ file }}"
|
|
1010
|
-
lineNumber: "Line number: {{ line }}"
|
|
1011
|
-
noErrors: "No errors"
|
|
1012
|
-
positionals:
|
|
1013
|
-
path:
|
|
1014
|
-
describe: "Path to the theme within the Design Manager."
|
|
1015
|
-
preview:
|
|
1016
|
-
describe: "Upload and watch a theme directory on your computer for changes and start a local development server to preview theme changes on a site."
|
|
1017
|
-
errors:
|
|
1018
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a directory"
|
|
1019
|
-
noThemeComponents: "Your project has no theme components available to preview."
|
|
1020
|
-
positionals:
|
|
1021
|
-
src:
|
|
1022
|
-
describe: "Path to the local directory your theme is in, relative to your current working directory"
|
|
1023
|
-
dest:
|
|
1024
|
-
describe: "Path in HubSpot Design Tools. Can be a net new path. If you wish to preview a site page using your theme changes it must match the path of the theme used by the site."
|
|
1025
|
-
options:
|
|
1026
|
-
notify:
|
|
1027
|
-
describe: "Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file"
|
|
1028
|
-
noSsl:
|
|
1029
|
-
describe: "Disable HTTPS"
|
|
1030
|
-
port:
|
|
1031
|
-
describe: "The port on which to start the local server"
|
|
1032
|
-
initialUploadProgressBar:
|
|
1033
|
-
start: "Starting..."
|
|
1034
|
-
uploading: "Uploading..."
|
|
1035
|
-
finish: "Complete!"
|
|
1036
|
-
logs:
|
|
1037
|
-
processExited: "Stopping dev server..."
|
|
1038
|
-
module:
|
|
1039
|
-
describe: "Commands for working with modules, including marketplace validation with the marketplace-validate subcommand."
|
|
1040
|
-
subcommands:
|
|
1041
|
-
marketplaceValidate:
|
|
1042
|
-
describe: "Validate a module for the marketplace. Make sure to include the suffix .module in the path to the module within the Design Manager."
|
|
1043
|
-
errors:
|
|
1044
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a module within the Design Manager."
|
|
1045
|
-
logs:
|
|
1046
|
-
validatingModule: "Validating module \"{{ path }}\" \n"
|
|
1047
|
-
options:
|
|
1048
|
-
json:
|
|
1049
|
-
describe: "Output raw json data"
|
|
1050
|
-
results:
|
|
1051
|
-
required: "Required validation results:"
|
|
1052
|
-
recommended: "Recommended validation results:"
|
|
1053
|
-
warnings:
|
|
1054
|
-
file: "File: {{ file }}"
|
|
1055
|
-
lineNumber: "Line number: {{ line }}"
|
|
1056
|
-
noErrors: "No errors"
|
|
1057
|
-
positionals:
|
|
1058
|
-
src:
|
|
1059
|
-
describe: "Path to the module within the Design Manager."
|
|
1060
|
-
upload:
|
|
1061
|
-
describe: "Upload a folder or file from your computer to the HubSpot CMS."
|
|
1062
|
-
errors:
|
|
1063
|
-
destinationRequired: "A destination path needs to be passed"
|
|
1064
|
-
fileIgnored: "The file \"{{ path }}\" is being ignored via an .hsignore rule"
|
|
1065
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a file or folder"
|
|
1066
|
-
uploadFailed: "Uploading file \"{{ src }}\" to \"{{ dest }}\" failed"
|
|
1067
|
-
someFilesFailed: "One or more files failed to upload to \"{{ dest }}\" in the Design Manager"
|
|
1068
|
-
deleteFailed: "Deleting \"{{ path }}\" from account {{ accountId }} failed"
|
|
1069
|
-
options:
|
|
1070
|
-
options:
|
|
1071
|
-
describe: "Options to pass to javascript fields files"
|
|
1072
|
-
saveOutput:
|
|
1073
|
-
describe: "If true, saves all output from javascript fields files as 'fields.output.json'."
|
|
1074
|
-
convertFields:
|
|
1075
|
-
describe: "If true, converts any javascript fields files contained in module folder or project root."
|
|
1076
|
-
clean:
|
|
1077
|
-
describe: "Will delete the destination directory and its contents before uploading. This will also clear the global content associated with any global partial templates and modules."
|
|
1078
|
-
force:
|
|
1079
|
-
describe: "Skips confirmation prompts when doing a clean upload."
|
|
1080
|
-
previewUrl: "To preview this theme, visit: {{ previewUrl }}"
|
|
1081
|
-
positionals:
|
|
1082
|
-
src:
|
|
1083
|
-
describe: "Path to the local file, relative to your current working directory."
|
|
1084
|
-
dest:
|
|
1085
|
-
describe: "Path in HubSpot Design Tools, can be a net new path."
|
|
1086
|
-
success:
|
|
1087
|
-
fileUploaded: "Uploaded file from \"{{ src }}\" to \"{{ dest }}\" in the Design Manager of account {{ accountId }}"
|
|
1088
|
-
uploadComplete: "Uploading files to \"{{ dest }}\" in the Design Manager is complete"
|
|
1089
|
-
uploading: "Uploading files from \"{{ src }}\" to \"{{ dest }}\" in the Design Manager of account {{ accountId }}"
|
|
1090
|
-
notUploaded: "There was an error processing \"{{ src }}\". The file has not been uploaded."
|
|
1091
|
-
cleaning: "Removing \"{{ filePath }}\" from account {{ accountId }} and uploading local..."
|
|
1092
|
-
confirmCleanUpload: "You are about to delete the directory \"{{ filePath }}\" and its contents on HubSpot account {{ accountId }} before uploading. This will also clear the global content associated with any global partial templates and modules. Are you sure you want to do this?"
|
|
1093
|
-
watch:
|
|
1094
|
-
describe: "Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS."
|
|
1095
|
-
errors:
|
|
1096
|
-
folderFailed: "Initial uploading of folder \"{{ src }}\" to \"{{ dest }}\" in account {{ accountId }} had failures"
|
|
1097
|
-
fileFailed: "Upload of file \"{{ file }}\" to \"{{ dest }}\" in account {{ accountId }} failed"
|
|
1098
|
-
destinationRequired: "A destination directory needs to be passed"
|
|
1099
|
-
invalidPath: "The \"{{ path }}\" is not a path to a directory"
|
|
1100
|
-
options:
|
|
1101
|
-
disableInitial:
|
|
1102
|
-
describe: "Disable the initial upload when watching a directory (default)"
|
|
1103
|
-
initialUpload:
|
|
1104
|
-
describe: "Upload directory before watching for updates"
|
|
1105
|
-
notify:
|
|
1106
|
-
describe: "Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file"
|
|
1107
|
-
remove:
|
|
1108
|
-
describe: "Will cause watch to delete files in your HubSpot account that are not found locally."
|
|
1109
|
-
convertFields:
|
|
1110
|
-
describe: "If true, converts any javascript fields files contained in module folder or project root."
|
|
1111
|
-
saveOutput:
|
|
1112
|
-
describe: "If true, saves all output from javascript fields files as 'fields.output.json'."
|
|
1113
|
-
options:
|
|
1114
|
-
describe: "Options to pass to javascript fields files"
|
|
1115
|
-
positionals:
|
|
1116
|
-
src:
|
|
1117
|
-
describe: "Path to the local directory your files are in, relative to your current working directory"
|
|
1118
|
-
dest:
|
|
1119
|
-
describe: "Path in HubSpot Design Tools. Can be a net new path"
|
|
1120
|
-
warnings:
|
|
1121
|
-
disableInitial: "Passing the \"--disable-initial\" option is no longer necessary. Running \"hs watch\" no longer uploads the watched directory by default."
|
|
1122
|
-
initialUpload: "To upload the directory run \"hs upload\" beforehand or add the \"--initial-upload\" option when running \"hs watch\"."
|
|
1123
|
-
notUploaded: "The \"hs watch\" command no longer uploads the watched directory when started. The directory \"{{ path }}\" was not uploaded."
|
|
1124
953
|
convertFields:
|
|
1125
954
|
describe: "Converts a specific JavaScript fields file of a module or theme to JSON."
|
|
1126
955
|
positionals:
|
|
@@ -1207,7 +1036,7 @@ en:
|
|
|
1207
1036
|
errors:
|
|
1208
1037
|
noProjectsInConfig: "Unable to find any projects in the target repository's config.json file. Please ensure that there is a \"projects\" array in the config file."
|
|
1209
1038
|
missingConfigFileTemplateSource: "Failed to fetch the config.json file from the target repository. Please ensure that there is a valid config.json file at the root of the repository and try again."
|
|
1210
|
-
missingPropertiesInConfig: "Found misconfigured projects in the target repository's config.json file. Please ensure that each project in the target repository's config.json file contains the following properties: [\"name\", \"label\", \"path\"
|
|
1039
|
+
missingPropertiesInConfig: "Found misconfigured projects in the target repository's config.json file. Please ensure that each project in the target repository's config.json file contains the following properties: [\"name\", \"label\", \"path\"]."
|
|
1211
1040
|
validateProjectConfig:
|
|
1212
1041
|
configNotFound: "Unable to locate a project configuration file. Try running again from a project directory, or run {{ createCommand }} to create a new project."
|
|
1213
1042
|
configMissingFields: "The project configuration file is missing required fields."
|
|
@@ -1223,19 +1052,6 @@ en:
|
|
|
1223
1052
|
logFeedbackMessage:
|
|
1224
1053
|
feedbackHeader: "We'd love to hear your feedback!"
|
|
1225
1054
|
feedbackMessage: "How are you liking the new projects and developer tools? \n > Run `{{#yellow}}hs feedback{{/yellow}}` to let us know what you think!\n"
|
|
1226
|
-
projectBuildAndDeploy:
|
|
1227
|
-
makePollTaskStatusFunc:
|
|
1228
|
-
componentCountSingular: "Found 1 component in this project"
|
|
1229
|
-
componentCount: "Found {{ numComponents }} components in this project"
|
|
1230
|
-
successStatusText: "DONE"
|
|
1231
|
-
failedStatusText: "FAILED"
|
|
1232
|
-
errorFetchingTaskStatus: "An error occurred while fetching the status of the current {{ taskType }}. For more information, view this project in HubSpot by running {{ openCommand }}."
|
|
1233
|
-
pollBuildAutodeployStatusError: "Error fetching autodeploy status for build #{{ buildId }}"
|
|
1234
|
-
pollProjectBuildAndDeploy:
|
|
1235
|
-
buildSucceededAutomaticallyDeploying: "Build #{{ buildId }} succeeded. {{#bold}}Automatically deploying{{/bold}} to {{ accountIdentifier }}\n"
|
|
1236
|
-
cleanedUpTempFile: "Cleaned up temporary file {{ path }}"
|
|
1237
|
-
viewDeploys: "View all deploys for this project in HubSpot"
|
|
1238
|
-
unableToFindAutodeployStatus: "Unable to find the auto deploy for build #{{ buildId }}. This deploy may have been skipped. {{ viewDeploysLink }}."
|
|
1239
1055
|
projectUpload:
|
|
1240
1056
|
uploadProjectFiles:
|
|
1241
1057
|
add: "Uploading {{#bold}}{{ projectName }}{{/bold}} project files to {{ accountIdentifier }}"
|
|
@@ -1247,9 +1063,6 @@ en:
|
|
|
1247
1063
|
compressed: "Project files compressed: {{ byteCount }} bytes"
|
|
1248
1064
|
compressing: "Compressing build files to \"{{ path }}\""
|
|
1249
1065
|
fileFiltered: "Ignore rule triggered for \"{{ filename }}\""
|
|
1250
|
-
middleware:
|
|
1251
|
-
fireAlarm:
|
|
1252
|
-
failedToLoadBoxen: "Failed to load boxen util."
|
|
1253
1066
|
ui:
|
|
1254
1067
|
betaTag: "{{#bold}}[BETA]{{/bold}}"
|
|
1255
1068
|
betaWarning:
|
|
@@ -1284,6 +1097,9 @@ en:
|
|
|
1284
1097
|
feedbackCommand:
|
|
1285
1098
|
command: "hs feedback"
|
|
1286
1099
|
message: "Run {{ command }} to report a bug or leave feedback"
|
|
1100
|
+
getStartedCommand:
|
|
1101
|
+
command: "hs get-started"
|
|
1102
|
+
message: "Run {{ command }} to get started with HubSpot development"
|
|
1287
1103
|
helpCommand:
|
|
1288
1104
|
command: "hs help"
|
|
1289
1105
|
message: "Run {{ command }} to see a list of available commands"
|
|
@@ -1301,7 +1117,7 @@ en:
|
|
|
1301
1117
|
message: "Run {{ command }} to upload your project to your HubSpot account"
|
|
1302
1118
|
projectDevCommand:
|
|
1303
1119
|
command: "hs project dev"
|
|
1304
|
-
message: "Run {{ command }} to set up your test environment and start local development"
|
|
1120
|
+
message: "Run {{ command }} from within your project directory to set up your test environment and start local development"
|
|
1305
1121
|
projectInstallDepsCommand:
|
|
1306
1122
|
command: "hs project install-deps"
|
|
1307
1123
|
message: "Run {{ command }} to install dependencies for your project components"
|
|
@@ -1342,13 +1158,6 @@ en:
|
|
|
1342
1158
|
describe: "Use environment variable config"
|
|
1343
1159
|
debug:
|
|
1344
1160
|
describe: "Set log level to debug"
|
|
1345
|
-
configMigrate:
|
|
1346
|
-
migrateConfigPrompt: "Migrate config?\n From deprecated config file: {{ deprecatedConfigPath }}\n To new global config file: {{ globalConfigPath }}\n (This action will delete the deprecated config file).\n"
|
|
1347
|
-
mergeConfigConflictPrompt: "Change the {{ property }} property in the global config from {{ newValue }} to {{ oldValue }}?"
|
|
1348
|
-
mergeConfigsPrompt: "Two config files detected. Merge them?\n Deprecated config file: {{ deprecatedConfigPath }}\n Global config: {{ globalConfigPath }}\n (This action will delete the deprecated config file).\n"
|
|
1349
|
-
migrationSuccess: "The deprecated config file has been migrated to the new global config file at {{ globalConfigPath }}."
|
|
1350
|
-
mergeSuccess: "The deprecated config file has been merged with the global config file at {{ globalConfigPath }}."
|
|
1351
|
-
skippedExistingAccounts: "\nThe following accounts were not merged, because they already exist in the global config: {{ skippedAccountIds }}.\n"
|
|
1352
1161
|
prompts:
|
|
1353
1162
|
projectDevTargetAccountPrompt:
|
|
1354
1163
|
createNewSandboxOption: "<Test on a new development sandbox>"
|
|
@@ -1437,7 +1246,7 @@ en:
|
|
|
1437
1246
|
invalidCharacters: "The selected destination contains invalid characters. Please provide a new path and try again."
|
|
1438
1247
|
invalidTemplate: "[--template] Could not find template \"{{ template }}\". Please choose an available template:"
|
|
1439
1248
|
projectTemplateRequired: "Project template is required when projectTemplates is provided"
|
|
1440
|
-
|
|
1249
|
+
selectPublicAppForMigrationPrompt:
|
|
1441
1250
|
selectAppIdMigrate: "[--appId] Choose an app under {{ accountName }} to migrate:"
|
|
1442
1251
|
selectAppIdClone: "[--appId] Choose an app under {{ accountName }} to clone:"
|
|
1443
1252
|
errors:
|
|
@@ -1460,8 +1269,8 @@ en:
|
|
|
1460
1269
|
nameRequired: "A component name is required"
|
|
1461
1270
|
invalidType: "[--type] Could not find type \"{{ type }}\". Please choose an available type:"
|
|
1462
1271
|
secretPrompt:
|
|
1463
|
-
enterValue: "Enter a value for
|
|
1464
|
-
enterName: "Enter
|
|
1272
|
+
enterValue: "Enter a value for the secret: "
|
|
1273
|
+
enterName: "Enter the name of the secret to add: "
|
|
1465
1274
|
selectSecretUpdate: "Select the secret you want to update"
|
|
1466
1275
|
selectSecretDelete: "Select the secret you want to delete"
|
|
1467
1276
|
errors:
|
|
@@ -1492,12 +1301,6 @@ en:
|
|
|
1492
1301
|
errors:
|
|
1493
1302
|
srcRequired: "You must specify a source directory."
|
|
1494
1303
|
destRequired: "You must specify a destination directory."
|
|
1495
|
-
installPublicAppPrompt:
|
|
1496
|
-
explanation: "Local development requires this app to be installed in the target test account"
|
|
1497
|
-
reinstallExplanation: "This app's required scopes have been updated since it was last installed on the target test account. To avoid issues with local development, we recommend reinstalling the app with the updated scopes."
|
|
1498
|
-
prompt: "Open HubSpot to install this app?"
|
|
1499
|
-
reinstallPrompt: "Open HubSpot to reinstall this app?"
|
|
1500
|
-
decline: "To continue local development of this app, install it in your target test account and re-run {{#bold}}`hs project dev`{{/bold}}"
|
|
1501
1304
|
selectHubDBTablePrompt:
|
|
1502
1305
|
selectTable: "Select a HubDB table:"
|
|
1503
1306
|
enterDest: "Enter the destination path:"
|
package/lib/accountTypes.js
CHANGED
|
@@ -39,6 +39,5 @@ async function isUnifiedAccount(account) {
|
|
|
39
39
|
if (!accountId) {
|
|
40
40
|
return false;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
return isStandardAccount(account) && isUngatedForUnifiedApps;
|
|
42
|
+
return (0, hasFeature_1.hasFeature)(accountId, constants_1.FEATURES.UNIFIED_APPS);
|
|
44
43
|
}
|
package/lib/app/migrate.d.ts
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { ArgumentsCamelCase } from 'yargs';
|
|
2
2
|
import { LoadedProjectConfig } from '../projects/config';
|
|
3
|
+
import { MigrationApp, MigrationFailed, MigrationStatus } from '../../api/migrate';
|
|
3
4
|
import { AccountArgs, CommonArgs, ConfigArgs, EnvironmentArgs } from '../../types/Yargs';
|
|
4
5
|
export type MigrateAppArgs = CommonArgs & AccountArgs & EnvironmentArgs & ConfigArgs & {
|
|
5
6
|
name?: string;
|
|
6
7
|
dest?: string;
|
|
7
8
|
appId?: number;
|
|
8
9
|
platformVersion: string;
|
|
10
|
+
unstable: boolean;
|
|
9
11
|
};
|
|
12
|
+
export declare function getUnmigratableReason(reasonCode: string, projectName: string | undefined, accountId: number): string;
|
|
13
|
+
export declare function generateFilterAppsByProjectNameFunction(projectConfig?: LoadedProjectConfig): (app: MigrationApp) => boolean;
|
|
14
|
+
export declare function buildErrorMessageFromMigrationStatus(error: MigrationFailed): string;
|
|
15
|
+
export declare function fetchMigrationApps(appId: MigrateAppArgs['appId'], derivedAccountId: number, platformVersion: string, projectConfig?: LoadedProjectConfig): Promise<MigrationApp[]>;
|
|
16
|
+
export declare function promptForAppToMigrate(allApps: MigrationApp[], derivedAccountId: number): Promise<number>;
|
|
17
|
+
export declare function selectAppToMigrate(allApps: MigrationApp[], derivedAccountId: number, appId?: number): Promise<{
|
|
18
|
+
proceed: boolean;
|
|
19
|
+
appIdToMigrate?: number;
|
|
20
|
+
}>;
|
|
21
|
+
export declare function handleMigrationSetup(derivedAccountId: number, options: ArgumentsCamelCase<MigrateAppArgs>, projectConfig?: LoadedProjectConfig): Promise<{
|
|
22
|
+
appIdToMigrate?: number | undefined;
|
|
23
|
+
projectName?: string;
|
|
24
|
+
projectDest?: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function beginMigration(derivedAccountId: number, appId: number, platformVersion: string): Promise<{
|
|
27
|
+
migrationId: number;
|
|
28
|
+
uidMap: Record<string, string>;
|
|
29
|
+
} | undefined>;
|
|
30
|
+
export declare function pollMigrationStatus(derivedAccountId: number, migrationId: number, successStates?: string[]): Promise<MigrationStatus>;
|
|
31
|
+
export declare function finalizeMigration(derivedAccountId: number, migrationId: number, uidMap: Record<string, string>, projectName: string): Promise<number>;
|
|
32
|
+
export declare function downloadProjectFiles(derivedAccountId: number, projectName: string, buildId: number, projectDest: string, projectConfig?: LoadedProjectConfig): Promise<void>;
|
|
10
33
|
export declare function migrateApp2025_2(derivedAccountId: number, options: ArgumentsCamelCase<MigrateAppArgs>, projectConfig?: LoadedProjectConfig): Promise<void>;
|
|
11
34
|
export declare function logInvalidAccountError(): void;
|
package/lib/app/migrate.js
CHANGED
|
@@ -3,6 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getUnmigratableReason = getUnmigratableReason;
|
|
7
|
+
exports.generateFilterAppsByProjectNameFunction = generateFilterAppsByProjectNameFunction;
|
|
8
|
+
exports.buildErrorMessageFromMigrationStatus = buildErrorMessageFromMigrationStatus;
|
|
9
|
+
exports.fetchMigrationApps = fetchMigrationApps;
|
|
10
|
+
exports.promptForAppToMigrate = promptForAppToMigrate;
|
|
11
|
+
exports.selectAppToMigrate = selectAppToMigrate;
|
|
12
|
+
exports.handleMigrationSetup = handleMigrationSetup;
|
|
13
|
+
exports.beginMigration = beginMigration;
|
|
14
|
+
exports.pollMigrationStatus = pollMigrationStatus;
|
|
15
|
+
exports.finalizeMigration = finalizeMigration;
|
|
16
|
+
exports.downloadProjectFiles = downloadProjectFiles;
|
|
6
17
|
exports.migrateApp2025_2 = migrateApp2025_2;
|
|
7
18
|
exports.logInvalidAccountError = logInvalidAccountError;
|
|
8
19
|
const path_1 = __importDefault(require("path"));
|
|
@@ -43,7 +54,7 @@ function getUnmigratableReason(reasonCode, projectName, accountId) {
|
|
|
43
54
|
return en_1.lib.migrate.errors.unmigratableReasons.generic(reasonCode);
|
|
44
55
|
}
|
|
45
56
|
}
|
|
46
|
-
function
|
|
57
|
+
function generateFilterAppsByProjectNameFunction(projectConfig) {
|
|
47
58
|
return (app) => {
|
|
48
59
|
if (projectConfig) {
|
|
49
60
|
return app.projectName === projectConfig?.projectConfig?.name;
|
|
@@ -65,8 +76,8 @@ function buildErrorMessageFromMigrationStatus(error) {
|
|
|
65
76
|
}
|
|
66
77
|
async function fetchMigrationApps(appId, derivedAccountId, platformVersion, projectConfig) {
|
|
67
78
|
const { data: { migratableApps, unmigratableApps }, } = await (0, migrate_1.listAppsForMigration)(derivedAccountId, platformVersion);
|
|
68
|
-
const filteredMigratableApps = migratableApps.filter(
|
|
69
|
-
const filteredUnmigratableApps = unmigratableApps.filter(
|
|
79
|
+
const filteredMigratableApps = migratableApps.filter(generateFilterAppsByProjectNameFunction(projectConfig));
|
|
80
|
+
const filteredUnmigratableApps = unmigratableApps.filter(generateFilterAppsByProjectNameFunction(projectConfig));
|
|
70
81
|
const allApps = [...filteredMigratableApps, ...filteredUnmigratableApps];
|
|
71
82
|
if (allApps.length > 1 && projectConfig) {
|
|
72
83
|
throw new Error(en_1.lib.migrate.errors.project.multipleApps);
|
|
@@ -116,7 +127,7 @@ async function promptForAppToMigrate(allApps, derivedAccountId) {
|
|
|
116
127
|
});
|
|
117
128
|
return selectedAppId;
|
|
118
129
|
}
|
|
119
|
-
async function selectAppToMigrate(allApps, derivedAccountId, appId
|
|
130
|
+
async function selectAppToMigrate(allApps, derivedAccountId, appId) {
|
|
120
131
|
if (appId &&
|
|
121
132
|
!allApps.some(app => {
|
|
122
133
|
return app.appId === appId;
|
|
@@ -145,10 +156,9 @@ async function selectAppToMigrate(allApps, derivedAccountId, appId, projectConfi
|
|
|
145
156
|
logger_1.uiLogger.log(en_1.lib.migrate.componentsThatWillNotBeMigrated(`\n - ${[...unmigratableComponents].join('\n - ')}`));
|
|
146
157
|
}
|
|
147
158
|
logger_1.uiLogger.log('');
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const proceed = await (0, promptUtils_1.confirmPrompt)(promptMessage, { defaultAnswer: false });
|
|
159
|
+
const proceed = await (0, promptUtils_1.confirmPrompt)(en_1.lib.migrate.prompt.proceed, {
|
|
160
|
+
defaultAnswer: false,
|
|
161
|
+
});
|
|
152
162
|
return {
|
|
153
163
|
proceed,
|
|
154
164
|
appIdToMigrate,
|
|
@@ -157,7 +167,7 @@ async function selectAppToMigrate(allApps, derivedAccountId, appId, projectConfi
|
|
|
157
167
|
async function handleMigrationSetup(derivedAccountId, options, projectConfig) {
|
|
158
168
|
const { name, dest, appId } = options;
|
|
159
169
|
const allApps = await fetchMigrationApps(appId, derivedAccountId, options.platformVersion, projectConfig);
|
|
160
|
-
const { proceed, appIdToMigrate } = await selectAppToMigrate(allApps, derivedAccountId, appId
|
|
170
|
+
const { proceed, appIdToMigrate } = await selectAppToMigrate(allApps, derivedAccountId, appId);
|
|
161
171
|
if (!proceed) {
|
|
162
172
|
return {};
|
|
163
173
|
}
|
|
@@ -226,9 +236,21 @@ async function beginMigration(derivedAccountId, appId, platformVersion) {
|
|
|
226
236
|
if (Object.values(componentsRequiringUids).length !== 0) {
|
|
227
237
|
for (const [componentId, component] of Object.entries(componentsRequiringUids)) {
|
|
228
238
|
const { componentHint, componentType } = component;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
239
|
+
// Extract the internal ID from the base64-encoded ComponentExternalId
|
|
240
|
+
let internalId;
|
|
241
|
+
try {
|
|
242
|
+
const decoded = Buffer.from(componentId, 'base64').toString('utf8');
|
|
243
|
+
const parts = decoded.split('$$');
|
|
244
|
+
internalId = parts[1] || componentId;
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
// If decoding fails, use the componentId as the internalId
|
|
248
|
+
internalId = componentId;
|
|
249
|
+
}
|
|
250
|
+
const promptText = componentHint
|
|
251
|
+
? `${(0, transform_1.mapToUserFacingType)(componentType)} '${componentHint}' (ID: ${internalId})`
|
|
252
|
+
: `${(0, transform_1.mapToUserFacingType)(componentType)} (ID: ${internalId})`;
|
|
253
|
+
uidMap[componentId] = await (0, promptUtils_1.inputPrompt)(en_1.lib.migrate.prompt.uidForComponent(promptText), {
|
|
232
254
|
validate: (uid) => {
|
|
233
255
|
const result = (0, project_parsing_lib_1.validateUid)(uid);
|
|
234
256
|
return result === undefined ? true : result;
|
|
@@ -17,7 +17,7 @@ const exitCodes_1 = require("../enums/exitCodes");
|
|
|
17
17
|
const ui_1 = require("../ui");
|
|
18
18
|
const lang_1 = require("../lang");
|
|
19
19
|
const accountTypes_1 = require("../accountTypes");
|
|
20
|
-
const
|
|
20
|
+
const selectPublicAppForMigrationPrompt_1 = require("../prompts/selectPublicAppForMigrationPrompt");
|
|
21
21
|
const createProjectPrompt_1 = require("../prompts/createProjectPrompt");
|
|
22
22
|
const ensureProjectExists_1 = require("../projects/ensureProjectExists");
|
|
23
23
|
const usageTracking_1 = require("../usageTracking");
|
|
@@ -30,11 +30,11 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
|
|
|
30
30
|
const defaultAccountIsUnified = await (0, accountTypes_1.isUnifiedAccount)(accountConfig);
|
|
31
31
|
if (!(0, accountTypes_1.isAppDeveloperAccount)(accountConfig) && !defaultAccountIsUnified) {
|
|
32
32
|
(0, migrate_1.logInvalidAccountError)();
|
|
33
|
-
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
33
|
+
return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
34
34
|
}
|
|
35
35
|
let appId = options.appId;
|
|
36
36
|
if (!appId) {
|
|
37
|
-
const { appId: selectAppId } = await (0,
|
|
37
|
+
const { appId: selectAppId } = await (0, selectPublicAppForMigrationPrompt_1.selectPublicAppForMigrationPrompt)({
|
|
38
38
|
accountId: derivedAccountId,
|
|
39
39
|
accountName,
|
|
40
40
|
isMigratingApp: true,
|
|
@@ -51,12 +51,12 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
|
|
|
51
51
|
logger_1.logger.error((0, lang_1.i18n)(`commands.project.subcommands.migrateApp.errors.invalidApp`, {
|
|
52
52
|
appId,
|
|
53
53
|
}));
|
|
54
|
-
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
54
|
+
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
catch (error) {
|
|
58
58
|
(0, errorHandlers_1.logError)(error, new errorHandlers_1.ApiErrorContext({ accountId: derivedAccountId }));
|
|
59
|
-
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
59
|
+
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
60
60
|
}
|
|
61
61
|
const createProjectPromptResponse = await (0, createProjectPrompt_1.createProjectPrompt)(options);
|
|
62
62
|
const { name: projectName, dest: projectDest } = createProjectPromptResponse;
|
|
@@ -86,7 +86,7 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
|
|
|
86
86
|
});
|
|
87
87
|
process.stdin.resume();
|
|
88
88
|
if (!shouldCreateApp) {
|
|
89
|
-
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
89
|
+
return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
90
90
|
}
|
|
91
91
|
try {
|
|
92
92
|
SpinniesManager_1.default.init();
|
|
@@ -97,7 +97,7 @@ async function migrateApp2023_2(derivedAccountId, options, accountConfig) {
|
|
|
97
97
|
if ((key.ctrl && key.name === 'c') || key.name === 'q') {
|
|
98
98
|
SpinniesManager_1.default.remove('migrateApp');
|
|
99
99
|
logger_1.logger.log((0, lang_1.i18n)(`commands.project.subcommands.migrateApp.migrationInterrupted`));
|
|
100
|
-
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
100
|
+
return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
const { data: migrateResponse } = await (0, projects_1.migrateApp)(derivedAccountId, appId, projectName);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Environment } from '@hubspot/local-dev-lib/types/Config';
|
|
2
|
+
type PrivateAppInstallUrlArgs = {
|
|
3
|
+
targetAccountId: number;
|
|
4
|
+
env: Environment;
|
|
5
|
+
appId: string;
|
|
6
|
+
};
|
|
7
|
+
type PublicAppInstallUrlArgs = {
|
|
8
|
+
targetAccountId: number;
|
|
9
|
+
env: Environment;
|
|
10
|
+
clientId: string;
|
|
11
|
+
scopes: string[];
|
|
12
|
+
redirectUrls: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare function getOauthAppInstallUrl({ targetAccountId, env, clientId, scopes, redirectUrls, }: PublicAppInstallUrlArgs): string;
|
|
15
|
+
export declare function getStaticAuthAppInstallUrl({ targetAccountId, env, appId, }: PrivateAppInstallUrlArgs): string;
|
|
16
|
+
export {};
|
package/lib/app/urls.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOauthAppInstallUrl = getOauthAppInstallUrl;
|
|
4
|
+
exports.getStaticAuthAppInstallUrl = getStaticAuthAppInstallUrl;
|
|
5
|
+
const urls_1 = require("@hubspot/local-dev-lib/urls");
|
|
6
|
+
function getOauthAppInstallUrl({ targetAccountId, env, clientId, scopes, redirectUrls, }) {
|
|
7
|
+
const websiteOrigin = (0, urls_1.getHubSpotWebsiteOrigin)(env);
|
|
8
|
+
return (`${websiteOrigin}/oauth/${targetAccountId}/authorize` +
|
|
9
|
+
`?client_id=${encodeURIComponent(clientId)}` +
|
|
10
|
+
`&scope=${encodeURIComponent(scopes.join(' '))}` +
|
|
11
|
+
`&redirect_uri=${encodeURIComponent(redirectUrls[0])}`);
|
|
12
|
+
}
|
|
13
|
+
function getStaticAuthAppInstallUrl({ targetAccountId, env, appId, }) {
|
|
14
|
+
const websiteOrigin = (0, urls_1.getHubSpotWebsiteOrigin)(env);
|
|
15
|
+
return `${websiteOrigin}/static-token/${targetAccountId}/authorize?appId=${appId}`;
|
|
16
|
+
}
|