@contentstack/cli-utilities 1.17.2 ā 1.17.3
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/lib/index.d.ts +2 -2
- package/lib/index.js +3 -3
- package/lib/management-types.d.ts +16 -0
- package/lib/management-types.js +2 -0
- package/lib/progress-summary/summary-manager.js +1 -1
- package/package.json +6 -6
- package/lib/flag-deprecation-check.d.ts +0 -7
- package/lib/flag-deprecation-check.js +0 -40
package/lib/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { default as messageHandler } from './message-handler';
|
|
|
7
7
|
export { default as authHandler } from './auth-handler';
|
|
8
8
|
export { default as configHandler } from './config-handler';
|
|
9
9
|
export { default as managementSDKClient, managementSDKInitiator, ContentstackClient, ContentstackConfig, } from './contentstack-management-sdk';
|
|
10
|
-
export
|
|
10
|
+
export * from './management-types';
|
|
11
11
|
export * from './http-client';
|
|
12
12
|
export * from './fs-utility';
|
|
13
13
|
export { default as NodeCrypto } from './encrypter';
|
|
@@ -25,5 +25,5 @@ export { FlagInput, ArgInput, FlagDefinition } from '@oclif/core/lib/interfaces/
|
|
|
25
25
|
export { default as TablePrompt } from './inquirer-table-prompt';
|
|
26
26
|
export { Logger };
|
|
27
27
|
export { default as authenticationHandler } from './authentication-handler';
|
|
28
|
-
export { v2Logger as log, cliErrorHandler, handleAndLogError, getLogPath } from './logger/log';
|
|
28
|
+
export { v2Logger as log, cliErrorHandler, handleAndLogError, getLogPath, getSessionLogPath } from './logger/log';
|
|
29
29
|
export { CLIProgressManager, SummaryManager, PrimaryProcessStrategy, ProgressStrategyRegistry, CustomProgressStrategy, DefaultProgressStrategy } from './progress-summary';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DefaultProgressStrategy = exports.CustomProgressStrategy = exports.ProgressStrategyRegistry = exports.PrimaryProcessStrategy = exports.SummaryManager = exports.CLIProgressManager = exports.getLogPath = exports.handleAndLogError = exports.cliErrorHandler = exports.log = exports.authenticationHandler = exports.Logger = exports.TablePrompt = exports.execute = exports.ux = exports.flush = exports.settings = exports.toConfiguredId = exports.toStandardizedId = exports.run = exports.Plugin = exports.Parser = exports.Interfaces = exports.HelpBase = exports.Help = exports.loadHelpClass = exports.Flags = exports.Errors = exports.Config = exports.CommandHelp = exports.Args = exports.marketplaceSDKInitiator = exports.MarketplaceSDKInitiator = exports.marketplaceSDKClient = exports.CLITable = exports.createLogContext = exports.Command = exports.flags = exports.args = exports.NodeCrypto = exports.
|
|
3
|
+
exports.DefaultProgressStrategy = exports.CustomProgressStrategy = exports.ProgressStrategyRegistry = exports.PrimaryProcessStrategy = exports.SummaryManager = exports.CLIProgressManager = exports.getSessionLogPath = exports.getLogPath = exports.handleAndLogError = exports.cliErrorHandler = exports.log = exports.authenticationHandler = exports.Logger = exports.TablePrompt = exports.execute = exports.ux = exports.flush = exports.settings = exports.toConfiguredId = exports.toStandardizedId = exports.run = exports.Plugin = exports.Parser = exports.Interfaces = exports.HelpBase = exports.Help = exports.loadHelpClass = exports.Flags = exports.Errors = exports.Config = exports.CommandHelp = exports.Args = exports.marketplaceSDKInitiator = exports.MarketplaceSDKInitiator = exports.marketplaceSDKClient = exports.CLITable = exports.createLogContext = exports.Command = exports.flags = exports.args = exports.NodeCrypto = exports.managementSDKInitiator = exports.managementSDKClient = exports.configHandler = exports.authHandler = exports.messageHandler = exports.CLIError = exports.cliux = exports.LoggerService = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const logger_1 = tslib_1.__importDefault(require("./logger"));
|
|
6
6
|
exports.Logger = logger_1.default;
|
|
@@ -23,8 +23,7 @@ Object.defineProperty(exports, "configHandler", { enumerable: true, get: functio
|
|
|
23
23
|
var contentstack_management_sdk_1 = require("./contentstack-management-sdk");
|
|
24
24
|
Object.defineProperty(exports, "managementSDKClient", { enumerable: true, get: function () { return tslib_1.__importDefault(contentstack_management_sdk_1).default; } });
|
|
25
25
|
Object.defineProperty(exports, "managementSDKInitiator", { enumerable: true, get: function () { return contentstack_management_sdk_1.managementSDKInitiator; } });
|
|
26
|
-
|
|
27
|
-
Object.defineProperty(exports, "printFlagDeprecation", { enumerable: true, get: function () { return tslib_1.__importDefault(flag_deprecation_check_1).default; } });
|
|
26
|
+
tslib_1.__exportStar(require("./management-types"), exports);
|
|
28
27
|
tslib_1.__exportStar(require("./http-client"), exports);
|
|
29
28
|
tslib_1.__exportStar(require("./fs-utility"), exports);
|
|
30
29
|
var encrypter_1 = require("./encrypter");
|
|
@@ -71,6 +70,7 @@ Object.defineProperty(exports, "log", { enumerable: true, get: function () { ret
|
|
|
71
70
|
Object.defineProperty(exports, "cliErrorHandler", { enumerable: true, get: function () { return log_1.cliErrorHandler; } });
|
|
72
71
|
Object.defineProperty(exports, "handleAndLogError", { enumerable: true, get: function () { return log_1.handleAndLogError; } });
|
|
73
72
|
Object.defineProperty(exports, "getLogPath", { enumerable: true, get: function () { return log_1.getLogPath; } });
|
|
73
|
+
Object.defineProperty(exports, "getSessionLogPath", { enumerable: true, get: function () { return log_1.getSessionLogPath; } });
|
|
74
74
|
var progress_summary_1 = require("./progress-summary");
|
|
75
75
|
Object.defineProperty(exports, "CLIProgressManager", { enumerable: true, get: function () { return progress_summary_1.CLIProgressManager; } });
|
|
76
76
|
Object.defineProperty(exports, "SummaryManager", { enumerable: true, get: function () { return progress_summary_1.SummaryManager; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of @contentstack/management types for CLI consumers.
|
|
3
|
+
* Import these from @contentstack/cli-utilities instead of @contentstack/management.
|
|
4
|
+
*/
|
|
5
|
+
export type { Stack as ManagementStack } from '@contentstack/management/types/stack';
|
|
6
|
+
export type { AssetData } from '@contentstack/management/types/stack/asset';
|
|
7
|
+
export type { LocaleData } from '@contentstack/management/types/stack/locale';
|
|
8
|
+
export type { PublishConfig } from '@contentstack/management/types/utility/publish';
|
|
9
|
+
export type { FolderData } from '@contentstack/management/types/stack/asset/folder';
|
|
10
|
+
export type { ExtensionData } from '@contentstack/management/types/stack/extension';
|
|
11
|
+
export type { EnvironmentData } from '@contentstack/management/types/stack/environment';
|
|
12
|
+
export type { LabelData } from '@contentstack/management/types/stack/label';
|
|
13
|
+
export type { WebhookData } from '@contentstack/management/types/stack/webhook';
|
|
14
|
+
export type { WorkflowData } from '@contentstack/management/types/stack/workflow';
|
|
15
|
+
export type { RoleData } from '@contentstack/management/types/stack/role';
|
|
16
|
+
export type { GlobalFieldData, GlobalField } from '@contentstack/management/types/stack/globalField';
|
|
@@ -144,7 +144,7 @@ class SummaryManager {
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
console.log(chalk_1.default.blue('\nš For detailed error information, check the log files:'));
|
|
147
|
-
//console.log(chalk.blue(` ${
|
|
147
|
+
//console.log(chalk.blue(` ${getSessionLogPath()}`));
|
|
148
148
|
console.log(chalk_1.default.gray(' Recent errors are logged with full context and stack traces.'));
|
|
149
149
|
}
|
|
150
150
|
getStatusIcon(status) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-utilities",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.3",
|
|
4
4
|
"description": "Utilities for contentstack projects",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
"author": "contentstack",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@contentstack/management": "~1.27.
|
|
36
|
-
"@contentstack/marketplace-sdk": "^1.
|
|
35
|
+
"@contentstack/management": "~1.27.5",
|
|
36
|
+
"@contentstack/marketplace-sdk": "^1.5.0",
|
|
37
37
|
"@oclif/core": "^4.3.0",
|
|
38
|
-
"axios": "^1.
|
|
38
|
+
"axios": "^1.13.5",
|
|
39
39
|
"chalk": "^4.1.2",
|
|
40
40
|
"cli-cursor": "^3.1.0",
|
|
41
41
|
"cli-progress": "^3.12.0",
|
|
42
42
|
"cli-table": "^0.3.11",
|
|
43
43
|
"conf": "^10.2.0",
|
|
44
|
-
"dotenv": "^16.
|
|
44
|
+
"dotenv": "^16.6.1",
|
|
45
45
|
"figures": "^3.2.0",
|
|
46
46
|
"inquirer": "8.2.7",
|
|
47
47
|
"inquirer-search-checkbox": "^1.0.0",
|
|
48
48
|
"inquirer-search-list": "^1.2.6",
|
|
49
49
|
"js-yaml": "^4.1.1",
|
|
50
50
|
"klona": "^2.0.6",
|
|
51
|
-
"lodash": "^4.17.
|
|
51
|
+
"lodash": "^4.17.23",
|
|
52
52
|
"mkdirp": "^1.0.4",
|
|
53
53
|
"open": "^8.4.2",
|
|
54
54
|
"ora": "^5.4.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* checks the deprecation and prints it
|
|
3
|
-
* @param {Array} deprecatedFlags flags to be deprecated
|
|
4
|
-
* @param {String} customMessage [optional] a custom message
|
|
5
|
-
* @returns flag parser
|
|
6
|
-
*/
|
|
7
|
-
export default function (deprecatedFlags?: any[], suggestions?: any[], customMessage?: string): (input: any, command: any) => any;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const cli_ux_1 = tslib_1.__importDefault(require("./cli-ux"));
|
|
5
|
-
/**
|
|
6
|
-
* checks the deprecation and prints it
|
|
7
|
-
* @param {Array} deprecatedFlags flags to be deprecated
|
|
8
|
-
* @param {String} customMessage [optional] a custom message
|
|
9
|
-
* @returns flag parser
|
|
10
|
-
*/
|
|
11
|
-
function default_1(deprecatedFlags = [], suggestions = [], customMessage) {
|
|
12
|
-
return (input, command) => {
|
|
13
|
-
const { context: { flagWarningPrintState = {} } = {} } = command;
|
|
14
|
-
let isCommandHasDeprecationFlag = false;
|
|
15
|
-
deprecatedFlags.forEach((item) => {
|
|
16
|
-
if (command.argv.indexOf(item) !== -1) {
|
|
17
|
-
if (flagWarningPrintState[command.id + item]) {
|
|
18
|
-
return input;
|
|
19
|
-
}
|
|
20
|
-
flagWarningPrintState[command.id + item] = true;
|
|
21
|
-
isCommandHasDeprecationFlag = true;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
if (isCommandHasDeprecationFlag) {
|
|
25
|
-
let deprecationMessage = '';
|
|
26
|
-
if (customMessage) {
|
|
27
|
-
deprecationMessage = customMessage;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
deprecationMessage = `WARNING!!! You're using the old (soon to be deprecated) Contentstack CLI flags (${deprecatedFlags.join(', ')}).`;
|
|
31
|
-
if (suggestions.length > 0) {
|
|
32
|
-
deprecationMessage += ` We recommend you to use the updated flags (${suggestions.join(', ')}).`;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
cli_ux_1.default.print(deprecationMessage, { color: 'yellow' });
|
|
36
|
-
}
|
|
37
|
-
return input;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
exports.default = default_1;
|