@devicecloud.dev/dcd 5.0.0-beta.4 → 5.0.1-beta.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/commands/cloud.js
CHANGED
|
@@ -324,7 +324,7 @@ export const cloudCommand = defineCommand({
|
|
|
324
324
|
cli_version: cliVersion,
|
|
325
325
|
ci_provider: ciContext.provider,
|
|
326
326
|
ci_wrapper_version: ciContext.wrapperVersion,
|
|
327
|
-
}, { out
|
|
327
|
+
}, { out });
|
|
328
328
|
deviceValidationService.validateAndroidDevice(androidApiLevel, androidDevice, googlePlay, compatibilityData, { debug, logger: (m) => out(m) });
|
|
329
329
|
if (maestroChromeOnboarding && !androidApiLevel && !androidDevice) {
|
|
330
330
|
warnOut('The --maestro-chrome-onboarding flag only applies to Android tests and will be ignored for iOS tests.');
|
|
@@ -28,13 +28,18 @@ export type NoticeContext = Record<string, unknown>;
|
|
|
28
28
|
/** A null / empty match imposes no constraint; otherwise every rule must match (AND). */
|
|
29
29
|
export declare function matchesRules(match: NoticeMatch | null | undefined, ctx: NoticeContext): boolean;
|
|
30
30
|
export interface RenderNoticesOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Emit a line of human output. Notices route through the same gated `out` as
|
|
33
|
+
* the rest of the CLI (suppressed under `--json`); we don't use the `warn`
|
|
34
|
+
* channel because its logger prepends its own `⚠`, which would double up with
|
|
35
|
+
* the symbol the `ui.*` helpers already add.
|
|
36
|
+
*/
|
|
31
37
|
out: (message: string) => void;
|
|
32
|
-
warnOut: (message: string) => void;
|
|
33
38
|
}
|
|
34
39
|
/**
|
|
35
40
|
* Filter notices by their local-context `match` gate and render those that pass.
|
|
36
41
|
* Returns the visible notices so a `--json` caller can include them in its
|
|
37
|
-
* payload instead of printing.
|
|
38
|
-
*
|
|
42
|
+
* payload instead of printing. `opts.out` is the caller's `--json`-gated
|
|
43
|
+
* emitter, so under `--json` nothing prints but the list is still returned.
|
|
39
44
|
*/
|
|
40
45
|
export declare function renderNotices(notices: Notice[] | undefined, ctx: NoticeContext, opts: RenderNoticesOptions): Notice[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ui } from '../utils/ui.js';
|
|
2
|
-
import { colors } from '../utils/styling.js';
|
|
2
|
+
import { colors, symbols } 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,9 +48,13 @@ 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)}`);
|
|
53
|
+
opts.out(ui.branch(rows));
|
|
54
|
+
break;
|
|
51
55
|
case 'warn':
|
|
52
|
-
opts.
|
|
53
|
-
opts.
|
|
56
|
+
opts.out(`${symbols.warning} ${colors.bold(notice.title)}`);
|
|
57
|
+
opts.out(ui.branch(rows));
|
|
54
58
|
break;
|
|
55
59
|
case 'marketing':
|
|
56
60
|
opts.out(ui.section(notice.title));
|
|
@@ -66,8 +70,8 @@ function renderNotice(notice, opts) {
|
|
|
66
70
|
/**
|
|
67
71
|
* Filter notices by their local-context `match` gate and render those that pass.
|
|
68
72
|
* Returns the visible notices so a `--json` caller can include them in its
|
|
69
|
-
* payload instead of printing.
|
|
70
|
-
*
|
|
73
|
+
* payload instead of printing. `opts.out` is the caller's `--json`-gated
|
|
74
|
+
* emitter, so under `--json` nothing prints but the list is still returned.
|
|
71
75
|
*/
|
|
72
76
|
export function renderNotices(notices, ctx, opts) {
|
|
73
77
|
if (!notices || notices.length === 0)
|