@hubspot/cli 7.5.11-experimental.0 → 7.6.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/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 +29 -28
- 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 +88 -31
- package/commands/project/dev/unifiedFlow.d.ts +11 -2
- package/commands/project/dev/unifiedFlow.js +81 -41
- package/commands/project/listBuilds.js +2 -5
- package/commands/project/migrate.d.ts +1 -0
- package/commands/project/profile/add.d.ts +7 -0
- package/commands/project/profile/add.js +209 -0
- package/commands/project/profile/delete.d.ts +6 -0
- package/commands/project/profile/delete.js +123 -0
- package/commands/project/profile.d.ts +3 -0
- package/commands/project/profile.js +25 -0
- package/commands/project/upload.d.ts +1 -0
- package/commands/project/upload.js +22 -8
- package/commands/project/validate.d.ts +6 -0
- package/commands/project/validate.js +82 -0
- package/commands/project.js +4 -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 +1135 -660
- package/lang/en.js +935 -471
- package/lang/en.lyaml +30 -213
- package/lib/accountTypes.js +1 -2
- package/lib/app/migrate.d.ts +23 -0
- package/lib/app/migrate.js +29 -6
- 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/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 +5 -3
- 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/DevServerManagerV2.d.ts +11 -22
- package/lib/projects/localDev/DevServerManagerV2.js +19 -15
- 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 +3 -2
- package/lib/projects/localDev/helpers.js +32 -2
- package/lib/projects/upload.d.ts +5 -1
- package/lib/projects/upload.js +60 -20
- 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/index.js +4 -1
- package/lib/upload.d.ts +1 -1
- package/lib/validation.js +4 -5
- 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 +10 -1
- 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,15 +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"
|
|
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 "
|
|
591
575
|
errors:
|
|
592
576
|
noProjectConfig: "No project detected. Please run this command again from a project directory."
|
|
593
577
|
noAccount: "An error occurred while reading account {{ accountId }} from your config. Run {{ authCommand }} to re-auth this account."
|
|
594
578
|
noAccountsInConfig: "No accounts found in your config. Run {{ authCommand }} to configure a HubSpot account with the CLI."
|
|
595
579
|
invalidProjectComponents: "Projects cannot contain both private and public apps. Move your apps to separate projects before attempting local development."
|
|
596
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."
|
|
597
|
-
|
|
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 }}."
|
|
598
582
|
examples:
|
|
599
583
|
default: "Start local dev for the current project"
|
|
584
|
+
options:
|
|
585
|
+
profile:
|
|
586
|
+
describe: "The profile to target during local dev"
|
|
600
587
|
create:
|
|
601
588
|
describe: "Create a new project."
|
|
602
589
|
errors:
|
|
@@ -707,6 +694,7 @@ en:
|
|
|
707
694
|
buildIdDoesNotExist: "Build {{ buildId }} does not exist for project {{ projectName }}. {{ linkToProject }}"
|
|
708
695
|
buildAlreadyDeployed: "Build {{ buildId }} is already deployed. {{ linkToProject}}"
|
|
709
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"
|
|
710
698
|
examples:
|
|
711
699
|
default: "Deploy the latest build of the current project"
|
|
712
700
|
withOptions: "Deploy build 5 of the project my-project"
|
|
@@ -715,6 +703,10 @@ en:
|
|
|
715
703
|
describe: "Project build ID to be deployed"
|
|
716
704
|
project:
|
|
717
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."
|
|
718
710
|
listBuilds:
|
|
719
711
|
describe: "List the project's builds."
|
|
720
712
|
continueOrExitPrompt: "Press <enter> to load more, or ctrl+c to exit"
|
|
@@ -782,6 +774,8 @@ en:
|
|
|
782
774
|
describe: "Automatically create project if it does not exist"
|
|
783
775
|
message:
|
|
784
776
|
describe: "Add a message when you upload your project and create a build"
|
|
777
|
+
profile:
|
|
778
|
+
describe: "The profile to target with this upload"
|
|
785
779
|
watch:
|
|
786
780
|
describe: "Watch your local project for changes and automatically upload changed files to a new build in HubSpot."
|
|
787
781
|
examples:
|
|
@@ -841,18 +835,10 @@ en:
|
|
|
841
835
|
default: "Opens the projects page for the specified account"
|
|
842
836
|
success: "Successfully opened \"{{ projectName }}\""
|
|
843
837
|
feedback:
|
|
844
|
-
describe: "Leave feedback
|
|
845
|
-
|
|
846
|
-
prompt: "What type of feedback would you like to leave?"
|
|
847
|
-
bug: "[--bug] Report a bug"
|
|
848
|
-
general: "[--general] Tell us about your experience with HubSpot's developer tools"
|
|
849
|
-
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?"
|
|
850
840
|
success: "We opened {{ url }} in your browser."
|
|
851
|
-
|
|
852
|
-
bug:
|
|
853
|
-
describe: "Open Github issues in your browser to report a bug."
|
|
854
|
-
general:
|
|
855
|
-
describe: "Open Github issues in your browser to give feedback."
|
|
841
|
+
error: "Navigate to {{ url }} to leave feedback."
|
|
856
842
|
installDeps:
|
|
857
843
|
help:
|
|
858
844
|
describe: "Install the dependencies for your project, or add a dependency to a subcomponent of a project."
|
|
@@ -867,14 +853,6 @@ en:
|
|
|
867
853
|
noProjectConfig: "No project detected. Run this command from a project directory."
|
|
868
854
|
noPackageJsonInProject: "No dependencies to install. The project {{ projectName }} folder might be missing component or subcomponent files. {{ link }}"
|
|
869
855
|
packageManagerNotInstalled: "This command depends on {{ packageManager }}, install {{#bold}}{{ link }}{{/bold}}"
|
|
870
|
-
remove:
|
|
871
|
-
describe: "Delete a file or folder from HubSpot."
|
|
872
|
-
deleted: "Deleted \"{{ path }}\" from account {{ accountId }}"
|
|
873
|
-
errors:
|
|
874
|
-
deleteFailed: "Deleting \"{{ path }}\" from account {{ accountId }} failed"
|
|
875
|
-
positionals:
|
|
876
|
-
path:
|
|
877
|
-
describe: "Remote hubspot path"
|
|
878
856
|
sandbox:
|
|
879
857
|
describe: "Commands for managing sandboxes."
|
|
880
858
|
subcommands:
|
|
@@ -972,144 +950,6 @@ en:
|
|
|
972
950
|
success:
|
|
973
951
|
update: "The secret \"{{ secretName }}\" was updated in the HubSpot account: {{ accountIdentifier }}"
|
|
974
952
|
updateExplanation: "Existing serverless functions will start using this new value within 10 seconds."
|
|
975
|
-
theme:
|
|
976
|
-
describe: "Commands for managing themes."
|
|
977
|
-
subcommands:
|
|
978
|
-
generateSelectors:
|
|
979
|
-
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."
|
|
980
|
-
errors:
|
|
981
|
-
invalidPath: "Could not find directory \"{{ themePath }}\""
|
|
982
|
-
fieldsNotFound: "Unable to find theme's fields.json."
|
|
983
|
-
noSelectorsFound: "No selectors found."
|
|
984
|
-
success: "Selectors generated for {{ themePath }}, please double check the selectors generated at {{ selectorsPath }} before uploading the theme."
|
|
985
|
-
positionals:
|
|
986
|
-
path:
|
|
987
|
-
describe: "The path of the theme you'd like to generate an editor-preview.json for."
|
|
988
|
-
marketplaceValidate:
|
|
989
|
-
describe: "Validate a theme for the marketplace."
|
|
990
|
-
errors:
|
|
991
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a folder in the Design Manager"
|
|
992
|
-
logs:
|
|
993
|
-
validatingTheme: "Validating theme \"{{ path }}\" \n"
|
|
994
|
-
results:
|
|
995
|
-
required: "Required validation results:"
|
|
996
|
-
recommended: "Recommended validation results:"
|
|
997
|
-
warnings:
|
|
998
|
-
file: "File: {{ file }}"
|
|
999
|
-
lineNumber: "Line number: {{ line }}"
|
|
1000
|
-
noErrors: "No errors"
|
|
1001
|
-
positionals:
|
|
1002
|
-
path:
|
|
1003
|
-
describe: "Path to the theme within the Design Manager."
|
|
1004
|
-
preview:
|
|
1005
|
-
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."
|
|
1006
|
-
errors:
|
|
1007
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a directory"
|
|
1008
|
-
noThemeComponents: "Your project has no theme components available to preview."
|
|
1009
|
-
positionals:
|
|
1010
|
-
src:
|
|
1011
|
-
describe: "Path to the local directory your theme is in, relative to your current working directory"
|
|
1012
|
-
dest:
|
|
1013
|
-
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."
|
|
1014
|
-
options:
|
|
1015
|
-
notify:
|
|
1016
|
-
describe: "Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file"
|
|
1017
|
-
noSsl:
|
|
1018
|
-
describe: "Disable HTTPS"
|
|
1019
|
-
port:
|
|
1020
|
-
describe: "The port on which to start the local server"
|
|
1021
|
-
initialUploadProgressBar:
|
|
1022
|
-
start: "Starting..."
|
|
1023
|
-
uploading: "Uploading..."
|
|
1024
|
-
finish: "Complete!"
|
|
1025
|
-
logs:
|
|
1026
|
-
processExited: "Stopping dev server..."
|
|
1027
|
-
module:
|
|
1028
|
-
describe: "Commands for working with modules, including marketplace validation with the marketplace-validate subcommand."
|
|
1029
|
-
subcommands:
|
|
1030
|
-
marketplaceValidate:
|
|
1031
|
-
describe: "Validate a module for the marketplace. Make sure to include the suffix .module in the path to the module within the Design Manager."
|
|
1032
|
-
errors:
|
|
1033
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a module within the Design Manager."
|
|
1034
|
-
logs:
|
|
1035
|
-
validatingModule: "Validating module \"{{ path }}\" \n"
|
|
1036
|
-
options:
|
|
1037
|
-
json:
|
|
1038
|
-
describe: "Output raw json data"
|
|
1039
|
-
results:
|
|
1040
|
-
required: "Required validation results:"
|
|
1041
|
-
recommended: "Recommended validation results:"
|
|
1042
|
-
warnings:
|
|
1043
|
-
file: "File: {{ file }}"
|
|
1044
|
-
lineNumber: "Line number: {{ line }}"
|
|
1045
|
-
noErrors: "No errors"
|
|
1046
|
-
positionals:
|
|
1047
|
-
src:
|
|
1048
|
-
describe: "Path to the module within the Design Manager."
|
|
1049
|
-
upload:
|
|
1050
|
-
describe: "Upload a folder or file from your computer to the HubSpot CMS."
|
|
1051
|
-
errors:
|
|
1052
|
-
destinationRequired: "A destination path needs to be passed"
|
|
1053
|
-
fileIgnored: "The file \"{{ path }}\" is being ignored via an .hsignore rule"
|
|
1054
|
-
invalidPath: "The path \"{{ path }}\" is not a path to a file or folder"
|
|
1055
|
-
uploadFailed: "Uploading file \"{{ src }}\" to \"{{ dest }}\" failed"
|
|
1056
|
-
someFilesFailed: "One or more files failed to upload to \"{{ dest }}\" in the Design Manager"
|
|
1057
|
-
deleteFailed: "Deleting \"{{ path }}\" from account {{ accountId }} failed"
|
|
1058
|
-
options:
|
|
1059
|
-
options:
|
|
1060
|
-
describe: "Options to pass to javascript fields files"
|
|
1061
|
-
saveOutput:
|
|
1062
|
-
describe: "If true, saves all output from javascript fields files as 'fields.output.json'."
|
|
1063
|
-
convertFields:
|
|
1064
|
-
describe: "If true, converts any javascript fields files contained in module folder or project root."
|
|
1065
|
-
clean:
|
|
1066
|
-
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."
|
|
1067
|
-
force:
|
|
1068
|
-
describe: "Skips confirmation prompts when doing a clean upload."
|
|
1069
|
-
previewUrl: "To preview this theme, visit: {{ previewUrl }}"
|
|
1070
|
-
positionals:
|
|
1071
|
-
src:
|
|
1072
|
-
describe: "Path to the local file, relative to your current working directory."
|
|
1073
|
-
dest:
|
|
1074
|
-
describe: "Path in HubSpot Design Tools, can be a net new path."
|
|
1075
|
-
success:
|
|
1076
|
-
fileUploaded: "Uploaded file from \"{{ src }}\" to \"{{ dest }}\" in the Design Manager of account {{ accountId }}"
|
|
1077
|
-
uploadComplete: "Uploading files to \"{{ dest }}\" in the Design Manager is complete"
|
|
1078
|
-
uploading: "Uploading files from \"{{ src }}\" to \"{{ dest }}\" in the Design Manager of account {{ accountId }}"
|
|
1079
|
-
notUploaded: "There was an error processing \"{{ src }}\". The file has not been uploaded."
|
|
1080
|
-
cleaning: "Removing \"{{ filePath }}\" from account {{ accountId }} and uploading local..."
|
|
1081
|
-
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?"
|
|
1082
|
-
watch:
|
|
1083
|
-
describe: "Watch a directory on your computer for changes and upload the changed files to the HubSpot CMS."
|
|
1084
|
-
errors:
|
|
1085
|
-
folderFailed: "Initial uploading of folder \"{{ src }}\" to \"{{ dest }}\" in account {{ accountId }} had failures"
|
|
1086
|
-
fileFailed: "Upload of file \"{{ file }}\" to \"{{ dest }}\" in account {{ accountId }} failed"
|
|
1087
|
-
destinationRequired: "A destination directory needs to be passed"
|
|
1088
|
-
invalidPath: "The \"{{ path }}\" is not a path to a directory"
|
|
1089
|
-
options:
|
|
1090
|
-
disableInitial:
|
|
1091
|
-
describe: "Disable the initial upload when watching a directory (default)"
|
|
1092
|
-
initialUpload:
|
|
1093
|
-
describe: "Upload directory before watching for updates"
|
|
1094
|
-
notify:
|
|
1095
|
-
describe: "Log to specified file when a watch task is triggered and after workers have gone idle. Ex. --notify path/to/file"
|
|
1096
|
-
remove:
|
|
1097
|
-
describe: "Will cause watch to delete files in your HubSpot account that are not found locally."
|
|
1098
|
-
convertFields:
|
|
1099
|
-
describe: "If true, converts any javascript fields files contained in module folder or project root."
|
|
1100
|
-
saveOutput:
|
|
1101
|
-
describe: "If true, saves all output from javascript fields files as 'fields.output.json'."
|
|
1102
|
-
options:
|
|
1103
|
-
describe: "Options to pass to javascript fields files"
|
|
1104
|
-
positionals:
|
|
1105
|
-
src:
|
|
1106
|
-
describe: "Path to the local directory your files are in, relative to your current working directory"
|
|
1107
|
-
dest:
|
|
1108
|
-
describe: "Path in HubSpot Design Tools. Can be a net new path"
|
|
1109
|
-
warnings:
|
|
1110
|
-
disableInitial: "Passing the \"--disable-initial\" option is no longer necessary. Running \"hs watch\" no longer uploads the watched directory by default."
|
|
1111
|
-
initialUpload: "To upload the directory run \"hs upload\" beforehand or add the \"--initial-upload\" option when running \"hs watch\"."
|
|
1112
|
-
notUploaded: "The \"hs watch\" command no longer uploads the watched directory when started. The directory \"{{ path }}\" was not uploaded."
|
|
1113
953
|
convertFields:
|
|
1114
954
|
describe: "Converts a specific JavaScript fields file of a module or theme to JSON."
|
|
1115
955
|
positionals:
|
|
@@ -1196,7 +1036,7 @@ en:
|
|
|
1196
1036
|
errors:
|
|
1197
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."
|
|
1198
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."
|
|
1199
|
-
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\"]."
|
|
1200
1040
|
validateProjectConfig:
|
|
1201
1041
|
configNotFound: "Unable to locate a project configuration file. Try running again from a project directory, or run {{ createCommand }} to create a new project."
|
|
1202
1042
|
configMissingFields: "The project configuration file is missing required fields."
|
|
@@ -1212,19 +1052,6 @@ en:
|
|
|
1212
1052
|
logFeedbackMessage:
|
|
1213
1053
|
feedbackHeader: "We'd love to hear your feedback!"
|
|
1214
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"
|
|
1215
|
-
projectBuildAndDeploy:
|
|
1216
|
-
makePollTaskStatusFunc:
|
|
1217
|
-
componentCountSingular: "Found 1 component in this project"
|
|
1218
|
-
componentCount: "Found {{ numComponents }} components in this project"
|
|
1219
|
-
successStatusText: "DONE"
|
|
1220
|
-
failedStatusText: "FAILED"
|
|
1221
|
-
errorFetchingTaskStatus: "An error occurred while fetching the status of the current {{ taskType }}. For more information, view this project in HubSpot by running {{ openCommand }}."
|
|
1222
|
-
pollBuildAutodeployStatusError: "Error fetching autodeploy status for build #{{ buildId }}"
|
|
1223
|
-
pollProjectBuildAndDeploy:
|
|
1224
|
-
buildSucceededAutomaticallyDeploying: "Build #{{ buildId }} succeeded. {{#bold}}Automatically deploying{{/bold}} to {{ accountIdentifier }}\n"
|
|
1225
|
-
cleanedUpTempFile: "Cleaned up temporary file {{ path }}"
|
|
1226
|
-
viewDeploys: "View all deploys for this project in HubSpot"
|
|
1227
|
-
unableToFindAutodeployStatus: "Unable to find the auto deploy for build #{{ buildId }}. This deploy may have been skipped. {{ viewDeploysLink }}."
|
|
1228
1055
|
projectUpload:
|
|
1229
1056
|
uploadProjectFiles:
|
|
1230
1057
|
add: "Uploading {{#bold}}{{ projectName }}{{/bold}} project files to {{ accountIdentifier }}"
|
|
@@ -1270,6 +1097,9 @@ en:
|
|
|
1270
1097
|
feedbackCommand:
|
|
1271
1098
|
command: "hs feedback"
|
|
1272
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"
|
|
1273
1103
|
helpCommand:
|
|
1274
1104
|
command: "hs help"
|
|
1275
1105
|
message: "Run {{ command }} to see a list of available commands"
|
|
@@ -1287,7 +1117,7 @@ en:
|
|
|
1287
1117
|
message: "Run {{ command }} to upload your project to your HubSpot account"
|
|
1288
1118
|
projectDevCommand:
|
|
1289
1119
|
command: "hs project dev"
|
|
1290
|
-
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"
|
|
1291
1121
|
projectInstallDepsCommand:
|
|
1292
1122
|
command: "hs project install-deps"
|
|
1293
1123
|
message: "Run {{ command }} to install dependencies for your project components"
|
|
@@ -1328,13 +1158,6 @@ en:
|
|
|
1328
1158
|
describe: "Use environment variable config"
|
|
1329
1159
|
debug:
|
|
1330
1160
|
describe: "Set log level to debug"
|
|
1331
|
-
configMigrate:
|
|
1332
|
-
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"
|
|
1333
|
-
mergeConfigConflictPrompt: "Change the {{ property }} property in the global config from {{ newValue }} to {{ oldValue }}?"
|
|
1334
|
-
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"
|
|
1335
|
-
migrationSuccess: "The deprecated config file has been migrated to the new global config file at {{ globalConfigPath }}."
|
|
1336
|
-
mergeSuccess: "The deprecated config file has been merged with the global config file at {{ globalConfigPath }}."
|
|
1337
|
-
skippedExistingAccounts: "\nThe following accounts were not merged, because they already exist in the global config: {{ skippedAccountIds }}.\n"
|
|
1338
1161
|
prompts:
|
|
1339
1162
|
projectDevTargetAccountPrompt:
|
|
1340
1163
|
createNewSandboxOption: "<Test on a new development sandbox>"
|
|
@@ -1423,7 +1246,7 @@ en:
|
|
|
1423
1246
|
invalidCharacters: "The selected destination contains invalid characters. Please provide a new path and try again."
|
|
1424
1247
|
invalidTemplate: "[--template] Could not find template \"{{ template }}\". Please choose an available template:"
|
|
1425
1248
|
projectTemplateRequired: "Project template is required when projectTemplates is provided"
|
|
1426
|
-
|
|
1249
|
+
selectPublicAppForMigrationPrompt:
|
|
1427
1250
|
selectAppIdMigrate: "[--appId] Choose an app under {{ accountName }} to migrate:"
|
|
1428
1251
|
selectAppIdClone: "[--appId] Choose an app under {{ accountName }} to clone:"
|
|
1429
1252
|
errors:
|
|
@@ -1446,8 +1269,8 @@ en:
|
|
|
1446
1269
|
nameRequired: "A component name is required"
|
|
1447
1270
|
invalidType: "[--type] Could not find type \"{{ type }}\". Please choose an available type:"
|
|
1448
1271
|
secretPrompt:
|
|
1449
|
-
enterValue: "Enter a value for
|
|
1450
|
-
enterName: "Enter
|
|
1272
|
+
enterValue: "Enter a value for the secret: "
|
|
1273
|
+
enterName: "Enter the name of the secret to add: "
|
|
1451
1274
|
selectSecretUpdate: "Select the secret you want to update"
|
|
1452
1275
|
selectSecretDelete: "Select the secret you want to delete"
|
|
1453
1276
|
errors:
|
|
@@ -1478,12 +1301,6 @@ en:
|
|
|
1478
1301
|
errors:
|
|
1479
1302
|
srcRequired: "You must specify a source directory."
|
|
1480
1303
|
destRequired: "You must specify a destination directory."
|
|
1481
|
-
installPublicAppPrompt:
|
|
1482
|
-
explanation: "Local development requires this app to be installed in the target test account"
|
|
1483
|
-
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."
|
|
1484
|
-
prompt: "Open HubSpot to install this app?"
|
|
1485
|
-
reinstallPrompt: "Open HubSpot to reinstall this app?"
|
|
1486
|
-
decline: "To continue local development of this app, install it in your target test account and re-run {{#bold}}`hs project dev`{{/bold}}"
|
|
1487
1304
|
selectHubDBTablePrompt:
|
|
1488
1305
|
selectTable: "Select a HubDB table:"
|
|
1489
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);
|
|
@@ -225,9 +236,21 @@ async function beginMigration(derivedAccountId, appId, platformVersion) {
|
|
|
225
236
|
if (Object.values(componentsRequiringUids).length !== 0) {
|
|
226
237
|
for (const [componentId, component] of Object.entries(componentsRequiringUids)) {
|
|
227
238
|
const { componentHint, componentType } = component;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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), {
|
|
231
254
|
validate: (uid) => {
|
|
232
255
|
const result = (0, project_parsing_lib_1.validateUid)(uid);
|
|
233
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
|
+
}
|
package/lib/commonOpts.d.ts
CHANGED
|
@@ -16,9 +16,7 @@ export declare function setLogLevel(options: Arguments<{
|
|
|
16
16
|
debug?: boolean;
|
|
17
17
|
networkDebug?: boolean;
|
|
18
18
|
}>): void;
|
|
19
|
-
export declare function getCommandName(argv: Arguments
|
|
20
|
-
_?: string[];
|
|
21
|
-
}>): string;
|
|
19
|
+
export declare function getCommandName(argv: Arguments): string;
|
|
22
20
|
export declare function getCmsPublishMode(options: Arguments<{
|
|
23
21
|
cmsPublishMode?: CmsPublishMode;
|
|
24
22
|
derivedAccountId?: number;
|
package/lib/commonOpts.js
CHANGED
|
@@ -138,7 +138,7 @@ function setLogLevel(options) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
function getCommandName(argv) {
|
|
141
|
-
return (argv && argv._ && argv._[0]) || '';
|
|
141
|
+
return String(argv && argv._ && argv._[0]) || '';
|
|
142
142
|
}
|
|
143
143
|
function getCmsPublishMode(options) {
|
|
144
144
|
// 1. --cmsPublishMode
|
package/lib/configMigrate.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function handleMigration(
|
|
2
|
-
export declare function handleMerge(
|
|
1
|
+
export declare function handleMigration(deprecatedConfigPath?: string, hideWarning?: boolean): Promise<boolean>;
|
|
2
|
+
export declare function handleMerge(deprecatedConfigPath?: string, force?: boolean, hideWarning?: boolean): Promise<boolean>;
|