@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, symbols } from '../utils/styling.js';
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
- // Red ⚠ so a deprecation reads as more serious than a plain (yellow) warn.
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(`${symbols.warning} ${colors.bold(notice.title)}`);
55
+ opts.out(ui.warn(colors.bold(notice.title)));
57
56
  opts.out(ui.branch(rows));
58
57
  break;
59
58
  case 'marketing':
@@ -9,6 +9,7 @@ export declare const stripAnsi: (s: string) => string;
9
9
  */
10
10
  export declare const symbols: {
11
11
  readonly cancelled: string;
12
+ readonly deprecation: string;
12
13
  readonly error: string;
13
14
  readonly info: string;
14
15
  readonly pending: string;
@@ -12,6 +12,7 @@ export const stripAnsi = (s) => s.replace(/\u001B\[[0-9;]*m/g, '');
12
12
  */
13
13
  export const symbols = {
14
14
  cancelled: chalk.gray('⊘'),
15
+ deprecation: chalk.red('⚠'),
15
16
  error: chalk.red('✗'),
16
17
  info: chalk.blue('ℹ'),
17
18
  pending: chalk.yellow('⏸'),
@@ -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}`;
package/package.json CHANGED
@@ -60,7 +60,7 @@
60
60
  "type": "git",
61
61
  "url": "https://devicecloud.dev"
62
62
  },
63
- "version": "5.0.1-beta.1",
63
+ "version": "5.1.0",
64
64
  "bugs": {
65
65
  "url": "https://discord.gg/gm3mJwcNw8"
66
66
  },