@tolgee/cli 1.0.0-prerelease.1 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const commander_1 = require("commander");
8
+ const ansi_colors_1 = __importDefault(require("ansi-colors"));
8
9
  const credentials_1 = require("./config/credentials");
9
10
  const tolgeerc_1 = __importDefault(require("./config/tolgeerc"));
10
11
  const client_1 = __importDefault(require("./client"));
@@ -19,6 +20,7 @@ const extract_1 = __importDefault(require("./commands/extract"));
19
20
  const compare_1 = __importDefault(require("./commands/sync/compare"));
20
21
  const sync_1 = __importDefault(require("./commands/sync/sync"));
21
22
  const NO_KEY_COMMANDS = ['login', 'logout', 'extract'];
23
+ ansi_colors_1.default.enabled = process.stdout.isTTY;
22
24
  function topLevelName(command) {
23
25
  return command.parent && command.parent.parent
24
26
  ? topLevelName(command.parent)
@@ -76,6 +76,12 @@ exports.error = error;
76
76
  * @returns The promise passed in parameter. Useful for decorating without using a buffer variable.
77
77
  */
78
78
  function loading(comment, promise) {
79
+ if (!process.stdout.isTTY) {
80
+ // Simple stdout without animations
81
+ process.stdout.write(comment);
82
+ promise.then(() => process.stdout.write(` ✓ Success\n`), () => process.stdout.write(` ✗ Failure\n`));
83
+ return promise;
84
+ }
79
85
  let symbolPosition = 0;
80
86
  const interval = setInterval(() => {
81
87
  process.stdout.write(`\r${SYMBOLS[symbolPosition]} ${comment}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolgee/cli",
3
- "version": "1.0.0-prerelease.1",
3
+ "version": "1.0.0-rc.1",
4
4
  "type": "commonjs",
5
5
  "description": "A tool to interact with the Tolgee Platform through CLI",
6
6
  "bin": {
@@ -76,7 +76,7 @@
76
76
  {
77
77
  "name": "prerelease",
78
78
  "channel": "rc",
79
- "prerelease": true
79
+ "prerelease": "rc"
80
80
  }
81
81
  ],
82
82
  "plugins": [