@hubspot/cli 6.2.2-experimental.0 → 6.3.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/LICENSE +12 -0
- package/README.md +71 -0
- package/commands/accounts/clean.d.ts +1 -4
- package/commands/accounts/clean.js +2 -0
- package/commands/accounts/info.d.ts +1 -4
- package/commands/accounts/info.js +3 -1
- package/commands/accounts/list.d.ts +1 -4
- package/commands/accounts/list.js +2 -0
- package/commands/accounts/remove.d.ts +1 -4
- package/commands/accounts/remove.js +2 -0
- package/commands/accounts/rename.d.ts +1 -4
- package/commands/accounts/rename.js +2 -0
- package/commands/accounts/use.d.ts +1 -4
- package/commands/accounts/use.js +2 -0
- package/commands/accounts.d.ts +1 -3
- package/commands/accounts.js +2 -0
- package/commands/auth.d.ts +1 -4
- package/commands/auth.js +2 -2
- package/commands/cms/convertFields.d.ts +1 -4
- package/commands/cms/convertFields.js +2 -0
- package/commands/cms/lighthouseScore.d.ts +1 -4
- package/commands/cms/lighthouseScore.js +2 -0
- package/commands/cms/reactModules.d.ts +1 -4
- package/commands/cms/reactModules.js +2 -0
- package/commands/cms.d.ts +1 -3
- package/commands/cms.js +2 -0
- package/commands/config/set.d.ts +1 -4
- package/commands/config/set.js +3 -3
- package/commands/config.d.ts +1 -3
- package/commands/config.js +2 -0
- package/commands/create/api-sample.d.ts +1 -13
- package/commands/create/api-sample.js +4 -2
- package/commands/create/app.d.ts +1 -10
- package/commands/create/app.js +2 -0
- package/commands/create/function.d.ts +1 -6
- package/commands/create/function.js +2 -0
- package/commands/create/index.d.ts +1 -109
- package/commands/create/index.js +2 -0
- package/commands/create/module.d.ts +1 -11
- package/commands/create/module.js +2 -0
- package/commands/create/react-app.d.ts +1 -9
- package/commands/create/react-app.js +2 -0
- package/commands/create/template.d.ts +1 -12
- package/commands/create/template.js +2 -0
- package/commands/create/vue-app.d.ts +1 -9
- package/commands/create/vue-app.js +2 -0
- package/commands/create/webpack-serverless.d.ts +1 -9
- package/commands/create/webpack-serverless.js +2 -0
- package/commands/create/website-theme.d.ts +1 -9
- package/commands/create/website-theme.js +2 -0
- package/commands/create.d.ts +24 -4
- package/commands/create.js +4 -3
- package/commands/customObject/create.d.ts +1 -4
- package/commands/customObject/create.js +2 -0
- package/commands/customObject/schema/create.d.ts +1 -4
- package/commands/customObject/schema/create.js +2 -0
- package/commands/customObject/schema/delete.d.ts +1 -4
- package/commands/customObject/schema/delete.js +3 -1
- package/commands/customObject/schema/fetch-all.d.ts +1 -4
- package/commands/customObject/schema/fetch-all.js +2 -0
- package/commands/customObject/schema/fetch.d.ts +1 -4
- package/commands/customObject/schema/fetch.js +3 -1
- package/commands/customObject/schema/list.d.ts +1 -3
- package/commands/customObject/schema/list.js +2 -0
- package/commands/customObject/schema/update.d.ts +1 -4
- package/commands/customObject/schema/update.js +2 -0
- package/commands/customObject/schema.d.ts +1 -3
- package/commands/customObject/schema.js +2 -0
- package/commands/customObject.d.ts +1 -3
- package/commands/customObject.js +2 -0
- package/commands/feedback.d.ts +1 -4
- package/commands/feedback.js +21 -4
- package/commands/fetch.d.ts +1 -4
- package/commands/fetch.js +2 -0
- package/commands/filemanager/fetch.d.ts +1 -4
- package/commands/filemanager/fetch.js +4 -2
- package/commands/filemanager/upload.d.ts +1 -4
- package/commands/filemanager/upload.js +2 -0
- package/commands/filemanager.d.ts +1 -3
- package/commands/filemanager.js +2 -0
- package/commands/functions/deploy.d.ts +1 -4
- package/commands/functions/deploy.js +2 -0
- package/commands/functions/list.d.ts +1 -4
- package/commands/functions/list.js +13 -2
- package/commands/functions/server.d.ts +1 -4
- package/commands/functions/server.js +2 -0
- package/commands/functions.d.ts +1 -3
- package/commands/functions.js +2 -0
- package/commands/hubdb/clear.d.ts +1 -4
- package/commands/hubdb/clear.js +2 -0
- package/commands/hubdb/create.d.ts +1 -4
- package/commands/hubdb/create.js +2 -0
- package/commands/hubdb/delete.d.ts +1 -4
- package/commands/hubdb/delete.js +2 -0
- package/commands/hubdb/fetch.d.ts +1 -4
- package/commands/hubdb/fetch.js +2 -0
- package/commands/hubdb.d.ts +1 -3
- package/commands/hubdb.js +2 -0
- package/commands/init.d.ts +1 -4
- package/commands/init.js +2 -2
- package/commands/lint.d.ts +1 -4
- package/commands/lint.js +30 -1
- package/commands/list.d.ts +1 -4
- package/commands/list.js +2 -0
- package/commands/logs.d.ts +1 -4
- package/commands/logs.js +2 -0
- package/commands/module/marketplace-validate.d.ts +1 -4
- package/commands/module/marketplace-validate.js +3 -1
- package/commands/module.d.ts +1 -3
- package/commands/module.js +2 -0
- package/commands/mv.d.ts +1 -4
- package/commands/mv.js +2 -0
- package/commands/open.d.ts +1 -4
- package/commands/open.js +2 -0
- package/commands/project/add.d.ts +1 -4
- package/commands/project/add.js +2 -0
- package/commands/project/cloneApp.d.ts +1 -4
- package/commands/project/cloneApp.js +2 -0
- package/commands/project/create.d.ts +1 -4
- package/commands/project/create.js +2 -0
- package/commands/project/deploy.d.ts +1 -4
- package/commands/project/deploy.js +12 -3
- package/commands/project/dev.d.ts +1 -4
- package/commands/project/dev.js +3 -0
- package/commands/project/download.d.ts +1 -4
- package/commands/project/download.js +4 -2
- package/commands/project/installDeps.d.ts +1 -6
- package/commands/project/installDeps.js +2 -0
- package/commands/project/listBuilds.d.ts +1 -4
- package/commands/project/listBuilds.js +2 -0
- package/commands/project/logs.d.ts +1 -4
- package/commands/project/logs.js +3 -1
- package/commands/project/migrateApp.d.ts +1 -4
- package/commands/project/migrateApp.js +2 -0
- package/commands/project/open.d.ts +1 -4
- package/commands/project/open.js +2 -0
- package/commands/project/upload.d.ts +1 -4
- package/commands/project/upload.js +2 -0
- package/commands/project/watch.d.ts +1 -4
- package/commands/project/watch.js +2 -0
- package/commands/project.d.ts +1 -3
- package/commands/project.js +2 -0
- package/commands/remove.d.ts +1 -4
- package/commands/remove.js +2 -0
- package/commands/sandbox/create.d.ts +1 -4
- package/commands/sandbox/create.js +2 -0
- package/commands/sandbox/delete.d.ts +1 -4
- package/commands/sandbox/delete.js +7 -3
- package/commands/sandbox.d.ts +1 -3
- package/commands/sandbox.js +2 -0
- package/commands/secrets/addSecret.d.ts +1 -4
- package/commands/secrets/addSecret.js +2 -0
- package/commands/secrets/deleteSecret.d.ts +1 -4
- package/commands/secrets/deleteSecret.js +2 -0
- package/commands/secrets/listSecrets.d.ts +1 -4
- package/commands/secrets/listSecrets.js +2 -0
- package/commands/secrets/updateSecret.d.ts +1 -4
- package/commands/secrets/updateSecret.js +2 -0
- package/commands/secrets.d.ts +1 -3
- package/commands/secrets.js +2 -0
- package/commands/theme/generate-selectors.d.ts +1 -4
- package/commands/theme/generate-selectors.js +3 -1
- package/commands/theme/marketplace-validate.d.ts +1 -4
- package/commands/theme/marketplace-validate.js +3 -1
- package/commands/theme/preview.d.ts +1 -4
- package/commands/theme/preview.js +56 -46
- package/commands/theme.d.ts +1 -3
- package/commands/theme.js +2 -0
- package/commands/upload.d.ts +1 -4
- package/commands/upload.js +2 -0
- package/commands/watch.d.ts +1 -4
- package/commands/watch.js +2 -0
- package/lang/en.lyaml +8 -13
- package/lib/DevServerManager.d.ts +1 -35
- package/lib/DevServerManager.js +2 -0
- package/lib/LocalDevManager.d.ts +1 -41
- package/lib/LocalDevManager.js +5 -3
- package/lib/ProjectLogsManager.d.ts +1 -0
- package/lib/{projectLogsManager.js → ProjectLogsManager.js} +2 -0
- package/lib/accountTypes.d.ts +7 -6
- package/lib/accountTypes.js +31 -17
- package/lib/buildAccount.d.ts +1 -22
- package/lib/buildAccount.js +2 -0
- package/lib/commonOpts.d.ts +23 -17
- package/lib/commonOpts.js +73 -54
- package/lib/configOptions.d.ts +1 -0
- package/lib/configOptions.js +110 -0
- package/lib/constants.d.ts +76 -83
- package/lib/constants.js +21 -46
- package/lib/dependencyManagement.d.ts +1 -7
- package/lib/dependencyManagement.js +2 -0
- package/lib/developerTestAccounts.d.ts +1 -7
- package/lib/developerTestAccounts.js +2 -0
- package/lib/enums/exitCodes.d.ts +5 -5
- package/lib/enums/exitCodes.js +3 -2
- package/lib/errorHandlers/index.d.ts +1 -19
- package/lib/errorHandlers/index.js +2 -0
- package/lib/errorHandlers/suppressError.d.ts +1 -1
- package/lib/errorHandlers/suppressError.js +2 -0
- package/lib/filesystem.d.ts +2 -2
- package/lib/filesystem.js +12 -10
- package/lib/generateSelectors.d.ts +1 -0
- package/lib/{generate-selectors.js → generateSelectors.js} +3 -1
- package/lib/hasFeature.d.ts +1 -1
- package/lib/hasFeature.js +7 -8
- package/lib/hasFlag.d.ts +1 -2
- package/lib/hasFlag.js +7 -3
- package/lib/interpolation.d.ts +5 -10
- package/lib/interpolation.js +39 -45
- package/lib/lang.d.ts +9 -3
- package/lib/lang.js +38 -31
- package/lib/links.d.ts +1 -127
- package/lib/links.js +2 -0
- package/lib/localDev.d.ts +1 -11
- package/lib/localDev.js +2 -0
- package/lib/marketplaceValidate.d.ts +1 -0
- package/lib/{marketplace-validate.js → marketplaceValidate.js} +2 -0
- package/lib/oauth.d.ts +1 -1
- package/lib/oauth.js +3 -1
- package/lib/polling.d.ts +1 -1
- package/lib/polling.js +2 -0
- package/lib/process.d.ts +12 -2
- package/lib/process.js +17 -15
- package/lib/projectStructure.d.ts +1 -13
- package/lib/projectStructure.js +4 -2
- package/lib/projects.d.ts +1 -40
- package/lib/projects.js +10 -5
- package/lib/projectsWatch.d.ts +1 -1
- package/lib/projectsWatch.js +8 -3
- package/lib/prompts/accountNamePrompt.d.ts +1 -11
- package/lib/prompts/accountNamePrompt.js +3 -2
- package/lib/prompts/accountsPrompt.d.ts +1 -3
- package/lib/prompts/accountsPrompt.js +2 -17
- package/lib/prompts/cleanUploadPrompt.d.ts +1 -1
- package/lib/prompts/cleanUploadPrompt.js +2 -0
- package/lib/prompts/cmsFieldPrompt.d.ts +1 -1
- package/lib/prompts/cmsFieldPrompt.js +2 -0
- package/lib/prompts/createApiSamplePrompt.d.ts +1 -1
- package/lib/prompts/createApiSamplePrompt.js +2 -0
- package/lib/prompts/createFunctionPrompt.d.ts +1 -1
- package/lib/prompts/createFunctionPrompt.js +5 -4
- package/lib/prompts/createModulePrompt.d.ts +1 -1
- package/lib/prompts/createModulePrompt.js +2 -0
- package/lib/prompts/createProjectPrompt.d.ts +1 -1
- package/lib/prompts/createProjectPrompt.js +10 -5
- package/lib/prompts/createTemplatePrompt.d.ts +1 -1
- package/lib/prompts/createTemplatePrompt.js +2 -0
- package/lib/prompts/downloadProjectPrompt.d.ts +1 -1
- package/lib/prompts/downloadProjectPrompt.js +3 -1
- package/lib/prompts/installPublicAppPrompt.d.ts +1 -1
- package/lib/prompts/installPublicAppPrompt.js +2 -0
- package/lib/prompts/personalAccessKeyPrompt.d.ts +1 -69
- package/lib/prompts/personalAccessKeyPrompt.js +2 -0
- package/lib/prompts/previewPrompt.d.ts +1 -2
- package/lib/prompts/previewPrompt.js +2 -0
- package/lib/prompts/projectAddPrompt.d.ts +1 -1
- package/lib/prompts/projectAddPrompt.js +2 -0
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +1 -4
- package/lib/prompts/projectDevTargetAccountPrompt.js +2 -0
- package/lib/prompts/projectNamePrompt.d.ts +1 -1
- package/lib/prompts/projectNamePrompt.js +2 -0
- package/lib/prompts/projectsLogsPrompt.d.ts +1 -5
- package/lib/prompts/projectsLogsPrompt.js +2 -0
- package/lib/prompts/promptUtils.d.ts +12 -2
- package/lib/prompts/promptUtils.js +25 -12
- package/lib/prompts/sandboxesPrompt.d.ts +1 -2
- package/lib/prompts/sandboxesPrompt.js +2 -0
- package/lib/prompts/secretPrompt.d.ts +1 -1
- package/lib/prompts/secretPrompt.js +2 -0
- package/lib/prompts/selectPublicAppPrompt.d.ts +1 -5
- package/lib/prompts/selectPublicAppPrompt.js +3 -1
- package/lib/prompts/setAsDefaultAccountPrompt.d.ts +1 -1
- package/lib/prompts/setAsDefaultAccountPrompt.js +2 -0
- package/lib/prompts/uploadPrompt.d.ts +1 -1
- package/lib/prompts/uploadPrompt.js +2 -0
- package/lib/sandboxSync.d.ts +1 -8
- package/lib/sandboxSync.js +3 -1
- package/lib/sandboxes.d.ts +1 -40
- package/lib/sandboxes.js +2 -0
- package/lib/schema.d.ts +3 -2
- package/lib/schema.js +20 -18
- package/lib/serverlessLogs.d.ts +1 -8
- package/lib/serverlessLogs.js +3 -1
- package/lib/ui/SpinniesManager.d.ts +1 -61
- package/lib/ui/SpinniesManager.js +2 -0
- package/lib/ui/git.d.ts +1 -1
- package/lib/ui/git.js +2 -0
- package/lib/ui/index.d.ts +1 -36
- package/lib/ui/index.js +2 -0
- package/lib/ui/serverlessFunctionLogs.d.ts +1 -1
- package/lib/ui/serverlessFunctionLogs.js +2 -0
- package/lib/ui/spinniesUtils.d.ts +1 -60
- package/lib/ui/spinniesUtils.js +2 -0
- package/lib/ui/supportHyperlinks.d.ts +1 -3
- package/lib/ui/supportHyperlinks.js +3 -1
- package/lib/ui/supportsColor.d.ts +1 -13
- package/lib/ui/supportsColor.js +3 -1
- package/lib/ui/table.d.ts +1 -2
- package/lib/ui/table.js +2 -0
- package/lib/upload.d.ts +1 -1
- package/lib/upload.js +4 -2
- package/lib/usageTracking.d.ts +1 -6
- package/lib/usageTracking.js +12 -1
- package/lib/validation.d.ts +1 -16
- package/lib/validation.js +2 -2
- package/package.json +17 -9
- package/commands/config/set/allowUsageTracking.d.ts +0 -4
- package/commands/config/set/allowUsageTracking.js +0 -45
- package/commands/config/set/defaultMode.d.ts +0 -4
- package/commands/config/set/defaultMode.js +0 -48
- package/commands/config/set/httpTimeout.d.ts +0 -4
- package/commands/config/set/httpTimeout.js +0 -33
- package/lib/debugInfo.d.ts +0 -3
- package/lib/debugInfo.js +0 -18
- package/lib/environment.d.ts +0 -1
- package/lib/environment.js +0 -14
- package/lib/generate-selectors.d.ts +0 -6
- package/lib/getFunctionArrays.d.ts +0 -1
- package/lib/getFunctionArrays.js +0 -17
- package/lib/hublValidate.d.ts +0 -4
- package/lib/hublValidate.js +0 -28
- package/lib/interpolationHelpers.d.ts +0 -6
- package/lib/interpolationHelpers.js +0 -26
- package/lib/marketplace-validate.d.ts +0 -5
- package/lib/projectLogsManager.d.ts +0 -19
- package/lib/prompts/activeInstallConfirmationPrompt.d.ts +0 -1
- package/lib/prompts/activeInstallConfirmationPrompt.js +0 -18
- package/lib/prompts/deployBuildIdPrompt.d.ts +0 -1
- package/lib/prompts/deployBuildIdPrompt.js +0 -20
- package/lib/prompts/feedbackPrompt.d.ts +0 -2
- package/lib/prompts/feedbackPrompt.js +0 -37
- package/lib/prompts/folderOverwritePrompt.d.ts +0 -1
- package/lib/prompts/folderOverwritePrompt.js +0 -15
- package/lib/regex.d.ts +0 -1
- package/lib/regex.js +0 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright 2019 HubSpot, Inc.
|
|
2
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
you may not use this file except in compliance with the License.
|
|
4
|
+
You may obtain a copy of the License at
|
|
5
|
+
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
|
|
8
|
+
Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
See the License for the specific language governing permissions and
|
|
12
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @hubspot/cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@hubspot/cli) [](https://www.npmjs.com/package/@hubspot/cli?activeTab=versions)
|
|
4
|
+
|
|
5
|
+
A CLI for HubSpot developers to enable local development and automation. [Learn more about building on HubSpot](https://developers.hubspot.com).
|
|
6
|
+
|
|
7
|
+
## Contributing
|
|
8
|
+
|
|
9
|
+
For more information on developing, see the [Contributing Guide](CONTRIBUTING.md).
|
|
10
|
+
|
|
11
|
+
## Getting started
|
|
12
|
+
|
|
13
|
+
For more information on using these tools, see [Local Development Tooling: Getting Started](https://developers.hubspot.com/docs/cms/guides/getting-started-with-local-development)
|
|
14
|
+
|
|
15
|
+
### Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g @hubspot/cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Configuring
|
|
22
|
+
|
|
23
|
+
Once the `@hubspot/cli` has been added to a project, a config file named [hubspot.config.yml](../../docs/HubspotConfigFile.md) will also be needed. It is recommended that the config file is kept in your `$HOME` directory.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd ~
|
|
27
|
+
hs init
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### Auto Completion
|
|
31
|
+
|
|
32
|
+
You can set up command autocompletion by running
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
hs completion
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
and copying the output to either your `.bashrc` or `.zshrc`, and then sourcing that file `source ~/.bashrc` `source ~/.zshrc` or restarting your terminal.
|
|
39
|
+
|
|
40
|
+
## Commands
|
|
41
|
+
|
|
42
|
+
A full breakdown of the commands can be found on the [local development tools reference page](https://developers.hubspot.com/docs/cms/developer-reference/local-development-cli).
|
|
43
|
+
|
|
44
|
+
**Note:** When `@hubspot/cli` is installed local to a project, the commands need to be prefixed with either `yarn` if using `yarn` or `npx` if using `npm`.
|
|
45
|
+
|
|
46
|
+
## Authentication
|
|
47
|
+
|
|
48
|
+
There are two ways that the tools can authenticate with HubSpot.
|
|
49
|
+
|
|
50
|
+
### Personal Access Key (recommended)
|
|
51
|
+
|
|
52
|
+
1. Run `hs init` or `hs auth personalaccesskey` and follow the instructions
|
|
53
|
+
|
|
54
|
+
### OAuth2
|
|
55
|
+
|
|
56
|
+
1. [Create a developer app](https://developers.hubspot.com/docs/faq/how-do-i-create-an-app-in-hubspot)
|
|
57
|
+
2. Run `hs auth oauth2`
|
|
58
|
+
3. Select `OAuth2` and follow the steps
|
|
59
|
+
|
|
60
|
+
_**Note:** The Account ID used should be the Test Account ID (not the developer app ID). Client ID and Client Secret are from the developer app._
|
|
61
|
+
### Exit Codes
|
|
62
|
+
|
|
63
|
+
The CLI will exit with one of the following exit codes:
|
|
64
|
+
- `0`: A successful run
|
|
65
|
+
- `1`: There was a config problem or an internal error
|
|
66
|
+
- `2`: There are warnings or validation issues
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Changelog
|
|
70
|
+
|
|
71
|
+
The best way to stay up to date is to check out the [Github Releases](https://github.com/HubSpot/hubspot-cli/releases) and also follow our [developer changelog posts](https://developers.hubspot.com/changelog) for an easier to read breakdown of major changes.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { accessTokenForPersonalAccessKey, } = require('@hubspot/local-dev-lib/personalAccessKey');
|
|
4
6
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { getAccountConfig } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { getAccessToken } = require('@hubspot/local-dev-lib/personalAccessKey');
|
|
@@ -11,7 +13,7 @@ exports.describe = i18n(`${i18nKey}.describe`);
|
|
|
11
13
|
exports.command = 'info [--account]';
|
|
12
14
|
exports.handler = async (options) => {
|
|
13
15
|
await loadAndValidateOptions(options);
|
|
14
|
-
|
|
16
|
+
const accountId = getAccountId(options);
|
|
15
17
|
const config = getAccountConfig(accountId);
|
|
16
18
|
// check if the provided account is using a personal access key, if not, show an error
|
|
17
19
|
if (config.authType === 'personalaccesskey') {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { getConfig, getConfigPath } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { getTableContents, getTableHeader } = require('../../lib/ui/table');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { getConfig, getConfigPath, deleteAccount, getConfigDefaultAccount, getAccountId: getAccountIdFromConfig, updateDefaultAccount, } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { renameAccount } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { addConfigOptions, addAccountOptions, getAccountId, } = require('../../lib/commonOpts');
|
package/commands/accounts/use.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { getConfig, getConfigPath, updateDefaultAccount, getAccountId: getAccountIdFromConfig, } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
package/commands/accounts.d.ts
CHANGED
package/commands/accounts.js
CHANGED
package/commands/auth.d.ts
CHANGED
package/commands/auth.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { checkAndWarnGitInclusion } = require('../lib/ui/git');
|
|
3
5
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
4
6
|
const { OAUTH_AUTH_METHOD, PERSONAL_ACCESS_KEY_AUTH_METHOD, } = require('@hubspot/local-dev-lib/constants/auth');
|
|
@@ -13,7 +15,6 @@ const { personalAccessKeyPrompt, OAUTH_FLOW, } = require('../lib/prompts/persona
|
|
|
13
15
|
const { cliAccountNamePrompt } = require('../lib/prompts/accountNamePrompt');
|
|
14
16
|
const { setAsDefaultAccountPrompt, } = require('../lib/prompts/setAsDefaultAccountPrompt');
|
|
15
17
|
const { addConfigOptions, setLogLevel, getAccountId, addTestingOptions, } = require('../lib/commonOpts');
|
|
16
|
-
const { logDebugInfo } = require('../lib/debugInfo');
|
|
17
18
|
const { trackAuthAction, trackCommandUsage } = require('../lib/usageTracking');
|
|
18
19
|
const { authenticateWithOauth } = require('../lib/oauth');
|
|
19
20
|
const { EXIT_CODES } = require('../lib/enums/exitCodes');
|
|
@@ -38,7 +39,6 @@ exports.handler = async (options) => {
|
|
|
38
39
|
const { type, config: c, qa, account } = options;
|
|
39
40
|
const authType = (type && type.toLowerCase()) || PERSONAL_ACCESS_KEY_AUTH_METHOD.value;
|
|
40
41
|
setLogLevel(options);
|
|
41
|
-
logDebugInfo(options);
|
|
42
42
|
if (!getConfigPath(c)) {
|
|
43
43
|
logger.error(i18n(`${i18nKey}.errors.noConfigFileFound`));
|
|
44
44
|
process.exit(EXIT_CODES.ERROR);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const SpinniesManager = require('../../lib/ui/SpinniesManager');
|
|
3
5
|
const { addAccountOptions, addConfigOptions, addUseEnvironmentOptions, getAccountId, } = require('../../lib/commonOpts');
|
|
4
6
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
package/commands/cms.d.ts
CHANGED
package/commands/cms.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { i18n } = require('../lib/lang');
|
|
3
5
|
const { addConfigOptions, addAccountOptions } = require('../lib/commonOpts');
|
|
4
6
|
const lighthouseScore = require('./cms/lighthouseScore');
|
package/commands/config/set.d.ts
CHANGED
package/commands/config/set.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { loadAndValidateOptions } = require('../../lib/validation');
|
|
3
5
|
const { i18n } = require('../../lib/lang');
|
|
4
6
|
const { getAccountId } = require('../../lib/commonOpts');
|
|
5
7
|
const { trackCommandUsage } = require('../../lib/usageTracking');
|
|
6
8
|
const { promptUser } = require('../../lib/prompts/promptUtils');
|
|
7
9
|
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
|
|
8
|
-
const { setDefaultMode } = require('
|
|
9
|
-
const { setHttpTimeout } = require('./set/httpTimeout');
|
|
10
|
-
const { setAllowUsageTracking } = require('./set/allowUsageTracking');
|
|
10
|
+
const { setDefaultMode, setHttpTimeout, setAllowUsageTracking, } = require('../../lib/configOptions');
|
|
11
11
|
const i18nKey = 'commands.config.subcommands.set';
|
|
12
12
|
exports.command = 'set';
|
|
13
13
|
exports.describe = i18n(`${i18nKey}.describe`);
|
package/commands/config.d.ts
CHANGED
package/commands/config.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function dest({ dest }: {
|
|
3
|
-
dest: any;
|
|
4
|
-
}): any;
|
|
5
|
-
export function validate({ name }: {
|
|
6
|
-
name: any;
|
|
7
|
-
}): boolean;
|
|
8
|
-
export function execute({ dest, name, assetType, options }: {
|
|
9
|
-
dest: any;
|
|
10
|
-
name: any;
|
|
11
|
-
assetType: any;
|
|
12
|
-
options: any;
|
|
13
|
-
}): Promise<void>;
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { createApiSamplePrompt, } = require('../../lib/prompts/createApiSamplePrompt');
|
|
3
|
-
const {
|
|
5
|
+
const { confirmPrompt } = require('../../lib/prompts/promptUtils');
|
|
4
6
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
5
7
|
const path = require('path');
|
|
6
8
|
const fs = require('fs-extra');
|
|
@@ -20,7 +22,7 @@ module.exports = {
|
|
|
20
22
|
execute: async ({ dest, name, assetType, options }) => {
|
|
21
23
|
const filePath = path.join(dest, name);
|
|
22
24
|
if (fs.existsSync(filePath)) {
|
|
23
|
-
const
|
|
25
|
+
const overwrite = await confirmPrompt(i18n(`${i18nKey}.folderOverwritePrompt`, { folderName: filePath }), { defaultAnswer: false });
|
|
24
26
|
if (overwrite) {
|
|
25
27
|
fs.rmdirSync(filePath, { recursive: true });
|
|
26
28
|
}
|
package/commands/create/app.d.ts
CHANGED
package/commands/create/app.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { createFunction } = require('@hubspot/local-dev-lib/cms/functions');
|
|
3
5
|
const { createFunctionPrompt, } = require('../../lib/prompts/createFunctionPrompt');
|
|
4
6
|
const { logError } = require('../../lib/errorHandlers/index');
|
|
@@ -1,109 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'api-sample': {
|
|
3
|
-
hidden: boolean;
|
|
4
|
-
dest: ({ dest }: {
|
|
5
|
-
dest: any;
|
|
6
|
-
}) => any;
|
|
7
|
-
validate: ({ name }: {
|
|
8
|
-
name: any;
|
|
9
|
-
}) => boolean;
|
|
10
|
-
execute: ({ dest, name, assetType, options }: {
|
|
11
|
-
dest: any;
|
|
12
|
-
name: any;
|
|
13
|
-
assetType: any;
|
|
14
|
-
options: any;
|
|
15
|
-
}) => Promise<void>;
|
|
16
|
-
};
|
|
17
|
-
app: {
|
|
18
|
-
hidden: boolean;
|
|
19
|
-
dest: ({ name, assetType }: {
|
|
20
|
-
name: any;
|
|
21
|
-
assetType: any;
|
|
22
|
-
}) => any;
|
|
23
|
-
execute: ({ options, dest, assetType }: {
|
|
24
|
-
options: any;
|
|
25
|
-
dest: any;
|
|
26
|
-
assetType: any;
|
|
27
|
-
}) => Promise<boolean>;
|
|
28
|
-
};
|
|
29
|
-
function: {
|
|
30
|
-
dest: ({ name }: {
|
|
31
|
-
name: any;
|
|
32
|
-
}) => any;
|
|
33
|
-
execute: ({ dest }: {
|
|
34
|
-
dest: any;
|
|
35
|
-
}) => Promise<void>;
|
|
36
|
-
};
|
|
37
|
-
module: {
|
|
38
|
-
dest: ({ dest }: {
|
|
39
|
-
dest: any;
|
|
40
|
-
}) => any;
|
|
41
|
-
validate: ({ name }: {
|
|
42
|
-
name: any;
|
|
43
|
-
}) => boolean;
|
|
44
|
-
execute: ({ name, dest, getInternalVersion }: {
|
|
45
|
-
name: any;
|
|
46
|
-
dest: any;
|
|
47
|
-
getInternalVersion: any;
|
|
48
|
-
}) => Promise<void>;
|
|
49
|
-
};
|
|
50
|
-
'react-app': {
|
|
51
|
-
dest: ({ name, assetType }: {
|
|
52
|
-
name: any;
|
|
53
|
-
assetType: any;
|
|
54
|
-
}) => any;
|
|
55
|
-
execute: ({ options, dest, assetType }: {
|
|
56
|
-
options: any;
|
|
57
|
-
dest: any;
|
|
58
|
-
assetType: any;
|
|
59
|
-
}) => Promise<boolean>;
|
|
60
|
-
};
|
|
61
|
-
template: {
|
|
62
|
-
dest: ({ dest }: {
|
|
63
|
-
dest: any;
|
|
64
|
-
}) => any;
|
|
65
|
-
validate: ({ name }: {
|
|
66
|
-
name: any;
|
|
67
|
-
}) => boolean;
|
|
68
|
-
execute: ({ name, dest }: {
|
|
69
|
-
name: any;
|
|
70
|
-
dest: any;
|
|
71
|
-
}) => Promise<{
|
|
72
|
-
templateType: any;
|
|
73
|
-
}>;
|
|
74
|
-
};
|
|
75
|
-
'vue-app': {
|
|
76
|
-
dest: ({ name, assetType }: {
|
|
77
|
-
name: any;
|
|
78
|
-
assetType: any;
|
|
79
|
-
}) => any;
|
|
80
|
-
execute: ({ options, dest, assetType }: {
|
|
81
|
-
options: any;
|
|
82
|
-
dest: any;
|
|
83
|
-
assetType: any;
|
|
84
|
-
}) => Promise<boolean>;
|
|
85
|
-
};
|
|
86
|
-
'webpack-serverless': {
|
|
87
|
-
dest: ({ name, assetType }: {
|
|
88
|
-
name: any;
|
|
89
|
-
assetType: any;
|
|
90
|
-
}) => any;
|
|
91
|
-
execute: ({ options, dest, assetType }: {
|
|
92
|
-
options: any;
|
|
93
|
-
dest: any;
|
|
94
|
-
assetType: any;
|
|
95
|
-
}) => Promise<boolean>;
|
|
96
|
-
};
|
|
97
|
-
'website-theme': {
|
|
98
|
-
dest: ({ name, assetType }: {
|
|
99
|
-
name: any;
|
|
100
|
-
assetType: any;
|
|
101
|
-
}) => any;
|
|
102
|
-
execute: ({ dest, assetType, options }: {
|
|
103
|
-
dest: any;
|
|
104
|
-
assetType: any;
|
|
105
|
-
options: any;
|
|
106
|
-
}) => Promise<void>;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
export = _exports;
|
|
1
|
+
export {};
|
package/commands/create/index.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
dest: any;
|
|
3
|
-
}): any;
|
|
4
|
-
export function validate({ name }: {
|
|
5
|
-
name: any;
|
|
6
|
-
}): boolean;
|
|
7
|
-
export function execute({ name, dest, getInternalVersion }: {
|
|
8
|
-
name: any;
|
|
9
|
-
dest: any;
|
|
10
|
-
getInternalVersion: any;
|
|
11
|
-
}): Promise<void>;
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
3
5
|
const { createModule } = require('@hubspot/local-dev-lib/cms/modules');
|
|
4
6
|
const { i18n } = require('../../lib/lang');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { createTemplate } = require('@hubspot/local-dev-lib/cms/templates');
|
|
3
5
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
4
6
|
const { logError } = require('../../lib/errorHandlers/index');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { cloneGithubRepo } = require('@hubspot/local-dev-lib/github');
|
|
3
5
|
const { getIsInProject } = require('../../lib/projects');
|
|
4
6
|
const PROJECT_BOILERPLATE_BRANCH = 'cms-boilerplate-developer-projects';
|