@hubspot/cli 7.5.1-experimental.0 → 7.5.2-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/api/migrate.d.ts +12 -3
- package/api/migrate.js +9 -2
- package/bin/cli.js +96 -93
- package/commands/account/auth.d.ts +6 -0
- package/commands/account/auth.js +167 -0
- package/commands/account/clean.d.ts +3 -7
- package/commands/account/clean.js +54 -14
- package/commands/account/createOverride.d.ts +6 -0
- package/commands/account/createOverride.js +121 -0
- package/commands/account/info.d.ts +3 -7
- package/commands/account/info.js +51 -9
- package/commands/account/list.d.ts +3 -7
- package/commands/account/list.js +38 -13
- package/commands/account/remove.d.ts +3 -7
- package/commands/account/remove.js +57 -11
- package/commands/account/removeOverride.d.ts +6 -0
- package/commands/account/removeOverride.js +93 -0
- 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 +39 -9
- package/commands/account.d.ts +3 -4
- package/commands/account.js +33 -53
- package/commands/app/migrate.d.ts +5 -6
- package/commands/app/migrate.js +60 -44
- 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 +10 -10
- package/commands/auth.d.ts +3 -7
- package/commands/auth.js +20 -25
- 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 +133 -100
- package/commands/cms.d.ts +3 -1
- package/commands/cms.js +22 -16
- package/commands/completion.d.ts +3 -1
- package/commands/completion.js +23 -13
- package/commands/config/migrate.d.ts +6 -0
- package/commands/config/migrate.js +75 -0
- package/commands/config/set.d.ts +10 -1
- package/commands/config/set.js +61 -32
- package/commands/config.d.ts +3 -1
- package/commands/config.js +19 -11
- package/commands/create/api-sample.d.ts +3 -1
- package/commands/create/api-sample.js +34 -36
- 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 +62 -75
- 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 +21 -11
- package/commands/customObject/schema/fetch-all.d.ts +4 -9
- package/commands/customObject/schema/fetch-all.js +19 -11
- package/commands/customObject/schema/fetch.d.ts +4 -9
- package/commands/customObject/schema/fetch.js +19 -11
- 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 -48
- package/commands/doctor.d.ts +6 -8
- package/commands/doctor.js +30 -22
- package/commands/feedback.d.ts +4 -1
- package/commands/feedback.js +38 -48
- package/commands/fetch.d.ts +12 -1
- package/commands/fetch.js +49 -34
- 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 +18 -42
- 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 +22 -11
- package/commands/hubdb/clear.d.ts +4 -9
- package/commands/hubdb/clear.js +21 -15
- package/commands/hubdb/create.d.ts +4 -9
- package/commands/hubdb/create.js +23 -17
- package/commands/hubdb/delete.d.ts +4 -9
- package/commands/hubdb/delete.js +24 -16
- package/commands/hubdb/fetch.d.ts +4 -9
- package/commands/hubdb/fetch.js +20 -14
- package/commands/hubdb.d.ts +3 -2
- package/commands/hubdb.js +22 -47
- package/commands/init.d.ts +3 -7
- package/commands/init.js +25 -23
- package/commands/lint.d.ts +6 -4
- package/commands/lint.js +42 -44
- package/commands/list.d.ts +3 -7
- package/commands/list.js +21 -16
- package/commands/logs.d.ts +10 -1
- package/commands/logs.js +53 -45
- package/commands/module/marketplace-validate.d.ts +6 -1
- package/commands/module/marketplace-validate.js +39 -30
- package/commands/module.d.ts +3 -1
- package/commands/module.js +23 -12
- package/commands/mv.d.ts +3 -7
- package/commands/mv.js +20 -15
- package/commands/open.d.ts +3 -7
- package/commands/open.js +20 -15
- package/commands/project/add.d.ts +8 -9
- package/commands/project/add.js +53 -85
- package/commands/project/cloneApp.d.ts +6 -8
- package/commands/project/cloneApp.js +51 -47
- package/commands/project/create.d.ts +4 -1
- package/commands/project/create.js +132 -81
- package/commands/project/deploy.d.ts +4 -6
- package/commands/project/deploy.js +66 -36
- package/commands/project/dev/deprecatedFlow.d.ts +8 -2
- package/commands/project/dev/deprecatedFlow.js +41 -26
- package/commands/project/dev/index.d.ts +4 -5
- package/commands/project/dev/index.js +103 -33
- package/commands/project/dev/unifiedFlow.d.ts +11 -2
- package/commands/project/dev/unifiedFlow.js +87 -46
- package/commands/project/download.d.ts +3 -7
- package/commands/project/download.js +18 -19
- package/commands/project/installDeps.d.ts +6 -1
- package/commands/project/installDeps.js +48 -32
- package/commands/project/listBuilds.d.ts +3 -7
- package/commands/project/listBuilds.js +32 -27
- package/commands/project/logs.d.ts +10 -1
- package/commands/project/logs.js +73 -65
- package/commands/project/migrate.d.ts +7 -8
- package/commands/project/migrate.js +49 -26
- package/commands/project/migrateApp.d.ts +3 -8
- package/commands/project/migrateApp.js +23 -20
- package/commands/project/open.d.ts +3 -7
- package/commands/project/open.js +29 -21
- 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 +10 -1
- package/commands/project/upload.js +110 -56
- package/commands/project/watch.d.ts +6 -1
- package/commands/project/watch.js +95 -61
- package/commands/project.d.ts +3 -1
- package/commands/project.js +47 -37
- package/commands/remove.d.ts +3 -7
- package/commands/remove.js +22 -20
- package/commands/sandbox/create.d.ts +4 -9
- package/commands/sandbox/create.js +27 -21
- package/commands/sandbox/delete.d.ts +4 -9
- package/commands/sandbox/delete.js +35 -29
- package/commands/sandbox.d.ts +3 -4
- package/commands/sandbox.js +18 -44
- package/commands/secret/addSecret.d.ts +4 -9
- package/commands/secret/addSecret.js +21 -15
- package/commands/secret/deleteSecret.d.ts +4 -9
- package/commands/secret/deleteSecret.js +28 -18
- package/commands/secret/listSecret.d.ts +4 -9
- package/commands/secret/listSecret.js +19 -13
- package/commands/secret/updateSecret.d.ts +4 -9
- package/commands/secret/updateSecret.js +25 -17
- package/commands/secret.d.ts +3 -4
- package/commands/secret.js +23 -49
- package/commands/theme/generate-selectors.d.ts +3 -7
- package/commands/theme/generate-selectors.js +20 -16
- package/commands/theme/marketplace-validate.d.ts +4 -9
- package/commands/theme/marketplace-validate.js +22 -18
- package/commands/theme/preview.d.ts +4 -9
- package/commands/theme/preview.js +36 -30
- package/commands/theme.d.ts +3 -4
- package/commands/theme.js +22 -48
- package/commands/upload.d.ts +12 -1
- package/commands/upload.js +116 -135
- package/commands/watch.d.ts +14 -1
- package/commands/watch.js +74 -76
- package/lang/en.d.ts +3078 -0
- package/lang/en.js +2940 -3317
- package/lang/en.lyaml +89 -214
- package/lib/accountTypes.d.ts +1 -0
- package/lib/accountTypes.js +11 -0
- package/lib/app/migrate.d.ts +33 -4
- package/lib/app/migrate.js +171 -86
- package/lib/app/migrate_legacy.d.ts +2 -2
- package/lib/app/migrate_legacy.js +12 -11
- package/lib/app/urls.d.ts +16 -0
- package/lib/app/urls.js +16 -0
- package/lib/buildAccount.d.ts +1 -2
- package/lib/buildAccount.js +11 -10
- package/lib/commonOpts.d.ts +4 -7
- package/lib/commonOpts.js +47 -19
- package/lib/configMigrate.d.ts +2 -0
- package/lib/configMigrate.js +83 -0
- package/lib/configOptions.d.ts +4 -0
- package/lib/configOptions.js +41 -45
- package/lib/constants.d.ts +24 -0
- package/lib/constants.js +25 -1
- package/lib/dependencyManagement.d.ts +0 -5
- package/lib/dependencyManagement.js +14 -40
- package/lib/doctor/Diagnosis.d.ts +1 -2
- package/lib/doctor/Diagnosis.js +19 -16
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +2 -1
- package/lib/doctor/DiagnosticInfoBuilder.js +10 -9
- package/lib/doctor/Doctor.d.ts +1 -0
- package/lib/doctor/Doctor.js +59 -45
- package/lib/errorHandlers/index.js +6 -7
- package/lib/errorHandlers/suppressError.js +18 -26
- package/lib/filesystem.d.ts +1 -1
- package/lib/generateSelectors.js +3 -6
- package/lib/hasFeature.d.ts +3 -1
- package/lib/interpolation.d.ts +2 -3
- package/lib/lang.d.ts +2 -3
- package/lib/marketplaceValidate.d.ts +12 -2
- package/lib/marketplaceValidate.js +22 -29
- package/lib/middleware/__test__/yargsChecksMiddleware.test.js +3 -3
- package/lib/middleware/autoUpdateMiddleware.d.ts +1 -0
- package/lib/middleware/autoUpdateMiddleware.js +89 -0
- package/lib/middleware/configMiddleware.js +23 -3
- package/lib/middleware/fireAlarmMiddleware.d.ts +4 -0
- package/lib/middleware/fireAlarmMiddleware.js +125 -0
- package/lib/middleware/yargsChecksMiddleware.js +2 -2
- package/lib/npm.d.ts +9 -0
- package/lib/npm.js +36 -0
- package/lib/oauth.js +1 -2
- package/lib/process.js +1 -2
- package/lib/projectProfiles.d.ts +6 -0
- package/lib/projectProfiles.js +65 -0
- package/lib/projects/ProjectLogsManager.d.ts +1 -1
- package/lib/projects/ProjectLogsManager.js +16 -21
- package/lib/projects/add/legacyAddComponent.d.ts +5 -0
- package/lib/projects/add/legacyAddComponent.js +48 -0
- package/lib/projects/add/v3AddComponent.d.ts +8 -0
- package/lib/projects/add/v3AddComponent.js +85 -0
- package/lib/projects/buildAndDeploy.js +45 -41
- package/lib/projects/components.d.ts +2 -0
- package/lib/projects/components.js +82 -0
- package/lib/projects/config.d.ts +9 -0
- package/lib/projects/config.js +79 -0
- package/lib/projects/create/index.d.ts +23 -0
- package/lib/projects/create/index.js +33 -0
- package/lib/projects/create/legacy.d.ts +6 -0
- package/lib/projects/{create.js → create/legacy.js} +23 -15
- package/lib/projects/create/v3.d.ts +27 -0
- package/lib/projects/create/v3.js +158 -0
- package/lib/projects/ensureProjectExists.d.ts +11 -0
- package/lib/projects/ensureProjectExists.js +97 -0
- package/lib/projects/localDev/AppDevModeInterface.d.ts +26 -0
- package/lib/projects/localDev/AppDevModeInterface.js +178 -0
- package/lib/{DevServerManager.d.ts → projects/localDev/DevServerManager.d.ts} +1 -1
- package/lib/{DevServerManager.js → projects/localDev/DevServerManager.js} +6 -6
- package/lib/projects/localDev/DevServerManagerV2.d.ts +22 -0
- package/lib/{DevServerManagerV2.js → projects/localDev/DevServerManagerV2.js} +22 -19
- package/lib/projects/localDev/LocalDevLogger.d.ts +30 -0
- package/lib/projects/localDev/LocalDevLogger.js +158 -0
- package/lib/{LocalDevManager.d.ts → projects/localDev/LocalDevManager.d.ts} +1 -1
- package/lib/{LocalDevManager.js → projects/localDev/LocalDevManager.js} +57 -83
- package/lib/projects/localDev/LocalDevProcess.d.ts +33 -0
- package/lib/projects/localDev/LocalDevProcess.js +198 -0
- package/lib/projects/localDev/LocalDevState.d.ts +47 -0
- package/lib/projects/localDev/LocalDevState.js +109 -0
- package/lib/projects/localDev/LocalDevWatcher.d.ts +10 -0
- package/lib/projects/localDev/LocalDevWatcher.js +53 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +20 -0
- package/lib/projects/localDev/LocalDevWebsocketServer.js +130 -0
- package/lib/{localDev.d.ts → projects/localDev/helpers.d.ts} +6 -4
- package/lib/{localDev.js → projects/localDev/helpers.js} +127 -114
- package/lib/projects/ui.d.ts +1 -0
- package/lib/projects/ui.js +15 -0
- package/lib/projects/upload.d.ts +14 -2
- package/lib/projects/upload.js +25 -35
- package/lib/projects/urls.d.ts +1 -0
- package/lib/projects/urls.js +6 -0
- package/lib/projects/watch.d.ts +1 -1
- package/lib/projects/watch.js +21 -18
- package/lib/prompts/accountNamePrompt.js +16 -13
- package/lib/prompts/accountsPrompt.js +1 -2
- package/lib/prompts/cmsFieldPrompt.js +1 -2
- package/lib/prompts/createApiSamplePrompt.d.ts +2 -10
- package/lib/prompts/createApiSamplePrompt.js +4 -5
- package/lib/prompts/createFunctionPrompt.js +13 -14
- package/lib/prompts/createModulePrompt.js +8 -9
- package/lib/prompts/createProjectPrompt.d.ts +20 -4
- package/lib/prompts/createProjectPrompt.js +41 -13
- package/lib/prompts/createTemplatePrompt.d.ts +22 -4
- package/lib/prompts/createTemplatePrompt.js +1 -2
- package/lib/prompts/downloadProjectPrompt.js +3 -4
- package/lib/prompts/installAppPrompt.d.ts +1 -0
- package/lib/prompts/installAppPrompt.js +35 -0
- package/lib/prompts/personalAccessKeyPrompt.js +17 -18
- package/lib/prompts/previewPrompt.js +5 -6
- package/lib/prompts/projectAddPrompt.d.ts +5 -1
- package/lib/prompts/projectAddPrompt.js +35 -8
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +6 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +15 -16
- package/lib/prompts/projectNamePrompt.js +5 -6
- package/lib/prompts/projectsLogsPrompt.js +3 -2
- package/lib/prompts/promptUtils.d.ts +3 -2
- package/lib/prompts/promptUtils.js +2 -1
- package/lib/prompts/sandboxesPrompt.js +5 -6
- package/lib/prompts/secretPrompt.js +2 -3
- package/lib/prompts/selectAppPrompt.d.ts +2 -0
- package/lib/prompts/selectAppPrompt.js +40 -0
- package/lib/prompts/selectHubDBTablePrompt.js +11 -8
- package/lib/prompts/{selectPublicAppPrompt.d.ts → selectPublicAppForMigrationPrompt.d.ts} +1 -1
- package/lib/prompts/{selectPublicAppPrompt.js → selectPublicAppForMigrationPrompt.js} +8 -9
- package/lib/prompts/setAsDefaultAccountPrompt.js +11 -2
- package/lib/prompts/uploadPrompt.js +4 -5
- package/lib/sandboxSync.js +15 -14
- package/lib/sandboxes.js +12 -13
- package/lib/serverlessLogs.js +4 -6
- package/lib/testUtils.d.ts +3 -3
- package/lib/testUtils.js +8 -9
- package/lib/ui/SpinniesManager.d.ts +1 -1
- package/lib/ui/boxen.d.ts +5 -0
- package/lib/ui/boxen.js +30 -0
- package/lib/ui/git.js +8 -9
- package/lib/ui/index.d.ts +4 -2
- package/lib/ui/index.js +20 -17
- package/lib/ui/logger.d.ts +10 -0
- package/lib/ui/logger.js +15 -0
- package/lib/ui/serverlessFunctionLogs.js +2 -3
- package/lib/ui/spinniesUtils.d.ts +5 -5
- package/lib/upload.d.ts +1 -1
- package/lib/validation.js +4 -5
- package/lib/yargsUtils.d.ts +5 -1
- package/lib/yargsUtils.js +6 -0
- package/package.json +16 -10
- package/types/Cms.d.ts +30 -0
- package/types/Cms.js +2 -0
- package/types/LocalDev.d.ts +33 -0
- package/types/LocalDev.js +2 -0
- package/types/Projects.d.ts +19 -2
- package/types/Prompts.d.ts +0 -7
- package/types/Yargs.d.ts +14 -14
- package/lib/DevServerManagerV2.d.ts +0 -33
- package/lib/LocalDevManagerV2.d.ts +0 -64
- package/lib/LocalDevManagerV2.js +0 -377
- package/lib/projects/create.d.ts +0 -5
- package/lib/projects/index.d.ts +0 -21
- package/lib/projects/index.js +0 -194
- package/lib/prompts/installPublicAppPrompt.d.ts +0 -1
- package/lib/prompts/installPublicAppPrompt.js +0 -40
package/commands/secret.d.ts
CHANGED
|
@@ -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 secretCommand: YargsCommandModuleBucket;
|
|
3
|
+
export default secretCommand;
|
package/commands/secret.js
CHANGED
|
@@ -1,56 +1,30 @@
|
|
|
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
|
|
39
|
-
const
|
|
40
|
-
const listSecretCommand = __importStar(require("./secret/listSecret"));
|
|
41
|
-
const deleteSecretCommand = __importStar(require("./secret/deleteSecret"));
|
|
42
|
-
const updateSecretCommand = __importStar(require("./secret/updateSecret"));
|
|
6
|
+
const addSecret_1 = __importDefault(require("./secret/addSecret"));
|
|
7
|
+
const listSecret_1 = __importDefault(require("./secret/listSecret"));
|
|
8
|
+
const deleteSecret_1 = __importDefault(require("./secret/deleteSecret"));
|
|
9
|
+
const updateSecret_1 = __importDefault(require("./secret/updateSecret"));
|
|
43
10
|
const lang_1 = require("../lib/lang");
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
function
|
|
48
|
-
(0, commonOpts_1.addGlobalOptions)(yargs);
|
|
11
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
12
|
+
const command = ['secret', 'secrets'];
|
|
13
|
+
const describe = (0, lang_1.i18n)(`commands.secret.describe`);
|
|
14
|
+
function secretBuilder(yargs) {
|
|
49
15
|
yargs
|
|
50
|
-
.command(
|
|
51
|
-
.command(
|
|
52
|
-
.command(
|
|
53
|
-
.command(
|
|
16
|
+
.command(listSecret_1.default)
|
|
17
|
+
.command(addSecret_1.default)
|
|
18
|
+
.command(updateSecret_1.default)
|
|
19
|
+
.command(deleteSecret_1.default)
|
|
54
20
|
.demandCommand(1, '');
|
|
55
21
|
return yargs;
|
|
56
22
|
}
|
|
23
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(secretBuilder, command, describe);
|
|
24
|
+
const secretCommand = {
|
|
25
|
+
command,
|
|
26
|
+
describe,
|
|
27
|
+
builder,
|
|
28
|
+
handler: () => { },
|
|
29
|
+
};
|
|
30
|
+
exports.default = secretCommand;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommonArgs } from '../../types/Yargs';
|
|
3
|
-
export declare const command = "generate-selectors <path>";
|
|
4
|
-
export declare const describe: string;
|
|
1
|
+
import { CommonArgs, YargsCommandModule } from '../../types/Yargs';
|
|
5
2
|
type ThemeSelectorArgs = CommonArgs & {
|
|
6
3
|
path: string;
|
|
7
4
|
};
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export {};
|
|
5
|
+
declare const themeSelectorsCommand: YargsCommandModule<unknown, ThemeSelectorArgs>;
|
|
6
|
+
export default themeSelectorsCommand;
|
|
@@ -3,14 +3,12 @@ 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
|
-
exports.describe = exports.command = void 0;
|
|
7
|
-
exports.handler = handler;
|
|
8
|
-
exports.builder = builder;
|
|
9
6
|
const fs_1 = __importDefault(require("fs"));
|
|
10
|
-
const
|
|
11
|
-
const lang_1 = require("../../lib/lang");
|
|
7
|
+
const en_1 = require("../../lang/en");
|
|
12
8
|
const generateSelectors_1 = require("../../lib/generateSelectors");
|
|
13
9
|
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
10
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
11
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
14
12
|
const HUBL_EXPRESSION_REGEX = new RegExp(/{%\s*(.*)\s*%}/, 'g');
|
|
15
13
|
const HUBL_VARIABLE_NAME_REGEX = new RegExp(/{%\s*set\s*(\w*)/, 'i');
|
|
16
14
|
const HUBL_STATEMENT_REGEX = new RegExp(/{{\s*[\w.(,\d\-\s)|/~]*.*}}/, 'g');
|
|
@@ -20,14 +18,13 @@ const CSS_VARS_NAME_REGEX = new RegExp(/(--[\w.(,\d\-)]*)/, 'g');
|
|
|
20
18
|
const CSS_SELECTORS_REGEX = new RegExp(/([\s\w:.,\0-[\]]*){/, 'i');
|
|
21
19
|
const CSS_EXPRESSION_REGEX = new RegExp(/(?!\s)([^}])*(?![.#\s,>])[^}]*}/, 'g');
|
|
22
20
|
const THEME_PATH_REGEX = new RegExp(/=\s*.*(theme\.(\w|\.)*)/, 'i');
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
exports.describe = (0, lang_1.i18n)(`${i18nKey}.describe`);
|
|
21
|
+
const command = 'generate-selectors <path>';
|
|
22
|
+
const describe = en_1.commands.theme.subcommands.generateSelectors.describe;
|
|
26
23
|
async function handler(args) {
|
|
27
24
|
const { path } = args;
|
|
28
25
|
const fieldsJsonPath = (0, generateSelectors_1.findFieldsJsonPath)(path);
|
|
29
26
|
if (!fieldsJsonPath) {
|
|
30
|
-
logger_1.
|
|
27
|
+
logger_1.uiLogger.error(en_1.commands.theme.subcommands.generateSelectors.errors.fieldsNotFound);
|
|
31
28
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
32
29
|
}
|
|
33
30
|
let fieldsJson = JSON.parse(fs_1.default.readFileSync(fieldsJsonPath, 'utf-8'));
|
|
@@ -137,7 +134,7 @@ async function handler(args) {
|
|
|
137
134
|
return themeFieldsSelectorMap;
|
|
138
135
|
}, {});
|
|
139
136
|
if (!Object.keys(finalMap).length) {
|
|
140
|
-
logger_1.
|
|
137
|
+
logger_1.uiLogger.error(en_1.commands.theme.subcommands.generateSelectors.errors.noSelectorsFound);
|
|
141
138
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
142
139
|
}
|
|
143
140
|
Object.keys(finalMap).forEach(themeFieldKey => {
|
|
@@ -154,16 +151,23 @@ async function handler(args) {
|
|
|
154
151
|
const selectorsMap = (0, generateSelectors_1.generateSelectorsMap)(fieldsJson);
|
|
155
152
|
const selectorsPath = `${path}/editor-preview.json`;
|
|
156
153
|
fs_1.default.writeFileSync(selectorsPath, `${JSON.stringify({ selectors: selectorsMap }, null, 2)}\n`);
|
|
157
|
-
logger_1.
|
|
158
|
-
themePath: path,
|
|
159
|
-
selectorsPath,
|
|
160
|
-
}));
|
|
154
|
+
logger_1.uiLogger.success(en_1.commands.theme.subcommands.generateSelectors.success(path, selectorsPath));
|
|
161
155
|
}
|
|
162
|
-
function
|
|
156
|
+
function themeSelectorBuilder(yargs) {
|
|
163
157
|
yargs.positional('path', {
|
|
164
|
-
describe:
|
|
158
|
+
describe: en_1.commands.theme.subcommands.generateSelectors.positionals.path,
|
|
165
159
|
type: 'string',
|
|
166
160
|
required: true,
|
|
167
161
|
});
|
|
168
162
|
return yargs;
|
|
169
163
|
}
|
|
164
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(themeSelectorBuilder, command, describe, {
|
|
165
|
+
useGlobalOptions: true,
|
|
166
|
+
});
|
|
167
|
+
const themeSelectorsCommand = {
|
|
168
|
+
command,
|
|
169
|
+
describe,
|
|
170
|
+
handler,
|
|
171
|
+
builder,
|
|
172
|
+
};
|
|
173
|
+
exports.default = themeSelectorsCommand;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const command = "marketplace-validate <path>";
|
|
4
|
-
export declare const describe: string;
|
|
5
|
-
type CombinedArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs;
|
|
6
|
-
type ThemeValidateArgs = CombinedArgs & {
|
|
1
|
+
import { CommonArgs, ConfigArgs, AccountArgs, EnvironmentArgs, YargsCommandModule } from '../../types/Yargs';
|
|
2
|
+
type ThemeValidateArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & {
|
|
7
3
|
path: string;
|
|
8
4
|
};
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export {};
|
|
5
|
+
declare const themeValidateCommand: YargsCommandModule<unknown, ThemeValidateArgs>;
|
|
6
|
+
export default themeValidateCommand;
|
|
@@ -3,43 +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
|
-
exports.describe = exports.command = void 0;
|
|
7
|
-
exports.handler = handler;
|
|
8
|
-
exports.builder = builder;
|
|
9
6
|
const SpinniesManager_1 = __importDefault(require("../../lib/ui/SpinniesManager"));
|
|
10
|
-
const commonOpts_1 = require("../../lib/commonOpts");
|
|
11
7
|
const usageTracking_1 = require("../../lib/usageTracking");
|
|
12
8
|
const marketplaceValidate_1 = require("../../lib/marketplaceValidate");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
const en_1 = require("../../lang/en");
|
|
10
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
11
|
+
const command = 'marketplace-validate <path>';
|
|
12
|
+
const describe = en_1.commands.theme.subcommands.marketplaceValidate.describe;
|
|
17
13
|
async function handler(args) {
|
|
18
14
|
const { path, derivedAccountId } = args;
|
|
19
15
|
(0, usageTracking_1.trackCommandUsage)('validate', {}, derivedAccountId);
|
|
20
16
|
SpinniesManager_1.default.init();
|
|
21
17
|
SpinniesManager_1.default.add('marketplaceValidation', {
|
|
22
|
-
text:
|
|
23
|
-
path,
|
|
24
|
-
}),
|
|
18
|
+
text: en_1.commands.theme.subcommands.marketplaceValidate.logs.validatingTheme(path),
|
|
25
19
|
});
|
|
26
20
|
const assetType = 'THEME';
|
|
27
21
|
const validationId = await (0, marketplaceValidate_1.kickOffValidation)(derivedAccountId, assetType, path);
|
|
28
22
|
await (0, marketplaceValidate_1.pollForValidationFinish)(derivedAccountId, validationId);
|
|
29
23
|
SpinniesManager_1.default.remove('marketplaceValidation');
|
|
30
24
|
const validationResults = await (0, marketplaceValidate_1.fetchValidationResults)(derivedAccountId, validationId);
|
|
31
|
-
(0, marketplaceValidate_1.processValidationErrors)(
|
|
32
|
-
(0, marketplaceValidate_1.displayValidationResults)(
|
|
25
|
+
(0, marketplaceValidate_1.processValidationErrors)(en_1.commands.theme.subcommands.marketplaceValidate.errors.invalidPath, validationResults);
|
|
26
|
+
(0, marketplaceValidate_1.displayValidationResults)(en_1.commands.theme.subcommands.marketplaceValidate.results, validationResults);
|
|
33
27
|
process.exit();
|
|
34
28
|
}
|
|
35
|
-
function
|
|
36
|
-
(0, commonOpts_1.addConfigOptions)(yargs);
|
|
37
|
-
(0, commonOpts_1.addAccountOptions)(yargs);
|
|
38
|
-
(0, commonOpts_1.addUseEnvironmentOptions)(yargs);
|
|
29
|
+
function themeValidateBuilder(yargs) {
|
|
39
30
|
yargs.positional('path', {
|
|
40
|
-
describe:
|
|
31
|
+
describe: en_1.commands.theme.subcommands.marketplaceValidate.positionals.path.describe,
|
|
41
32
|
type: 'string',
|
|
42
33
|
required: true,
|
|
43
34
|
});
|
|
44
35
|
return yargs;
|
|
45
36
|
}
|
|
37
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(themeValidateBuilder, command, describe, {
|
|
38
|
+
useGlobalOptions: true,
|
|
39
|
+
useConfigOptions: true,
|
|
40
|
+
useAccountOptions: true,
|
|
41
|
+
useEnvironmentOptions: true,
|
|
42
|
+
});
|
|
43
|
+
const themeValidateCommand = {
|
|
44
|
+
command,
|
|
45
|
+
describe,
|
|
46
|
+
handler,
|
|
47
|
+
builder,
|
|
48
|
+
};
|
|
49
|
+
exports.default = themeValidateCommand;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const command = "preview [--src] [--dest]";
|
|
4
|
-
export declare const describe: string;
|
|
5
|
-
type CombinedArgs = CommonArgs & ConfigArgs & AccountArgs;
|
|
6
|
-
type ThemePreviewArgs = CombinedArgs & {
|
|
1
|
+
import { CommonArgs, ConfigArgs, AccountArgs, YargsCommandModule } from '../../types/Yargs';
|
|
2
|
+
type ThemePreviewArgs = CommonArgs & ConfigArgs & AccountArgs & {
|
|
7
3
|
src: string;
|
|
8
4
|
dest: string;
|
|
9
5
|
notify: string;
|
|
@@ -12,6 +8,5 @@ type ThemePreviewArgs = CombinedArgs & {
|
|
|
12
8
|
resetSession?: boolean;
|
|
13
9
|
generateFieldsTypes?: boolean;
|
|
14
10
|
};
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export {};
|
|
11
|
+
declare const themePreviewCommand: YargsCommandModule<unknown, ThemePreviewArgs>;
|
|
12
|
+
export default themePreviewCommand;
|
|
@@ -3,37 +3,32 @@ 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
|
-
exports.describe = exports.command = void 0;
|
|
7
|
-
exports.handler = handler;
|
|
8
|
-
exports.builder = builder;
|
|
9
6
|
const fs_1 = __importDefault(require("fs"));
|
|
10
7
|
const path_1 = __importDefault(require("path"));
|
|
11
8
|
const cli_progress_1 = __importDefault(require("cli-progress"));
|
|
12
|
-
const
|
|
13
|
-
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
9
|
+
const en_1 = require("../../lang/en");
|
|
14
10
|
const path_2 = require("@hubspot/local-dev-lib/path");
|
|
15
11
|
const files_1 = require("@hubspot/local-dev-lib/constants/files");
|
|
16
12
|
const themes_1 = require("@hubspot/local-dev-lib/cms/themes");
|
|
17
13
|
const theme_preview_dev_server_1 = require("@hubspot/theme-preview-dev-server");
|
|
18
|
-
const commonOpts_1 = require("../../lib/commonOpts");
|
|
19
14
|
const upload_1 = require("../../lib/upload");
|
|
20
15
|
const usageTracking_1 = require("../../lib/usageTracking");
|
|
21
16
|
const previewPrompt_1 = require("../../lib/prompts/previewPrompt");
|
|
22
17
|
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
23
18
|
const index_1 = require("../../lib/errorHandlers/index");
|
|
24
19
|
const process_1 = require("../../lib/process");
|
|
25
|
-
const
|
|
20
|
+
const config_1 = require("../../lib/projects/config");
|
|
26
21
|
const structure_1 = require("../../lib/projects/structure");
|
|
27
22
|
const Projects_1 = require("../../types/Projects");
|
|
28
23
|
const hasFeature_1 = require("../../lib/hasFeature");
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
const constants_1 = require("../../lib/constants");
|
|
25
|
+
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
26
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
27
|
+
const command = 'preview [--src] [--dest]';
|
|
28
|
+
const describe = en_1.commands.theme.subcommands.preview.describe;
|
|
32
29
|
function validateSrcPath(src) {
|
|
33
30
|
const logInvalidPath = () => {
|
|
34
|
-
logger_1.
|
|
35
|
-
path: src,
|
|
36
|
-
}));
|
|
31
|
+
logger_1.uiLogger.error(en_1.commands.theme.subcommands.preview.errors.invalidPath(src));
|
|
37
32
|
};
|
|
38
33
|
try {
|
|
39
34
|
const stats = fs_1.default.statSync(src);
|
|
@@ -50,7 +45,7 @@ function validateSrcPath(src) {
|
|
|
50
45
|
}
|
|
51
46
|
function handleUserInput() {
|
|
52
47
|
const onTerminate = () => {
|
|
53
|
-
logger_1.
|
|
48
|
+
logger_1.uiLogger.log(en_1.commands.theme.subcommands.preview.logs.processExited);
|
|
54
49
|
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
55
50
|
};
|
|
56
51
|
(0, process_1.handleExit)(onTerminate);
|
|
@@ -63,7 +58,7 @@ function handleUserInput() {
|
|
|
63
58
|
async function determineSrcAndDest(args) {
|
|
64
59
|
let absoluteSrc;
|
|
65
60
|
let dest;
|
|
66
|
-
const { projectDir, projectConfig } = await (0,
|
|
61
|
+
const { projectDir, projectConfig } = await (0, config_1.getProjectConfig)();
|
|
67
62
|
if (!(projectDir && projectConfig)) {
|
|
68
63
|
// Not in a project, prompt for src and dest of traditional theme
|
|
69
64
|
const previewPromptAnswers = await (0, previewPrompt_1.previewPrompt)(args);
|
|
@@ -81,7 +76,7 @@ async function determineSrcAndDest(args) {
|
|
|
81
76
|
const projectComponents = await (0, structure_1.findProjectComponents)(projectDir);
|
|
82
77
|
const themeComponents = projectComponents.filter(c => c.type === Projects_1.ComponentTypes.HublTheme);
|
|
83
78
|
if (themeComponents.length === 0) {
|
|
84
|
-
logger_1.
|
|
79
|
+
logger_1.uiLogger.error(en_1.commands.theme.subcommands.preview.errors.noThemeComponents);
|
|
85
80
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
86
81
|
}
|
|
87
82
|
const answer = await (0, previewPrompt_1.previewProjectPrompt)(themeComponents);
|
|
@@ -105,7 +100,7 @@ async function handler(args) {
|
|
|
105
100
|
hideCursor: true,
|
|
106
101
|
}, cli_progress_1.default.Presets.rect);
|
|
107
102
|
initialUploadProgressBar.start(numFiles, 0, {
|
|
108
|
-
label:
|
|
103
|
+
label: en_1.commands.theme.subcommands.preview.initialUploadProgressBar.start,
|
|
109
104
|
});
|
|
110
105
|
let uploadsHaveStarted = false;
|
|
111
106
|
const uploadOptions = {
|
|
@@ -117,7 +112,8 @@ async function handler(args) {
|
|
|
117
112
|
if (!uploadsHaveStarted) {
|
|
118
113
|
uploadsHaveStarted = true;
|
|
119
114
|
initialUploadProgressBar.update(0, {
|
|
120
|
-
label:
|
|
115
|
+
label: en_1.commands.theme.subcommands.preview.initialUploadProgressBar
|
|
116
|
+
.uploading,
|
|
121
117
|
});
|
|
122
118
|
}
|
|
123
119
|
},
|
|
@@ -130,12 +126,12 @@ async function handler(args) {
|
|
|
130
126
|
onFinalErrorCallback: () => initialUploadProgressBar.increment(),
|
|
131
127
|
onFinishCallback: (results) => {
|
|
132
128
|
initialUploadProgressBar.update(numFiles, {
|
|
133
|
-
label:
|
|
129
|
+
label: en_1.commands.theme.subcommands.preview.initialUploadProgressBar.finish,
|
|
134
130
|
});
|
|
135
131
|
initialUploadProgressBar.stop();
|
|
136
132
|
results.forEach(result => {
|
|
137
133
|
if (result.resultType == files_1.FILE_UPLOAD_RESULT_TYPES.FAILURE) {
|
|
138
|
-
logger_1.
|
|
134
|
+
logger_1.uiLogger.error(en_1.commands.theme.subcommands.preview.errors.uploadFailed(result.file, dest));
|
|
139
135
|
(0, index_1.logError)(result.error, new index_1.ApiErrorContext({
|
|
140
136
|
accountId: derivedAccountId,
|
|
141
137
|
request: dest,
|
|
@@ -157,9 +153,9 @@ async function handler(args) {
|
|
|
157
153
|
createUnifiedDevServer = createDevServer;
|
|
158
154
|
}
|
|
159
155
|
catch (e) {
|
|
160
|
-
logger_1.
|
|
156
|
+
logger_1.uiLogger.warn('Unified dev server requires node 20 to run. Defaulting to legacy preview.');
|
|
161
157
|
}
|
|
162
|
-
const isUngatedForUnified = await (0, hasFeature_1.hasFeature)(derivedAccountId,
|
|
158
|
+
const isUngatedForUnified = await (0, hasFeature_1.hasFeature)(derivedAccountId, constants_1.FEATURES.UNIFIED_THEME_PREVIEW);
|
|
163
159
|
if (isUngatedForUnified && createUnifiedDevServer) {
|
|
164
160
|
if (port) {
|
|
165
161
|
process.env['PORT'] = port.toString();
|
|
@@ -183,32 +179,30 @@ async function handler(args) {
|
|
|
183
179
|
});
|
|
184
180
|
}
|
|
185
181
|
}
|
|
186
|
-
function
|
|
187
|
-
(0, commonOpts_1.addConfigOptions)(yargs);
|
|
188
|
-
(0, commonOpts_1.addAccountOptions)(yargs);
|
|
182
|
+
function themePreviewBuilder(yargs) {
|
|
189
183
|
yargs
|
|
190
184
|
.option('src', {
|
|
191
|
-
describe:
|
|
185
|
+
describe: en_1.commands.theme.subcommands.preview.positionals.src,
|
|
192
186
|
type: 'string',
|
|
193
187
|
requiresArg: true,
|
|
194
188
|
})
|
|
195
189
|
.option('dest', {
|
|
196
|
-
describe:
|
|
190
|
+
describe: en_1.commands.theme.subcommands.preview.positionals.dest,
|
|
197
191
|
type: 'string',
|
|
198
192
|
requiresArg: true,
|
|
199
193
|
})
|
|
200
194
|
.option('notify', {
|
|
201
195
|
alias: 'n',
|
|
202
|
-
describe:
|
|
196
|
+
describe: en_1.commands.theme.subcommands.preview.options.notify,
|
|
203
197
|
type: 'string',
|
|
204
198
|
requiresArg: true,
|
|
205
199
|
})
|
|
206
200
|
.option('no-ssl', {
|
|
207
|
-
describe:
|
|
201
|
+
describe: en_1.commands.theme.subcommands.preview.options.noSsl,
|
|
208
202
|
type: 'boolean',
|
|
209
203
|
})
|
|
210
204
|
.option('port', {
|
|
211
|
-
describe:
|
|
205
|
+
describe: en_1.commands.theme.subcommands.preview.options.port,
|
|
212
206
|
type: 'number',
|
|
213
207
|
})
|
|
214
208
|
.option('resetSession', {
|
|
@@ -221,3 +215,15 @@ function builder(yargs) {
|
|
|
221
215
|
});
|
|
222
216
|
return yargs;
|
|
223
217
|
}
|
|
218
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(themePreviewBuilder, command, describe, {
|
|
219
|
+
useGlobalOptions: true,
|
|
220
|
+
useConfigOptions: true,
|
|
221
|
+
useAccountOptions: true,
|
|
222
|
+
});
|
|
223
|
+
const themePreviewCommand = {
|
|
224
|
+
command,
|
|
225
|
+
describe,
|
|
226
|
+
handler,
|
|
227
|
+
builder,
|
|
228
|
+
};
|
|
229
|
+
exports.default = themePreviewCommand;
|
package/commands/theme.d.ts
CHANGED
|
@@ -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 themeCommand: YargsCommandModuleBucket;
|
|
3
|
+
export default themeCommand;
|
package/commands/theme.js
CHANGED
|
@@ -1,54 +1,28 @@
|
|
|
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
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
exports.command = ['theme', 'themes'];
|
|
45
|
-
exports.describe = (0, lang_1.i18n)(`${i18nKey}.describe`);
|
|
46
|
-
function builder(yargs) {
|
|
47
|
-
(0, commonOpts_1.addGlobalOptions)(yargs);
|
|
6
|
+
const marketplace_validate_1 = __importDefault(require("./theme/marketplace-validate"));
|
|
7
|
+
const generate_selectors_1 = __importDefault(require("./theme/generate-selectors"));
|
|
8
|
+
const preview_1 = __importDefault(require("./theme/preview"));
|
|
9
|
+
const en_1 = require("../lang/en");
|
|
10
|
+
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
11
|
+
const command = ['theme', 'themes'];
|
|
12
|
+
const describe = en_1.commands.theme.describe;
|
|
13
|
+
function themeBuilder(yargs) {
|
|
48
14
|
yargs
|
|
49
|
-
.command(
|
|
50
|
-
.command(
|
|
51
|
-
.command(
|
|
15
|
+
.command(preview_1.default)
|
|
16
|
+
.command(marketplace_validate_1.default)
|
|
17
|
+
.command(generate_selectors_1.default)
|
|
52
18
|
.demandCommand(1, '');
|
|
53
19
|
return yargs;
|
|
54
20
|
}
|
|
21
|
+
const builder = (0, yargsUtils_1.makeYargsBuilder)(themeBuilder, command, describe);
|
|
22
|
+
const themeCommand = {
|
|
23
|
+
command,
|
|
24
|
+
describe,
|
|
25
|
+
builder,
|
|
26
|
+
handler: () => { },
|
|
27
|
+
};
|
|
28
|
+
exports.default = themeCommand;
|
package/commands/upload.d.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { CommonArgs, ConfigArgs, AccountArgs, EnvironmentArgs, CmsPublishModeArgs, YargsCommandModule } from '../types/Yargs';
|
|
2
|
+
type UploadArgs = CommonArgs & ConfigArgs & AccountArgs & EnvironmentArgs & CmsPublishModeArgs & {
|
|
3
|
+
src?: string;
|
|
4
|
+
dest?: string;
|
|
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;
|