eas-cli 18.12.3 → 18.13.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.
- package/README.md +100 -100
- package/build/commands/observe/events.d.ts +7 -7
- package/build/commands/observe/events.js +7 -29
- package/build/commands/observe/logs.d.ts +8 -8
- package/build/commands/observe/logs.js +7 -29
- package/build/commands/observe/metrics.d.ts +4 -4
- package/build/commands/observe/metrics.js +4 -20
- package/build/commands/observe/routes.d.ts +27 -0
- package/build/commands/observe/routes.js +106 -0
- package/build/commands/observe/versions.d.ts +2 -2
- package/build/commands/observe/versions.js +4 -21
- package/build/graphql/generated.d.ts +56 -0
- package/build/graphql/queries/ObserveQuery.d.ts +12 -1
- package/build/graphql/queries/ObserveQuery.js +54 -0
- package/build/observe/fetchMetrics.js +2 -6
- package/build/observe/fetchNavigationRoutes.d.ts +22 -0
- package/build/observe/fetchNavigationRoutes.js +51 -0
- package/build/observe/flags.d.ts +20 -0
- package/build/observe/flags.js +46 -0
- package/build/observe/formatNavigationRoutes.d.ts +34 -0
- package/build/observe/formatNavigationRoutes.js +170 -0
- package/build/observe/metricNames.d.ts +2 -0
- package/build/observe/metricNames.js +22 -3
- package/build/observe/platforms.d.ts +1 -0
- package/build/observe/platforms.js +5 -1
- package/oclif.manifest.json +1618 -1424
- package/package.json +2 -2
|
@@ -8,16 +8,16 @@ export default class ObserveEvents extends EasCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
11
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
14
|
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
15
|
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
16
|
days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
18
|
+
after: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
sort: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
21
|
};
|
|
22
22
|
static contextDefinition: {
|
|
23
23
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -8,6 +8,7 @@ const flags_1 = require("../../commandUtils/flags");
|
|
|
8
8
|
const pagination_1 = require("../../commandUtils/pagination");
|
|
9
9
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
10
|
const fetchEvents_1 = require("../../observe/fetchEvents");
|
|
11
|
+
const flags_2 = require("../../observe/flags");
|
|
11
12
|
const metricNames_1 = require("../../observe/metricNames");
|
|
12
13
|
const formatEvents_1 = require("../../observe/formatEvents");
|
|
13
14
|
const platforms_1 = require("../../observe/platforms");
|
|
@@ -33,39 +34,16 @@ class ObserveEvents extends EasCommand_1.default {
|
|
|
33
34
|
required: false,
|
|
34
35
|
default: fetchEvents_1.EventsOrderPreset.Oldest.valueOf().toLowerCase(),
|
|
35
36
|
})(),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
options: platforms_1.allowedPlatformFlagValues,
|
|
39
|
-
})(),
|
|
40
|
-
after: core_1.Flags.string({
|
|
41
|
-
description: 'Cursor for pagination. Use the endCursor from a previous query to fetch the next page.',
|
|
42
|
-
}),
|
|
37
|
+
...flags_2.ObservePlatformFlag,
|
|
38
|
+
...flags_2.ObserveAfterFlag,
|
|
43
39
|
limit: (0, pagination_1.getLimitFlagWithCustomValues)({
|
|
44
40
|
defaultTo: DEFAULT_EVENTS_LIMIT,
|
|
45
41
|
limit: 100,
|
|
46
42
|
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
end: core_1.Flags.string({
|
|
52
|
-
description: 'End of time range (ISO date)',
|
|
53
|
-
exclusive: ['days'],
|
|
54
|
-
}),
|
|
55
|
-
days: core_1.Flags.integer({
|
|
56
|
-
description: 'Show events from the last N days (mutually exclusive with --start/--end)',
|
|
57
|
-
min: 1,
|
|
58
|
-
exclusive: ['start', 'end'],
|
|
59
|
-
}),
|
|
60
|
-
'app-version': core_1.Flags.string({
|
|
61
|
-
description: 'Filter by app version',
|
|
62
|
-
}),
|
|
63
|
-
'update-id': core_1.Flags.string({
|
|
64
|
-
description: 'Filter by EAS update ID',
|
|
65
|
-
}),
|
|
66
|
-
'project-id': core_1.Flags.string({
|
|
67
|
-
description: 'EAS project ID (defaults to the project ID of the current directory)',
|
|
68
|
-
}),
|
|
43
|
+
...flags_2.ObserveTimeRangeFlags,
|
|
44
|
+
...flags_2.ObserveAppVersionFlag,
|
|
45
|
+
...flags_2.ObserveUpdateIdFlag,
|
|
46
|
+
...flags_2.ObserveProjectIdFlag,
|
|
69
47
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
70
48
|
};
|
|
71
49
|
static contextDefinition = {
|
|
@@ -8,17 +8,17 @@ export default class ObserveLogs extends EasCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'session-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'all-events': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
16
|
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
17
|
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
18
|
days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'all-events': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
-
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
20
|
+
after: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
22
|
};
|
|
23
23
|
static contextDefinition: {
|
|
24
24
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -8,6 +8,7 @@ const pagination_1 = require("../../commandUtils/pagination");
|
|
|
8
8
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
9
|
const ObserveQuery_1 = require("../../graphql/queries/ObserveQuery");
|
|
10
10
|
const fetchCustomEvents_1 = require("../../observe/fetchCustomEvents");
|
|
11
|
+
const flags_2 = require("../../observe/flags");
|
|
11
12
|
const formatCustomEvents_1 = require("../../observe/formatCustomEvents");
|
|
12
13
|
const platforms_1 = require("../../observe/platforms");
|
|
13
14
|
const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
|
|
@@ -24,36 +25,15 @@ class ObserveLogs extends EasCommand_1.default {
|
|
|
24
25
|
}),
|
|
25
26
|
};
|
|
26
27
|
static flags = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
options: platforms_1.allowedPlatformFlagValues,
|
|
30
|
-
})(),
|
|
31
|
-
after: core_1.Flags.string({
|
|
32
|
-
description: 'Cursor for pagination. Use the endCursor from a previous query to fetch the next page.',
|
|
33
|
-
}),
|
|
28
|
+
...flags_2.ObservePlatformFlag,
|
|
29
|
+
...flags_2.ObserveAfterFlag,
|
|
34
30
|
limit: (0, pagination_1.getLimitFlagWithCustomValues)({
|
|
35
31
|
defaultTo: DEFAULT_EVENTS_LIMIT,
|
|
36
32
|
limit: 100,
|
|
37
33
|
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
end: core_1.Flags.string({
|
|
43
|
-
description: 'End of time range (ISO date)',
|
|
44
|
-
exclusive: ['days'],
|
|
45
|
-
}),
|
|
46
|
-
days: core_1.Flags.integer({
|
|
47
|
-
description: 'Show events from the last N days (mutually exclusive with --start/--end)',
|
|
48
|
-
min: 1,
|
|
49
|
-
exclusive: ['start', 'end'],
|
|
50
|
-
}),
|
|
51
|
-
'app-version': core_1.Flags.string({
|
|
52
|
-
description: 'Filter by app version',
|
|
53
|
-
}),
|
|
54
|
-
'update-id': core_1.Flags.string({
|
|
55
|
-
description: 'Filter by EAS update ID',
|
|
56
|
-
}),
|
|
34
|
+
...flags_2.ObserveTimeRangeFlags,
|
|
35
|
+
...flags_2.ObserveAppVersionFlag,
|
|
36
|
+
...flags_2.ObserveUpdateIdFlag,
|
|
57
37
|
'session-id': core_1.Flags.string({
|
|
58
38
|
description: 'Filter by session ID',
|
|
59
39
|
}),
|
|
@@ -61,9 +41,7 @@ class ObserveLogs extends EasCommand_1.default {
|
|
|
61
41
|
description: 'When no event name argument is provided, list all events across all event names instead of a summary of event names + counts.',
|
|
62
42
|
default: false,
|
|
63
43
|
}),
|
|
64
|
-
|
|
65
|
-
description: 'EAS project ID (defaults to the project ID of the current directory)',
|
|
66
|
-
}),
|
|
44
|
+
...flags_2.ObserveProjectIdFlag,
|
|
67
45
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
68
46
|
};
|
|
69
47
|
static contextDefinition = {
|
|
@@ -5,13 +5,13 @@ export default class ObserveMetrics extends EasCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
|
|
9
|
-
metric: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
-
stat: import("@oclif/core/lib/interfaces").OptionFlag<("min" | "max" | "median" | "average" | "p80" | "p90" | "p99" | "eventCount")[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
9
|
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
10
|
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
11
|
days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
-
|
|
12
|
+
metric: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
stat: import("@oclif/core/lib/interfaces").OptionFlag<("min" | "max" | "median" | "average" | "p80" | "p90" | "p99" | "eventCount")[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
};
|
|
16
16
|
static contextDefinition: {
|
|
17
17
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -6,6 +6,7 @@ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasComm
|
|
|
6
6
|
const flags_1 = require("../../commandUtils/flags");
|
|
7
7
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
8
8
|
const fetchMetrics_1 = require("../../observe/fetchMetrics");
|
|
9
|
+
const flags_2 = require("../../observe/flags");
|
|
9
10
|
const formatMetrics_1 = require("../../observe/formatMetrics");
|
|
10
11
|
const metricNames_1 = require("../../observe/metricNames");
|
|
11
12
|
const platforms_1 = require("../../observe/platforms");
|
|
@@ -34,10 +35,7 @@ class ObserveMetrics extends EasCommand_1.default {
|
|
|
34
35
|
static hidden = true;
|
|
35
36
|
static description = 'display app performance metrics grouped by app version';
|
|
36
37
|
static flags = {
|
|
37
|
-
|
|
38
|
-
description: 'Filter by platform',
|
|
39
|
-
options: platforms_1.allowedPlatformFlagValues,
|
|
40
|
-
})(),
|
|
38
|
+
...flags_2.ObservePlatformFlag,
|
|
41
39
|
metric: core_1.Flags.option({
|
|
42
40
|
description: 'Metric name to display (can be specified multiple times).',
|
|
43
41
|
multiple: true,
|
|
@@ -48,22 +46,8 @@ class ObserveMetrics extends EasCommand_1.default {
|
|
|
48
46
|
multiple: true,
|
|
49
47
|
options: DEFAULT_STATS_JSON,
|
|
50
48
|
})(),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
exclusive: ['days'],
|
|
54
|
-
}),
|
|
55
|
-
end: core_1.Flags.string({
|
|
56
|
-
description: 'End of time range for metrics data (ISO date).',
|
|
57
|
-
exclusive: ['days'],
|
|
58
|
-
}),
|
|
59
|
-
days: core_1.Flags.integer({
|
|
60
|
-
description: 'Show metrics from the last N days (mutually exclusive with --start/--end)',
|
|
61
|
-
min: 1,
|
|
62
|
-
exclusive: ['start', 'end'],
|
|
63
|
-
}),
|
|
64
|
-
'project-id': core_1.Flags.string({
|
|
65
|
-
description: 'EAS project ID (defaults to the project ID of the current directory)',
|
|
66
|
-
}),
|
|
49
|
+
...flags_2.ObserveTimeRangeFlags,
|
|
50
|
+
...flags_2.ObserveProjectIdFlag,
|
|
67
51
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
68
52
|
};
|
|
69
53
|
static contextDefinition = {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ObserveRoutes extends EasCommand {
|
|
3
|
+
static hidden: boolean;
|
|
4
|
+
static description: string;
|
|
5
|
+
static flags: {
|
|
6
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
16
|
+
after: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
metric: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
stat: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
static contextDefinition: {
|
|
22
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
23
|
+
projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
|
|
24
|
+
};
|
|
25
|
+
private static loggedInOnlyContextDefinition;
|
|
26
|
+
runAsync(): Promise<void>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
7
|
+
const pagination_1 = require("../../commandUtils/pagination");
|
|
8
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
|
+
const fetchNavigationRoutes_1 = require("../../observe/fetchNavigationRoutes");
|
|
10
|
+
const flags_2 = require("../../observe/flags");
|
|
11
|
+
const formatNavigationRoutes_1 = require("../../observe/formatNavigationRoutes");
|
|
12
|
+
const metricNames_1 = require("../../observe/metricNames");
|
|
13
|
+
const platforms_1 = require("../../observe/platforms");
|
|
14
|
+
const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
|
|
15
|
+
const startAndEndTime_1 = require("../../observe/startAndEndTime");
|
|
16
|
+
const json_1 = require("../../utils/json");
|
|
17
|
+
const DEFAULT_ROUTES_LIMIT = 50;
|
|
18
|
+
const STAT_OPTIONS = ['median', 'med', 'p90', 'count', 'event_count', 'eventCount'];
|
|
19
|
+
const DEFAULT_STATS_TABLE = ['median', 'count'];
|
|
20
|
+
const DEFAULT_STATS_JSON = ['median', 'p90', 'count'];
|
|
21
|
+
class ObserveRoutes extends EasCommand_1.default {
|
|
22
|
+
static hidden = true;
|
|
23
|
+
static description = 'display app navigation route metrics (Cold TTR, Warm TTR, TTI) grouped by route name';
|
|
24
|
+
static flags = {
|
|
25
|
+
...flags_2.ObservePlatformFlag,
|
|
26
|
+
metric: core_1.Flags.option({
|
|
27
|
+
description: 'Navigation metric to display (can be specified multiple times). Defaults to all three.',
|
|
28
|
+
multiple: true,
|
|
29
|
+
options: Object.keys(metricNames_1.NAVIGATION_METRIC_ALIASES),
|
|
30
|
+
})(),
|
|
31
|
+
stat: core_1.Flags.option({
|
|
32
|
+
description: 'Statistic to display per metric (can be specified multiple times)',
|
|
33
|
+
multiple: true,
|
|
34
|
+
options: STAT_OPTIONS,
|
|
35
|
+
})(),
|
|
36
|
+
...flags_2.ObserveAfterFlag,
|
|
37
|
+
limit: (0, pagination_1.getLimitFlagWithCustomValues)({
|
|
38
|
+
defaultTo: DEFAULT_ROUTES_LIMIT,
|
|
39
|
+
limit: 200,
|
|
40
|
+
}),
|
|
41
|
+
...flags_2.ObserveTimeRangeFlags,
|
|
42
|
+
...flags_2.ObserveAppVersionFlag,
|
|
43
|
+
...flags_2.ObserveUpdateIdFlag,
|
|
44
|
+
'build-number': core_1.Flags.string({
|
|
45
|
+
description: 'Filter by app build number',
|
|
46
|
+
}),
|
|
47
|
+
...flags_2.ObserveProjectIdFlag,
|
|
48
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
49
|
+
};
|
|
50
|
+
static contextDefinition = {
|
|
51
|
+
...this.ContextOptions.ProjectId,
|
|
52
|
+
...this.ContextOptions.LoggedIn,
|
|
53
|
+
};
|
|
54
|
+
static loggedInOnlyContextDefinition = {
|
|
55
|
+
...this.ContextOptions.LoggedIn,
|
|
56
|
+
};
|
|
57
|
+
async runAsync() {
|
|
58
|
+
const { flags } = await this.parse(ObserveRoutes);
|
|
59
|
+
const { projectId, graphqlClient } = await (0, resolveProjectContext_1.resolveObserveCommandContextAsync)({
|
|
60
|
+
command: this,
|
|
61
|
+
commandClass: ObserveRoutes,
|
|
62
|
+
loggedInOnlyContextDefinition: ObserveRoutes.loggedInOnlyContextDefinition,
|
|
63
|
+
projectIdOverride: flags['project-id'],
|
|
64
|
+
nonInteractive: flags['non-interactive'],
|
|
65
|
+
});
|
|
66
|
+
if (flags.json) {
|
|
67
|
+
(0, json_1.enableJsonOutput)();
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
log_1.default.warn('EAS Observe is in preview and subject to breaking changes.');
|
|
71
|
+
}
|
|
72
|
+
const metricNames = flags.metric?.length
|
|
73
|
+
? Array.from(new Set(flags.metric.map(metricNames_1.resolveNavigationMetricName)))
|
|
74
|
+
: formatNavigationRoutes_1.NAVIGATION_METRIC_NAMES;
|
|
75
|
+
const argumentsStat = flags.stat?.length
|
|
76
|
+
? Array.from(new Set(flags.stat.map(formatNavigationRoutes_1.resolveNavigationStatKey)))
|
|
77
|
+
: undefined;
|
|
78
|
+
const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
|
|
79
|
+
const platforms = (0, platforms_1.appPlatformsFromFlag)(flags.platform);
|
|
80
|
+
const { routes, pageInfoByPlatform } = await (0, fetchNavigationRoutes_1.fetchObserveNavigationRoutesAsync)(graphqlClient, projectId, {
|
|
81
|
+
startTime,
|
|
82
|
+
endTime,
|
|
83
|
+
platforms,
|
|
84
|
+
limit: flags.limit ?? DEFAULT_ROUTES_LIMIT,
|
|
85
|
+
...(flags.after && { after: flags.after }),
|
|
86
|
+
appVersion: flags['app-version'],
|
|
87
|
+
updateId: flags['update-id'],
|
|
88
|
+
buildNumber: flags['build-number'],
|
|
89
|
+
});
|
|
90
|
+
if (flags.json) {
|
|
91
|
+
const stats = argumentsStat ?? DEFAULT_STATS_JSON;
|
|
92
|
+
(0, json_1.printJsonOnlyOutput)((0, formatNavigationRoutes_1.buildObserveNavigationRoutesJson)(routes, metricNames, stats, pageInfoByPlatform));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const stats = argumentsStat ?? DEFAULT_STATS_TABLE;
|
|
96
|
+
log_1.default.addNewLineIfNone();
|
|
97
|
+
log_1.default.log((0, formatNavigationRoutes_1.buildObserveNavigationRoutesTable)(routes, metricNames, stats, {
|
|
98
|
+
daysBack,
|
|
99
|
+
startTime,
|
|
100
|
+
endTime,
|
|
101
|
+
pageInfoByPlatform,
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.default = ObserveRoutes;
|
|
@@ -5,11 +5,11 @@ export default class ObserveVersions extends EasCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
|
|
8
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
9
|
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
-
|
|
12
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
13
|
};
|
|
14
14
|
static contextDefinition: {
|
|
15
15
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const core_1 = require("@oclif/core");
|
|
5
4
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
5
|
const flags_1 = require("../../commandUtils/flags");
|
|
7
6
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
8
7
|
const fetchVersions_1 = require("../../observe/fetchVersions");
|
|
8
|
+
const flags_2 = require("../../observe/flags");
|
|
9
9
|
const formatVersions_1 = require("../../observe/formatVersions");
|
|
10
10
|
const platforms_1 = require("../../observe/platforms");
|
|
11
11
|
const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
|
|
@@ -15,26 +15,9 @@ class ObserveVersions extends EasCommand_1.default {
|
|
|
15
15
|
static hidden = true;
|
|
16
16
|
static description = 'display app versions with build and update details';
|
|
17
17
|
static flags = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})(),
|
|
22
|
-
start: core_1.Flags.string({
|
|
23
|
-
description: 'Start of time range (ISO date)',
|
|
24
|
-
exclusive: ['days'],
|
|
25
|
-
}),
|
|
26
|
-
end: core_1.Flags.string({
|
|
27
|
-
description: 'End of time range (ISO date)',
|
|
28
|
-
exclusive: ['days'],
|
|
29
|
-
}),
|
|
30
|
-
days: core_1.Flags.integer({
|
|
31
|
-
description: 'Show versions from the last N days (mutually exclusive with --start/--end)',
|
|
32
|
-
min: 1,
|
|
33
|
-
exclusive: ['start', 'end'],
|
|
34
|
-
}),
|
|
35
|
-
'project-id': core_1.Flags.string({
|
|
36
|
-
description: 'EAS project ID (defaults to the project ID of the current directory)',
|
|
37
|
-
}),
|
|
18
|
+
...flags_2.ObservePlatformFlag,
|
|
19
|
+
...flags_2.ObserveTimeRangeFlags,
|
|
20
|
+
...flags_2.ObserveProjectIdFlag,
|
|
38
21
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
39
22
|
};
|
|
40
23
|
static contextDefinition = {
|
|
@@ -3432,6 +3432,7 @@ export type BuildMetadataInput = {
|
|
|
3432
3432
|
developmentClient?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3433
3433
|
distribution?: InputMaybe<DistributionType>;
|
|
3434
3434
|
environment?: InputMaybe<Scalars['String']['input']>;
|
|
3435
|
+
expoPackageVersion?: InputMaybe<Scalars['String']['input']>;
|
|
3435
3436
|
fingerprintHash?: InputMaybe<Scalars['String']['input']>;
|
|
3436
3437
|
fingerprintSource?: InputMaybe<FingerprintSourceInput>;
|
|
3437
3438
|
gitCommitHash?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -17349,6 +17350,61 @@ export type AppObserveCustomEventNamesQuery = {
|
|
|
17349
17350
|
};
|
|
17350
17351
|
};
|
|
17351
17352
|
};
|
|
17353
|
+
export type AppObserveNavigationRoutesQueryVariables = Exact<{
|
|
17354
|
+
appId: Scalars['String']['input'];
|
|
17355
|
+
filter: AppObserveNavigationRoutesFilter;
|
|
17356
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
17357
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
17358
|
+
orderBy?: InputMaybe<AppObserveNavigationRoutesOrderBy>;
|
|
17359
|
+
}>;
|
|
17360
|
+
export type AppObserveNavigationRoutesQuery = {
|
|
17361
|
+
__typename?: 'RootQuery';
|
|
17362
|
+
app: {
|
|
17363
|
+
__typename?: 'AppQuery';
|
|
17364
|
+
byId: {
|
|
17365
|
+
__typename?: 'App';
|
|
17366
|
+
id: string;
|
|
17367
|
+
observe: {
|
|
17368
|
+
__typename?: 'AppObserve';
|
|
17369
|
+
navigationRoutes: {
|
|
17370
|
+
__typename?: 'AppObserveNavigationRoutesConnection';
|
|
17371
|
+
pageInfo: {
|
|
17372
|
+
__typename?: 'PageInfo';
|
|
17373
|
+
hasNextPage: boolean;
|
|
17374
|
+
hasPreviousPage: boolean;
|
|
17375
|
+
endCursor?: string | null;
|
|
17376
|
+
};
|
|
17377
|
+
edges: Array<{
|
|
17378
|
+
__typename?: 'AppObserveNavigationRouteEdge';
|
|
17379
|
+
cursor: string;
|
|
17380
|
+
node: {
|
|
17381
|
+
__typename?: 'AppObserveNavigationRoute';
|
|
17382
|
+
routeName: string;
|
|
17383
|
+
coldTtr: {
|
|
17384
|
+
__typename?: 'AppObserveNavigationStat';
|
|
17385
|
+
count: number;
|
|
17386
|
+
median?: number | null;
|
|
17387
|
+
p90?: number | null;
|
|
17388
|
+
};
|
|
17389
|
+
warmTtr: {
|
|
17390
|
+
__typename?: 'AppObserveNavigationStat';
|
|
17391
|
+
count: number;
|
|
17392
|
+
median?: number | null;
|
|
17393
|
+
p90?: number | null;
|
|
17394
|
+
};
|
|
17395
|
+
tti: {
|
|
17396
|
+
__typename?: 'AppObserveNavigationStat';
|
|
17397
|
+
count: number;
|
|
17398
|
+
median?: number | null;
|
|
17399
|
+
p90?: number | null;
|
|
17400
|
+
};
|
|
17401
|
+
};
|
|
17402
|
+
}>;
|
|
17403
|
+
};
|
|
17404
|
+
};
|
|
17405
|
+
};
|
|
17406
|
+
};
|
|
17407
|
+
};
|
|
17352
17408
|
export type GetAssetMetadataQueryVariables = Exact<{
|
|
17353
17409
|
storageKeys: Array<Scalars['String']['input']> | Scalars['String']['input'];
|
|
17354
17410
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AppObserveAppVersion, AppObserveCustomEvent, AppObserveCustomEventListFilter, AppObserveCustomEventName, AppObserveEvent, AppObserveEventsFilter, AppObserveEventsOrderBy, AppObservePlatform, AppObserveTimeSeriesStatistics, PageInfo } from '../generated';
|
|
2
|
+
import { AppObserveAppVersion, AppObserveCustomEvent, AppObserveCustomEventListFilter, AppObserveCustomEventName, AppObserveEvent, AppObserveEventsFilter, AppObserveEventsOrderBy, AppObserveNavigationRoute, AppObserveNavigationRoutesFilter, AppObserveNavigationRoutesOrderBy, AppObservePlatform, AppObserveTimeSeriesStatistics, PageInfo } from '../generated';
|
|
3
3
|
export type AppObserveTimeSeriesResult = {
|
|
4
4
|
appVersionMarkers: AppObserveAppVersion[];
|
|
5
5
|
eventCount: number;
|
|
@@ -18,6 +18,13 @@ type AppObserveCustomEventListQueryVariables = {
|
|
|
18
18
|
first?: number;
|
|
19
19
|
after?: string;
|
|
20
20
|
};
|
|
21
|
+
type AppObserveNavigationRoutesQueryVariables = {
|
|
22
|
+
appId: string;
|
|
23
|
+
filter: AppObserveNavigationRoutesFilter;
|
|
24
|
+
first?: number;
|
|
25
|
+
after?: string;
|
|
26
|
+
orderBy?: AppObserveNavigationRoutesOrderBy;
|
|
27
|
+
};
|
|
21
28
|
export declare const ObserveQuery: {
|
|
22
29
|
timeSeriesAsync(graphqlClient: ExpoGraphqlClient, { appId, metricName, platform, startTime, endTime, }: {
|
|
23
30
|
appId: string;
|
|
@@ -51,5 +58,9 @@ export declare const ObserveQuery: {
|
|
|
51
58
|
names: AppObserveCustomEventName[];
|
|
52
59
|
isTruncated: boolean;
|
|
53
60
|
}>;
|
|
61
|
+
navigationRoutesAsync(graphqlClient: ExpoGraphqlClient, variables: AppObserveNavigationRoutesQueryVariables): Promise<{
|
|
62
|
+
routes: AppObserveNavigationRoute[];
|
|
63
|
+
pageInfo: PageInfo;
|
|
64
|
+
}>;
|
|
54
65
|
};
|
|
55
66
|
export {};
|
|
@@ -186,4 +186,58 @@ exports.ObserveQuery = {
|
|
|
186
186
|
.toPromise());
|
|
187
187
|
return data.app.byId.observe.customEventNames;
|
|
188
188
|
},
|
|
189
|
+
async navigationRoutesAsync(graphqlClient, variables) {
|
|
190
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
191
|
+
.query((0, graphql_tag_1.default) `
|
|
192
|
+
query AppObserveNavigationRoutes(
|
|
193
|
+
$appId: String!
|
|
194
|
+
$filter: AppObserveNavigationRoutesFilter!
|
|
195
|
+
$first: Int
|
|
196
|
+
$after: String
|
|
197
|
+
$orderBy: AppObserveNavigationRoutesOrderBy
|
|
198
|
+
) {
|
|
199
|
+
app {
|
|
200
|
+
byId(appId: $appId) {
|
|
201
|
+
id
|
|
202
|
+
observe {
|
|
203
|
+
navigationRoutes(filter: $filter, first: $first, after: $after, orderBy: $orderBy) {
|
|
204
|
+
pageInfo {
|
|
205
|
+
hasNextPage
|
|
206
|
+
hasPreviousPage
|
|
207
|
+
endCursor
|
|
208
|
+
}
|
|
209
|
+
edges {
|
|
210
|
+
cursor
|
|
211
|
+
node {
|
|
212
|
+
routeName
|
|
213
|
+
coldTtr {
|
|
214
|
+
count
|
|
215
|
+
median
|
|
216
|
+
p90
|
|
217
|
+
}
|
|
218
|
+
warmTtr {
|
|
219
|
+
count
|
|
220
|
+
median
|
|
221
|
+
p90
|
|
222
|
+
}
|
|
223
|
+
tti {
|
|
224
|
+
count
|
|
225
|
+
median
|
|
226
|
+
p90
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
`, variables)
|
|
236
|
+
.toPromise());
|
|
237
|
+
const { edges, pageInfo } = data.app.byId.observe.navigationRoutes;
|
|
238
|
+
return {
|
|
239
|
+
routes: edges.map(edge => edge.node),
|
|
240
|
+
pageInfo,
|
|
241
|
+
};
|
|
242
|
+
},
|
|
189
243
|
};
|
|
@@ -4,14 +4,10 @@ exports.validateDateFlag = validateDateFlag;
|
|
|
4
4
|
exports.fetchObserveMetricsAsync = fetchObserveMetricsAsync;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const errors_1 = require("../commandUtils/errors");
|
|
7
|
-
const generated_1 = require("../graphql/generated");
|
|
8
7
|
const ObserveQuery_1 = require("../graphql/queries/ObserveQuery");
|
|
9
8
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
10
9
|
const formatMetrics_1 = require("./formatMetrics");
|
|
11
|
-
const
|
|
12
|
-
[generated_1.AppPlatform.Android]: generated_1.AppObservePlatform.Android,
|
|
13
|
-
[generated_1.AppPlatform.Ios]: generated_1.AppObservePlatform.Ios,
|
|
14
|
-
};
|
|
10
|
+
const platforms_1 = require("./platforms");
|
|
15
11
|
function validateDateFlag(value, flagName) {
|
|
16
12
|
const parsed = new Date(value);
|
|
17
13
|
if (isNaN(parsed.getTime())) {
|
|
@@ -20,7 +16,7 @@ function validateDateFlag(value, flagName) {
|
|
|
20
16
|
}
|
|
21
17
|
async function fetchObserveMetricsAsync(graphqlClient, appId, metricNames, platforms, startTime, endTime) {
|
|
22
18
|
const queries = platforms.map(async (appPlatform) => {
|
|
23
|
-
const observePlatform = appPlatformToObservePlatform[appPlatform];
|
|
19
|
+
const observePlatform = platforms_1.appPlatformToObservePlatform[appPlatform];
|
|
24
20
|
try {
|
|
25
21
|
const appVersions = await ObserveQuery_1.ObserveQuery.appVersionsAsync(graphqlClient, {
|
|
26
22
|
appId,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { AppObserveNavigationRoute, AppObserveNavigationRoutesOrderBy, AppPlatform, PageInfo } from '../graphql/generated';
|
|
3
|
+
export interface NavigationRouteWithPlatform {
|
|
4
|
+
platform: AppPlatform;
|
|
5
|
+
route: AppObserveNavigationRoute;
|
|
6
|
+
}
|
|
7
|
+
export interface FetchNavigationRoutesOptions {
|
|
8
|
+
startTime: string;
|
|
9
|
+
endTime: string;
|
|
10
|
+
platforms: AppPlatform[];
|
|
11
|
+
limit: number;
|
|
12
|
+
after?: string;
|
|
13
|
+
appVersion?: string;
|
|
14
|
+
updateId?: string;
|
|
15
|
+
buildNumber?: string;
|
|
16
|
+
orderBy?: AppObserveNavigationRoutesOrderBy;
|
|
17
|
+
}
|
|
18
|
+
export interface FetchNavigationRoutesResult {
|
|
19
|
+
routes: NavigationRouteWithPlatform[];
|
|
20
|
+
pageInfoByPlatform: Map<AppPlatform, PageInfo>;
|
|
21
|
+
}
|
|
22
|
+
export declare function fetchObserveNavigationRoutesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchNavigationRoutesOptions): Promise<FetchNavigationRoutesResult>;
|