@hubspot/cli 7.2.5-experimental.0 → 7.3.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 +10 -60
- package/commands/account/clean.js +12 -44
- package/commands/account/info.js +9 -33
- package/commands/account/list.js +9 -28
- package/commands/account/remove.js +8 -37
- package/commands/account/rename.js +4 -5
- package/commands/account/use.js +7 -21
- package/commands/account.js +0 -6
- package/commands/auth.js +2 -6
- package/commands/cms/convertFields.js +5 -6
- package/commands/cms/getReactModule.js +7 -8
- package/commands/cms/lighthouseScore.js +15 -16
- package/commands/config/set.d.ts +0 -12
- package/commands/config/set.js +29 -31
- package/commands/config.d.ts +1 -4
- package/commands/config.js +10 -45
- package/commands/create/api-sample.js +6 -7
- package/commands/create/module.js +1 -2
- package/commands/create/template.js +1 -2
- package/commands/customObject/create.js +8 -9
- package/commands/customObject/schema/create.js +5 -6
- package/commands/customObject/schema/delete.js +9 -10
- package/commands/customObject/schema/fetch-all.js +7 -8
- package/commands/customObject/schema/fetch.js +9 -10
- package/commands/customObject/schema/list.js +2 -3
- package/commands/customObject/schema/update.js +7 -8
- package/commands/customObject/schema.js +1 -2
- package/commands/customObject.d.ts +1 -1
- package/commands/filemanager/fetch.js +5 -6
- package/commands/filemanager/upload.js +12 -13
- package/commands/function/deploy.js +9 -10
- package/commands/function/list.js +4 -5
- package/commands/function/server.js +7 -8
- package/commands/init.js +10 -9
- package/commands/mv.d.ts +1 -1
- package/commands/project/add.d.ts +10 -0
- package/commands/project/add.js +64 -52
- package/commands/project/create.js +1 -0
- package/commands/project/deploy.d.ts +11 -1
- package/commands/project/deploy.js +79 -71
- package/commands/project/dev/index.d.ts +1 -1
- package/commands/project/download.d.ts +11 -0
- package/commands/project/download.js +56 -54
- package/commands/project/listBuilds.d.ts +10 -0
- package/commands/project/listBuilds.js +101 -91
- package/commands/project/open.d.ts +9 -0
- package/commands/project/open.js +43 -35
- package/commands/sandbox/create.d.ts +1 -1
- package/commands/sandbox/delete.d.ts +1 -1
- package/commands/sandbox.d.ts +1 -1
- package/lang/en.js +3453 -0
- package/lang/en.lyaml +17 -88
- package/lib/DevServerManagerV2.d.ts +1 -2
- package/lib/DevServerManagerV2.js +1 -2
- package/lib/LocalDevManagerV2.js +10 -15
- package/lib/dependencyManagement.js +8 -9
- package/lib/doctor/Diagnosis.d.ts +2 -1
- package/lib/doctor/Diagnosis.js +6 -10
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +0 -1
- package/lib/doctor/DiagnosticInfoBuilder.js +0 -1
- package/lib/doctor/Doctor.d.ts +0 -1
- package/lib/doctor/Doctor.js +0 -18
- package/lib/errorHandlers/index.js +17 -0
- package/lib/projects/buildAndDeploy.d.ts +1 -1
- package/lib/projects/buildAndDeploy.js +1 -1
- package/lib/projects/index.d.ts +1 -1
- package/lib/projects/index.js +1 -1
- package/lib/projects/structure.d.ts +1 -2
- package/lib/projects/structure.js +0 -4
- package/lib/prompts/downloadProjectPrompt.js +5 -1
- package/lib/prompts/projectNamePrompt.d.ts +6 -1
- package/lib/prompts/projectNamePrompt.js +17 -16
- package/lib/testUtils.d.ts +4 -2
- package/lib/testUtils.js +17 -3
- package/lib/ui/index.d.ts +2 -2
- package/lib/ui/index.js +0 -5
- package/lib/yargsUtils.d.ts +2 -2
- package/lib/yargsUtils.js +2 -2
- package/package.json +4 -4
- package/types/ProjectComponents.d.ts +0 -15
- package/commands/account/auth.d.ts +0 -10
- package/commands/account/auth.js +0 -169
- package/commands/account/createOverride.d.ts +0 -10
- package/commands/account/createOverride.js +0 -103
- package/commands/account/removeOverride.d.ts +0 -10
- package/commands/account/removeOverride.js +0 -77
- package/commands/config/migrate.d.ts +0 -10
- package/commands/config/migrate.js +0 -85
- package/lib/configMigrate.d.ts +0 -2
- package/lib/configMigrate.js +0 -105
package/lang/en.lyaml
CHANGED
|
@@ -11,9 +11,6 @@ en:
|
|
|
11
11
|
portalEnvVarDeprecated: "The HUBSPOT_PORTAL_ID environment variable is deprecated. Please use HUBSPOT_ACCOUNT_ID instead."
|
|
12
12
|
loadConfigMiddleware:
|
|
13
13
|
configFileExists: "A configuration file already exists at {{ configPath }}. To specify a new configuration file, delete the existing one and try again."
|
|
14
|
-
injectAccountIdMiddleware:
|
|
15
|
-
invalidAccountId: "In the default override file ({{ hsAccountFileName }}), the account ID must be a number. Please delete the current file and generate a new one using {{ overrideCommand }}."
|
|
16
|
-
accountNotFound: "The account in the default override file ({{ hsAccountFileName }}) wasn't found in your configured accounts. You can authorize this account using {{ authCommand }}."
|
|
17
14
|
completion:
|
|
18
15
|
describe: "Enable bash completion shortcuts for commands. Concat the generated script to your .bashrc, .bash_profile, or .zshrc file."
|
|
19
16
|
examples:
|
|
@@ -21,51 +18,11 @@ en:
|
|
|
21
18
|
account:
|
|
22
19
|
describe: "Commands for managing configured accounts."
|
|
23
20
|
subcommands:
|
|
24
|
-
auth:
|
|
25
|
-
describe: "Configure authentication for your HubSpot account."
|
|
26
|
-
options:
|
|
27
|
-
account:
|
|
28
|
-
describe: "HubSpot account to authenticate"
|
|
29
|
-
errors:
|
|
30
|
-
failedToUpdateConfig: "Failed to update the configuration file. Please try again."
|
|
31
|
-
bothConfigFilesNotAllowed: "Unable to create config file, because there is an existing \"{{ deprecatedConfig }}\" file. To create a new config file, delete the existing one and try again."
|
|
32
|
-
success:
|
|
33
|
-
configFileCreated: "Created config file \"{{ configPath }}\""
|
|
34
|
-
configFileUpdated: "Connected account \"{{ account }}\" and set it as the default account"
|
|
35
|
-
createOverride:
|
|
36
|
-
describe: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory."
|
|
37
|
-
success: "Default account override file created at {{ overrideFilePath }}"
|
|
38
|
-
accountOverride: "An account override file already exists at {{ overrideFilePath }} associated with account \"{{ accountOverride }}\"."
|
|
39
|
-
prompts:
|
|
40
|
-
replaceOverrideFile: "Replace existing account override file?"
|
|
41
|
-
errors:
|
|
42
|
-
accountNotFound: "The specified account could not be found in the config file {{ configPath }}"
|
|
43
|
-
options:
|
|
44
|
-
account:
|
|
45
|
-
describe: "Name or ID of the account to create an override file for."
|
|
46
|
-
examples:
|
|
47
|
-
default: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory"
|
|
48
|
-
idBased: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory, using the account with accountId \"1234567\""
|
|
49
|
-
nameBased: "Create a new default account override file ({{ hsAccountFileName }}) in the current working directory, using the account with name \"MyAccount\""
|
|
50
|
-
removeOverride:
|
|
51
|
-
describe: "Remove the default account override file ({{ overrideFile }}) from the current working directory."
|
|
52
|
-
accountOverride: "There is an account override file at {{ overrideFilePath }} associated with account \"{{ accountOverride }}\"."
|
|
53
|
-
prompts:
|
|
54
|
-
deleteOverrideFile: "Delete account override file?"
|
|
55
|
-
success: "Removed the default account override file."
|
|
56
|
-
noOverrideFile: "No default account override file found in the current working directory. No action required."
|
|
57
|
-
options:
|
|
58
|
-
force:
|
|
59
|
-
describe: "Skip confirmation prompt when removing the override file"
|
|
60
21
|
list:
|
|
61
|
-
describe: "List names of accounts defined in config."
|
|
62
22
|
accounts: "{{#bold}}Accounts{{/bold}}:"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
configPath: "
|
|
66
|
-
overrideFilePathTitle: "{{#bold}}Default Account Override{{/bold}}"
|
|
67
|
-
overrideFilePath: "Source: {{ overrideFilePath }}"
|
|
68
|
-
overrideAccount: "Account: {{ account }}"
|
|
23
|
+
defaultAccount: "{{#bold}}Default account{{/bold}}: {{ account }}"
|
|
24
|
+
describe: "List names of accounts defined in config."
|
|
25
|
+
configPath: "{{#bold}}Config path{{/bold}}: {{ configPath }}"
|
|
69
26
|
labels:
|
|
70
27
|
accountId: "Account ID"
|
|
71
28
|
authType: "Auth Type"
|
|
@@ -83,8 +40,6 @@ en:
|
|
|
83
40
|
describe: "Set the Hubspot account to use as the default account. The default account can be overridden with the \"--account\" option."
|
|
84
41
|
errors:
|
|
85
42
|
accountNotFound: "The account \"{{ specifiedAccount }}\" could not be found in {{ configPath }}"
|
|
86
|
-
accountOverride: "This project currently has an account override set: \"{{ accountOverride }}\". Account \"{{accountOverride}}\" will continue to act as the default account for this project."
|
|
87
|
-
accountOverrideCommands: "Use {{ createOverrideCommand }} to change override accounts, or {{ removeOverrideCommand }} to remove the override and use your default account."
|
|
88
43
|
examples:
|
|
89
44
|
default: "Select a HubSpot account to use as the default account"
|
|
90
45
|
idBased: "Set the default account to the account in the config with accountId equal to \"1234567\""
|
|
@@ -100,7 +55,6 @@ en:
|
|
|
100
55
|
logs:
|
|
101
56
|
replaceDefaultAccount: "The removed account was the default account."
|
|
102
57
|
prompts:
|
|
103
|
-
deleteOverrideFile: "Delete the override file ({{ overrideFilePath }}) associated with {{ accountName }}?"
|
|
104
58
|
selectAccountToRemove: "Select an account to remove from the config"
|
|
105
59
|
errors:
|
|
106
60
|
accountNotFound: "The account \"{{ specifiedAccount }}\" could not be found in {{ configPath }}"
|
|
@@ -116,12 +70,6 @@ en:
|
|
|
116
70
|
info:
|
|
117
71
|
accountId: "{{#bold}}Account ID{{/bold}}: {{ accountId }}"
|
|
118
72
|
describe: "Print information about the default account, or about the account specified with the \"account\" option."
|
|
119
|
-
defaultAccountTitle: "{{#bold}}Default Account{{/bold}}"
|
|
120
|
-
defaultAccount: "Account: {{ account }}"
|
|
121
|
-
configPath: "Source: {{ configPath }}"
|
|
122
|
-
overrideFilePathTitle: "{{#bold}}Default Account Override{{/bold}}"
|
|
123
|
-
overrideFilePath: "Source: {{ overrideFilePath }}"
|
|
124
|
-
overrideAccount: "Account: {{ account }}"
|
|
125
73
|
errors:
|
|
126
74
|
notUsingPersonalAccessKey: "This command currently only supports fetching scopes for the personal access key auth type."
|
|
127
75
|
options:
|
|
@@ -144,15 +92,13 @@ en:
|
|
|
144
92
|
confirm:
|
|
145
93
|
one: "Remove 1 inactive account from the CLI config?"
|
|
146
94
|
other: "Remove {{ count }} inactive accounts from the CLI config?"
|
|
147
|
-
defaultAccountOverride: "\n(This will also delete the default account override file at {{ overrideFilePath }})"
|
|
148
|
-
replaceDefaultAccount: "The default account was removed."
|
|
149
95
|
removeSuccess: "Removed {{ accountName }} from the CLI config."
|
|
150
96
|
auth:
|
|
151
97
|
describe: "Configure authentication for your HubSpot account."
|
|
152
98
|
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
99
|
errors:
|
|
100
|
+
noConfigFileFound: "No config file was found. To create a new config file, use the \"hs init\" command."
|
|
154
101
|
unsupportedAuthType: "Unsupported auth type: {{ type }}. The only supported authentication protocols are {{ supportedProtocols }}."
|
|
155
|
-
globalConfigFileExists: "A global config file exists at {{ configPath }}. To authorize an account, please use {{ authCommand }}."
|
|
156
102
|
options:
|
|
157
103
|
authType:
|
|
158
104
|
describe: "Authentication method"
|
|
@@ -163,16 +109,6 @@ en:
|
|
|
163
109
|
config:
|
|
164
110
|
describe: "Commands for managing the CLI config file."
|
|
165
111
|
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
112
|
set:
|
|
177
113
|
describe: "Set various configuration options within the hubspot.config.yml file."
|
|
178
114
|
promptMessage: "Select a config option to update"
|
|
@@ -520,6 +456,8 @@ en:
|
|
|
520
456
|
describe: "Authentication method"
|
|
521
457
|
account:
|
|
522
458
|
describe: "HubSpot account to authenticate"
|
|
459
|
+
useHiddenConfig:
|
|
460
|
+
describe: "Use the new HubSpot configuration file located in a hidden file in the user's home directory"
|
|
523
461
|
success:
|
|
524
462
|
configFileCreated: "Created config file \"{{ configPath }}\""
|
|
525
463
|
configFileUpdated: "Connected account \"{{ account }}\" using \"{{ authType }}\" and set it as the default account"
|
|
@@ -527,7 +465,7 @@ en:
|
|
|
527
465
|
updateConfig: "To update an existing config file, use the \"hs auth\" command."
|
|
528
466
|
errors:
|
|
529
467
|
configFileExists: "The config file {{ configPath }} already exists."
|
|
530
|
-
|
|
468
|
+
bothConfigFilesNotAllowed: "Unable to create config file, because there is an existing one at \"{{ path }}\". To create a new config file, delete the existing one and try again."
|
|
531
469
|
lint:
|
|
532
470
|
issuesFound: "{{ count }} issues found."
|
|
533
471
|
groupName: "Linting {{ path }}"
|
|
@@ -693,7 +631,7 @@ en:
|
|
|
693
631
|
debug:
|
|
694
632
|
deploying: "Deploying project at path: {{ path }}"
|
|
695
633
|
errors:
|
|
696
|
-
deploy: "Deploy error:
|
|
634
|
+
deploy: "Deploy error: an unknown error occurred."
|
|
697
635
|
noBuilds: "Deploy error: no builds for this project were found."
|
|
698
636
|
noBuildId: "You must specify a build to deploy"
|
|
699
637
|
projectNotFound: "The project {{ projectName }} does not exist in account {{ accountIdentifier }}. Run {{ command }} to upload your project files to HubSpot."
|
|
@@ -812,7 +750,7 @@ en:
|
|
|
812
750
|
downloadSucceeded: "Downloaded build \"{{ buildId }}\" from project \"{{ projectName }}\""
|
|
813
751
|
errors:
|
|
814
752
|
downloadFailed: "Something went wrong downloading the project"
|
|
815
|
-
|
|
753
|
+
noBuildIdToDownload: "This project is empty. There is no build content to download"
|
|
816
754
|
warnings:
|
|
817
755
|
cannotDownloadWithinProject: "Cancelling project download. Please run the command again outside the context of an existing project."
|
|
818
756
|
options:
|
|
@@ -1139,6 +1077,7 @@ en:
|
|
|
1139
1077
|
missingComponents: "Couldn't find the following components in the deployed build for this project: {{#bold}}'{{ missingComponents }}'{{/bold}}. This may cause issues in local development."
|
|
1140
1078
|
defaultWarning: "{{#bold}}Changing project configuration requires a new project build.{{/bold}}"
|
|
1141
1079
|
defaultPublicAppWarning: "{{#bold}}Changing project configuration requires a new project build.{{/bold}}\n\nThis will affect your public app's {{#bold}}{{ installCount }} existing {{ installText }}{{/bold}}. If your app has users in production, we strongly recommend creating a copy of this app to test your changes before proceding."
|
|
1080
|
+
defaultMarketplaceAppWarning: "{{#bold}}Changing project configuration requires creating a new project build.{{/bold}}\n\nYour marketplace app is currently installed in {{#bold}}{{ installCount }} {{ accountText }}{{/bold}}. Any uploaded changes will impact your app's users. We strongly recommend creating a copy of this app to test your changes before proceding."
|
|
1142
1081
|
header: "{{ warning }} To reflect these changes and continue testing:"
|
|
1143
1082
|
stopDev: " * Stop {{ command }}"
|
|
1144
1083
|
runUpload: " * Run {{ command }}"
|
|
@@ -1245,14 +1184,11 @@ en:
|
|
|
1245
1184
|
command: "--account"
|
|
1246
1185
|
message: "Use the {{ command }} option with any command to override the default account"
|
|
1247
1186
|
accountsListCommand:
|
|
1248
|
-
command:
|
|
1187
|
+
command: hs accounts list
|
|
1249
1188
|
message: "Run {{ command }} to see a list of configured HubSpot accounts"
|
|
1250
1189
|
accountsUseCommand:
|
|
1251
|
-
command: "hs
|
|
1190
|
+
command: "hs accounts use"
|
|
1252
1191
|
message: "Run {{ command }} to set the Hubspot account that the CLI will target by default"
|
|
1253
|
-
accountAuthCommand:
|
|
1254
|
-
command: "hs account auth"
|
|
1255
|
-
message: "Run {{ command }} to connect the CLI to additional HubSpot accounts"
|
|
1256
1192
|
authCommand:
|
|
1257
1193
|
command: "hs auth"
|
|
1258
1194
|
message: "Run {{ command }} to connect the CLI to additional HubSpot accounts"
|
|
@@ -1277,6 +1213,9 @@ en:
|
|
|
1277
1213
|
projectDevCommand:
|
|
1278
1214
|
command: "hs project dev"
|
|
1279
1215
|
message: "Run {{ command }} to set up your test environment and start local development"
|
|
1216
|
+
projectInstallDepsCommand:
|
|
1217
|
+
command: "hs project install-deps"
|
|
1218
|
+
message: "Run {{ command }} to install dependencies for your project components"
|
|
1280
1219
|
projectCommandTip:
|
|
1281
1220
|
message: "Tip: All project commands must be run from within a project directory"
|
|
1282
1221
|
sampleProjects:
|
|
@@ -1314,13 +1253,6 @@ en:
|
|
|
1314
1253
|
describe: "Use environment variable config"
|
|
1315
1254
|
debug:
|
|
1316
1255
|
describe: "Set log level to debug"
|
|
1317
|
-
configMigrate:
|
|
1318
|
-
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"
|
|
1319
|
-
mergeConfigConflictPrompt: "Change the {{ property }} property in the global config from {{ newValue }} to {{ oldValue }}?"
|
|
1320
|
-
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"
|
|
1321
|
-
migrationSuccess: "The deprecated config file has been migrated to the new global config file at {{ globalConfigPath }}."
|
|
1322
|
-
mergeSuccess: "The deprecated config file has been merged with the global config file at {{ globalConfigPath }}."
|
|
1323
|
-
skippedExistingAccounts: "\nThe following accounts were not merged, because they already exist in the global config: {{ skippedAccountIds }}.\n"
|
|
1324
1256
|
prompts:
|
|
1325
1257
|
projectDevTargetAccountPrompt:
|
|
1326
1258
|
createNewSandboxOption: "<Test on a new development sandbox>"
|
|
@@ -1586,6 +1518,8 @@ en:
|
|
|
1586
1518
|
errorContext: "Context: {{ context }}"
|
|
1587
1519
|
errorCause: "Cause: {{ cause }}"
|
|
1588
1520
|
unknownErrorOccurred: "An unknown error has occurred."
|
|
1521
|
+
configTimeoutErrorOccurred: "This error occurred because a request exceeded the default HTTP timeout of {{ timeout }}ms. To increase the default HTTP timeout, run {{ configSetCommand }}."
|
|
1522
|
+
genericTimeoutErrorOccurred: "This error occurred because an HTTP request timed out. Re-running the command may resolve this issue."
|
|
1589
1523
|
suppressErrors:
|
|
1590
1524
|
platformVersionErrors:
|
|
1591
1525
|
header: "Platform version update required"
|
|
@@ -1605,9 +1539,6 @@ en:
|
|
|
1605
1539
|
doctor:
|
|
1606
1540
|
runningDiagnostics: "Running diagnostics..."
|
|
1607
1541
|
diagnosticsComplete: "Diagnostics complete"
|
|
1608
|
-
defaultAccountOverrideFileChecks:
|
|
1609
|
-
overrideActive: "Default account override file active: {{ defaultAccountOverrideFile }}"
|
|
1610
|
-
overrideAccountId: "Active account ID: {{ overrideAccountId }}"
|
|
1611
1542
|
accountChecks:
|
|
1612
1543
|
active: "Default account active"
|
|
1613
1544
|
inactive: "Default account isn't active"
|
|
@@ -1659,8 +1590,6 @@ en:
|
|
|
1659
1590
|
settings:
|
|
1660
1591
|
httpUseLocalhost: "The setting {{#bold}}httpUseLocalhost{{/bold}} is enabled"
|
|
1661
1592
|
httpUseLocalhostSecondary: "This setting causes all CLI requests to route to localhost"
|
|
1662
|
-
defaultAccountOverrideFile:
|
|
1663
|
-
header: "Default account override file path:"
|
|
1664
1593
|
projectConfig:
|
|
1665
1594
|
header: "Project configuration"
|
|
1666
1595
|
projectDirSubHeader: "Project dir: {{#bold}}{{ projectDir }}{{/bold}}"
|
|
@@ -12,11 +12,10 @@ declare class DevServerManagerV2 {
|
|
|
12
12
|
private devServers;
|
|
13
13
|
constructor();
|
|
14
14
|
iterateDevServers(callback: (serverInterface: DevServerInterface) => Promise<void>): Promise<void>;
|
|
15
|
-
setup({ projectNodes,
|
|
15
|
+
setup({ projectNodes, accountId, setActiveApp, }: {
|
|
16
16
|
projectNodes: {
|
|
17
17
|
[key: string]: IntermediateRepresentationNodeLocalDev;
|
|
18
18
|
};
|
|
19
|
-
onUploadRequired: () => void;
|
|
20
19
|
accountId: number;
|
|
21
20
|
setActiveApp: (appUid: string | undefined) => Promise<void>;
|
|
22
21
|
}): Promise<void>;
|
|
@@ -20,7 +20,7 @@ class DevServerManagerV2 {
|
|
|
20
20
|
async iterateDevServers(callback) {
|
|
21
21
|
await Promise.all(this.devServers.map(devServer => callback(devServer)));
|
|
22
22
|
}
|
|
23
|
-
async setup({ projectNodes,
|
|
23
|
+
async setup({ projectNodes, accountId, setActiveApp, }) {
|
|
24
24
|
let env;
|
|
25
25
|
const accountConfig = (0, config_1.getAccountConfig)(accountId);
|
|
26
26
|
if (accountConfig) {
|
|
@@ -31,7 +31,6 @@ class DevServerManagerV2 {
|
|
|
31
31
|
if (serverInterface.setup) {
|
|
32
32
|
await serverInterface.setup({
|
|
33
33
|
components: projectNodes,
|
|
34
|
-
onUploadRequired,
|
|
35
34
|
promptUser: promptUtils_1.promptUser,
|
|
36
35
|
logger: logger_1.logger,
|
|
37
36
|
urls: {
|
package/lib/LocalDevManagerV2.js
CHANGED
|
@@ -10,6 +10,7 @@ const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
|
10
10
|
const localDevAuth_1 = require("@hubspot/local-dev-lib/api/localDevAuth");
|
|
11
11
|
const appsDev_1 = require("@hubspot/local-dev-lib/api/appsDev");
|
|
12
12
|
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
13
|
+
const project_parsing_lib_1 = require("@hubspot/project-parsing-lib");
|
|
13
14
|
const constants_1 = require("./constants");
|
|
14
15
|
const SpinniesManager_1 = __importDefault(require("./ui/SpinniesManager"));
|
|
15
16
|
const DevServerManagerV2_1 = __importDefault(require("./DevServerManagerV2"));
|
|
@@ -212,16 +213,13 @@ class LocalDevManagerV2 {
|
|
|
212
213
|
: (0, ui_1.uiCommandReference)('hs project upload');
|
|
213
214
|
}
|
|
214
215
|
logUploadWarning(reason) {
|
|
215
|
-
let warning;
|
|
216
|
-
if (
|
|
217
|
-
warning = reason;
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
216
|
+
let warning = reason;
|
|
217
|
+
if (!warning) {
|
|
220
218
|
warning =
|
|
221
219
|
this.publicAppActiveInstalls && this.publicAppActiveInstalls > 0
|
|
222
|
-
? (0, lang_1.i18n)(`${i18nKey}.uploadWarning.
|
|
220
|
+
? (0, lang_1.i18n)(`${i18nKey}.uploadWarning.defaultMarketplaceAppWarning`, {
|
|
223
221
|
installCount: this.publicAppActiveInstalls,
|
|
224
|
-
|
|
222
|
+
accountText: this.publicAppActiveInstalls === 1 ? 'account' : 'accounts',
|
|
225
223
|
})
|
|
226
224
|
: (0, lang_1.i18n)(`${i18nKey}.uploadWarning.defaultWarning`);
|
|
227
225
|
}
|
|
@@ -268,10 +266,10 @@ class LocalDevManagerV2 {
|
|
|
268
266
|
const deployedComponentNames = this.deployedBuild.subbuildStatuses.map(subbuildStatus => subbuildStatus.buildName);
|
|
269
267
|
const missingProjectNodes = [];
|
|
270
268
|
Object.values(this.projectNodes).forEach(node => {
|
|
271
|
-
if (
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
269
|
+
if (!deployedComponentNames.includes(node.uid)) {
|
|
270
|
+
const userFriendlyName = (0, project_parsing_lib_1.mapToUserFriendlyName)(node.componentType);
|
|
271
|
+
const label = userFriendlyName ? `[${userFriendlyName}] ` : '';
|
|
272
|
+
missingProjectNodes.push(`${label}${node.uid}`);
|
|
275
273
|
}
|
|
276
274
|
});
|
|
277
275
|
if (missingProjectNodes.length) {
|
|
@@ -284,9 +282,7 @@ class LocalDevManagerV2 {
|
|
|
284
282
|
this.watcher = chokidar_1.default.watch(this.projectDir, {
|
|
285
283
|
ignoreInitial: true,
|
|
286
284
|
});
|
|
287
|
-
const configPaths = Object.values(this.projectNodes)
|
|
288
|
-
.filter(structure_1.isAppIRNode)
|
|
289
|
-
.map(component => component.localDev.componentConfigPath);
|
|
285
|
+
const configPaths = Object.values(this.projectNodes).map(component => component.localDev.componentConfigPath);
|
|
290
286
|
const projectConfigPath = path_1.default.join(this.projectDir, constants_1.PROJECT_CONFIG_FILE);
|
|
291
287
|
configPaths.push(projectConfigPath);
|
|
292
288
|
this.watcher.on('add', filePath => {
|
|
@@ -317,7 +313,6 @@ class LocalDevManagerV2 {
|
|
|
317
313
|
try {
|
|
318
314
|
await DevServerManagerV2_1.default.setup({
|
|
319
315
|
projectNodes: this.projectNodes,
|
|
320
|
-
onUploadRequired: this.logUploadWarning.bind(this),
|
|
321
316
|
accountId: this.targetTestingAccountId,
|
|
322
317
|
setActiveApp: this.setActiveApp.bind(this),
|
|
323
318
|
});
|
|
@@ -20,10 +20,9 @@ const SpinniesManager_1 = __importDefault(require("./ui/SpinniesManager"));
|
|
|
20
20
|
const fs_2 = __importDefault(require("fs"));
|
|
21
21
|
const package_json_1 = __importDefault(require("../package.json"));
|
|
22
22
|
const DEFAULT_PACKAGE_MANAGER = 'npm';
|
|
23
|
-
const i18nKey = `commands.project.subcommands.installDeps`;
|
|
24
23
|
class NoPackageJsonFilesError extends Error {
|
|
25
24
|
constructor(projectName) {
|
|
26
|
-
super((0, lang_1.i18n)(
|
|
25
|
+
super((0, lang_1.i18n)(`commands.project.subcommands.installDeps.noPackageJsonInProject`, {
|
|
27
26
|
projectName,
|
|
28
27
|
link: (0, ui_1.uiLink)('Learn how to create a project from scratch.', 'https://developers.hubspot.com/beta-docs/guides/crm/intro/create-a-project'),
|
|
29
28
|
}));
|
|
@@ -57,11 +56,11 @@ async function installPackagesInDirectory(directory, packages) {
|
|
|
57
56
|
SpinniesManager_1.default.init();
|
|
58
57
|
SpinniesManager_1.default.add(spinner, {
|
|
59
58
|
text: packages && packages.length
|
|
60
|
-
? (0, lang_1.i18n)(
|
|
59
|
+
? (0, lang_1.i18n)(`commands.project.subcommands.installDeps.addingDependenciesToLocation`, {
|
|
61
60
|
dependencies: `[${packages.join(', ')}]`,
|
|
62
61
|
directory: relativeDir,
|
|
63
62
|
})
|
|
64
|
-
: (0, lang_1.i18n)(
|
|
63
|
+
: (0, lang_1.i18n)(`commands.project.subcommands.installDeps.installingDependencies`, {
|
|
65
64
|
directory: relativeDir,
|
|
66
65
|
}),
|
|
67
66
|
});
|
|
@@ -74,18 +73,18 @@ async function installPackagesInDirectory(directory, packages) {
|
|
|
74
73
|
const exec = util_1.default.promisify(child_process_1.exec);
|
|
75
74
|
await exec(installCommand, { cwd: directory });
|
|
76
75
|
SpinniesManager_1.default.succeed(spinner, {
|
|
77
|
-
text: (0, lang_1.i18n)(
|
|
76
|
+
text: (0, lang_1.i18n)(`commands.project.subcommands.installDeps.installationSuccessful`, {
|
|
78
77
|
directory: relativeDir,
|
|
79
78
|
}),
|
|
80
79
|
});
|
|
81
80
|
}
|
|
82
81
|
catch (e) {
|
|
83
82
|
SpinniesManager_1.default.fail(spinner, {
|
|
84
|
-
text: (0, lang_1.i18n)(
|
|
83
|
+
text: (0, lang_1.i18n)(`commands.project.subcommands.installDeps.installingDependenciesFailed`, {
|
|
85
84
|
directory: relativeDir,
|
|
86
85
|
}),
|
|
87
86
|
});
|
|
88
|
-
throw new Error((0, lang_1.i18n)(
|
|
87
|
+
throw new Error((0, lang_1.i18n)(`commands.project.subcommands.installDeps.installingDependenciesFailed`, {
|
|
89
88
|
directory: relativeDir,
|
|
90
89
|
}), {
|
|
91
90
|
cause: e,
|
|
@@ -97,11 +96,11 @@ async function getProjectPackageJsonLocations() {
|
|
|
97
96
|
if (!projectConfig ||
|
|
98
97
|
!projectConfig.projectDir ||
|
|
99
98
|
!projectConfig.projectConfig) {
|
|
100
|
-
throw new Error((0, lang_1.i18n)(
|
|
99
|
+
throw new Error((0, lang_1.i18n)(`commands.project.subcommands.installDeps.noProjectConfig`));
|
|
101
100
|
}
|
|
102
101
|
const { projectDir, projectConfig: { srcDir, name }, } = projectConfig;
|
|
103
102
|
if (!(await isGloballyInstalled(DEFAULT_PACKAGE_MANAGER))) {
|
|
104
|
-
throw new Error((0, lang_1.i18n)(
|
|
103
|
+
throw new Error((0, lang_1.i18n)(`commands.project.subcommands.installDeps.packageManagerNotInstalled`, {
|
|
105
104
|
packageManager: DEFAULT_PACKAGE_MANAGER,
|
|
106
105
|
link: (0, ui_1.uiLink)(DEFAULT_PACKAGE_MANAGER, 'https://docs.npmjs.com/downloading-and-installing-node-js-and-npm'),
|
|
107
106
|
}));
|
|
@@ -11,15 +11,16 @@ interface Section {
|
|
|
11
11
|
export declare class Diagnosis {
|
|
12
12
|
private readonly prefixes;
|
|
13
13
|
private readonly diagnosis;
|
|
14
|
+
private readonly indentation;
|
|
14
15
|
private errorCount;
|
|
15
16
|
private warningCount;
|
|
16
17
|
constructor({ diagnosticInfo, accountId }: DiagnosisOptions);
|
|
18
|
+
private indent;
|
|
17
19
|
getErrorCount(): number;
|
|
18
20
|
getWarningCount(): number;
|
|
19
21
|
addCliSection(section: Section): void;
|
|
20
22
|
addProjectSection(section: Section): void;
|
|
21
23
|
addCLIConfigSection(section: Section): void;
|
|
22
|
-
addDefaultAccountOverrideFileSection(section: Section): void;
|
|
23
24
|
toString(): string;
|
|
24
25
|
private generateSections;
|
|
25
26
|
}
|
package/lib/doctor/Diagnosis.js
CHANGED
|
@@ -5,12 +5,12 @@ const spinniesUtils_1 = require("../ui/spinniesUtils");
|
|
|
5
5
|
const chalk_1 = require("chalk");
|
|
6
6
|
const interpolation_1 = require("../interpolation");
|
|
7
7
|
const ui_1 = require("../ui");
|
|
8
|
-
const index_1 = require("../ui/index");
|
|
9
8
|
const { i18n } = require('../lang');
|
|
10
9
|
const i18nKey = `lib.doctor.diagnosis`;
|
|
11
10
|
class Diagnosis {
|
|
12
11
|
prefixes;
|
|
13
12
|
diagnosis;
|
|
13
|
+
indentation = ' ';
|
|
14
14
|
errorCount = 0;
|
|
15
15
|
warningCount = 0;
|
|
16
16
|
constructor({ diagnosticInfo, accountId }) {
|
|
@@ -29,10 +29,6 @@ class Diagnosis {
|
|
|
29
29
|
header: i18n(`${i18nKey}.cliConfig.header`),
|
|
30
30
|
sections: [],
|
|
31
31
|
},
|
|
32
|
-
defaultAccountOverrideFile: {
|
|
33
|
-
header: i18n(`${i18nKey}.defaultAccountOverrideFile.header`),
|
|
34
|
-
sections: [],
|
|
35
|
-
},
|
|
36
32
|
project: {
|
|
37
33
|
header: i18n(`${i18nKey}.projectConfig.header`),
|
|
38
34
|
subheaders: [
|
|
@@ -57,6 +53,9 @@ class Diagnosis {
|
|
|
57
53
|
];
|
|
58
54
|
}
|
|
59
55
|
}
|
|
56
|
+
indent(level) {
|
|
57
|
+
return this.indentation.repeat(level);
|
|
58
|
+
}
|
|
60
59
|
getErrorCount() {
|
|
61
60
|
return this.errorCount;
|
|
62
61
|
}
|
|
@@ -72,9 +71,6 @@ class Diagnosis {
|
|
|
72
71
|
addCLIConfigSection(section) {
|
|
73
72
|
this.diagnosis.cliConfig.sections.push(section);
|
|
74
73
|
}
|
|
75
|
-
addDefaultAccountOverrideFileSection(section) {
|
|
76
|
-
this.diagnosis.defaultAccountOverrideFile.sections.push(section);
|
|
77
|
-
}
|
|
78
74
|
toString() {
|
|
79
75
|
const output = [];
|
|
80
76
|
for (const value of Object.values(this.diagnosis)) {
|
|
@@ -112,9 +108,9 @@ class Diagnosis {
|
|
|
112
108
|
else if (section.type === 'warning') {
|
|
113
109
|
this.warningCount++;
|
|
114
110
|
}
|
|
115
|
-
output.push(`${
|
|
111
|
+
output.push(`${this.indent(1)}${this.prefixes[section.type]} ${section.message}`);
|
|
116
112
|
if (section.secondaryMessaging) {
|
|
117
|
-
output.push(`${
|
|
113
|
+
output.push(`${this.indent(2)}- ${section.secondaryMessaging}`);
|
|
118
114
|
}
|
|
119
115
|
});
|
|
120
116
|
return output.join('\n');
|
|
@@ -64,7 +64,6 @@ class DiagnosticInfoBuilder {
|
|
|
64
64
|
arch,
|
|
65
65
|
path: mainModule?.path,
|
|
66
66
|
config: (0, config_2.getConfigPath)(),
|
|
67
|
-
defaultAccountOverrideFile: (0, config_1.getDefaultAccountOverrideFilePath)(),
|
|
68
67
|
configSettings: this.configSettings,
|
|
69
68
|
versions: {
|
|
70
69
|
[hubspotCli]: package_json_1.default.version,
|
package/lib/doctor/Doctor.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export declare class Doctor {
|
|
|
10
10
|
private performCliChecks;
|
|
11
11
|
private performProjectChecks;
|
|
12
12
|
private performCliConfigChecks;
|
|
13
|
-
private performDefaultAccountOverrideFileChecks;
|
|
14
13
|
private performCliConfigSettingsChecks;
|
|
15
14
|
private checkIfAccessTokenValid;
|
|
16
15
|
private checkIfNodeIsInstalled;
|
package/lib/doctor/Doctor.js
CHANGED
|
@@ -51,7 +51,6 @@ class Doctor {
|
|
|
51
51
|
...this.performCliConfigChecks(),
|
|
52
52
|
...(this.projectConfig?.projectConfig ? this.performProjectChecks() : []),
|
|
53
53
|
]);
|
|
54
|
-
this.performDefaultAccountOverrideFileChecks();
|
|
55
54
|
this.performCliConfigSettingsChecks();
|
|
56
55
|
SpinniesManager_1.default.succeed('runningDiagnostics', {
|
|
57
56
|
text: i18n(`${i18nKey}.diagnosticsComplete`),
|
|
@@ -89,23 +88,6 @@ class Doctor {
|
|
|
89
88
|
}
|
|
90
89
|
return [this.checkIfAccessTokenValid()];
|
|
91
90
|
}
|
|
92
|
-
performDefaultAccountOverrideFileChecks() {
|
|
93
|
-
const localI18nKey = `${i18nKey}.defaultAccountOverrideFileChecks`;
|
|
94
|
-
if (this.diagnosticInfo?.defaultAccountOverrideFile) {
|
|
95
|
-
this.diagnosis?.addDefaultAccountOverrideFileSection({
|
|
96
|
-
type: 'warning',
|
|
97
|
-
message: i18n(`${localI18nKey}.overrideActive`, {
|
|
98
|
-
defaultAccountOverrideFile: this.diagnosticInfo.defaultAccountOverrideFile,
|
|
99
|
-
}),
|
|
100
|
-
});
|
|
101
|
-
this.diagnosis?.addDefaultAccountOverrideFileSection({
|
|
102
|
-
type: 'warning',
|
|
103
|
-
message: i18n(`${localI18nKey}.overrideAccountId`, {
|
|
104
|
-
overrideAccountId: (0, config_1.getCWDAccountOverride)(),
|
|
105
|
-
}),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
91
|
performCliConfigSettingsChecks() {
|
|
110
92
|
if (this.diagnosticInfo?.configSettings.httpUseLocalhost) {
|
|
111
93
|
this.diagnosis?.addCLIConfigSection({
|
|
@@ -8,9 +8,11 @@ exports.logError = logError;
|
|
|
8
8
|
exports.debugError = debugError;
|
|
9
9
|
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
10
10
|
const index_1 = require("@hubspot/local-dev-lib/errors/index");
|
|
11
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
11
12
|
const suppressError_1 = require("./suppressError");
|
|
12
13
|
const lang_1 = require("../lang");
|
|
13
14
|
const util_1 = __importDefault(require("util"));
|
|
15
|
+
const ui_1 = require("../ui");
|
|
14
16
|
const i18nKey = 'lib.errorHandlers.index';
|
|
15
17
|
function logError(error, context) {
|
|
16
18
|
debugError(error, context);
|
|
@@ -41,6 +43,21 @@ function logError(error, context) {
|
|
|
41
43
|
// Unknown errors
|
|
42
44
|
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.unknownErrorOccurred`));
|
|
43
45
|
}
|
|
46
|
+
if ((0, index_1.isHubSpotHttpError)(error) && error.code === 'ETIMEDOUT') {
|
|
47
|
+
const config = (0, config_1.getConfig)();
|
|
48
|
+
const defaultTimeout = config?.httpTimeout;
|
|
49
|
+
// Timeout was caused by the default timeout
|
|
50
|
+
if (error.timeout && defaultTimeout === error.timeout) {
|
|
51
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.configTimeoutErrorOccurred`, {
|
|
52
|
+
timeout: error.timeout,
|
|
53
|
+
configSetCommand: (0, ui_1.uiCommandReference)('hs config set'),
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
// Timeout was caused by a custom timeout set by the CLI or LDL
|
|
57
|
+
else {
|
|
58
|
+
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.genericTimeoutErrorOccurred`));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
44
61
|
}
|
|
45
62
|
function debugError(error, context) {
|
|
46
63
|
if ((0, index_1.isHubSpotHttpError)(error)) {
|
|
@@ -3,7 +3,7 @@ import { Build } from '@hubspot/local-dev-lib/types/Build';
|
|
|
3
3
|
import { Deploy } from '@hubspot/local-dev-lib/types/Deploy';
|
|
4
4
|
import { ProjectConfig, ProjectTask, ProjectPollResult } from '../../types/Projects';
|
|
5
5
|
export declare function useV3Api(platformVersion?: string | null): boolean;
|
|
6
|
-
type PollTaskStatusFunction<T extends ProjectTask> = (accountId: number, taskName: string, taskId: number, deployedBuildId: number | null, silenceLogs
|
|
6
|
+
type PollTaskStatusFunction<T extends ProjectTask> = (accountId: number, taskName: string, taskId: number, deployedBuildId: number | null, silenceLogs?: boolean) => Promise<T>;
|
|
7
7
|
export declare const pollBuildStatus: PollTaskStatusFunction<Build>;
|
|
8
8
|
export declare const pollDeployStatus: PollTaskStatusFunction<Deploy>;
|
|
9
9
|
export declare function displayWarnLogs(accountId: number, projectName: string, taskId: number, isDeploy?: boolean): Promise<void>;
|
|
@@ -59,7 +59,7 @@ function handleTaskStatusError(statusText) {
|
|
|
59
59
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
60
60
|
}
|
|
61
61
|
function makePollTaskStatusFunc({ statusFn, structureFn, statusText, statusStrings, linkToHubSpot, }) {
|
|
62
|
-
return async function (accountId, taskName, taskId, deployedBuildId
|
|
62
|
+
return async function (accountId, taskName, taskId, deployedBuildId, silenceLogs = false) {
|
|
63
63
|
const displayId = deployedBuildId || taskId;
|
|
64
64
|
if (linkToHubSpot && !silenceLogs) {
|
|
65
65
|
logger_1.logger.log(`\n${linkToHubSpot(accountId, taskName, taskId, deployedBuildId)}\n`);
|
package/lib/projects/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function getProjectConfig(dir?: string): Promise<{
|
|
|
6
6
|
projectDir: string | null;
|
|
7
7
|
projectConfig: ProjectConfig | null;
|
|
8
8
|
}>;
|
|
9
|
-
export declare function validateProjectConfig(projectConfig: ProjectConfig, projectDir: string): void;
|
|
9
|
+
export declare function validateProjectConfig(projectConfig: ProjectConfig | null, projectDir: string | null): void;
|
|
10
10
|
export declare function ensureProjectExists(accountId: number, projectName: string, { forceCreate, allowCreate, noLogs, withPolling, uploadCommand, }?: {
|
|
11
11
|
forceCreate?: boolean | undefined;
|
|
12
12
|
allowCreate?: boolean | undefined;
|
package/lib/projects/index.js
CHANGED
|
@@ -67,7 +67,7 @@ async function getProjectConfig(dir) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
function validateProjectConfig(projectConfig, projectDir) {
|
|
70
|
-
if (!projectConfig) {
|
|
70
|
+
if (!projectConfig || !projectDir) {
|
|
71
71
|
logger_1.logger.error((0, lang_1.i18n)(`${i18nKey}.validateProjectConfig.configNotFound`, {
|
|
72
72
|
createCommand: (0, ui_1.uiCommandReference)('hs project create'),
|
|
73
73
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentTypes, Component, GenericComponentConfig, PublicAppComponentConfig, PrivateAppComponentConfig, AppCardComponentConfig } from '../../types/Projects';
|
|
2
2
|
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types';
|
|
3
|
-
import { AppIRNode
|
|
3
|
+
import { AppIRNode } from '../../types/ProjectComponents';
|
|
4
4
|
export declare const CONFIG_FILES: {
|
|
5
5
|
[k in ComponentTypes]: string;
|
|
6
6
|
};
|
|
@@ -16,4 +16,3 @@ export declare function getComponentUid(component?: Component | null): string |
|
|
|
16
16
|
export declare function componentIsApp(component?: Component | null): component is Component<PublicAppComponentConfig | PrivateAppComponentConfig>;
|
|
17
17
|
export declare function componentIsPublicApp(component?: Component | null): component is Component<PublicAppComponentConfig>;
|
|
18
18
|
export declare function isAppIRNode(component: IntermediateRepresentationNodeLocalDev): component is AppIRNode;
|
|
19
|
-
export declare function isCardIRNode(component: IntermediateRepresentationNodeLocalDev): component is CardIRNode;
|
|
@@ -44,7 +44,6 @@ exports.getComponentUid = getComponentUid;
|
|
|
44
44
|
exports.componentIsApp = componentIsApp;
|
|
45
45
|
exports.componentIsPublicApp = componentIsPublicApp;
|
|
46
46
|
exports.isAppIRNode = isAppIRNode;
|
|
47
|
-
exports.isCardIRNode = isCardIRNode;
|
|
48
47
|
const fs = __importStar(require("fs"));
|
|
49
48
|
const path = __importStar(require("path"));
|
|
50
49
|
const fs_1 = require("@hubspot/local-dev-lib/fs");
|
|
@@ -175,6 +174,3 @@ function componentIsPublicApp(component) {
|
|
|
175
174
|
function isAppIRNode(component) {
|
|
176
175
|
return component.componentType === constants_1.IR_COMPONENT_TYPES.APPLICATION;
|
|
177
176
|
}
|
|
178
|
-
function isCardIRNode(component) {
|
|
179
|
-
return component.componentType === constants_1.IR_COMPONENT_TYPES.CARD;
|
|
180
|
-
}
|