@hubspot/cli 7.5.11-experimental.0 → 7.7.0-experimental.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 +5 -6
- package/bin/hsmcp.d.ts +2 -0
- package/bin/hsmcp.js +13 -0
- package/commands/account/auth.d.ts +3 -7
- package/commands/account/auth.js +19 -9
- package/commands/account/clean.d.ts +3 -7
- package/commands/account/clean.js +16 -9
- package/commands/account/createOverride.d.ts +3 -7
- package/commands/account/createOverride.js +23 -6
- package/commands/account/info.d.ts +3 -7
- package/commands/account/info.js +13 -5
- package/commands/account/list.d.ts +3 -7
- package/commands/account/list.js +15 -8
- package/commands/account/remove.d.ts +3 -7
- package/commands/account/remove.js +21 -9
- package/commands/account/removeOverride.d.ts +3 -7
- package/commands/account/removeOverride.js +23 -6
- package/commands/account/rename.d.ts +3 -7
- package/commands/account/rename.js +16 -9
- package/commands/account/use.d.ts +5 -9
- package/commands/account/use.js +14 -6
- package/commands/account.d.ts +3 -4
- package/commands/account.js +35 -58
- package/commands/app/migrate.d.ts +1 -2
- package/commands/app/migrate.js +7 -8
- package/commands/app/secret/add.d.ts +7 -0
- package/commands/app/secret/add.js +64 -0
- package/commands/app/secret/delete.d.ts +8 -0
- package/commands/app/secret/delete.js +87 -0
- package/commands/app/secret/list.d.ts +6 -0
- package/commands/app/secret/list.js +64 -0
- package/commands/app/secret/update.d.ts +7 -0
- package/commands/app/secret/update.js +77 -0
- package/commands/app/secret.d.ts +3 -0
- package/commands/app/secret.js +30 -0
- package/commands/app.d.ts +2 -5
- package/commands/app.js +12 -8
- package/commands/auth.d.ts +3 -7
- package/commands/auth.js +12 -5
- package/commands/cms/convertFields.d.ts +7 -1
- package/commands/cms/convertFields.js +57 -41
- package/commands/cms/getReactModule.d.ts +7 -1
- package/commands/cms/getReactModule.js +52 -34
- package/commands/cms/lighthouseScore.d.ts +8 -1
- package/commands/cms/lighthouseScore.js +129 -100
- package/commands/cms.d.ts +3 -1
- package/commands/cms.js +24 -15
- package/commands/completion.d.ts +3 -1
- package/commands/completion.js +25 -12
- package/commands/config/migrate.d.ts +3 -7
- package/commands/config/migrate.js +25 -15
- package/commands/config/set.d.ts +5 -6
- package/commands/config/set.js +38 -14
- package/commands/config.d.ts +3 -4
- package/commands/config.js +20 -44
- package/commands/create/api-sample.d.ts +3 -1
- package/commands/create/api-sample.js +34 -38
- package/commands/create/app.d.ts +3 -1
- package/commands/create/app.js +9 -7
- package/commands/create/function.d.ts +3 -1
- package/commands/create/function.js +11 -10
- package/commands/create/index.d.ts +5 -1
- package/commands/create/index.js +23 -11
- package/commands/create/module.d.ts +3 -1
- package/commands/create/module.js +14 -13
- package/commands/create/react-app.d.ts +3 -1
- package/commands/create/react-app.js +10 -7
- package/commands/create/template.d.ts +3 -1
- package/commands/create/template.js +14 -14
- package/commands/create/vue-app.d.ts +3 -1
- package/commands/create/vue-app.js +10 -7
- package/commands/create/webpack-serverless.d.ts +3 -1
- package/commands/create/webpack-serverless.js +10 -7
- package/commands/create/website-theme.d.ts +3 -1
- package/commands/create/website-theme.js +10 -9
- package/commands/create.d.ts +4 -24
- package/commands/create.js +64 -74
- package/commands/customObject/create.d.ts +4 -9
- package/commands/customObject/create.js +17 -10
- package/commands/customObject/schema/create.d.ts +4 -9
- package/commands/customObject/schema/create.js +18 -11
- package/commands/customObject/schema/delete.d.ts +4 -9
- package/commands/customObject/schema/delete.js +17 -10
- package/commands/customObject/schema/fetch-all.d.ts +4 -9
- package/commands/customObject/schema/fetch-all.js +17 -10
- package/commands/customObject/schema/fetch.d.ts +4 -9
- package/commands/customObject/schema/fetch.js +17 -10
- package/commands/customObject/schema/list.d.ts +4 -8
- package/commands/customObject/schema/list.js +17 -10
- package/commands/customObject/schema/update.d.ts +4 -9
- package/commands/customObject/schema/update.js +18 -11
- package/commands/customObject/schema.d.ts +3 -5
- package/commands/customObject/schema.js +27 -54
- package/commands/customObject.d.ts +3 -4
- package/commands/customObject.js +20 -45
- package/commands/doctor.d.ts +6 -8
- package/commands/doctor.js +32 -21
- package/commands/feedback.d.ts +4 -1
- package/commands/feedback.js +40 -47
- package/commands/fetch.d.ts +12 -1
- package/commands/fetch.js +49 -33
- package/commands/filemanager/fetch.d.ts +4 -9
- package/commands/filemanager/fetch.js +18 -11
- package/commands/filemanager/upload.d.ts +4 -9
- package/commands/filemanager/upload.js +17 -11
- package/commands/filemanager.d.ts +3 -4
- package/commands/filemanager.js +20 -41
- package/commands/function/deploy.d.ts +6 -1
- package/commands/function/deploy.js +70 -50
- package/commands/function/list.d.ts +6 -1
- package/commands/function/list.js +44 -32
- package/commands/function/server.d.ts +10 -1
- package/commands/function/server.js +49 -38
- package/commands/function.d.ts +5 -1
- package/commands/function.js +24 -10
- package/commands/hubdb/clear.d.ts +4 -9
- package/commands/hubdb/clear.js +17 -10
- package/commands/hubdb/create.d.ts +4 -9
- package/commands/hubdb/create.js +17 -10
- package/commands/hubdb/delete.d.ts +4 -9
- package/commands/hubdb/delete.js +17 -10
- package/commands/hubdb/fetch.d.ts +4 -9
- package/commands/hubdb/fetch.js +17 -10
- package/commands/hubdb.d.ts +3 -2
- package/commands/hubdb.js +23 -45
- package/commands/init.d.ts +3 -7
- package/commands/init.js +12 -5
- package/commands/lint.d.ts +6 -4
- package/commands/lint.js +44 -43
- package/commands/list.d.ts +3 -7
- package/commands/list.js +19 -11
- package/commands/logs.d.ts +10 -1
- package/commands/logs.js +53 -44
- package/commands/module/marketplace-validate.d.ts +6 -1
- package/commands/module/marketplace-validate.js +39 -27
- package/commands/module.d.ts +3 -1
- package/commands/module.js +22 -10
- package/commands/mv.d.ts +3 -7
- package/commands/mv.js +19 -11
- package/commands/open.d.ts +3 -7
- package/commands/open.js +19 -11
- package/commands/project/cloneApp.d.ts +1 -1
- package/commands/project/cloneApp.js +2 -2
- package/commands/project/create.js +3 -3
- package/commands/project/deploy.d.ts +1 -0
- package/commands/project/deploy.js +40 -12
- package/commands/project/dev/index.d.ts +1 -4
- package/commands/project/dev/index.js +48 -16
- package/commands/project/dev/unifiedFlow.d.ts +2 -1
- package/commands/project/dev/unifiedFlow.js +85 -30
- package/commands/project/migrate.d.ts +1 -0
- package/commands/project/profile/add.d.ts +7 -0
- package/commands/project/profile/add.js +209 -0
- package/commands/project/profile/delete.d.ts +6 -0
- package/commands/project/profile/delete.js +123 -0
- package/commands/project/profile.d.ts +3 -0
- package/commands/project/profile.js +25 -0
- package/commands/project/upload.d.ts +1 -0
- package/commands/project/upload.js +38 -8
- package/commands/project/validate.d.ts +4 -0
- package/commands/project/validate.js +53 -0
- package/commands/project.js +4 -0
- package/commands/remove.d.ts +3 -7
- package/commands/remove.js +19 -11
- package/commands/sandbox/create.d.ts +4 -9
- package/commands/sandbox/create.js +18 -11
- package/commands/sandbox/delete.d.ts +4 -9
- package/commands/sandbox/delete.js +18 -11
- package/commands/sandbox.d.ts +3 -4
- package/commands/sandbox.js +20 -43
- package/commands/secret/addSecret.d.ts +4 -9
- package/commands/secret/addSecret.js +17 -10
- package/commands/secret/deleteSecret.d.ts +4 -9
- package/commands/secret/deleteSecret.js +17 -10
- package/commands/secret/listSecret.d.ts +4 -9
- package/commands/secret/listSecret.js +17 -10
- package/commands/secret/updateSecret.d.ts +4 -9
- package/commands/secret/updateSecret.js +17 -10
- package/commands/secret.d.ts +3 -4
- package/commands/secret.js +25 -48
- package/commands/setupMcp.d.ts +8 -0
- package/commands/setupMcp.js +229 -0
- package/commands/theme/generate-selectors.d.ts +3 -7
- package/commands/theme/generate-selectors.js +14 -6
- package/commands/theme/marketplace-validate.d.ts +4 -9
- package/commands/theme/marketplace-validate.js +17 -10
- package/commands/theme/preview.d.ts +4 -9
- package/commands/theme/preview.js +16 -9
- package/commands/theme.d.ts +3 -4
- package/commands/theme.js +23 -46
- package/commands/upload.d.ts +12 -1
- package/commands/upload.js +118 -97
- package/commands/watch.d.ts +14 -1
- package/commands/watch.js +76 -65
- package/lang/en.d.ts +838 -574
- package/lang/en.js +630 -373
- package/lang/en.lyaml +30 -23
- package/lib/accountTypes.js +2 -1
- package/lib/app/migrate.d.ts +23 -0
- package/lib/app/migrate.js +14 -3
- package/lib/app/migrate_legacy.js +7 -7
- package/lib/app/urls.d.ts +16 -0
- package/lib/app/urls.js +16 -0
- package/lib/configMigrate.js +24 -10
- package/lib/configOptions.d.ts +4 -0
- package/lib/configOptions.js +41 -46
- package/lib/constants.d.ts +6 -0
- package/lib/constants.js +7 -1
- package/lib/dependencyManagement.d.ts +0 -5
- package/lib/dependencyManagement.js +13 -39
- package/lib/doctor/Doctor.js +2 -1
- package/lib/filesystem.d.ts +1 -1
- package/lib/interpolation.d.ts +2 -3
- package/lib/lang.d.ts +2 -3
- package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
- package/lib/middleware/autoUpdateMiddleware.js +89 -0
- package/lib/middleware/configMiddleware.js +8 -0
- package/lib/npm.d.ts +9 -0
- package/lib/npm.js +36 -0
- package/lib/projectProfiles.d.ts +6 -0
- package/lib/projectProfiles.js +65 -0
- package/lib/projects/buildAndDeploy.js +17 -2
- package/lib/projects/localDev/AppDevModeInterface.d.ts +26 -0
- package/lib/projects/localDev/AppDevModeInterface.js +156 -0
- package/lib/projects/localDev/DevServerManagerV2.d.ts +11 -22
- package/lib/projects/localDev/DevServerManagerV2.js +19 -15
- package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
- package/lib/projects/localDev/LocalDevLogger.js +158 -0
- package/lib/projects/localDev/LocalDevManager.js +12 -5
- package/lib/projects/localDev/LocalDevProcess.d.ts +27 -0
- package/lib/projects/localDev/LocalDevProcess.js +171 -0
- package/lib/projects/localDev/LocalDevState.d.ts +37 -0
- package/lib/projects/localDev/LocalDevState.js +78 -0
- package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
- package/lib/projects/localDev/LocalDevWatcher.js +56 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +17 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.js +92 -0
- package/lib/projects/localDev/helpers.d.ts +3 -2
- package/lib/projects/localDev/helpers.js +32 -2
- package/lib/projects/upload.d.ts +2 -1
- package/lib/projects/upload.js +2 -2
- package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
- package/lib/prompts/createTemplatePrompt.d.ts +22 -4
- package/lib/prompts/installAppPrompt.d.ts +1 -0
- package/lib/prompts/installAppPrompt.js +35 -0
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +6 -6
- package/lib/prompts/promptUtils.d.ts +2 -1
- package/lib/prompts/promptUtils.js +2 -1
- package/lib/prompts/selectAppPrompt.d.ts +2 -0
- package/lib/prompts/selectAppPrompt.js +40 -0
- package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
- package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -8
- package/lib/testUtils.d.ts +3 -3
- package/lib/testUtils.js +8 -9
- package/lib/ui/index.js +4 -1
- package/lib/upload.d.ts +1 -1
- package/lib/validation.js +4 -5
- package/lib/yargsUtils.d.ts +4 -0
- package/lib/yargsUtils.js +6 -0
- package/mcp-server/index.d.ts +1 -0
- package/mcp-server/index.js +17 -0
- package/mcp-server/mcpLoader.d.ts +5 -0
- package/mcp-server/mcpLoader.js +24 -0
- package/mcp-server/tools/ExplainProjectStructureTool.d.ts +33 -0
- package/mcp-server/tools/ExplainProjectStructureTool.js +266 -0
- package/mcp-server/tools/GenerateAppComponentTool.d.ts +99 -0
- package/mcp-server/tools/GenerateAppComponentTool.js +193 -0
- package/mcp-server/tools/GenerateCardComponentTool.d.ts +74 -0
- package/mcp-server/tools/GenerateCardComponentTool.js +146 -0
- package/mcp-server/tools/GenerateProjectConfigTool.d.ts +32 -0
- package/mcp-server/tools/GenerateProjectConfigTool.js +40 -0
- package/mcp-server/tools/HubSpotCLIHelper.d.ts +16 -0
- package/mcp-server/tools/HubSpotCLIHelper.js +74 -0
- package/mcp-server/tools/UploadProjectTool.d.ts +44 -0
- package/mcp-server/tools/UploadProjectTool.js +149 -0
- package/mcp-server/tools/ValidateProjectTool.d.ts +62 -0
- package/mcp-server/tools/ValidateProjectTool.js +315 -0
- package/package.json +13 -6
- package/types/Cms.d.ts +30 -0
- package/types/Cms.js +2 -0
- package/types/LocalDev.d.ts +24 -0
- package/types/LocalDev.js +2 -0
- package/types/Prompts.d.ts +0 -7
- package/types/Yargs.d.ts +8 -1
- package/lib/projects/localDev/LocalDevManagerV2.d.ts +0 -64
- package/lib/projects/localDev/LocalDevManagerV2.js +0 -345
- package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
- package/lib/prompts/installPublicAppPrompt.js +0 -41
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const command = "update [name]";
|
|
4
|
-
export declare const describe: string;
|
|
5
|
-
type CombinedArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & TestingArgs;
|
|
6
|
-
type SchemaUpdateArgs = CombinedArgs & {
|
|
1
|
+
import { CommonArgs, ConfigArgs, AccountArgs, EnvironmentArgs, TestingArgs, YargsCommandModule } from '../../../types/Yargs';
|
|
2
|
+
type SchemaUpdateArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & TestingArgs & {
|
|
7
3
|
name?: string;
|
|
8
4
|
path: string;
|
|
9
5
|
};
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
export {};
|
|
6
|
+
declare const schemaUpdateCommand: YargsCommandModule<unknown, SchemaUpdateArgs>;
|
|
7
|
+
export default schemaUpdateCommand;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.describe = exports.command = void 0;
|
|
4
|
-
exports.handler = handler;
|
|
5
|
-
exports.builder = builder;
|
|
6
3
|
const customObjects_1 = require("@hubspot/local-dev-lib/api/customObjects");
|
|
7
4
|
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
8
5
|
const path_1 = require("@hubspot/local-dev-lib/path");
|
|
@@ -13,12 +10,12 @@ const promptUtils_1 = require("../../../lib/prompts/promptUtils");
|
|
|
13
10
|
const index_1 = require("../../../lib/errorHandlers/index");
|
|
14
11
|
const validation_1 = require("../../../lib/validation");
|
|
15
12
|
const usageTracking_1 = require("../../../lib/usageTracking");
|
|
16
|
-
const commonOpts_1 = require("../../../lib/commonOpts");
|
|
17
13
|
const lang_1 = require("../../../lib/lang");
|
|
18
14
|
const exitCodes_1 = require("../../../lib/enums/exitCodes");
|
|
19
15
|
const customObject_1 = require("../../../lib/customObject");
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const yargsUtils_1 = require("../../../lib/yargsUtils");
|
|
17
|
+
const command = 'update [name]';
|
|
18
|
+
const describe = (0, lang_1.i18n)(`commands.customObject.subcommands.schema.subcommands.update.describe`);
|
|
22
19
|
async function handler(args) {
|
|
23
20
|
const { path, name: providedName, derivedAccountId } = args;
|
|
24
21
|
(0, usageTracking_1.trackCommandUsage)('custom-object-schema-update', {}, derivedAccountId);
|
|
@@ -50,11 +47,7 @@ async function handler(args) {
|
|
|
50
47
|
}));
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
|
-
function
|
|
54
|
-
(0, commonOpts_1.addConfigOptions)(yargs);
|
|
55
|
-
(0, commonOpts_1.addAccountOptions)(yargs);
|
|
56
|
-
(0, commonOpts_1.addUseEnvironmentOptions)(yargs);
|
|
57
|
-
(0, commonOpts_1.addTestingOptions)(yargs);
|
|
50
|
+
function schemaUpdateBuilder(yargs) {
|
|
58
51
|
yargs
|
|
59
52
|
.positional('name', {
|
|
60
53
|
describe: (0, lang_1.i18n)(`commands.customObject.subcommands.schema.subcommands.update.positionals.name.describe`),
|
|
@@ -67,3 +60,17 @@ function builder(yargs) {
|
|
|
67
60
|
});
|
|
68
61
|
return yargs;
|
|
69
62
|
}
|
|
63
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(schemaUpdateBuilder, command, describe, {
|
|
64
|
+
useGlobalOptions: true,
|
|
65
|
+
useConfigOptions: true,
|
|
66
|
+
useAccountOptions: true,
|
|
67
|
+
useEnvironmentOptions: true,
|
|
68
|
+
useTestingOptions: true,
|
|
69
|
+
});
|
|
70
|
+
const schemaUpdateCommand = {
|
|
71
|
+
command,
|
|
72
|
+
describe,
|
|
73
|
+
handler,
|
|
74
|
+
builder,
|
|
75
|
+
};
|
|
76
|
+
exports.default = schemaUpdateCommand;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare function handler(): void;
|
|
5
|
-
export declare function builder(yargs: Argv): Argv;
|
|
1
|
+
import { YargsCommandModuleBucket } from '../../types/Yargs';
|
|
2
|
+
declare const customObjectSchemaCommand: YargsCommandModuleBucket;
|
|
3
|
+
export default customObjectSchemaCommand;
|
|
@@ -1,61 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
35
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const deleteCommand = __importStar(require("./schema/delete"));
|
|
43
|
-
const listCommand = __importStar(require("./schema/list"));
|
|
44
|
-
const updateSchema = __importStar(require("./schema/update"));
|
|
6
|
+
const create_1 = __importDefault(require("./schema/create"));
|
|
7
|
+
const fetch_1 = __importDefault(require("./schema/fetch"));
|
|
8
|
+
const fetch_all_1 = __importDefault(require("./schema/fetch-all"));
|
|
9
|
+
const delete_1 = __importDefault(require("./schema/delete"));
|
|
10
|
+
const list_1 = __importDefault(require("./schema/list"));
|
|
11
|
+
const update_1 = __importDefault(require("./schema/update"));
|
|
45
12
|
const lang_1 = require("../../lib/lang");
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
function builder(yargs) {
|
|
13
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
14
|
+
const command = ['schema', 'schemas'];
|
|
15
|
+
const describe = (0, lang_1.i18n)(`commands.customObject.subcommands.schema.describe`);
|
|
16
|
+
function customObjectSchemaBuilder(yargs) {
|
|
52
17
|
yargs
|
|
53
|
-
.command(
|
|
54
|
-
.command(
|
|
55
|
-
.command(
|
|
56
|
-
.command(
|
|
57
|
-
.command(
|
|
58
|
-
.command(
|
|
18
|
+
.command(list_1.default)
|
|
19
|
+
.command(fetch_1.default)
|
|
20
|
+
.command(fetch_all_1.default)
|
|
21
|
+
.command(create_1.default)
|
|
22
|
+
.command(update_1.default)
|
|
23
|
+
.command(delete_1.default)
|
|
59
24
|
.demandCommand(1, '');
|
|
60
25
|
return yargs;
|
|
61
26
|
}
|
|
27
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(customObjectSchemaBuilder, command, describe);
|
|
28
|
+
const customObjectSchemaCommand = {
|
|
29
|
+
command,
|
|
30
|
+
describe,
|
|
31
|
+
builder,
|
|
32
|
+
handler: () => { },
|
|
33
|
+
};
|
|
34
|
+
exports.default = customObjectSchemaCommand;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare function builder(yargs: Argv): Argv;
|
|
1
|
+
import { YargsCommandModuleBucket } from '../types/Yargs';
|
|
2
|
+
declare const customObjectCommand: YargsCommandModuleBucket;
|
|
3
|
+
export default customObjectCommand;
|
package/commands/customObject.js
CHANGED
|
@@ -1,58 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
35
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const commonOpts_1 = require("../lib/commonOpts");
|
|
39
|
-
const schemaCommand = __importStar(require("./customObject/schema"));
|
|
40
|
-
const createCommand = __importStar(require("./customObject/create"));
|
|
6
|
+
const schema_1 = __importDefault(require("./customObject/schema"));
|
|
7
|
+
const create_1 = __importDefault(require("./customObject/create"));
|
|
41
8
|
const lang_1 = require("../lib/lang");
|
|
42
9
|
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
43
10
|
const ui_1 = require("../lib/ui");
|
|
44
|
-
|
|
45
|
-
|
|
11
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
12
|
+
const command = ['custom-object', 'custom-objects', 'co'];
|
|
13
|
+
const describe = (0, ui_1.uiBetaTag)((0, lang_1.i18n)(`commands.customObject.describe`), false);
|
|
46
14
|
function logBetaMessage() {
|
|
47
15
|
(0, ui_1.uiBetaTag)((0, lang_1.i18n)(`commands.customObject.betaMessage`));
|
|
48
16
|
logger_1.logger.log((0, ui_1.uiLink)((0, lang_1.i18n)(`commands.customObject.seeMoreLink`), 'https://developers.hubspot.com/docs/api/crm/crm-custom-objects'));
|
|
49
17
|
logger_1.logger.log();
|
|
50
18
|
}
|
|
51
|
-
function
|
|
52
|
-
(0, commonOpts_1.addGlobalOptions)(yargs);
|
|
19
|
+
function customObjectBuilder(yargs) {
|
|
53
20
|
yargs.middleware([logBetaMessage]);
|
|
54
|
-
yargs.command(
|
|
55
|
-
yargs.command(createCommand);
|
|
56
|
-
yargs.demandCommand(1, '');
|
|
21
|
+
yargs.command(schema_1.default).command(create_1.default).demandCommand(1, '');
|
|
57
22
|
return yargs;
|
|
58
23
|
}
|
|
24
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(customObjectBuilder, command, describe);
|
|
25
|
+
const customObjectCommand = {
|
|
26
|
+
command,
|
|
27
|
+
describe,
|
|
28
|
+
builder,
|
|
29
|
+
handler: () => { },
|
|
30
|
+
};
|
|
31
|
+
exports.default = customObjectCommand;
|
|
32
|
+
// TODO Remove this legacy export once we've migrated all commands to TS
|
|
33
|
+
module.exports = customObjectCommand;
|
package/commands/doctor.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export declare const handler: ({ outputDir, }: ArgumentsCamelCase<DoctorOptions>) => Promise<never>;
|
|
8
|
-
export declare const builder: BuilderCallback<DoctorOptions, DoctorOptions>;
|
|
1
|
+
import { CommonArgs, YargsCommandModule } from '../types/Yargs';
|
|
2
|
+
export type DoctorArgs = CommonArgs & {
|
|
3
|
+
outputDir?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const doctorCommand: YargsCommandModule<unknown, DoctorArgs>;
|
|
6
|
+
export default doctorCommand;
|
package/commands/doctor.js
CHANGED
|
@@ -3,46 +3,47 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const usageTracking_1 = require("../lib/usageTracking");
|
|
8
9
|
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
9
|
-
const fs_1 = __importDefault(require("fs"));
|
|
10
10
|
const Doctor_1 = require("../lib/doctor/Doctor");
|
|
11
11
|
const exitCodes_1 = require("../lib/enums/exitCodes");
|
|
12
|
-
const path_1 = __importDefault(require("path"));
|
|
13
12
|
const path_2 = require("@hubspot/local-dev-lib/path");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const handler = async (
|
|
13
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
14
|
+
const lang_1 = require("../lib/lang");
|
|
15
|
+
const command = 'doctor';
|
|
16
|
+
const describe = (0, lang_1.i18n)(`commands.doctor.describe`);
|
|
17
|
+
const handler = async (args) => {
|
|
18
|
+
const { outputDir } = args;
|
|
19
19
|
const doctor = new Doctor_1.Doctor();
|
|
20
|
-
(0, usageTracking_1.trackCommandUsage)(
|
|
20
|
+
(0, usageTracking_1.trackCommandUsage)(command, undefined, doctor.accountId || undefined);
|
|
21
21
|
const output = await doctor.diagnose();
|
|
22
22
|
const totalCount = (output?.errorCount || 0) + (output?.warningCount || 0);
|
|
23
23
|
if (totalCount > 0) {
|
|
24
|
-
(0, usageTracking_1.trackCommandMetadataUsage)(
|
|
24
|
+
(0, usageTracking_1.trackCommandMetadataUsage)(command, { successful: false, type: totalCount }, doctor.accountId || undefined);
|
|
25
25
|
}
|
|
26
26
|
if (!outputDir) {
|
|
27
27
|
if (output?.diagnosis) {
|
|
28
28
|
logger_1.logger.log(output.diagnosis);
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
logger_1.logger.error(i18n(`commands.doctor.errors.generatingDiagnosis`));
|
|
31
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.doctor.errors.generatingDiagnosis`));
|
|
32
32
|
return process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
33
33
|
}
|
|
34
34
|
return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
let outputDirPath = outputDir;
|
|
37
|
+
if (!path_1.default.isAbsolute(outputDirPath)) {
|
|
38
|
+
outputDirPath = path_1.default.join((0, path_2.getCwd)(), outputDirPath);
|
|
38
39
|
}
|
|
39
|
-
const outputFile = path_1.default.join(
|
|
40
|
+
const outputFile = path_1.default.join(outputDirPath, `hubspot-doctor-${new Date().toISOString()}.json`);
|
|
40
41
|
try {
|
|
41
42
|
fs_1.default.writeFileSync(outputFile, JSON.stringify(output, null, 4));
|
|
42
|
-
logger_1.logger.success(i18n(`commands.doctor.outputWritten`, { filename: outputFile }));
|
|
43
|
+
logger_1.logger.success((0, lang_1.i18n)(`commands.doctor.outputWritten`, { filename: outputFile }));
|
|
43
44
|
}
|
|
44
45
|
catch (e) {
|
|
45
|
-
logger_1.logger.error(i18n(`commands.doctor.errors.unableToWriteOutputFile`, {
|
|
46
|
+
logger_1.logger.error((0, lang_1.i18n)(`commands.doctor.errors.unableToWriteOutputFile`, {
|
|
46
47
|
file: outputFile,
|
|
47
48
|
errorMessage: e instanceof Error ? e.message : e,
|
|
48
49
|
}));
|
|
@@ -50,12 +51,22 @@ const handler = async ({ outputDir, }) => {
|
|
|
50
51
|
}
|
|
51
52
|
return process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
-
const builder = yargs => {
|
|
54
|
+
function doctorBuilder(yargs) {
|
|
55
55
|
yargs.option('output-dir', {
|
|
56
|
-
describe: i18n(`commands.doctor.options.outputDir`),
|
|
56
|
+
describe: (0, lang_1.i18n)(`commands.doctor.options.outputDir`),
|
|
57
57
|
type: 'string',
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
return yargs;
|
|
60
|
+
}
|
|
61
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(doctorBuilder, command, describe, {
|
|
62
|
+
useGlobalOptions: true,
|
|
63
|
+
});
|
|
64
|
+
const doctorCommand = {
|
|
65
|
+
command,
|
|
66
|
+
describe,
|
|
67
|
+
handler,
|
|
68
|
+
builder,
|
|
60
69
|
};
|
|
61
|
-
exports.
|
|
70
|
+
exports.default = doctorCommand;
|
|
71
|
+
// TODO Remove this after cli.ts is ported to TS
|
|
72
|
+
module.exports = doctorCommand;
|
package/commands/feedback.d.ts
CHANGED
package/commands/feedback.js
CHANGED
|
@@ -1,51 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const open = require('open');
|
|
5
|
-
const { i18n } = require('../lib/lang');
|
|
6
|
-
const { logger } = require('@hubspot/local-dev-lib/logger');
|
|
7
|
-
const { confirmPrompt, listPrompt } = require('../lib/prompts/promptUtils');
|
|
8
|
-
const { addGlobalOptions } = require('../lib/commonOpts');
|
|
9
|
-
const FEEDBACK_OPTIONS = {
|
|
10
|
-
BUG: 'bug',
|
|
11
|
-
GENERAL: 'general',
|
|
12
|
-
};
|
|
13
|
-
const FEEDBACK_URLS = {
|
|
14
|
-
BUG: 'https://github.com/HubSpot/hubspot-cli/issues/new',
|
|
15
|
-
GENERAL: 'https://docs.google.com/forms/d/e/1FAIpQLSejZZewYzuH3oKBU01tseX-cSWOUsTHLTr-YsiMGpzwcvgIMg/viewform?usp=sf_link',
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
4
|
};
|
|
17
|
-
exports
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const shouldOpen = await confirmPrompt(i18n(`commands.project.subcommands.feedback.openPrompt`)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
open(url, { url: true });
|
|
36
|
-
logger.success(i18n(`commands.project.subcommands.feedback.success`, { url }));
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const open_1 = __importDefault(require("open"));
|
|
7
|
+
const lang_1 = require("../lib/lang");
|
|
8
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
9
|
+
const promptUtils_1 = require("../lib/prompts/promptUtils");
|
|
10
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
11
|
+
const exitCodes_1 = require("../lib/enums/exitCodes");
|
|
12
|
+
const ui_1 = require("../lib/ui");
|
|
13
|
+
const FEEDBACK_URL = 'https://developers.hubspot.com/feedback';
|
|
14
|
+
const command = 'feedback';
|
|
15
|
+
const describe = (0, lang_1.i18n)(`commands.project.subcommands.feedback.describe`);
|
|
16
|
+
async function handler() {
|
|
17
|
+
const shouldOpen = await (0, promptUtils_1.confirmPrompt)((0, lang_1.i18n)(`commands.project.subcommands.feedback.openPrompt`));
|
|
18
|
+
if (!shouldOpen) {
|
|
19
|
+
logger_1.logger.log((0, lang_1.i18n)(`commands.project.subcommands.feedback.error`, {
|
|
20
|
+
url: (0, ui_1.uiLink)('the developer feedback form', FEEDBACK_URL),
|
|
21
|
+
}));
|
|
22
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
37
23
|
}
|
|
24
|
+
(0, open_1.default)(FEEDBACK_URL, { url: true });
|
|
25
|
+
logger_1.logger.success((0, lang_1.i18n)(`commands.project.subcommands.feedback.success`, {
|
|
26
|
+
url: (0, ui_1.uiLink)('the developer feedback form', FEEDBACK_URL),
|
|
27
|
+
}));
|
|
28
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
29
|
+
}
|
|
30
|
+
function feedbackBuilder(yargs) {
|
|
31
|
+
return yargs;
|
|
32
|
+
}
|
|
33
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(feedbackBuilder, command, describe, {
|
|
34
|
+
useGlobalOptions: true,
|
|
35
|
+
});
|
|
36
|
+
const feedbackCommand = {
|
|
37
|
+
command,
|
|
38
|
+
describe,
|
|
39
|
+
handler,
|
|
40
|
+
builder,
|
|
38
41
|
};
|
|
39
|
-
exports.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
describe: i18n(`commands.project.subcommands.feedback.options.bug.describe`),
|
|
43
|
-
type: 'boolean',
|
|
44
|
-
},
|
|
45
|
-
general: {
|
|
46
|
-
describe: i18n(`commands.project.subcommands.feedback.options.general.describe`),
|
|
47
|
-
type: 'boolean',
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
addGlobalOptions(yargs);
|
|
51
|
-
};
|
|
42
|
+
exports.default = feedbackCommand;
|
|
43
|
+
// TODO remove this after cli.ts is ported to TS
|
|
44
|
+
module.exports = feedbackCommand;
|
package/commands/fetch.d.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { CmsPublishMode } from '@hubspot/local-dev-lib/types/Files';
|
|
2
|
+
import { AccountArgs, CommonArgs, ConfigArgs, EnvironmentArgs, YargsCommandModule } from '../types/Yargs';
|
|
3
|
+
type FetchCommandArgs = {
|
|
4
|
+
src: string;
|
|
5
|
+
dest?: string;
|
|
6
|
+
cmsPublishMode?: CmsPublishMode;
|
|
7
|
+
staging?: boolean;
|
|
8
|
+
assetVersion?: number;
|
|
9
|
+
overwrite?: boolean;
|
|
10
|
+
} & ConfigArgs & AccountArgs & EnvironmentArgs & CommonArgs;
|
|
11
|
+
declare const fetchCommand: YargsCommandModule<unknown, FetchCommandArgs>;
|
|
12
|
+
export default fetchCommand;
|
package/commands/fetch.js
CHANGED
|
@@ -1,50 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
const fileMapper_1 = require("@hubspot/local-dev-lib/fileMapper");
|
|
4
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
5
|
+
const commonOpts_1 = require("../lib/commonOpts");
|
|
6
|
+
const filesystem_1 = require("../lib/filesystem");
|
|
7
|
+
const validation_1 = require("../lib/validation");
|
|
8
|
+
const usageTracking_1 = require("../lib/usageTracking");
|
|
9
|
+
const lang_1 = require("../lib/lang");
|
|
10
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
11
|
+
const exitCodes_1 = require("../lib/enums/exitCodes");
|
|
12
|
+
const index_1 = require("../lib/errorHandlers/index");
|
|
13
|
+
const command = 'fetch <src> [dest]';
|
|
14
|
+
const describe = (0, lang_1.i18n)('commands.fetch.describe');
|
|
15
|
+
const handler = async (options) => {
|
|
16
16
|
const { src, dest } = options;
|
|
17
|
-
if (!validateCmsPublishMode(options)) {
|
|
18
|
-
process.exit(EXIT_CODES.ERROR);
|
|
17
|
+
if (!(0, validation_1.validateCmsPublishMode)(options)) {
|
|
18
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
19
19
|
}
|
|
20
20
|
if (typeof src !== 'string') {
|
|
21
|
-
logger.error(i18n('commands.fetch.errors.sourceRequired'));
|
|
22
|
-
process.exit(EXIT_CODES.ERROR);
|
|
21
|
+
logger_1.logger.error((0, lang_1.i18n)('commands.fetch.errors.sourceRequired'));
|
|
22
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
23
23
|
}
|
|
24
24
|
const { derivedAccountId } = options;
|
|
25
|
-
const cmsPublishMode = getCmsPublishMode(options);
|
|
26
|
-
trackCommandUsage('fetch', { mode: cmsPublishMode }, derivedAccountId);
|
|
25
|
+
const cmsPublishMode = (0, commonOpts_1.getCmsPublishMode)(options);
|
|
26
|
+
(0, usageTracking_1.trackCommandUsage)('fetch', { mode: cmsPublishMode }, derivedAccountId);
|
|
27
|
+
const { assetVersion, staging, overwrite } = options;
|
|
27
28
|
try {
|
|
28
29
|
// Fetch and write file/folder.
|
|
29
|
-
await downloadFileOrFolder(derivedAccountId, src, resolveLocalPath(dest), cmsPublishMode,
|
|
30
|
+
await (0, fileMapper_1.downloadFileOrFolder)(derivedAccountId, src, (0, filesystem_1.resolveLocalPath)(dest), cmsPublishMode, {
|
|
31
|
+
assetVersion: assetVersion !== undefined ? `${assetVersion}` : assetVersion,
|
|
32
|
+
staging,
|
|
33
|
+
overwrite,
|
|
34
|
+
});
|
|
30
35
|
}
|
|
31
36
|
catch (err) {
|
|
32
|
-
logError(err);
|
|
33
|
-
process.exit(EXIT_CODES.ERROR);
|
|
37
|
+
(0, index_1.logError)(err);
|
|
38
|
+
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
34
39
|
}
|
|
35
40
|
};
|
|
36
|
-
|
|
41
|
+
const fetchBuilder = (yargs) => {
|
|
37
42
|
yargs.positional('src', {
|
|
38
|
-
describe: i18n('commands.fetch.positionals.src.describe'),
|
|
43
|
+
describe: (0, lang_1.i18n)('commands.fetch.positionals.src.describe'),
|
|
39
44
|
type: 'string',
|
|
40
45
|
});
|
|
41
46
|
yargs.positional('dest', {
|
|
42
|
-
describe: i18n('commands.fetch.positionals.dest.describe'),
|
|
47
|
+
describe: (0, lang_1.i18n)('commands.fetch.positionals.dest.describe'),
|
|
43
48
|
type: 'string',
|
|
44
49
|
});
|
|
45
50
|
yargs.options({
|
|
46
51
|
staging: {
|
|
47
|
-
describe: i18n('commands.fetch.options.staging.describe'),
|
|
52
|
+
describe: (0, lang_1.i18n)('commands.fetch.options.staging.describe'),
|
|
48
53
|
type: 'boolean',
|
|
49
54
|
default: false,
|
|
50
55
|
hidden: true,
|
|
@@ -53,14 +58,25 @@ exports.builder = yargs => {
|
|
|
53
58
|
yargs.options({
|
|
54
59
|
assetVersion: {
|
|
55
60
|
type: 'number',
|
|
56
|
-
describe: i18n('commands.fetch.options.assetVersion.describe'),
|
|
61
|
+
describe: (0, lang_1.i18n)('commands.fetch.options.assetVersion.describe'),
|
|
57
62
|
},
|
|
58
63
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
addOverwriteOptions(yargs);
|
|
62
|
-
addCmsPublishModeOptions(yargs, { read: true });
|
|
63
|
-
addUseEnvironmentOptions(yargs);
|
|
64
|
-
addGlobalOptions(yargs);
|
|
64
|
+
(0, commonOpts_1.addCmsPublishModeOptions)(yargs, { read: true });
|
|
65
|
+
(0, commonOpts_1.addOverwriteOptions)(yargs);
|
|
65
66
|
return yargs;
|
|
66
67
|
};
|
|
68
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(fetchBuilder, command, describe, {
|
|
69
|
+
useConfigOptions: true,
|
|
70
|
+
useAccountOptions: true,
|
|
71
|
+
useGlobalOptions: true,
|
|
72
|
+
useEnvironmentOptions: true,
|
|
73
|
+
useTestingOptions: false,
|
|
74
|
+
});
|
|
75
|
+
const fetchCommand = {
|
|
76
|
+
command,
|
|
77
|
+
describe,
|
|
78
|
+
handler,
|
|
79
|
+
builder,
|
|
80
|
+
};
|
|
81
|
+
exports.default = fetchCommand;
|
|
82
|
+
module.exports = fetchCommand;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const command = "fetch <src> [dest]";
|
|
4
|
-
export declare const describe: string;
|
|
5
|
-
type CombinedArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & OverwriteArgs;
|
|
6
|
-
type FileManagerFetchArgs = CombinedArgs & {
|
|
1
|
+
import { AccountArgs, CommonArgs, ConfigArgs, EnvironmentArgs, OverwriteArgs, YargsCommandModule } from '../../types/Yargs';
|
|
2
|
+
type FileManagerFetchArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & OverwriteArgs & {
|
|
7
3
|
src: string;
|
|
8
4
|
dest: string;
|
|
9
5
|
includeArchived?: boolean;
|
|
10
6
|
};
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
export {};
|
|
7
|
+
declare const fileManagerFetchCommand: YargsCommandModule<unknown, FileManagerFetchArgs>;
|
|
8
|
+
export default fileManagerFetchCommand;
|