@devicecloud.dev/dcd 5.0.1-beta.1 → 5.1.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ui } from '../utils/ui.js';
|
|
2
|
-
import { colors
|
|
2
|
+
import { colors } from '../utils/styling.js';
|
|
3
3
|
import { compareSemver } from './version.service.js';
|
|
4
4
|
function isPresent(raw) {
|
|
5
5
|
return raw !== null && raw !== undefined && raw !== false && raw !== '';
|
|
@@ -48,12 +48,11 @@ function renderNotice(notice, opts) {
|
|
|
48
48
|
}
|
|
49
49
|
switch (notice.level) {
|
|
50
50
|
case 'deprecation':
|
|
51
|
-
|
|
52
|
-
opts.out(`${colors.error('⚠')} ${colors.bold(notice.title)}`);
|
|
51
|
+
opts.out(ui.deprecation(colors.bold(notice.title)));
|
|
53
52
|
opts.out(ui.branch(rows));
|
|
54
53
|
break;
|
|
55
54
|
case 'warn':
|
|
56
|
-
opts.out(
|
|
55
|
+
opts.out(ui.warn(colors.bold(notice.title)));
|
|
57
56
|
opts.out(ui.branch(rows));
|
|
58
57
|
break;
|
|
59
58
|
case 'marketing':
|
package/dist/utils/styling.d.ts
CHANGED
package/dist/utils/styling.js
CHANGED
package/dist/utils/ui.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare const ui: {
|
|
|
17
17
|
* visible width so ANSI colours never throw the columns off.
|
|
18
18
|
*/
|
|
19
19
|
readonly fields: (pairs: Field[]) => string[];
|
|
20
|
+
/** `⚠ message` in red — a deprecation; reads as more serious than a (yellow) {@link warn}. */
|
|
21
|
+
readonly deprecation: (message: string) => string;
|
|
20
22
|
/** `ℹ message` — neutral, standalone information. */
|
|
21
23
|
readonly info: (message: string) => string;
|
|
22
24
|
/** Dimmed secondary text — hints, tips, "you can close this terminal", etc. */
|
package/dist/utils/ui.js
CHANGED
|
@@ -52,6 +52,10 @@ export const ui = {
|
|
|
52
52
|
return `${styled}${padding} ${value}`;
|
|
53
53
|
});
|
|
54
54
|
},
|
|
55
|
+
/** `⚠ message` in red — a deprecation; reads as more serious than a (yellow) {@link warn}. */
|
|
56
|
+
deprecation(message) {
|
|
57
|
+
return `${symbols.deprecation} ${message}`;
|
|
58
|
+
},
|
|
55
59
|
/** `ℹ message` — neutral, standalone information. */
|
|
56
60
|
info(message) {
|
|
57
61
|
return `${symbols.info} ${message}`;
|