@hubspot/cli 7.8.12-experimental.1 → 7.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +560 -425
- package/lang/en.js +562 -427
- package/lang/en.lyaml +2 -2
- package/lib/__tests__/buildAccount.test.js +2 -2
- 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/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.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 +9 -3
- package/lib/projects/localDev/AppDevModeInterface.js +116 -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/{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/{create/__tests__/v3.test.d.ts → __tests__/DevServerManager.test.d.ts} +0 -0
- /package/lib/projects/localDev/{LocalDevManager.d.ts → LocalDevManager_DEPRECATED.d.ts} +0 -0
|
@@ -1,200 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import cliProgress from 'cli-progress';
|
|
4
|
-
import { commands } from '../../lang/en.js';
|
|
5
|
-
import { getCwd } from '@hubspot/local-dev-lib/path';
|
|
6
|
-
import { FILE_UPLOAD_RESULT_TYPES } from '@hubspot/local-dev-lib/constants/files';
|
|
7
|
-
import { getThemeJSONPath } from '@hubspot/local-dev-lib/cms/themes';
|
|
8
|
-
import { preview } from '@hubspot/theme-preview-dev-server';
|
|
9
|
-
import { getUploadableFileList } from '../../lib/upload.js';
|
|
10
|
-
import { trackCommandUsage } from '../../lib/usageTracking.js';
|
|
11
|
-
import { previewPrompt, previewProjectPrompt, } from '../../lib/prompts/previewPrompt.js';
|
|
12
|
-
import { EXIT_CODES } from '../../lib/enums/exitCodes.js';
|
|
13
|
-
import { ApiErrorContext, logError } from '../../lib/errorHandlers/index.js';
|
|
14
|
-
import { handleExit, handleKeypress } from '../../lib/process.js';
|
|
15
|
-
import { getProjectConfig } from '../../lib/projects/config.js';
|
|
16
|
-
import { findProjectComponents } from '../../lib/projects/structure.js';
|
|
17
|
-
import { ComponentTypes } from '../../types/Projects.js';
|
|
1
|
+
import { uiCommandRelocatedMessage, uiCommandRenamedDescription, uiDeprecatedTag, } from '../../lib/ui/index.js';
|
|
2
|
+
import previewCommand from '../cms/theme/preview.js';
|
|
18
3
|
import { makeYargsBuilder } from '../../lib/yargsUtils.js';
|
|
19
|
-
import {
|
|
20
|
-
const command = 'preview
|
|
21
|
-
const describe =
|
|
22
|
-
function validateSrcPath(src) {
|
|
23
|
-
const logInvalidPath = () => {
|
|
24
|
-
uiLogger.error(commands.theme.subcommands.preview.errors.invalidPath(src));
|
|
25
|
-
};
|
|
26
|
-
try {
|
|
27
|
-
const stats = fs.statSync(src);
|
|
28
|
-
if (!stats.isDirectory()) {
|
|
29
|
-
logInvalidPath();
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
catch (e) {
|
|
34
|
-
logInvalidPath();
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
function handleUserInput() {
|
|
40
|
-
const onTerminate = () => {
|
|
41
|
-
uiLogger.log(commands.theme.subcommands.preview.logs.processExited);
|
|
42
|
-
process.exit(EXIT_CODES.SUCCESS);
|
|
43
|
-
};
|
|
44
|
-
handleExit(onTerminate);
|
|
45
|
-
handleKeypress(key => {
|
|
46
|
-
if ((key.ctrl && key.name === 'c') || key.name === 'q') {
|
|
47
|
-
onTerminate();
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
async function determineSrcAndDest(args) {
|
|
52
|
-
let absoluteSrc;
|
|
53
|
-
let dest;
|
|
54
|
-
const { projectDir, projectConfig } = await getProjectConfig();
|
|
55
|
-
if (!(projectDir && projectConfig)) {
|
|
56
|
-
// Not in a project, prompt for src and dest of traditional theme
|
|
57
|
-
const previewPromptAnswers = await previewPrompt(args);
|
|
58
|
-
const src = args.src || previewPromptAnswers.src;
|
|
59
|
-
dest = args.dest || previewPromptAnswers.dest;
|
|
60
|
-
absoluteSrc = path.resolve(getCwd(), src);
|
|
61
|
-
if (!dest || !validateSrcPath(absoluteSrc)) {
|
|
62
|
-
process.exit(EXIT_CODES.ERROR);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
// In a project
|
|
67
|
-
let themeJsonPath = getThemeJSONPath(getCwd());
|
|
68
|
-
if (!themeJsonPath) {
|
|
69
|
-
const projectComponents = await findProjectComponents(projectDir);
|
|
70
|
-
const themeComponents = projectComponents.filter(c => c.type === ComponentTypes.HublTheme);
|
|
71
|
-
if (themeComponents.length === 0) {
|
|
72
|
-
uiLogger.error(commands.theme.subcommands.preview.errors.noThemeComponents);
|
|
73
|
-
process.exit(EXIT_CODES.ERROR);
|
|
74
|
-
}
|
|
75
|
-
const answer = await previewProjectPrompt(themeComponents);
|
|
76
|
-
themeJsonPath = `${answer.themeComponentPath}/theme.json`;
|
|
77
|
-
}
|
|
78
|
-
const { dir: themeDir } = path.parse(themeJsonPath);
|
|
79
|
-
absoluteSrc = themeDir;
|
|
80
|
-
const { base: themeName } = path.parse(themeDir);
|
|
81
|
-
dest = `@projects/${projectConfig.name}/${themeName}`;
|
|
82
|
-
}
|
|
83
|
-
return { absoluteSrc, dest };
|
|
84
|
-
}
|
|
4
|
+
import { commands } from '../../lang/en.js';
|
|
5
|
+
const command = 'preview';
|
|
6
|
+
const describe = uiDeprecatedTag(previewCommand.describe, false);
|
|
85
7
|
async function handler(args) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const filePaths = await getUploadableFileList(absoluteSrc, false);
|
|
89
|
-
function startProgressBar(numFiles) {
|
|
90
|
-
const initialUploadProgressBar = new cliProgress.SingleBar({
|
|
91
|
-
gracefulExit: true,
|
|
92
|
-
format: '[{bar}] {percentage}% | {value}/{total} | {label}',
|
|
93
|
-
hideCursor: true,
|
|
94
|
-
}, cliProgress.Presets.rect);
|
|
95
|
-
initialUploadProgressBar.start(numFiles, 0, {
|
|
96
|
-
label: commands.theme.subcommands.preview.initialUploadProgressBar.start,
|
|
97
|
-
});
|
|
98
|
-
let uploadsHaveStarted = false;
|
|
99
|
-
const uploadOptions = {
|
|
100
|
-
onAttemptCallback: () => {
|
|
101
|
-
/* Intentionally blank */
|
|
102
|
-
},
|
|
103
|
-
onSuccessCallback: () => {
|
|
104
|
-
initialUploadProgressBar.increment();
|
|
105
|
-
if (!uploadsHaveStarted) {
|
|
106
|
-
uploadsHaveStarted = true;
|
|
107
|
-
initialUploadProgressBar.update(0, {
|
|
108
|
-
label: commands.theme.subcommands.preview.initialUploadProgressBar
|
|
109
|
-
.uploading,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
onFirstErrorCallback: () => {
|
|
114
|
-
/* Intentionally blank */
|
|
115
|
-
},
|
|
116
|
-
onRetryCallback: () => {
|
|
117
|
-
/* Intentionally blank */
|
|
118
|
-
},
|
|
119
|
-
onFinalErrorCallback: () => initialUploadProgressBar.increment(),
|
|
120
|
-
onFinishCallback: (results) => {
|
|
121
|
-
initialUploadProgressBar.update(numFiles, {
|
|
122
|
-
label: commands.theme.subcommands.preview.initialUploadProgressBar.finish,
|
|
123
|
-
});
|
|
124
|
-
initialUploadProgressBar.stop();
|
|
125
|
-
results.forEach(result => {
|
|
126
|
-
if (result.resultType == FILE_UPLOAD_RESULT_TYPES.FAILURE) {
|
|
127
|
-
uiLogger.error(commands.theme.subcommands.preview.errors.uploadFailed(result.file, dest));
|
|
128
|
-
logError(result.error, new ApiErrorContext({
|
|
129
|
-
accountId: derivedAccountId,
|
|
130
|
-
request: dest,
|
|
131
|
-
payload: result.file,
|
|
132
|
-
}));
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
return uploadOptions;
|
|
138
|
-
}
|
|
139
|
-
trackCommandUsage('preview', {}, derivedAccountId);
|
|
140
|
-
let createUnifiedDevServer;
|
|
141
|
-
try {
|
|
142
|
-
// @ts-ignore TODO: Remove when we deprecate Node 18
|
|
143
|
-
require.resolve('@hubspot/cms-dev-server');
|
|
144
|
-
// @ts-ignore TODO: Remove when we deprecate Node 18
|
|
145
|
-
const { createDevServer } = await import('@hubspot/cms-dev-server');
|
|
146
|
-
createUnifiedDevServer = createDevServer;
|
|
147
|
-
}
|
|
148
|
-
catch (e) {
|
|
149
|
-
uiLogger.warn('Unified dev server requires node 20 to run. Defaulting to legacy preview.');
|
|
150
|
-
}
|
|
151
|
-
if (createUnifiedDevServer) {
|
|
152
|
-
if (port) {
|
|
153
|
-
process.env['PORT'] = port.toString();
|
|
154
|
-
}
|
|
155
|
-
createUnifiedDevServer(absoluteSrc, false, '', '', !noSsl, generateFieldsTypes, {
|
|
156
|
-
filePaths,
|
|
157
|
-
resetSession: resetSession || false,
|
|
158
|
-
startProgressBar,
|
|
159
|
-
dest,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
preview(derivedAccountId, absoluteSrc, dest, {
|
|
164
|
-
notify,
|
|
165
|
-
filePaths,
|
|
166
|
-
noSsl,
|
|
167
|
-
port,
|
|
168
|
-
resetSession: resetSession || false,
|
|
169
|
-
startProgressBar,
|
|
170
|
-
handleUserInput,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
8
|
+
uiCommandRelocatedMessage('hs cms theme preview');
|
|
9
|
+
await previewCommand.handler(args);
|
|
173
10
|
}
|
|
174
|
-
function
|
|
11
|
+
function deprecatedThemePreviewBuilder(yargs) {
|
|
175
12
|
yargs
|
|
176
13
|
.option('src', {
|
|
177
|
-
describe: commands.theme.subcommands.preview.positionals.src,
|
|
14
|
+
describe: commands.cms.subcommands.theme.subcommands.preview.positionals.src,
|
|
178
15
|
type: 'string',
|
|
179
16
|
requiresArg: true,
|
|
180
17
|
})
|
|
181
18
|
.option('dest', {
|
|
182
|
-
describe: commands.theme.subcommands.preview.positionals.dest,
|
|
19
|
+
describe: commands.cms.subcommands.theme.subcommands.preview.positionals.dest,
|
|
183
20
|
type: 'string',
|
|
184
21
|
requiresArg: true,
|
|
185
22
|
})
|
|
186
23
|
.option('notify', {
|
|
187
24
|
alias: 'n',
|
|
188
|
-
describe: commands.theme.subcommands.preview.options.notify,
|
|
25
|
+
describe: commands.cms.subcommands.theme.subcommands.preview.options.notify,
|
|
189
26
|
type: 'string',
|
|
190
27
|
requiresArg: true,
|
|
191
28
|
})
|
|
192
29
|
.option('no-ssl', {
|
|
193
|
-
describe: commands.theme.subcommands.preview.options.noSsl,
|
|
30
|
+
describe: commands.cms.subcommands.theme.subcommands.preview.options.noSsl,
|
|
194
31
|
type: 'boolean',
|
|
195
32
|
})
|
|
196
33
|
.option('port', {
|
|
197
|
-
describe: commands.theme.subcommands.preview.options.port,
|
|
34
|
+
describe: commands.cms.subcommands.theme.subcommands.preview.options.port,
|
|
198
35
|
type: 'number',
|
|
199
36
|
})
|
|
200
37
|
.option('resetSession', {
|
|
@@ -207,15 +44,16 @@ function themePreviewBuilder(yargs) {
|
|
|
207
44
|
});
|
|
208
45
|
return yargs;
|
|
209
46
|
}
|
|
210
|
-
const
|
|
47
|
+
const verboseDescribe = uiCommandRenamedDescription(previewCommand.describe, 'hs cms theme preview');
|
|
48
|
+
const builder = makeYargsBuilder(deprecatedThemePreviewBuilder, command, verboseDescribe, {
|
|
211
49
|
useGlobalOptions: true,
|
|
212
50
|
useConfigOptions: true,
|
|
213
51
|
useAccountOptions: true,
|
|
214
52
|
});
|
|
215
|
-
const
|
|
216
|
-
|
|
53
|
+
const deprecatedPreviewCommand = {
|
|
54
|
+
...previewCommand,
|
|
217
55
|
describe,
|
|
218
56
|
handler,
|
|
219
57
|
builder,
|
|
220
58
|
};
|
|
221
|
-
export default
|
|
59
|
+
export default deprecatedPreviewCommand;
|
package/commands/theme.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { YargsCommandModuleBucket } from '../types/Yargs.js';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const deprecatedCmsThemeCommand: YargsCommandModuleBucket;
|
|
3
|
+
export default deprecatedCmsThemeCommand;
|
package/commands/theme.js
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { uiCommandRelocatedMessage, uiCommandRenamedDescription, uiDeprecatedTag, } from '../lib/ui/index.js';
|
|
2
|
+
import cmsThemeCommand from './cms/theme.js';
|
|
3
|
+
import generateSelectorsCommand from './theme/generate-selectors.js';
|
|
4
|
+
import marketplaceValidateCommand from './theme/marketplace-validate.js';
|
|
3
5
|
import previewCommand from './theme/preview.js';
|
|
4
|
-
import { commands } from '../lang/en.js';
|
|
5
6
|
import { makeYargsBuilder } from '../lib/yargsUtils.js';
|
|
6
|
-
const command = ['theme'
|
|
7
|
-
const describe =
|
|
8
|
-
function
|
|
7
|
+
const command = ['theme'];
|
|
8
|
+
const describe = uiDeprecatedTag(cmsThemeCommand.describe, false);
|
|
9
|
+
async function handler(args) {
|
|
10
|
+
uiCommandRelocatedMessage('hs cms theme');
|
|
11
|
+
await cmsThemeCommand.handler(args);
|
|
12
|
+
}
|
|
13
|
+
function deprecatedCmsThemeBuilder(yargs) {
|
|
9
14
|
yargs
|
|
15
|
+
.command(generateSelectorsCommand)
|
|
16
|
+
.command(marketplaceValidateCommand)
|
|
10
17
|
.command(previewCommand)
|
|
11
|
-
.command(marketplaceValidate)
|
|
12
|
-
.command(generateSelectors)
|
|
13
18
|
.demandCommand(1, '');
|
|
14
19
|
return yargs;
|
|
15
20
|
}
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
21
|
+
const verboseDescribe = uiCommandRenamedDescription(cmsThemeCommand.describe, 'hs cms theme');
|
|
22
|
+
const builder = makeYargsBuilder(deprecatedCmsThemeBuilder, command, verboseDescribe);
|
|
23
|
+
const deprecatedCmsThemeCommand = {
|
|
24
|
+
...cmsThemeCommand,
|
|
19
25
|
describe,
|
|
26
|
+
handler,
|
|
20
27
|
builder,
|
|
21
|
-
handler: () => { },
|
|
22
28
|
};
|
|
23
|
-
export default
|
|
29
|
+
export default deprecatedCmsThemeCommand;
|
package/commands/upload.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fieldOptions?: string | string[];
|
|
6
|
-
saveOutput?: boolean;
|
|
7
|
-
convertFields?: boolean;
|
|
8
|
-
clean?: boolean;
|
|
9
|
-
force?: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare const uploadCommand: YargsCommandModule<unknown, UploadArgs>;
|
|
12
|
-
export default uploadCommand;
|
|
1
|
+
import { YargsCommandModule } from '../types/Yargs.js';
|
|
2
|
+
import { UploadArgs } from './cms/upload.js';
|
|
3
|
+
declare const deprecatedCmsUploadCommand: YargsCommandModule<unknown, UploadArgs>;
|
|
4
|
+
export default deprecatedCmsUploadCommand;
|
package/commands/upload.js
CHANGED
|
@@ -1,212 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { uploadFolder, hasUploadErrors, } from '@hubspot/local-dev-lib/cms/uploadFolder';
|
|
4
|
-
import { getFileMapperQueryValues } from '@hubspot/local-dev-lib/fileMapper';
|
|
5
|
-
import { upload, deleteFile } from '@hubspot/local-dev-lib/api/fileMapper';
|
|
6
|
-
import { getCwd, convertToUnixPath, isAllowedExtension, } from '@hubspot/local-dev-lib/path';
|
|
7
|
-
import { validateSrcAndDestPaths } from '@hubspot/local-dev-lib/cms/modules';
|
|
8
|
-
import { shouldIgnoreFile } from '@hubspot/local-dev-lib/ignoreRules';
|
|
9
|
-
import { getThemePreviewUrl, getThemeJSONPath, } from '@hubspot/local-dev-lib/cms/themes';
|
|
10
|
-
import { FieldsJs, isConvertableFieldJs, cleanupTmpDirSync, } from '@hubspot/local-dev-lib/cms/handleFieldsJS';
|
|
11
|
-
import { ApiErrorContext, logError } from '../lib/errorHandlers/index.js';
|
|
12
|
-
import { getCmsPublishMode } from '../lib/commonOpts.js';
|
|
13
|
-
import { uploadPrompt } from '../lib/prompts/uploadPrompt.js';
|
|
14
|
-
import { confirmPrompt } from '../lib/prompts/promptUtils.js';
|
|
15
|
-
import { validateCmsPublishMode } from '../lib/validation.js';
|
|
16
|
-
import { trackCommandUsage } from '../lib/usageTracking.js';
|
|
17
|
-
import { getUploadableFileList } from '../lib/upload.js';
|
|
18
|
-
import { commands } from '../lang/en.js';
|
|
19
|
-
import { EXIT_CODES } from '../lib/enums/exitCodes.js';
|
|
1
|
+
import { uiCommandRelocatedMessage, uiCommandRenamedDescription, uiDeprecatedTag, } from '../lib/ui/index.js';
|
|
2
|
+
import cmsUploadCommand from './cms/upload.js';
|
|
20
3
|
import { makeYargsBuilder } from '../lib/yargsUtils.js';
|
|
21
|
-
import {
|
|
4
|
+
import { commands } from '../lang/en.js';
|
|
22
5
|
const command = 'upload [src] [dest]';
|
|
23
|
-
const describe =
|
|
24
|
-
function logThemePreview(filePath, accountId) {
|
|
25
|
-
const previewUrl = getThemePreviewUrl(filePath, accountId);
|
|
26
|
-
// Only log if we are actually in a theme
|
|
27
|
-
if (previewUrl) {
|
|
28
|
-
uiLogger.log(commands.upload.previewUrl(previewUrl));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
6
|
+
const describe = uiDeprecatedTag(cmsUploadCommand.describe, false);
|
|
31
7
|
async function handler(args) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
const { derivedAccountId } = args;
|
|
36
|
-
const cmsPublishMode = getCmsPublishMode(args);
|
|
37
|
-
const uploadPromptAnswers = await uploadPrompt(args);
|
|
38
|
-
const src = args.src || uploadPromptAnswers.src;
|
|
39
|
-
const saveOutput = args.saveOutput;
|
|
40
|
-
let dest = args.dest || uploadPromptAnswers.dest;
|
|
41
|
-
let absoluteSrcPath = path.resolve(getCwd(), src);
|
|
42
|
-
if (!dest) {
|
|
43
|
-
uiLogger.error(commands.upload.errors.destinationRequired);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
// Check for theme.json file and determine the root path for the project based on it if it exists
|
|
47
|
-
const themeJsonPath = getThemeJSONPath(absoluteSrcPath);
|
|
48
|
-
const projectRoot = themeJsonPath
|
|
49
|
-
? path.dirname(themeJsonPath)
|
|
50
|
-
: path.dirname(getCwd());
|
|
51
|
-
const convertFields = projectRoot &&
|
|
52
|
-
isConvertableFieldJs(projectRoot, absoluteSrcPath, args.convertFields);
|
|
53
|
-
let fieldsJs;
|
|
54
|
-
if (convertFields) {
|
|
55
|
-
fieldsJs = await new FieldsJs(projectRoot, absoluteSrcPath, undefined, args.fieldOptions).init();
|
|
56
|
-
if (fieldsJs.rejected)
|
|
57
|
-
return;
|
|
58
|
-
// Ensures that the dest path is a .json. The user might pass '.js' accidentally - this ensures it just works.
|
|
59
|
-
if (fieldsJs.outputPath) {
|
|
60
|
-
absoluteSrcPath = fieldsJs.outputPath;
|
|
61
|
-
}
|
|
62
|
-
dest = path.join(path.dirname(dest), 'fields.json');
|
|
63
|
-
}
|
|
64
|
-
let stats;
|
|
65
|
-
try {
|
|
66
|
-
stats = fs.statSync(absoluteSrcPath);
|
|
67
|
-
if (!stats.isFile() && !stats.isDirectory()) {
|
|
68
|
-
uiLogger.error(commands.upload.errors.invalidPath(src));
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
catch (e) {
|
|
73
|
-
uiLogger.error(commands.upload.errors.invalidPath(src));
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const normalizedDest = convertToUnixPath(dest);
|
|
77
|
-
trackCommandUsage('upload', { mode: cmsPublishMode, type: stats.isFile() ? 'file' : 'folder' }, derivedAccountId);
|
|
78
|
-
const srcDestIssues = await validateSrcAndDestPaths({ isLocal: true, path: src }, { isHubSpot: true, path: dest });
|
|
79
|
-
if (srcDestIssues.length) {
|
|
80
|
-
srcDestIssues.forEach(({ message }) => uiLogger.error(message));
|
|
81
|
-
process.exit(EXIT_CODES.WARNING);
|
|
82
|
-
}
|
|
83
|
-
if (stats.isFile()) {
|
|
84
|
-
if (!isAllowedExtension(src) && !convertFields) {
|
|
85
|
-
uiLogger.error(commands.upload.errors.invalidPath(src));
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (shouldIgnoreFile(absoluteSrcPath)) {
|
|
89
|
-
uiLogger.error(commands.upload.errors.fileIgnored(src));
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
upload(derivedAccountId, absoluteSrcPath, normalizedDest, getFileMapperQueryValues(cmsPublishMode))
|
|
93
|
-
.then(() => {
|
|
94
|
-
uiLogger.success(commands.upload.success.fileUploaded(src, normalizedDest, derivedAccountId));
|
|
95
|
-
logThemePreview(src, derivedAccountId);
|
|
96
|
-
})
|
|
97
|
-
.catch(error => {
|
|
98
|
-
uiLogger.error(commands.upload.errors.uploadFailed(src, normalizedDest));
|
|
99
|
-
logError(error, new ApiErrorContext({
|
|
100
|
-
accountId: derivedAccountId,
|
|
101
|
-
request: normalizedDest,
|
|
102
|
-
payload: src,
|
|
103
|
-
}));
|
|
104
|
-
process.exit(EXIT_CODES.WARNING);
|
|
105
|
-
})
|
|
106
|
-
.finally(() => {
|
|
107
|
-
if (!convertFields)
|
|
108
|
-
return;
|
|
109
|
-
if (saveOutput && fieldsJs) {
|
|
110
|
-
fieldsJs.saveOutput();
|
|
111
|
-
}
|
|
112
|
-
if (fieldsJs) {
|
|
113
|
-
cleanupTmpDirSync(fieldsJs.rootWriteDir);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
uiLogger.log(commands.upload.uploading(src, dest, derivedAccountId));
|
|
119
|
-
// Generate the first-pass file list in here, and pass to uploadFolder.
|
|
120
|
-
const filePaths = await getUploadableFileList(absoluteSrcPath, args.convertFields ?? false);
|
|
121
|
-
if (args.clean) {
|
|
122
|
-
// If clean is true, will first delete the dest folder and then upload src. Cleans up files that only exist on HS.
|
|
123
|
-
let cleanUpload = args.force;
|
|
124
|
-
if (!args.force) {
|
|
125
|
-
cleanUpload = await confirmPrompt(commands.upload.confirmCleanUpload(dest, derivedAccountId), { defaultAnswer: false });
|
|
126
|
-
}
|
|
127
|
-
if (cleanUpload) {
|
|
128
|
-
try {
|
|
129
|
-
await deleteFile(derivedAccountId, dest);
|
|
130
|
-
uiLogger.log(commands.upload.cleaning(dest, derivedAccountId));
|
|
131
|
-
}
|
|
132
|
-
catch (error) {
|
|
133
|
-
uiLogger.error(commands.upload.errors.deleteFailed(dest, derivedAccountId));
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
uploadFolder(derivedAccountId, absoluteSrcPath, dest, {}, {
|
|
138
|
-
convertFields: args.convertFields,
|
|
139
|
-
// @ts-expect-error - fieldOptions is a string or string[]
|
|
140
|
-
fieldOptions: args.fieldOptions ?? undefined,
|
|
141
|
-
saveOutput: args.saveOutput,
|
|
142
|
-
}, filePaths)
|
|
143
|
-
.then(results => {
|
|
144
|
-
if (!hasUploadErrors(results)) {
|
|
145
|
-
uiLogger.success(commands.upload.success.uploadComplete(dest));
|
|
146
|
-
logThemePreview(src, derivedAccountId);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
uiLogger.error(commands.upload.errors.someFilesFailed(dest));
|
|
150
|
-
process.exit(EXIT_CODES.WARNING);
|
|
151
|
-
}
|
|
152
|
-
})
|
|
153
|
-
.catch(error => {
|
|
154
|
-
uiLogger.error(commands.upload.errors.uploadFailed(src, dest));
|
|
155
|
-
logError(error, {
|
|
156
|
-
accountId: derivedAccountId,
|
|
157
|
-
});
|
|
158
|
-
process.exit(EXIT_CODES.WARNING);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
8
|
+
uiCommandRelocatedMessage('hs cms upload');
|
|
9
|
+
await cmsUploadCommand.handler(args);
|
|
161
10
|
}
|
|
162
|
-
function
|
|
11
|
+
function deprecatedCmsUploadBuilder(yargs) {
|
|
163
12
|
yargs.positional('src', {
|
|
164
|
-
describe: commands.upload.positionals.src,
|
|
13
|
+
describe: commands.cms.subcommands.upload.positionals.src,
|
|
165
14
|
type: 'string',
|
|
166
15
|
});
|
|
167
16
|
yargs.positional('dest', {
|
|
168
|
-
describe: commands.upload.positionals.dest,
|
|
17
|
+
describe: commands.cms.subcommands.upload.positionals.dest,
|
|
169
18
|
type: 'string',
|
|
170
19
|
});
|
|
171
20
|
yargs.option('fieldOptions', {
|
|
172
|
-
describe: commands.upload.options.options,
|
|
21
|
+
describe: commands.cms.subcommands.upload.options.options,
|
|
173
22
|
type: 'array',
|
|
174
23
|
default: [''],
|
|
175
24
|
hidden: true,
|
|
176
25
|
});
|
|
177
26
|
yargs.option('saveOutput', {
|
|
178
|
-
describe: commands.upload.options.saveOutput,
|
|
27
|
+
describe: commands.cms.subcommands.upload.options.saveOutput,
|
|
179
28
|
type: 'boolean',
|
|
180
29
|
default: false,
|
|
181
30
|
});
|
|
182
31
|
yargs.option('convertFields', {
|
|
183
|
-
describe: commands.upload.options.convertFields,
|
|
32
|
+
describe: commands.cms.subcommands.upload.options.convertFields,
|
|
184
33
|
type: 'boolean',
|
|
185
34
|
default: false,
|
|
186
35
|
});
|
|
187
36
|
yargs.option('clean', {
|
|
188
|
-
describe: commands.upload.options.clean,
|
|
37
|
+
describe: commands.cms.subcommands.upload.options.clean,
|
|
189
38
|
type: 'boolean',
|
|
190
39
|
default: false,
|
|
191
40
|
});
|
|
192
41
|
yargs.option('force', {
|
|
193
|
-
describe: commands.upload.options.force,
|
|
42
|
+
describe: commands.cms.subcommands.upload.options.force,
|
|
194
43
|
type: 'boolean',
|
|
195
44
|
default: false,
|
|
196
45
|
});
|
|
197
46
|
return yargs;
|
|
198
47
|
}
|
|
199
|
-
const
|
|
48
|
+
const verboseDescribe = uiCommandRenamedDescription(cmsUploadCommand.describe, 'hs cms upload');
|
|
49
|
+
const builder = makeYargsBuilder(deprecatedCmsUploadBuilder, command, verboseDescribe, {
|
|
200
50
|
useGlobalOptions: true,
|
|
201
51
|
useConfigOptions: true,
|
|
202
52
|
useAccountOptions: true,
|
|
203
53
|
useEnvironmentOptions: true,
|
|
204
54
|
useCmsPublishModeOptions: true,
|
|
205
55
|
});
|
|
206
|
-
const
|
|
207
|
-
|
|
56
|
+
const deprecatedCmsUploadCommand = {
|
|
57
|
+
...cmsUploadCommand,
|
|
208
58
|
describe,
|
|
209
59
|
handler,
|
|
210
60
|
builder,
|
|
211
61
|
};
|
|
212
|
-
export default
|
|
62
|
+
export default deprecatedCmsUploadCommand;
|
package/commands/watch.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fieldOptions?: string[];
|
|
6
|
-
remove?: boolean;
|
|
7
|
-
initialUpload?: boolean;
|
|
8
|
-
disableInitial?: boolean;
|
|
9
|
-
notify?: string;
|
|
10
|
-
convertFields?: boolean;
|
|
11
|
-
saveOutput?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const watchCommand: YargsCommandModule<unknown, WatchCommandArgs>;
|
|
14
|
-
export default watchCommand;
|
|
1
|
+
import { YargsCommandModule } from '../types/Yargs.js';
|
|
2
|
+
import { WatchCommandArgs } from './cms/watch.js';
|
|
3
|
+
declare const deprecatedCmsWatchCommand: YargsCommandModule<unknown, WatchCommandArgs>;
|
|
4
|
+
export default deprecatedCmsWatchCommand;
|