@hubspot/cli 7.8.12-experimental.1 → 7.9.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/__tests__/cms.test.js +44 -1
- package/commands/__tests__/customObject.test.js +22 -1
- package/commands/__tests__/project.test.js +2 -0
- package/commands/account/auth.js +1 -0
- package/commands/auth.js +1 -0
- package/commands/{__tests__/remove.test.js → cms/__tests__/delete.test.js} +8 -8
- package/commands/{__tests__ → cms/__tests__}/fetch.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/function.test.js +7 -3
- package/commands/{__tests__ → cms/__tests__}/lint.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/list.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/mv.test.js +3 -3
- package/commands/{__tests__ → cms/__tests__}/theme.test.js +9 -2
- package/commands/cms/app/create.d.ts +9 -0
- package/commands/cms/app/create.js +82 -0
- package/commands/cms/app.d.ts +3 -0
- package/commands/cms/app.js +17 -0
- package/commands/cms/delete.d.ts +6 -0
- package/commands/cms/delete.js +43 -0
- package/commands/cms/fetch.d.ts +12 -0
- package/commands/cms/fetch.js +79 -0
- package/commands/{__tests__ → cms/function/__tests__}/logs.test.js +4 -5
- package/commands/cms/function/create.d.ts +12 -0
- package/commands/cms/function/create.js +84 -0
- package/commands/cms/function/deploy.d.ts +6 -0
- package/commands/cms/function/deploy.js +89 -0
- package/commands/cms/function/list.d.ts +6 -0
- package/commands/cms/function/list.js +60 -0
- package/commands/cms/function/logs.d.ts +10 -0
- package/commands/cms/function/logs.js +135 -0
- package/commands/cms/function/server.d.ts +10 -0
- package/commands/cms/function/server.js +69 -0
- package/commands/cms/function.d.ts +3 -0
- package/commands/cms/function.js +27 -0
- package/commands/cms/lint.d.ts +6 -0
- package/commands/cms/lint.js +83 -0
- package/commands/cms/list.d.ts +6 -0
- package/commands/cms/list.js +96 -0
- package/commands/cms/module/create.d.ts +11 -0
- package/commands/cms/module/create.js +84 -0
- package/commands/cms/module/marketplace-validate.d.ts +6 -0
- package/commands/cms/module/marketplace-validate.js +45 -0
- package/commands/cms/module.d.ts +3 -0
- package/commands/cms/module.js +17 -0
- package/commands/cms/mv.d.ts +7 -0
- package/commands/cms/mv.js +60 -0
- package/commands/cms/template/create.d.ts +9 -0
- package/commands/cms/template/create.js +72 -0
- package/commands/cms/template.d.ts +3 -0
- package/commands/cms/template.js +17 -0
- package/commands/{theme → cms/theme}/__tests__/marketplace-validate.test.js +2 -2
- package/commands/{theme → cms/theme}/__tests__/preview.test.js +2 -2
- package/commands/cms/theme/create.d.ts +6 -0
- package/commands/cms/theme/create.js +58 -0
- package/commands/cms/theme/generate-selectors.d.ts +6 -0
- package/commands/cms/theme/generate-selectors.js +171 -0
- package/commands/cms/theme/marketplace-validate.d.ts +6 -0
- package/commands/cms/theme/marketplace-validate.js +46 -0
- package/commands/cms/theme/preview.d.ts +12 -0
- package/commands/cms/theme/preview.js +224 -0
- package/commands/cms/theme.d.ts +3 -0
- package/commands/cms/theme.js +25 -0
- package/commands/cms/upload.d.ts +12 -0
- package/commands/cms/upload.js +212 -0
- package/commands/cms/watch.d.ts +14 -0
- package/commands/cms/watch.js +138 -0
- package/commands/cms/webpack/create.d.ts +6 -0
- package/commands/cms/webpack/create.js +58 -0
- package/commands/cms/webpack.d.ts +3 -0
- package/commands/cms/webpack.js +17 -0
- package/commands/cms.js +26 -0
- package/commands/create.js +4 -2
- package/commands/customObject/{schema/__tests__/create.test.js → __tests__/createSchema.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/delete.test.js → __tests__/deleteSchema.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/fetch-all.test.js → __tests__/fetch-all-schemas.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/fetch.test.js → __tests__/fetchSchema.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/list.test.js → __tests__/listSchemas.test.js} +5 -5
- package/commands/customObject/{schema/__tests__/update.test.js → __tests__/updateSchema.test.js} +5 -5
- package/commands/customObject/createSchema.d.ts +6 -0
- package/commands/customObject/createSchema.js +56 -0
- package/commands/customObject/deleteSchema.d.ts +7 -0
- package/commands/customObject/deleteSchema.js +69 -0
- package/commands/customObject/fetchAllSchemas.d.ts +6 -0
- package/commands/customObject/fetchAllSchemas.js +57 -0
- package/commands/customObject/fetchSchema.d.ts +7 -0
- package/commands/customObject/fetchSchema.js +67 -0
- package/commands/customObject/listSchemas.d.ts +4 -0
- package/commands/customObject/listSchemas.js +35 -0
- package/commands/customObject/schema/create.d.ts +4 -6
- package/commands/customObject/schema/create.js +13 -36
- package/commands/customObject/schema/delete.d.ts +4 -7
- package/commands/customObject/schema/delete.js +15 -50
- package/commands/customObject/schema/fetch-all.d.ts +4 -6
- package/commands/customObject/schema/fetch-all.js +14 -41
- package/commands/customObject/schema/fetch.d.ts +4 -7
- package/commands/customObject/schema/fetch.js +14 -49
- package/commands/customObject/schema/list.d.ts +4 -4
- package/commands/customObject/schema/list.js +10 -19
- package/commands/customObject/schema/update.d.ts +4 -7
- package/commands/customObject/schema/update.js +15 -50
- package/commands/customObject/schema.js +4 -2
- package/commands/customObject/updateSchema.d.ts +7 -0
- package/commands/customObject/updateSchema.js +71 -0
- package/commands/customObject.js +16 -1
- package/commands/feedback.js +1 -1
- package/commands/fetch.d.ts +4 -12
- package/commands/fetch.js +19 -46
- package/commands/function/deploy.d.ts +4 -6
- package/commands/function/deploy.js +14 -71
- package/commands/function/list.d.ts +4 -6
- package/commands/function/list.js +14 -40
- package/commands/function/server.d.ts +4 -10
- package/commands/function/server.js +22 -29
- package/commands/function.d.ts +2 -4
- package/commands/function.js +25 -14
- package/commands/lint.d.ts +4 -6
- package/commands/lint.js +13 -65
- package/commands/list.d.ts +4 -6
- package/commands/list.js +13 -74
- package/commands/logs.d.ts +4 -10
- package/commands/logs.js +24 -87
- package/commands/module/marketplace-validate.d.ts +4 -6
- package/commands/module/marketplace-validate.js +15 -27
- package/commands/module.d.ts +2 -2
- package/commands/module.js +17 -15
- package/commands/mv.d.ts +4 -7
- package/commands/mv.js +13 -39
- package/commands/project/__tests__/add.test.js +12 -12
- package/commands/project/__tests__/devUnifiedFlow.test.js +32 -0
- package/commands/project/__tests__/list.test.js +31 -0
- package/commands/project/__tests__/migrate.test.js +1 -0
- package/commands/project/add.d.ts +2 -2
- package/commands/project/add.js +3 -2
- package/commands/project/create.js +1 -1
- package/commands/project/dev/deprecatedFlow.js +2 -2
- package/commands/project/dev/index.js +5 -5
- package/commands/project/dev/unifiedFlow.js +8 -3
- package/commands/project/download.js +5 -2
- package/commands/project/installDeps.d.ts +2 -2
- package/commands/project/installDeps.js +1 -0
- package/commands/project/list.d.ts +4 -0
- package/commands/project/list.js +62 -0
- package/commands/project/migrate.js +5 -2
- package/commands/project.js +2 -0
- package/commands/remove.d.ts +4 -6
- package/commands/remove.js +12 -24
- package/commands/testAccount/create.js +2 -2
- package/commands/testAccount/delete.js +1 -1
- package/commands/theme/generate-selectors.d.ts +4 -6
- package/commands/theme/generate-selectors.js +14 -152
- package/commands/theme/marketplace-validate.d.ts +4 -6
- package/commands/theme/marketplace-validate.js +14 -25
- package/commands/theme/preview.d.ts +4 -12
- package/commands/theme/preview.js +18 -180
- package/commands/theme.d.ts +2 -2
- package/commands/theme.js +19 -13
- package/commands/upload.d.ts +4 -12
- package/commands/upload.js +19 -169
- package/commands/watch.d.ts +4 -14
- package/commands/watch.js +23 -88
- package/lang/en.d.ts +561 -425
- package/lang/en.js +563 -427
- package/lang/en.lyaml +2 -2
- package/lib/__tests__/buildAccount.test.js +2 -2
- package/lib/__tests__/http.test.js +40 -0
- package/lib/buildAccount.d.ts +2 -2
- package/lib/buildAccount.js +7 -7
- package/lib/configMigrate.js +88 -9
- package/lib/constants.d.ts +9 -0
- package/lib/constants.js +9 -0
- package/lib/generateSelectors.js +1 -1
- package/lib/http.d.ts +1 -0
- package/lib/http.js +26 -0
- package/lib/middleware/autoUpdateMiddleware.d.ts +2 -1
- package/lib/middleware/autoUpdateMiddleware.js +12 -2
- package/lib/middleware/commandTargetingUtils.d.ts +1 -1
- package/lib/middleware/commandTargetingUtils.js +16 -20
- package/lib/projects/__tests__/AppDevModeInterface.test.js +95 -109
- package/lib/projects/__tests__/DevServerManager.test.d.ts +1 -0
- package/lib/projects/__tests__/DevServerManager.test.js +183 -0
- package/lib/projects/__tests__/LocalDevProcess.test.js +6 -5
- package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +6 -6
- package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.d.ts +1 -0
- package/lib/projects/__tests__/UIExtensionsDevModeInterface.test.js +161 -0
- package/lib/projects/__tests__/deploy.test.js +9 -9
- package/lib/projects/__tests__/upload.test.js +2 -2
- package/lib/projects/add/__tests__/v2AddComponent.test.d.ts +1 -0
- package/lib/projects/add/__tests__/{v3AddComponent.test.js → v2AddComponent.test.js} +35 -35
- package/lib/projects/add/{v3AddComponent.d.ts → v2AddComponent.d.ts} +1 -1
- package/lib/projects/add/{v3AddComponent.js → v2AddComponent.js} +5 -5
- package/lib/projects/create/__tests__/v2.test.d.ts +1 -0
- package/lib/projects/create/__tests__/{v3.test.js → v2.test.js} +2 -2
- package/lib/projects/create/index.js +2 -2
- package/lib/projects/create/{v3.d.ts → v2.d.ts} +3 -3
- package/lib/projects/create/{v3.js → v2.js} +3 -3
- package/lib/projects/deploy.d.ts +1 -1
- package/lib/projects/deploy.js +2 -2
- package/lib/projects/localDev/AppDevModeInterface.d.ts +10 -3
- package/lib/projects/localDev/AppDevModeInterface.js +132 -105
- package/lib/projects/localDev/DevServerManager.d.ts +10 -29
- package/lib/projects/localDev/DevServerManager.js +20 -76
- package/lib/projects/localDev/DevServerManager_DEPRECATED.d.ts +40 -0
- package/lib/projects/localDev/DevServerManager_DEPRECATED.js +120 -0
- package/lib/projects/localDev/{LocalDevManager.js → LocalDevManager_DEPRECATED.js} +6 -6
- package/lib/projects/localDev/LocalDevProcess.js +3 -2
- package/lib/projects/localDev/LocalDevState.d.ts +3 -0
- package/lib/projects/localDev/LocalDevState.js +9 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +4 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.js +39 -6
- package/lib/projects/localDev/UIExtensionsDevModeInterface.d.ts +13 -0
- package/lib/projects/localDev/UIExtensionsDevModeInterface.js +37 -0
- package/lib/projects/localDev/helpers/account.d.ts +1 -1
- package/lib/projects/localDev/helpers/account.js +2 -2
- package/lib/projects/localDev/helpers/process.d.ts +1 -0
- package/lib/projects/localDev/helpers/process.js +15 -0
- package/lib/projects/localDev/helpers/project.js +2 -3
- package/lib/projects/localDev/localDevWebsocketServerUtils.d.ts +3 -0
- package/lib/projects/localDev/localDevWebsocketServerUtils.js +9 -0
- package/lib/projects/urls.d.ts +0 -1
- package/lib/projects/urls.js +0 -3
- package/lib/prompts/__tests__/projectAddPrompt.test.js +10 -10
- package/lib/prompts/installAppPrompt.d.ts +1 -6
- package/lib/prompts/installAppPrompt.js +1 -6
- package/lib/prompts/projectAddPrompt.d.ts +2 -2
- package/lib/prompts/projectAddPrompt.js +1 -1
- package/lib/theme/__tests__/migrate.test.js +4 -4
- package/lib/ui/index.d.ts +2 -0
- package/lib/ui/index.js +8 -0
- package/lib/ui/uiMessages.d.ts +5 -0
- package/lib/ui/uiMessages.js +5 -0
- package/mcp-server/tools/cms/HsCreateModuleTool.d.ts +2 -2
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +1 -1
- package/package.json +6 -5
- package/types/Cms.d.ts +6 -6
- package/lib/projects/localDev/DevServerManagerV2.d.ts +0 -22
- package/lib/projects/localDev/DevServerManagerV2.js +0 -81
- /package/commands/{customObject/schema → cms}/__tests__/delete.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/fetch.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/function.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/lint.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/list.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/mv.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/__tests__}/theme.test.d.ts +0 -0
- /package/commands/{__tests__ → cms/function/__tests__}/logs.test.d.ts +0 -0
- /package/commands/{theme → cms/theme}/__tests__/generate-selectors.test.d.ts +0 -0
- /package/commands/{theme → cms/theme}/__tests__/generate-selectors.test.js +0 -0
- /package/commands/{theme → cms/theme}/__tests__/marketplace-validate.test.d.ts +0 -0
- /package/commands/{theme → cms/theme}/__tests__/preview.test.d.ts +0 -0
- /package/commands/{__tests__/remove.test.d.ts → customObject/__tests__/createSchema.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/create.test.d.ts → __tests__/deleteSchema.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/fetch-all.test.d.ts → __tests__/fetch-all-schemas.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/fetch.test.d.ts → __tests__/fetchSchema.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/list.test.d.ts → __tests__/listSchemas.test.d.ts} +0 -0
- /package/commands/customObject/{schema/__tests__/update.test.d.ts → __tests__/updateSchema.test.d.ts} +0 -0
- /package/{lib/projects/add/__tests__/v3AddComponent.test.d.ts → commands/project/__tests__/list.test.d.ts} +0 -0
- /package/lib/{projects/create/__tests__/v3.test.d.ts → __tests__/http.test.d.ts} +0 -0
- /package/{commands/create → lib/cmsAssets}/api-sample.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/api-sample.js +0 -0
- /package/{commands/create → lib/cmsAssets}/app.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/app.js +0 -0
- /package/{commands/create → lib/cmsAssets}/function.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/function.js +0 -0
- /package/{commands/create → lib/cmsAssets}/index.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/index.js +0 -0
- /package/{commands/create → lib/cmsAssets}/module.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/module.js +0 -0
- /package/{commands/create → lib/cmsAssets}/react-app.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/react-app.js +0 -0
- /package/{commands/create → lib/cmsAssets}/template.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/template.js +0 -0
- /package/{commands/create → lib/cmsAssets}/vue-app.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/vue-app.js +0 -0
- /package/{commands/create → lib/cmsAssets}/webpack-serverless.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/webpack-serverless.js +0 -0
- /package/{commands/create → lib/cmsAssets}/website-theme.d.ts +0 -0
- /package/{commands/create → lib/cmsAssets}/website-theme.js +0 -0
- /package/lib/projects/localDev/{LocalDevManager.d.ts → LocalDevManager_DEPRECATED.d.ts} +0 -0
package/commands/watch.js
CHANGED
|
@@ -1,138 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { watch } from '@hubspot/local-dev-lib/cms/watch';
|
|
4
|
-
import { getCwd } from '@hubspot/local-dev-lib/path';
|
|
5
|
-
import { getCmsPublishMode } from '../lib/commonOpts.js';
|
|
6
|
-
import { uploadPrompt } from '../lib/prompts/uploadPrompt.js';
|
|
7
|
-
import { validateCmsPublishMode } from '../lib/validation.js';
|
|
8
|
-
import { trackCommandUsage } from '../lib/usageTracking.js';
|
|
9
|
-
import { commands } from '../lang/en.js';
|
|
10
|
-
import { getUploadableFileList } from '../lib/upload.js';
|
|
11
|
-
import { logError, ApiErrorContext } from '../lib/errorHandlers/index.js';
|
|
12
|
-
import { EXIT_CODES } from '../lib/enums/exitCodes.js';
|
|
1
|
+
import { uiCommandRelocatedMessage, uiCommandRenamedDescription, uiDeprecatedTag, } from '../lib/ui/index.js';
|
|
2
|
+
import cmsWatchCommand from './cms/watch.js';
|
|
13
3
|
import { makeYargsBuilder } from '../lib/yargsUtils.js';
|
|
14
|
-
import {
|
|
4
|
+
import { commands } from '../lang/en.js';
|
|
15
5
|
const command = 'watch [src] [dest]';
|
|
16
|
-
const describe =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const cmsPublishMode = getCmsPublishMode(args);
|
|
23
|
-
const uploadPromptAnswers = await uploadPrompt(args);
|
|
24
|
-
const src = args.src || uploadPromptAnswers.src;
|
|
25
|
-
const dest = args.dest || uploadPromptAnswers.dest;
|
|
26
|
-
const absoluteSrcPath = path.resolve(getCwd(), src);
|
|
27
|
-
try {
|
|
28
|
-
const stats = fs.statSync(absoluteSrcPath);
|
|
29
|
-
if (!stats.isDirectory()) {
|
|
30
|
-
uiLogger.log(commands.watch.errors.invalidPath(src));
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
catch (e) {
|
|
35
|
-
uiLogger.log(commands.watch.errors.invalidPath(src));
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (!dest) {
|
|
39
|
-
uiLogger.log(commands.watch.errors.destinationRequired);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
let filesToUpload = [];
|
|
43
|
-
if (disableInitial) {
|
|
44
|
-
uiLogger.info(commands.watch.warnings.disableInitial);
|
|
45
|
-
}
|
|
46
|
-
else if (!initialUpload) {
|
|
47
|
-
uiLogger.info(commands.watch.warnings.notUploaded(src));
|
|
48
|
-
uiLogger.info(commands.watch.warnings.initialUpload);
|
|
49
|
-
}
|
|
50
|
-
if (initialUpload) {
|
|
51
|
-
filesToUpload = await getUploadableFileList(absoluteSrcPath, args.convertFields);
|
|
52
|
-
}
|
|
53
|
-
trackCommandUsage('watch', { mode: cmsPublishMode }, derivedAccountId);
|
|
54
|
-
const onUploadFolderError = (error) => {
|
|
55
|
-
uiLogger.error(commands.watch.errors.folderFailed(src, dest, derivedAccountId));
|
|
56
|
-
logError(error, {
|
|
57
|
-
accountId: derivedAccountId,
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
const onUploadFileError = (file, destPath, accountId) => (error) => {
|
|
61
|
-
uiLogger.error(commands.watch.errors.fileFailed(file, destPath, accountId));
|
|
62
|
-
logError(error, new ApiErrorContext({
|
|
63
|
-
accountId,
|
|
64
|
-
request: destPath,
|
|
65
|
-
payload: file,
|
|
66
|
-
}));
|
|
67
|
-
};
|
|
68
|
-
watch(derivedAccountId, absoluteSrcPath, dest, {
|
|
69
|
-
cmsPublishMode,
|
|
70
|
-
remove,
|
|
71
|
-
disableInitial: !initialUpload,
|
|
72
|
-
notify,
|
|
73
|
-
commandOptions: args,
|
|
74
|
-
filePaths: filesToUpload,
|
|
75
|
-
}, null, onUploadFolderError, undefined, onUploadFileError);
|
|
76
|
-
};
|
|
77
|
-
function watchBuilder(yargs) {
|
|
6
|
+
const describe = uiDeprecatedTag(cmsWatchCommand.describe, false);
|
|
7
|
+
async function handler(args) {
|
|
8
|
+
uiCommandRelocatedMessage('hs cms watch');
|
|
9
|
+
await cmsWatchCommand.handler(args);
|
|
10
|
+
}
|
|
11
|
+
function deprecatedCmsWatchBuilder(yargs) {
|
|
78
12
|
yargs.positional('src', {
|
|
79
|
-
describe: commands.watch.positionals.src,
|
|
13
|
+
describe: commands.cms.subcommands.watch.positionals.src,
|
|
80
14
|
type: 'string',
|
|
81
15
|
});
|
|
82
16
|
yargs.positional('dest', {
|
|
83
|
-
describe: commands.watch.positionals.dest,
|
|
17
|
+
describe: commands.cms.subcommands.watch.positionals.dest,
|
|
84
18
|
type: 'string',
|
|
85
19
|
});
|
|
86
20
|
yargs.option('fieldOptions', {
|
|
87
|
-
describe: commands.watch.options.options,
|
|
21
|
+
describe: commands.cms.subcommands.watch.options.options,
|
|
88
22
|
type: 'array',
|
|
89
23
|
default: [''],
|
|
90
24
|
hidden: true,
|
|
91
25
|
});
|
|
92
26
|
yargs.option('remove', {
|
|
93
27
|
alias: 'r',
|
|
94
|
-
describe: commands.watch.options.remove,
|
|
28
|
+
describe: commands.cms.subcommands.watch.options.remove,
|
|
95
29
|
type: 'boolean',
|
|
96
30
|
});
|
|
97
31
|
yargs.option('initial-upload', {
|
|
98
32
|
alias: 'i',
|
|
99
|
-
describe: commands.watch.options.initialUpload,
|
|
33
|
+
describe: commands.cms.subcommands.watch.options.initialUpload,
|
|
100
34
|
type: 'boolean',
|
|
101
35
|
});
|
|
102
36
|
yargs.option('disable-initial', {
|
|
103
|
-
describe: commands.watch.options.disableInitial,
|
|
37
|
+
describe: commands.cms.subcommands.watch.options.disableInitial,
|
|
104
38
|
type: 'boolean',
|
|
105
39
|
hidden: true,
|
|
106
40
|
});
|
|
107
41
|
yargs.option('notify', {
|
|
108
42
|
alias: 'n',
|
|
109
|
-
describe: commands.watch.options.notify,
|
|
43
|
+
describe: commands.cms.subcommands.watch.options.notify,
|
|
110
44
|
type: 'string',
|
|
111
45
|
requiresArg: true,
|
|
112
46
|
});
|
|
113
47
|
yargs.option('convertFields', {
|
|
114
|
-
describe: commands.watch.options.convertFields,
|
|
48
|
+
describe: commands.cms.subcommands.watch.options.convertFields,
|
|
115
49
|
type: 'boolean',
|
|
116
50
|
default: false,
|
|
117
51
|
});
|
|
118
52
|
yargs.option('saveOutput', {
|
|
119
|
-
describe: commands.watch.options.saveOutput,
|
|
53
|
+
describe: commands.cms.subcommands.watch.options.saveOutput,
|
|
120
54
|
type: 'boolean',
|
|
121
55
|
default: false,
|
|
122
56
|
});
|
|
123
57
|
return yargs;
|
|
124
58
|
}
|
|
125
|
-
const
|
|
59
|
+
const verboseDescribe = uiCommandRenamedDescription(cmsWatchCommand.describe, 'hs cms watch');
|
|
60
|
+
const builder = makeYargsBuilder(deprecatedCmsWatchBuilder, command, verboseDescribe, {
|
|
126
61
|
useConfigOptions: true,
|
|
127
62
|
useAccountOptions: true,
|
|
128
63
|
useGlobalOptions: true,
|
|
129
64
|
useEnvironmentOptions: true,
|
|
130
65
|
useCmsPublishModeOptions: { write: true },
|
|
131
66
|
});
|
|
132
|
-
const
|
|
133
|
-
|
|
67
|
+
const deprecatedCmsWatchCommand = {
|
|
68
|
+
...cmsWatchCommand,
|
|
134
69
|
describe,
|
|
135
70
|
handler,
|
|
136
71
|
builder,
|
|
137
72
|
};
|
|
138
|
-
export default
|
|
73
|
+
export default deprecatedCmsWatchCommand;
|