@toptal/davinci-cli-shared 2.2.2 ā 2.2.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/utils/print.cjs +12 -0
- package/src/utils/run.js +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 2.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1937](https://github.com/toptal/davinci/pull/1937) [`8b6806a6`](https://github.com/toptal/davinci/commit/8b6806a6ad1ef3f190e1e9e6a287aed12970b27f) Thanks [@dmaklygin](https://github.com/dmaklygin)! - ---
|
|
8
|
+
|
|
9
|
+
- apply identical formatting and success messages to all command logs.
|
|
10
|
+
|
|
3
11
|
## 2.2.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/package.json
CHANGED
package/src/utils/print.cjs
CHANGED
|
@@ -14,6 +14,16 @@ const prettifyObjectIfExist = args =>
|
|
|
14
14
|
|
|
15
15
|
const davinciGradient = gradient("#204ECF", "#00CC83")
|
|
16
16
|
|
|
17
|
+
const header = (...args) => {
|
|
18
|
+
const message = prettifyObjectIfExist(args).join(' ')
|
|
19
|
+
|
|
20
|
+
console.log('\nšØ', davinciGradient(message), '\n')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const success = (...args) => {
|
|
24
|
+
console.log('\n', chalk.green(...args), '\n')
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
const cyan = (...args) => {
|
|
18
28
|
console.log(chalk.cyan(...prettifyObjectIfExist(args)))
|
|
19
29
|
}
|
|
@@ -96,6 +106,8 @@ const startSpinner = (text, options) => {
|
|
|
96
106
|
}
|
|
97
107
|
|
|
98
108
|
module.exports = {
|
|
109
|
+
header,
|
|
110
|
+
success,
|
|
99
111
|
green,
|
|
100
112
|
cyan,
|
|
101
113
|
yellow,
|
package/src/utils/run.js
CHANGED
|
@@ -4,16 +4,12 @@ import print from './print.cjs'
|
|
|
4
4
|
|
|
5
5
|
export const runSync = (command, args, options) => {
|
|
6
6
|
try {
|
|
7
|
-
print.grey([command, ...args].join(' '))
|
|
7
|
+
print.grey('info: ', [command, ...args].join(' '))
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
return execa.sync(command, args, {
|
|
10
10
|
stdio: 'inherit',
|
|
11
11
|
...options,
|
|
12
12
|
})
|
|
13
|
-
|
|
14
|
-
console.log('Done.')
|
|
15
|
-
|
|
16
|
-
return result
|
|
17
13
|
} catch (e) {
|
|
18
14
|
print.red(e)
|
|
19
15
|
|