@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
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { promptUser } = require('./promptUtils');
|
|
3
5
|
const { i18n } = require('../lang');
|
|
4
6
|
const { uiLine } = require('../ui');
|
|
5
7
|
const { logError } = require('../errorHandlers/index');
|
|
6
8
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
7
9
|
const { fetchPublicAppsForPortal, } = require('@hubspot/local-dev-lib/api/appsDev');
|
|
8
|
-
const { EXIT_CODES } = require('
|
|
10
|
+
const { EXIT_CODES } = require('../enums/exitCodes');
|
|
9
11
|
const i18nKey = 'lib.prompts.selectPublicAppPrompt';
|
|
10
12
|
const fetchPublicAppOptions = async (accountId, accountName, isMigratingApp = false) => {
|
|
11
13
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { getConfig, updateDefaultAccount, } = require('@hubspot/local-dev-lib/config');
|
|
3
5
|
const { promptUser } = require('./promptUtils');
|
|
4
6
|
const { i18n } = require('../lang');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
package/lib/sandboxSync.d.ts
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {Object} accountConfig - Account config of sandbox portal
|
|
3
|
-
* @param {Object} parentAccountConfig - Account config of parent portal
|
|
4
|
-
* @param {String} env - Environment (QA/Prod)
|
|
5
|
-
* @param {Array} syncTasks - Array of available sync tasks
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export function syncSandbox({ accountConfig, parentAccountConfig, env, syncTasks, slimInfoMessage, }: Object): Promise<void>;
|
|
1
|
+
export {};
|
package/lib/sandboxSync.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const SpinniesManager = require('./ui/SpinniesManager');
|
|
3
5
|
const { getHubSpotWebsiteOrigin } = require('@hubspot/local-dev-lib/urls');
|
|
4
6
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
@@ -40,7 +42,7 @@ const syncSandbox = async ({ accountConfig, parentAccountConfig, env, syncTasks,
|
|
|
40
42
|
text: i18n(`${i18nKey}.loading.startSync`),
|
|
41
43
|
});
|
|
42
44
|
await initiateSync(parentAccountId, accountId, availableSyncTasks, accountId);
|
|
43
|
-
|
|
45
|
+
const spinniesText = isDevSandbox
|
|
44
46
|
? `${i18nKey}.loading.succeedDevSb`
|
|
45
47
|
: `${i18nKey}.loading.succeed`;
|
|
46
48
|
SpinniesManager.succeed('sandboxSync', {
|
package/lib/sandboxes.d.ts
CHANGED
|
@@ -1,40 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
let dev: "DEVELOPMENT_SANDBOX";
|
|
3
|
-
let developer: "DEVELOPMENT_SANDBOX";
|
|
4
|
-
let development: "DEVELOPMENT_SANDBOX";
|
|
5
|
-
let standard: "STANDARD_SANDBOX";
|
|
6
|
-
}
|
|
7
|
-
export namespace sandboxApiTypeMap {
|
|
8
|
-
let STANDARD_SANDBOX: number;
|
|
9
|
-
let DEVELOPMENT_SANDBOX: number;
|
|
10
|
-
}
|
|
11
|
-
export namespace syncTypes {
|
|
12
|
-
let OBJECT_RECORDS: string;
|
|
13
|
-
}
|
|
14
|
-
export function getSandboxTypeAsString(accountType: any): "development" | "standard";
|
|
15
|
-
export function getHasSandboxesByType(parentAccountConfig: any, type: any): boolean;
|
|
16
|
-
export function getSandboxLimit(error: any): number;
|
|
17
|
-
/**
|
|
18
|
-
* @param {Object} accountConfig - Account config of sandbox portal
|
|
19
|
-
* @param {String} sandboxType - Sandbox type for limit validation
|
|
20
|
-
* @param {String} env - Environment
|
|
21
|
-
* @returns {null}
|
|
22
|
-
*/
|
|
23
|
-
export function validateSandboxUsageLimits(accountConfig: Object, sandboxType: string, env: string): null;
|
|
24
|
-
export function getAvailableSyncTypes(parentAccountConfig: any, config: any): Promise<{
|
|
25
|
-
type: string;
|
|
26
|
-
}[]>;
|
|
27
|
-
/**
|
|
28
|
-
* @param {Object} accountConfig - Account config of sandbox portal
|
|
29
|
-
* @param {Array} availableSyncTasks - Array of available sync tasks
|
|
30
|
-
* @param {Boolean} skipPrompt - Option to skip contact records prompt and return all available sync tasks
|
|
31
|
-
* @returns {Array} Adjusted available sync task items
|
|
32
|
-
*/
|
|
33
|
-
export function getSyncTypesWithContactRecordsPrompt(accountConfig: Object, syncTasks: any, skipPrompt?: boolean): any[];
|
|
34
|
-
export function handleSandboxCreateError({ err, env, accountId, name, accountConfig, }: {
|
|
35
|
-
err: any;
|
|
36
|
-
env: any;
|
|
37
|
-
accountId: any;
|
|
38
|
-
name: any;
|
|
39
|
-
accountConfig: any;
|
|
40
|
-
}): void;
|
|
1
|
+
export {};
|
package/lib/sandboxes.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('./lang');
|
|
3
5
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
4
6
|
const { getSandboxUsageLimits, } = require('@hubspot/local-dev-lib/api/sandboxHubs');
|
package/lib/schema.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export function
|
|
1
|
+
import { Schema } from '@hubspot/local-dev-lib/types/Schemas';
|
|
2
|
+
export declare function logSchemas(schemas: Array<Schema>): void;
|
|
3
|
+
export declare function listSchemas(accountId: number): Promise<void>;
|
package/lib/schema.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.logSchemas = logSchemas;
|
|
7
|
+
exports.listSchemas = listSchemas;
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const table_1 = require("table");
|
|
10
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
11
|
+
const customObjects_1 = require("@hubspot/local-dev-lib/api/customObjects");
|
|
12
|
+
function logSchemas(schemas) {
|
|
7
13
|
const data = schemas
|
|
8
14
|
.map(r => [r.labels.singular, r.name, r.objectTypeId || ''])
|
|
9
15
|
.sort((a, b) => (a[1] > b[1] ? 1 : -1));
|
|
10
16
|
data.unshift([
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
chalk_1.default.bold('Label'),
|
|
18
|
+
chalk_1.default.bold('Name'),
|
|
19
|
+
chalk_1.default.bold('objectTypeId'),
|
|
14
20
|
]);
|
|
15
21
|
const tableConfig = {
|
|
16
22
|
singleLine: true,
|
|
17
|
-
border: getBorderCharacters('honeywell'),
|
|
23
|
+
border: (0, table_1.getBorderCharacters)('honeywell'),
|
|
18
24
|
};
|
|
19
|
-
logger.log(data.length ? table(data, tableConfig) : 'No Schemas were found');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const { data } = await fetchObjectSchemas(accountId);
|
|
25
|
+
logger_1.logger.log(data.length ? (0, table_1.table)(data, tableConfig) : 'No Schemas were found');
|
|
26
|
+
}
|
|
27
|
+
async function listSchemas(accountId) {
|
|
28
|
+
const { data } = await (0, customObjects_1.fetchObjectSchemas)(accountId);
|
|
23
29
|
logSchemas(data.results);
|
|
24
|
-
}
|
|
25
|
-
module.exports = {
|
|
26
|
-
logSchemas,
|
|
27
|
-
listSchemas,
|
|
28
|
-
};
|
|
30
|
+
}
|
package/lib/serverlessLogs.d.ts
CHANGED
package/lib/serverlessLogs.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const https = require('https');
|
|
3
5
|
const SpinniesManager = require('./ui/SpinniesManager');
|
|
4
6
|
const { handleExit, handleKeypress } = require('./process');
|
|
@@ -6,7 +8,7 @@ const chalk = require('chalk');
|
|
|
6
8
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
7
9
|
const { outputLogs } = require('./ui/serverlessFunctionLogs');
|
|
8
10
|
const { logError, ApiErrorContext } = require('./errorHandlers/index');
|
|
9
|
-
const { EXIT_CODES } = require('
|
|
11
|
+
const { EXIT_CODES } = require('./enums/exitCodes');
|
|
10
12
|
const { isHubSpotHttpError, isMissingScopeError, } = require('@hubspot/local-dev-lib/errors/index');
|
|
11
13
|
const { SCOPE_GROUPS, PERSONAL_ACCESS_KEY_AUTH_METHOD, } = require('@hubspot/local-dev-lib/constants/auth');
|
|
12
14
|
const { getAccountConfig } = require('@hubspot/local-dev-lib/config');
|
|
@@ -1,61 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export = _exports;
|
|
3
|
-
declare class SpinniesManager {
|
|
4
|
-
init(options?: {}): void;
|
|
5
|
-
options: {
|
|
6
|
-
spinner: any;
|
|
7
|
-
disableSpins: boolean;
|
|
8
|
-
succeedPrefix: any;
|
|
9
|
-
failPrefix: any;
|
|
10
|
-
color: any;
|
|
11
|
-
succeedColor: any;
|
|
12
|
-
failColor: any;
|
|
13
|
-
spinnerColor: any;
|
|
14
|
-
} | {
|
|
15
|
-
spinner: any;
|
|
16
|
-
disableSpins: boolean;
|
|
17
|
-
succeedPrefix: any;
|
|
18
|
-
failPrefix: any;
|
|
19
|
-
color: any;
|
|
20
|
-
succeedColor: any;
|
|
21
|
-
failColor: any;
|
|
22
|
-
spinnerColor: any;
|
|
23
|
-
} | undefined;
|
|
24
|
-
spin: boolean | undefined;
|
|
25
|
-
resetState(): void;
|
|
26
|
-
spinners: {} | undefined;
|
|
27
|
-
isCursorHidden: boolean | undefined;
|
|
28
|
-
currentInterval: NodeJS.Timeout | null | undefined;
|
|
29
|
-
stream: (NodeJS.WriteStream & {
|
|
30
|
-
fd: 2;
|
|
31
|
-
}) | undefined;
|
|
32
|
-
lineCount: number | undefined;
|
|
33
|
-
currentFrameIndex: any;
|
|
34
|
-
pick(name: any): any;
|
|
35
|
-
add(name: any, options?: {}): {
|
|
36
|
-
text: any;
|
|
37
|
-
status: any;
|
|
38
|
-
indent: any;
|
|
39
|
-
color: any;
|
|
40
|
-
succeedColor: any;
|
|
41
|
-
failColor: any;
|
|
42
|
-
spinnerColor: any;
|
|
43
|
-
succeedPrefix: any;
|
|
44
|
-
failPrefix: any;
|
|
45
|
-
name: any;
|
|
46
|
-
};
|
|
47
|
-
update(name: any, options?: {}): any;
|
|
48
|
-
succeed(name: any, options?: {}): any;
|
|
49
|
-
fail(name: any, options?: {}): any;
|
|
50
|
-
remove(name: any): any;
|
|
51
|
-
stopAll(newStatus?: string): {} | undefined;
|
|
52
|
-
hasAnySpinners(): boolean;
|
|
53
|
-
hasActiveSpinners(): boolean;
|
|
54
|
-
setSpinnerProperties(name: any, options: any, status: any): void;
|
|
55
|
-
updateSpinnerState(): void;
|
|
56
|
-
loopStream(): NodeJS.Timeout;
|
|
57
|
-
setStreamOutput(frame?: string): void;
|
|
58
|
-
setRawStreamOutput(): void;
|
|
59
|
-
checkIfActiveSpinners(): void;
|
|
60
|
-
bindSigint(): void;
|
|
61
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
2
3
|
/*
|
|
3
4
|
https://github.com/jbcarpanelli/spinnies
|
|
4
5
|
|
|
@@ -8,6 +9,7 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
8
9
|
|
|
9
10
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
11
|
**/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
13
|
const readline = require('readline');
|
|
12
14
|
const chalk = require('chalk');
|
|
13
15
|
const cliCursor = require('cli-cursor');
|
package/lib/ui/git.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
package/lib/ui/git.js
CHANGED
package/lib/ui/index.d.ts
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
let SORBET: string;
|
|
3
|
-
let MARIGOLD: string;
|
|
4
|
-
let MARIGOLD_DARK: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Returns formatted account name, account type (if applicable), and ID
|
|
8
|
-
*
|
|
9
|
-
* @param {number} accountId
|
|
10
|
-
* @param {boolean} bold
|
|
11
|
-
* @returns {string}
|
|
12
|
-
*/
|
|
13
|
-
export function uiAccountDescription(accountId: number, bold?: boolean): string;
|
|
14
|
-
export function uiCommandReference(command: any): string;
|
|
15
|
-
export function uiBetaTag(message: any, log?: boolean): string | undefined;
|
|
16
|
-
export function uiDeprecatedTag(message: any, log?: boolean): string | undefined;
|
|
17
|
-
export function uiFeatureHighlight(commands: any, title: any): void;
|
|
18
|
-
export function uiInfoSection(title: any, logContent: any): void;
|
|
19
|
-
/**
|
|
20
|
-
* Outputs horizontal line
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
export function uiLine(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a hyperlink or link and description
|
|
27
|
-
*
|
|
28
|
-
* @param {string} linkText
|
|
29
|
-
* @param {string} url
|
|
30
|
-
* @param {object} options
|
|
31
|
-
* @returns {string}
|
|
32
|
-
*/
|
|
33
|
-
export function uiLink(linkText: string, url: string): string;
|
|
34
|
-
export function uiDeprecatedMessage(command: any, url?: undefined, message?: undefined): void;
|
|
35
|
-
export function uiDeprecatedDescription(message: any, command: any, url?: undefined, log?: boolean): string | undefined;
|
|
36
|
-
export function uiCommandDisabledBanner(command: any, url?: undefined, message?: undefined): void;
|
|
1
|
+
export {};
|
package/lib/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function cleanStream(stream: any, rawLines: any): void;
|
|
3
|
-
export function colorOptions({ color, succeedColor, failColor, spinnerColor }: {
|
|
4
|
-
color: any;
|
|
5
|
-
succeedColor: any;
|
|
6
|
-
failColor: any;
|
|
7
|
-
spinnerColor: any;
|
|
8
|
-
}): {
|
|
9
|
-
color: any;
|
|
10
|
-
succeedColor: any;
|
|
11
|
-
failColor: any;
|
|
12
|
-
spinnerColor: any;
|
|
13
|
-
};
|
|
14
|
-
export function getLinesLength(text: any, prefixLength: any): any;
|
|
15
|
-
export function purgeSpinnerOptions(options: any): {
|
|
16
|
-
text: any;
|
|
17
|
-
status: any;
|
|
18
|
-
indent: any;
|
|
19
|
-
color: any;
|
|
20
|
-
succeedColor: any;
|
|
21
|
-
failColor: any;
|
|
22
|
-
spinnerColor: any;
|
|
23
|
-
};
|
|
24
|
-
export function purgeSpinnersOptions({ spinner, disableSpins, ...others }: {
|
|
25
|
-
[x: string]: any;
|
|
26
|
-
spinner: any;
|
|
27
|
-
disableSpins: any;
|
|
28
|
-
}): {
|
|
29
|
-
spinner: any;
|
|
30
|
-
disableSpins: boolean;
|
|
31
|
-
succeedPrefix: any;
|
|
32
|
-
failPrefix: any;
|
|
33
|
-
color: any;
|
|
34
|
-
succeedColor: any;
|
|
35
|
-
failColor: any;
|
|
36
|
-
spinnerColor: any;
|
|
37
|
-
} | {
|
|
38
|
-
spinner: any;
|
|
39
|
-
disableSpins?: undefined;
|
|
40
|
-
succeedPrefix: any;
|
|
41
|
-
failPrefix: any;
|
|
42
|
-
color: any;
|
|
43
|
-
succeedColor: any;
|
|
44
|
-
failColor: any;
|
|
45
|
-
spinnerColor: any;
|
|
46
|
-
};
|
|
47
|
-
export namespace SPINNERS {
|
|
48
|
-
namespace dots {
|
|
49
|
-
let interval: number;
|
|
50
|
-
let frames: string[];
|
|
51
|
-
}
|
|
52
|
-
namespace dashes {
|
|
53
|
-
let interval_1: number;
|
|
54
|
-
export { interval_1 as interval };
|
|
55
|
-
let frames_1: string[];
|
|
56
|
-
export { frames_1 as frames };
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
export function terminalSupportsUnicode(): boolean;
|
|
60
|
-
export function writeStream(stream: any, output: any, rawLines: any): void;
|
|
1
|
+
export {};
|
package/lib/ui/spinniesUtils.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
'use strict';
|
|
2
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const { hasFlag } = require('../hasFlag');
|
|
3
5
|
//See https://github.com/jamestalmage/supports-hyperlinks (License: https://github.com/jamestalmage/supports-hyperlinks/blob/master/license)
|
|
4
6
|
function parseVersion(versionString) {
|
|
5
7
|
if (/^\d{3,4}$/.test(versionString)) {
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
level: any;
|
|
3
|
-
hasBasic: boolean;
|
|
4
|
-
has256: boolean;
|
|
5
|
-
has16m: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare namespace stdout {
|
|
8
|
-
export { level };
|
|
9
|
-
export let hasBasic: boolean;
|
|
10
|
-
export let has256: boolean;
|
|
11
|
-
export let has16m: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare namespace stderr { }
|
|
1
|
+
export {};
|
package/lib/ui/supportsColor.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const process = require('process');
|
|
3
5
|
const os = require('os');
|
|
4
6
|
const tty = require('tty');
|
|
5
|
-
const hasFlag = require('../hasFlag');
|
|
7
|
+
const { hasFlag } = require('../hasFlag');
|
|
6
8
|
const { env } = process;
|
|
7
9
|
//From: https://github.com/chalk/supports-color/blob/main/index.js (License: https://github.com/chalk/supports-color/blob/main/license)
|
|
8
10
|
function translateLevel(level) {
|
package/lib/ui/table.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function getTableHeader(headerItems: any): any;
|
|
1
|
+
export {};
|
package/lib/ui/table.js
CHANGED
package/lib/upload.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
package/lib/upload.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const path = require('path');
|
|
3
5
|
const { walk } = require('@hubspot/local-dev-lib/fs');
|
|
4
6
|
const { createIgnoreFilter } = require('@hubspot/local-dev-lib/ignoreRules');
|
|
5
|
-
const { fieldsJsPrompt } = require('
|
|
7
|
+
const { fieldsJsPrompt } = require('./prompts/cmsFieldPrompt');
|
|
6
8
|
const { isAllowedExtension } = require('@hubspot/local-dev-lib/path');
|
|
7
9
|
const { isConvertableFieldJs, } = require('@hubspot/local-dev-lib/cms/handleFieldsJS');
|
|
8
10
|
const { logError } = require('./errorHandlers/index');
|
|
@@ -29,7 +31,7 @@ const getUploadableFileList = async (src, convertFields) => {
|
|
|
29
31
|
if (!convertFields) {
|
|
30
32
|
return allowedFiles;
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
const uploadableFiles = [];
|
|
33
35
|
let skipFiles = [];
|
|
34
36
|
for (const filePath of allowedFiles) {
|
|
35
37
|
const fileName = path.basename(filePath);
|
package/lib/usageTracking.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function trackHelpUsage(command: any): Promise<void>;
|
|
3
|
-
export function addHelpUsageTracking(program: any, command: any): void;
|
|
4
|
-
export function trackConvertFieldsUsage(command: any): Promise<void>;
|
|
5
|
-
export function trackAuthAction(command: any, authType: any, step: any, accountId: any): Promise<void>;
|
|
6
|
-
export function trackCommandMetadataUsage(command: any, meta: {} | undefined, accountId: any): void;
|
|
1
|
+
export {};
|
package/lib/usageTracking.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const { trackUsage } = require('@hubspot/local-dev-lib/trackUsage');
|
|
3
5
|
const { isTrackingAllowed, getAccountConfig, } = require('@hubspot/local-dev-lib/config');
|
|
4
6
|
const { API_KEY_AUTH_METHOD, } = require('@hubspot/local-dev-lib/constants/auth');
|
|
5
7
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
6
8
|
const { version } = require('../package.json');
|
|
7
|
-
const { getPlatform } = require('./environment');
|
|
8
9
|
const { setLogLevel } = require('./commonOpts');
|
|
9
10
|
/* **
|
|
10
11
|
Available tracking meta properties
|
|
@@ -34,6 +35,16 @@ const getNodeVersionData = () => ({
|
|
|
34
35
|
nodeVersion: process.version,
|
|
35
36
|
nodeMajorVersion: (process.version || '').split('.')[0],
|
|
36
37
|
});
|
|
38
|
+
const getPlatform = () => {
|
|
39
|
+
switch (process.platform) {
|
|
40
|
+
case 'darwin':
|
|
41
|
+
return 'macos';
|
|
42
|
+
case 'win32':
|
|
43
|
+
return 'windows';
|
|
44
|
+
default:
|
|
45
|
+
return process.platform;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
37
48
|
function trackCommandUsage(command, meta = {}, accountId) {
|
|
38
49
|
if (!isTrackingAllowed()) {
|
|
39
50
|
return;
|
package/lib/validation.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {object} command options
|
|
3
|
-
* @returns {boolean}
|
|
4
|
-
*/
|
|
5
|
-
export function validateMode(options: any): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Validate that an account was passed to the command and that the account's configuration is valid
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @param {object} command options
|
|
11
|
-
* @returns {boolean}
|
|
12
|
-
*/
|
|
13
|
-
export function validateAccount(options: any): boolean;
|
|
14
|
-
export function checkAndConvertToJson(_path: any): any;
|
|
15
|
-
export function fileExists(_path: any): boolean;
|
|
16
|
-
export function loadAndValidateOptions(options: any, shouldValidateAccount?: boolean): Promise<void>;
|
|
1
|
+
export {};
|
package/lib/validation.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// @ts-nocheck
|
|
2
4
|
const fs = require('fs');
|
|
3
5
|
const path = require('path');
|
|
4
6
|
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
@@ -10,13 +12,11 @@ const { getOauthManager } = require('@hubspot/local-dev-lib/oauth');
|
|
|
10
12
|
const { accessTokenForPersonalAccessKey, } = require('@hubspot/local-dev-lib/personalAccessKey');
|
|
11
13
|
const { getAbsoluteFilePath, getCwd, getExt, } = require('@hubspot/local-dev-lib/path');
|
|
12
14
|
const { getAccountId, getMode, setLogLevel } = require('./commonOpts');
|
|
13
|
-
const { logDebugInfo } = require('./debugInfo');
|
|
14
15
|
const { EXIT_CODES } = require('./enums/exitCodes');
|
|
15
16
|
const { checkAndWarnGitInclusion } = require('./ui/git');
|
|
16
17
|
const { logError } = require('./errorHandlers/index');
|
|
17
18
|
async function loadAndValidateOptions(options, shouldValidateAccount = true) {
|
|
18
19
|
setLogLevel(options);
|
|
19
|
-
logDebugInfo(options);
|
|
20
20
|
const { config: configPath } = options;
|
|
21
21
|
loadConfig(configPath, options);
|
|
22
22
|
checkAndWarnGitInclusion(getConfigPath());
|