eas-cli 23.2.0 → 24.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.
- package/README.md +636 -331
- package/build/build/utils/url.d.ts +1 -0
- package/build/build/utils/url.js +4 -0
- package/build/channel/protection.d.ts +4 -0
- package/build/channel/protection.js +49 -0
- package/build/channel/queries.d.ts +6 -0
- package/build/channel/queries.js +5 -1
- package/build/commands/channel/protect.d.ts +16 -0
- package/build/commands/channel/protect.js +68 -0
- package/build/commands/channel/unprotect.d.ts +16 -0
- package/build/commands/channel/unprotect.js +78 -0
- package/build/commands/observe/errors.d.ts +27 -0
- package/build/commands/observe/errors.js +122 -0
- package/build/commands/observe/event.d.ts +18 -0
- package/build/commands/observe/event.js +149 -0
- package/build/commands/observe/events.d.ts +2 -0
- package/build/commands/observe/events.js +10 -4
- package/build/commands/observe/metrics-summary.d.ts +1 -0
- package/build/commands/observe/metrics-summary.js +3 -2
- package/build/commands/observe/metrics.d.ts +2 -0
- package/build/commands/observe/metrics.js +8 -4
- package/build/commands/observe/routes.d.ts +2 -1
- package/build/commands/observe/routes.js +5 -5
- package/build/commands/observe/session.d.ts +1 -0
- package/build/commands/observe/session.js +14 -8
- package/build/commands/observe/versions.d.ts +1 -0
- package/build/commands/observe/versions.js +3 -2
- package/build/commands/project/status.d.ts +16 -0
- package/build/commands/project/status.js +47 -0
- package/build/commands/simulator/egress.d.ts +13 -0
- package/build/commands/simulator/egress.js +60 -0
- package/build/commands/simulator/get.js +3 -1
- package/build/commands/simulator/index.d.ts +2 -0
- package/build/commands/simulator/index.js +81 -11
- package/build/credentials/ios/credentials.d.ts +5 -3
- package/build/credentials/ios/utils/printCredentials.js +6 -1
- package/build/graphql/generated.d.ts +2388 -1092
- package/build/graphql/generated.js +64 -17
- package/build/graphql/mutations/RealtimeLogsMutation.d.ts +2 -2
- package/build/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +1 -1
- package/build/graphql/queries/AppStoreConnectApiKeyQuery.js +1 -1
- package/build/graphql/queries/ChannelQuery.js +2 -0
- package/build/graphql/queries/DeviceRunSessionQuery.js +25 -0
- package/build/graphql/queries/ObserveQuery.d.ts +62 -30
- package/build/graphql/queries/ObserveQuery.js +276 -121
- package/build/graphql/queries/SubmissionQuery.d.ts +6 -1
- package/build/graphql/queries/SubmissionQuery.js +41 -0
- package/build/graphql/types/Observe.d.ts +5 -3
- package/build/graphql/types/Observe.js +80 -21
- package/build/graphql/types/UpdateChannelBasicInfo.js +1 -0
- package/build/observe/fetchCustomEvents.d.ts +6 -4
- package/build/observe/fetchCustomEvents.js +4 -2
- package/build/observe/fetchErrors.d.ts +32 -0
- package/build/observe/fetchErrors.js +42 -0
- package/build/observe/fetchEvents.d.ts +9 -6
- package/build/observe/fetchEvents.js +16 -17
- package/build/observe/fetchMetrics.d.ts +2 -2
- package/build/observe/fetchMetrics.js +9 -9
- package/build/observe/fetchNavigationRoutes.d.ts +7 -5
- package/build/observe/fetchNavigationRoutes.js +8 -8
- package/build/observe/fetchSessions.d.ts +13 -11
- package/build/observe/fetchSessions.js +59 -30
- package/build/observe/fetchVersions.d.ts +4 -3
- package/build/observe/fetchVersions.js +7 -11
- package/build/observe/flags.d.ts +6 -0
- package/build/observe/flags.js +12 -2
- package/build/observe/formatCustomEvents.d.ts +16 -10
- package/build/observe/formatCustomEvents.js +61 -28
- package/build/observe/formatErrors.d.ts +97 -0
- package/build/observe/formatErrors.js +203 -0
- package/build/observe/formatEvents.d.ts +11 -5
- package/build/observe/formatEvents.js +46 -18
- package/build/observe/formatMetrics.d.ts +4 -4
- package/build/observe/formatMetrics.js +2 -2
- package/build/observe/formatNavigationRoutes.d.ts +4 -4
- package/build/observe/formatNavigationRoutes.js +3 -3
- package/build/observe/formatSessions.d.ts +3 -3
- package/build/observe/formatSessions.js +8 -8
- package/build/observe/formatVersions.js +2 -2
- package/build/observe/platforms.d.ts +10 -19
- package/build/observe/platforms.js +42 -40
- package/build/project/projectStatus.d.ts +96 -0
- package/build/project/projectStatus.js +314 -0
- package/build/simulator/egress.d.ts +121 -0
- package/build/simulator/egress.js +865 -0
- package/build/simulator/env.d.ts +5 -0
- package/build/simulator/env.js +42 -1
- package/build/simulator/utils.d.ts +53 -2
- package/build/simulator/utils.js +158 -10
- package/build/submit/utils/urls.js +2 -3
- package/build/utils/centrifuge.d.ts +2 -2
- package/oclif.manifest.json +1162 -546
- package/package.json +7 -7
- package/build/chat/chatClient.d.ts +0 -37
- package/build/chat/chatClient.js +0 -359
- package/build/chat/detectProject.d.ts +0 -5
- package/build/chat/detectProject.js +0 -41
- package/build/chat/renderMarkdown.d.ts +0 -7
- package/build/chat/renderMarkdown.js +0 -47
- package/build/chat/replInput.d.ts +0 -10
- package/build/chat/replInput.js +0 -52
- package/build/commands/chat.d.ts +0 -18
- package/build/commands/chat.js +0 -221
|
@@ -1,33 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppObserveAppVersionFragmentNode = exports.
|
|
3
|
+
exports.AppObserveAppVersionFragmentNode = exports.AppObserveErrorGroupFragmentNode = exports.AppObserveMetricFragmentNode = exports.AppObserveErrorOccurrenceFragmentNode = exports.AppObserveErrorFragmentNode = exports.AppObserveUserEventFragmentNode = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
-
exports.
|
|
7
|
-
fragment
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
exports.AppObserveUserEventFragmentNode = (0, graphql_tag_1.default) `
|
|
7
|
+
fragment AppObserveUserEventFragment on AppObserveUserEvent {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
timestamp
|
|
11
|
+
sessionId
|
|
12
|
+
severityNumber
|
|
13
|
+
severityText
|
|
14
|
+
properties {
|
|
15
|
+
key
|
|
16
|
+
value
|
|
17
|
+
type
|
|
10
18
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
appVersion
|
|
20
|
+
appBuildNumber
|
|
21
|
+
appUpdateId
|
|
22
|
+
appEasBuildId
|
|
23
|
+
deviceOs
|
|
24
|
+
deviceOsVersion
|
|
25
|
+
deviceModel
|
|
26
|
+
environment
|
|
27
|
+
easClientId
|
|
28
|
+
countryCode
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
exports.AppObserveErrorFragmentNode = (0, graphql_tag_1.default) `
|
|
32
|
+
fragment AppObserveErrorFragment on AppObserveError {
|
|
33
|
+
id
|
|
34
|
+
timestamp
|
|
35
|
+
sessionId
|
|
36
|
+
severityNumber
|
|
37
|
+
severityText
|
|
38
|
+
type
|
|
39
|
+
message
|
|
40
|
+
source
|
|
41
|
+
fingerprint
|
|
42
|
+
isFatal
|
|
43
|
+
properties {
|
|
44
|
+
key
|
|
45
|
+
value
|
|
46
|
+
type
|
|
20
47
|
}
|
|
48
|
+
appVersion
|
|
49
|
+
appBuildNumber
|
|
50
|
+
appUpdateId
|
|
51
|
+
appEasBuildId
|
|
52
|
+
deviceOs
|
|
53
|
+
deviceOsVersion
|
|
54
|
+
deviceModel
|
|
55
|
+
environment
|
|
56
|
+
easClientId
|
|
57
|
+
countryCode
|
|
21
58
|
}
|
|
22
59
|
`;
|
|
23
|
-
exports.
|
|
24
|
-
fragment
|
|
60
|
+
exports.AppObserveErrorOccurrenceFragmentNode = (0, graphql_tag_1.default) `
|
|
61
|
+
fragment AppObserveErrorOccurrenceFragment on AppObserveError {
|
|
25
62
|
id
|
|
26
|
-
eventName
|
|
27
63
|
timestamp
|
|
28
64
|
sessionId
|
|
29
65
|
severityNumber
|
|
30
66
|
severityText
|
|
67
|
+
type
|
|
68
|
+
message
|
|
69
|
+
source
|
|
70
|
+
fingerprint
|
|
71
|
+
isFatal
|
|
72
|
+
stacktrace
|
|
73
|
+
body
|
|
31
74
|
properties {
|
|
32
75
|
key
|
|
33
76
|
value
|
|
@@ -45,11 +88,11 @@ exports.AppObserveCustomEventFragmentNode = (0, graphql_tag_1.default) `
|
|
|
45
88
|
countryCode
|
|
46
89
|
}
|
|
47
90
|
`;
|
|
48
|
-
exports.
|
|
49
|
-
fragment
|
|
91
|
+
exports.AppObserveMetricFragmentNode = (0, graphql_tag_1.default) `
|
|
92
|
+
fragment AppObserveMetricFragment on AppObserveMetric {
|
|
50
93
|
id
|
|
51
|
-
|
|
52
|
-
|
|
94
|
+
name
|
|
95
|
+
value
|
|
53
96
|
timestamp
|
|
54
97
|
appVersion
|
|
55
98
|
appBuildNumber
|
|
@@ -64,6 +107,22 @@ exports.AppObserveEventFragmentNode = (0, graphql_tag_1.default) `
|
|
|
64
107
|
routeName
|
|
65
108
|
}
|
|
66
109
|
`;
|
|
110
|
+
exports.AppObserveErrorGroupFragmentNode = (0, graphql_tag_1.default) `
|
|
111
|
+
fragment AppObserveErrorGroupFragment on AppObserveErrorGroup {
|
|
112
|
+
fingerprint
|
|
113
|
+
exceptionType
|
|
114
|
+
exceptionMessage
|
|
115
|
+
errorSource
|
|
116
|
+
severity
|
|
117
|
+
isFatal
|
|
118
|
+
eventCount
|
|
119
|
+
uniqueUserCount
|
|
120
|
+
affectedSessionCount
|
|
121
|
+
firstSeenAt
|
|
122
|
+
lastSeenAt
|
|
123
|
+
platforms
|
|
124
|
+
}
|
|
125
|
+
`;
|
|
67
126
|
exports.AppObserveAppVersionFragmentNode = (0, graphql_tag_1.default) `
|
|
68
127
|
fragment AppObserveAppVersionFragment on AppObserveAppVersion {
|
|
69
128
|
appVersion
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import {
|
|
2
|
+
import { AppObservePlatform, AppObserveUserEvent, AppObserveUserEventListOrderBy, PageInfo } from '../graphql/generated';
|
|
3
3
|
interface FetchCustomEventsOptions {
|
|
4
4
|
eventName?: string;
|
|
5
5
|
limit: number;
|
|
6
6
|
after?: string;
|
|
7
7
|
startTime?: string;
|
|
8
8
|
endTime?: string;
|
|
9
|
-
|
|
9
|
+
platforms?: AppObservePlatform[];
|
|
10
10
|
appVersion?: string;
|
|
11
|
+
buildNumber?: string;
|
|
11
12
|
updateId?: string;
|
|
12
13
|
sessionId?: string;
|
|
13
|
-
|
|
14
|
+
environment?: string;
|
|
15
|
+
orderBy?: AppObserveUserEventListOrderBy;
|
|
14
16
|
}
|
|
15
17
|
interface FetchCustomEventsResult {
|
|
16
|
-
events:
|
|
18
|
+
events: AppObserveUserEvent[];
|
|
17
19
|
pageInfo: PageInfo;
|
|
18
20
|
}
|
|
19
21
|
export declare function fetchObserveCustomEventsAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchCustomEventsOptions): Promise<FetchCustomEventsResult>;
|
|
@@ -6,11 +6,13 @@ async function fetchObserveCustomEventsAsync(graphqlClient, appId, options) {
|
|
|
6
6
|
const filter = {
|
|
7
7
|
...(options.startTime && { startTime: options.startTime }),
|
|
8
8
|
...(options.endTime && { endTime: options.endTime }),
|
|
9
|
-
...(options.eventName && {
|
|
10
|
-
...(options.
|
|
9
|
+
...(options.eventName && { name: options.eventName }),
|
|
10
|
+
...(options.platforms?.length && { platforms: options.platforms }),
|
|
11
11
|
...(options.appVersion && { appVersion: options.appVersion }),
|
|
12
|
+
...(options.buildNumber && { appBuildNumber: options.buildNumber }),
|
|
12
13
|
...(options.updateId && { appUpdateId: options.updateId }),
|
|
13
14
|
...(options.sessionId && { sessionId: options.sessionId }),
|
|
15
|
+
...(options.environment && { environment: options.environment }),
|
|
14
16
|
};
|
|
15
17
|
return await ObserveQuery_1.ObserveQuery.customEventListAsync(graphqlClient, {
|
|
16
18
|
appId,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { AppObserveError, AppObserveErrorGroup, AppObserveErrorSeverity, AppObservePlatform, PageInfo } from '../graphql/generated';
|
|
3
|
+
export interface FetchObserveErrorGroupsOptions {
|
|
4
|
+
startTime: string;
|
|
5
|
+
endTime: string;
|
|
6
|
+
platforms?: AppObservePlatform[];
|
|
7
|
+
appVersion?: string;
|
|
8
|
+
buildNumber?: string;
|
|
9
|
+
updateId?: string;
|
|
10
|
+
environment?: string;
|
|
11
|
+
severity?: AppObserveErrorSeverity;
|
|
12
|
+
}
|
|
13
|
+
export declare function fetchObserveErrorGroupsAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchObserveErrorGroupsOptions): Promise<{
|
|
14
|
+
groups: AppObserveErrorGroup[];
|
|
15
|
+
isTruncated: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
export interface FetchObserveErrorOccurrencesOptions {
|
|
18
|
+
fingerprint: string;
|
|
19
|
+
startTime: string;
|
|
20
|
+
endTime: string;
|
|
21
|
+
platforms?: AppObservePlatform[];
|
|
22
|
+
appVersion?: string;
|
|
23
|
+
buildNumber?: string;
|
|
24
|
+
updateId?: string;
|
|
25
|
+
environment?: string;
|
|
26
|
+
limit: number;
|
|
27
|
+
after?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function fetchObserveErrorOccurrencesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchObserveErrorOccurrencesOptions): Promise<{
|
|
30
|
+
occurrences: AppObserveError[];
|
|
31
|
+
pageInfo: PageInfo;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchObserveErrorGroupsAsync = fetchObserveErrorGroupsAsync;
|
|
4
|
+
exports.fetchObserveErrorOccurrencesAsync = fetchObserveErrorOccurrencesAsync;
|
|
5
|
+
const generated_1 = require("../graphql/generated");
|
|
6
|
+
const ObserveQuery_1 = require("../graphql/queries/ObserveQuery");
|
|
7
|
+
async function fetchObserveErrorGroupsAsync(graphqlClient, appId, options) {
|
|
8
|
+
return await ObserveQuery_1.ObserveQuery.errorGroupsAsync(graphqlClient, {
|
|
9
|
+
appId,
|
|
10
|
+
input: {
|
|
11
|
+
startTime: options.startTime,
|
|
12
|
+
endTime: options.endTime,
|
|
13
|
+
...(options.platforms?.length && { platforms: options.platforms }),
|
|
14
|
+
...(options.appVersion && { appVersion: options.appVersion }),
|
|
15
|
+
...(options.buildNumber && { appBuildNumber: options.buildNumber }),
|
|
16
|
+
...(options.updateId && { appUpdateId: options.updateId }),
|
|
17
|
+
...(options.environment && { environment: options.environment }),
|
|
18
|
+
...(options.severity && { severity: options.severity }),
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async function fetchObserveErrorOccurrencesAsync(graphqlClient, appId, options) {
|
|
23
|
+
return await ObserveQuery_1.ObserveQuery.errorOccurrencesAsync(graphqlClient, {
|
|
24
|
+
appId,
|
|
25
|
+
filter: {
|
|
26
|
+
fingerprint: options.fingerprint,
|
|
27
|
+
startTime: options.startTime,
|
|
28
|
+
endTime: options.endTime,
|
|
29
|
+
...(options.platforms?.length && { platforms: options.platforms }),
|
|
30
|
+
...(options.appVersion && { appVersion: options.appVersion }),
|
|
31
|
+
...(options.buildNumber && { appBuildNumber: options.buildNumber }),
|
|
32
|
+
...(options.updateId && { appUpdateId: options.updateId }),
|
|
33
|
+
...(options.environment && { environment: options.environment }),
|
|
34
|
+
},
|
|
35
|
+
first: options.limit,
|
|
36
|
+
...(options.after && { after: options.after }),
|
|
37
|
+
orderBy: {
|
|
38
|
+
field: generated_1.AppObserveErrorOccurrencesOrderByField.Timestamp,
|
|
39
|
+
direction: generated_1.AppObserveOrderDirection.Desc,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import {
|
|
2
|
+
import { AppObserveMetric, AppObserveMetricsListOrderBy, AppObservePlatform, PageInfo } from '../graphql/generated';
|
|
3
|
+
import { ObservePlatformTarget } from './platforms';
|
|
3
4
|
export declare enum EventsOrderPreset {
|
|
4
5
|
Slowest = "SLOWEST",
|
|
5
6
|
Fastest = "FASTEST",
|
|
6
7
|
Newest = "NEWEST",
|
|
7
8
|
Oldest = "OLDEST"
|
|
8
9
|
}
|
|
9
|
-
export declare function resolveOrderBy(input: string):
|
|
10
|
+
export declare function resolveOrderBy(input: string): AppObserveMetricsListOrderBy;
|
|
10
11
|
interface FetchObserveEventsOptions {
|
|
11
12
|
metricName?: string;
|
|
12
|
-
orderBy:
|
|
13
|
+
orderBy: AppObserveMetricsListOrderBy;
|
|
13
14
|
limit: number;
|
|
14
15
|
after?: string;
|
|
15
16
|
startTime?: string;
|
|
16
17
|
endTime?: string;
|
|
17
|
-
|
|
18
|
+
platforms?: AppObservePlatform[];
|
|
18
19
|
appVersion?: string;
|
|
20
|
+
buildNumber?: string;
|
|
19
21
|
updateId?: string;
|
|
20
22
|
sessionId?: string;
|
|
23
|
+
environment?: string;
|
|
21
24
|
}
|
|
22
25
|
interface FetchObserveEventsResult {
|
|
23
|
-
events:
|
|
26
|
+
events: AppObserveMetric[];
|
|
24
27
|
pageInfo: PageInfo;
|
|
25
28
|
}
|
|
26
29
|
export declare function fetchObserveEventsAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchObserveEventsOptions): Promise<FetchObserveEventsResult>;
|
|
27
|
-
export declare function fetchTotalEventCountAsync(graphqlClient: ExpoGraphqlClient, appId: string, metricName: string,
|
|
30
|
+
export declare function fetchTotalEventCountAsync(graphqlClient: ExpoGraphqlClient, appId: string, metricName: string, targets: ObservePlatformTarget[], startTime: string, endTime: string, environment?: string): Promise<number>;
|
|
28
31
|
export {};
|
|
@@ -19,23 +19,23 @@ function resolveOrderBy(input) {
|
|
|
19
19
|
switch (preset) {
|
|
20
20
|
case EventsOrderPreset.Slowest:
|
|
21
21
|
return {
|
|
22
|
-
field: generated_1.
|
|
23
|
-
direction: generated_1.
|
|
22
|
+
field: generated_1.AppObserveMetricsListOrderByField.Value,
|
|
23
|
+
direction: generated_1.AppObserveOrderDirection.Desc,
|
|
24
24
|
};
|
|
25
25
|
case EventsOrderPreset.Fastest:
|
|
26
26
|
return {
|
|
27
|
-
field: generated_1.
|
|
28
|
-
direction: generated_1.
|
|
27
|
+
field: generated_1.AppObserveMetricsListOrderByField.Value,
|
|
28
|
+
direction: generated_1.AppObserveOrderDirection.Asc,
|
|
29
29
|
};
|
|
30
30
|
case EventsOrderPreset.Newest:
|
|
31
31
|
return {
|
|
32
|
-
field: generated_1.
|
|
33
|
-
direction: generated_1.
|
|
32
|
+
field: generated_1.AppObserveMetricsListOrderByField.Timestamp,
|
|
33
|
+
direction: generated_1.AppObserveOrderDirection.Desc,
|
|
34
34
|
};
|
|
35
35
|
case EventsOrderPreset.Oldest:
|
|
36
36
|
return {
|
|
37
|
-
field: generated_1.
|
|
38
|
-
direction: generated_1.
|
|
37
|
+
field: generated_1.AppObserveMetricsListOrderByField.Timestamp,
|
|
38
|
+
direction: generated_1.AppObserveOrderDirection.Asc,
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -43,11 +43,13 @@ async function fetchObserveEventsAsync(graphqlClient, appId, options) {
|
|
|
43
43
|
const filter = {
|
|
44
44
|
...(options.startTime && { startTime: options.startTime }),
|
|
45
45
|
...(options.endTime && { endTime: options.endTime }),
|
|
46
|
-
...(options.metricName && {
|
|
47
|
-
...(options.
|
|
46
|
+
...(options.metricName && { name: options.metricName }),
|
|
47
|
+
...(options.platforms?.length && { platforms: options.platforms }),
|
|
48
48
|
...(options.appVersion && { appVersion: options.appVersion }),
|
|
49
|
+
...(options.buildNumber && { appBuildNumber: options.buildNumber }),
|
|
49
50
|
...(options.updateId && { appUpdateId: options.updateId }),
|
|
50
51
|
...(options.sessionId && { sessionId: options.sessionId }),
|
|
52
|
+
...(options.environment && { environment: options.environment }),
|
|
51
53
|
};
|
|
52
54
|
return await ObserveQuery_1.ObserveQuery.eventsAsync(graphqlClient, {
|
|
53
55
|
appId,
|
|
@@ -57,19 +59,16 @@ async function fetchObserveEventsAsync(graphqlClient, appId, options) {
|
|
|
57
59
|
orderBy: options.orderBy,
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
[generated_1.AppPlatform.Ios]: generated_1.AppObservePlatform.Ios,
|
|
63
|
-
};
|
|
64
|
-
async function fetchTotalEventCountAsync(graphqlClient, appId, metricName, platforms, startTime, endTime) {
|
|
65
|
-
const queries = platforms.map(async (appPlatform) => {
|
|
62
|
+
async function fetchTotalEventCountAsync(graphqlClient, appId, metricName, targets, startTime, endTime, environment) {
|
|
63
|
+
const queries = targets.map(async (target) => {
|
|
66
64
|
try {
|
|
67
65
|
const versions = await ObserveQuery_1.ObserveQuery.appVersionsAsync(graphqlClient, {
|
|
68
66
|
appId,
|
|
69
|
-
|
|
67
|
+
platforms: target.platforms,
|
|
70
68
|
startTime,
|
|
71
69
|
endTime,
|
|
72
70
|
metricNames: [metricName],
|
|
71
|
+
environment,
|
|
73
72
|
});
|
|
74
73
|
return versions.reduce((sum, v) => {
|
|
75
74
|
const metric = v.metrics.find(m => m.metricName === metricName);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AppPlatform } from '../graphql/generated';
|
|
3
2
|
import { BuildNumbersMap, ObserveMetricsMap, UpdateIdsMap } from './formatMetrics';
|
|
3
|
+
import { ObservePlatformTarget } from './platforms';
|
|
4
4
|
export declare function validateDateFlag(value: string, flagName: string): void;
|
|
5
5
|
export interface FetchObserveMetricsResult {
|
|
6
6
|
metricsMap: ObserveMetricsMap;
|
|
@@ -8,4 +8,4 @@ export interface FetchObserveMetricsResult {
|
|
|
8
8
|
updateIdsMap: UpdateIdsMap;
|
|
9
9
|
totalEventCounts: Map<string, number>;
|
|
10
10
|
}
|
|
11
|
-
export declare function fetchObserveMetricsAsync(graphqlClient: ExpoGraphqlClient, appId: string, metricNames: string[],
|
|
11
|
+
export declare function fetchObserveMetricsAsync(graphqlClient: ExpoGraphqlClient, appId: string, metricNames: string[], targets: ObservePlatformTarget[], startTime: string, endTime: string, environment?: string): Promise<FetchObserveMetricsResult>;
|
|
@@ -15,18 +15,18 @@ function validateDateFlag(value, flagName) {
|
|
|
15
15
|
throw new errors_1.EasCommandError(`Invalid ${flagName} date: "${value}". Provide a valid ISO 8601 date (e.g. 2025-01-01).`);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
async function fetchObserveMetricsAsync(graphqlClient, appId, metricNames,
|
|
19
|
-
const queries =
|
|
20
|
-
const observePlatform = platforms_1.appPlatformToObservePlatform[appPlatform];
|
|
18
|
+
async function fetchObserveMetricsAsync(graphqlClient, appId, metricNames, targets, startTime, endTime, environment) {
|
|
19
|
+
const queries = targets.map(async (target) => {
|
|
21
20
|
try {
|
|
22
21
|
const appVersions = await ObserveQuery_1.ObserveQuery.appVersionsAsync(graphqlClient, {
|
|
23
22
|
appId,
|
|
24
|
-
|
|
23
|
+
platforms: target.platforms,
|
|
25
24
|
startTime,
|
|
26
25
|
endTime,
|
|
27
26
|
metricNames,
|
|
27
|
+
environment,
|
|
28
28
|
});
|
|
29
|
-
return {
|
|
29
|
+
return { target, appVersions };
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
32
|
// A plan gate is an account-wide rejection, not a per-platform failure —
|
|
@@ -34,7 +34,7 @@ async function fetchObserveMetricsAsync(graphqlClient, appId, metricNames, platf
|
|
|
34
34
|
if ((0, planGating_1.isObservePlanGateError)(error)) {
|
|
35
35
|
throw error;
|
|
36
36
|
}
|
|
37
|
-
log_1.default.warn(`Failed to fetch observe data on ${
|
|
37
|
+
log_1.default.warn(`Failed to fetch observe data on ${platforms_1.observePlatformDisplayNames[target.key]}: ${error.message}`);
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
40
|
});
|
|
@@ -47,9 +47,9 @@ async function fetchObserveMetricsAsync(graphqlClient, appId, metricNames, platf
|
|
|
47
47
|
if (!result) {
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
|
-
const {
|
|
50
|
+
const { target, appVersions } = result;
|
|
51
51
|
for (const version of appVersions) {
|
|
52
|
-
const key = (0, formatMetrics_1.makeMetricsKey)(version.appVersion,
|
|
52
|
+
const key = (0, formatMetrics_1.makeMetricsKey)(version.appVersion, target.key);
|
|
53
53
|
if (!metricsMap.has(key)) {
|
|
54
54
|
metricsMap.set(key, new Map());
|
|
55
55
|
}
|
|
@@ -71,7 +71,7 @@ async function fetchObserveMetricsAsync(graphqlClient, appId, metricNames, platf
|
|
|
71
71
|
eventCount: metric.eventCount,
|
|
72
72
|
};
|
|
73
73
|
metricsMap.get(key).set(metric.metricName, values);
|
|
74
|
-
const eventCountKey = `${metric.metricName}:${
|
|
74
|
+
const eventCountKey = `${metric.metricName}:${target.key}`;
|
|
75
75
|
totalEventCounts.set(eventCountKey, (totalEventCounts.get(eventCountKey) ?? 0) + metric.eventCount);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import {
|
|
2
|
+
import { AppObserveNavigationOrderBy, AppObserveNavigationRoute, PageInfo } from '../graphql/generated';
|
|
3
|
+
import { ObservePlatformKey, ObservePlatformTarget } from './platforms';
|
|
3
4
|
export interface NavigationRouteWithPlatform {
|
|
4
|
-
platform:
|
|
5
|
+
platform: ObservePlatformKey;
|
|
5
6
|
route: AppObserveNavigationRoute;
|
|
6
7
|
}
|
|
7
8
|
export interface FetchNavigationRoutesOptions {
|
|
8
9
|
startTime: string;
|
|
9
10
|
endTime: string;
|
|
10
|
-
|
|
11
|
+
targets: ObservePlatformTarget[];
|
|
11
12
|
limit: number;
|
|
12
13
|
after?: string;
|
|
13
14
|
appVersion?: string;
|
|
14
15
|
updateId?: string;
|
|
15
16
|
buildNumber?: string;
|
|
16
17
|
routeNames?: string[];
|
|
17
|
-
|
|
18
|
+
environment?: string;
|
|
19
|
+
orderBy?: AppObserveNavigationOrderBy;
|
|
18
20
|
}
|
|
19
21
|
export interface FetchNavigationRoutesResult {
|
|
20
22
|
routes: NavigationRouteWithPlatform[];
|
|
21
|
-
pageInfoByPlatform: Map<
|
|
23
|
+
pageInfoByPlatform: Map<ObservePlatformKey, PageInfo>;
|
|
22
24
|
}
|
|
23
25
|
export declare function fetchObserveNavigationRoutesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchNavigationRoutesOptions): Promise<FetchNavigationRoutesResult>;
|
|
@@ -10,27 +10,27 @@ const platforms_1 = require("./platforms");
|
|
|
10
10
|
async function fetchObserveNavigationRoutesAsync(graphqlClient, appId, options) {
|
|
11
11
|
const orderBy = options.orderBy ?? {
|
|
12
12
|
field: generated_1.AppObserveNavigationRoutesOrderByField.NavigationCount,
|
|
13
|
-
direction: generated_1.
|
|
13
|
+
direction: generated_1.AppObserveOrderDirection.Desc,
|
|
14
14
|
};
|
|
15
|
-
const queries = options.
|
|
16
|
-
const observePlatform = platforms_1.appPlatformToObservePlatform[appPlatform];
|
|
15
|
+
const queries = options.targets.map(async (target) => {
|
|
17
16
|
try {
|
|
18
17
|
const result = await ObserveQuery_1.ObserveQuery.navigationRoutesAsync(graphqlClient, {
|
|
19
18
|
appId,
|
|
20
19
|
filter: {
|
|
21
|
-
|
|
20
|
+
platforms: target.platforms,
|
|
22
21
|
startTime: options.startTime,
|
|
23
22
|
endTime: options.endTime,
|
|
24
23
|
...(options.appVersion && { appVersion: options.appVersion }),
|
|
25
24
|
...(options.updateId && { appUpdateId: options.updateId }),
|
|
26
25
|
...(options.buildNumber && { appBuildNumber: options.buildNumber }),
|
|
27
26
|
...(options.routeNames?.length && { routeNames: options.routeNames }),
|
|
27
|
+
...(options.environment && { environment: options.environment }),
|
|
28
28
|
},
|
|
29
29
|
first: options.limit,
|
|
30
30
|
...(options.after && { after: options.after }),
|
|
31
31
|
orderBy,
|
|
32
32
|
});
|
|
33
|
-
return {
|
|
33
|
+
return { target, ...result };
|
|
34
34
|
}
|
|
35
35
|
catch (error) {
|
|
36
36
|
// A plan gate is an account-wide rejection, not a per-platform failure —
|
|
@@ -38,7 +38,7 @@ async function fetchObserveNavigationRoutesAsync(graphqlClient, appId, options)
|
|
|
38
38
|
if ((0, planGating_1.isObservePlanGateError)(error)) {
|
|
39
39
|
throw error;
|
|
40
40
|
}
|
|
41
|
-
log_1.default.warn(`Failed to fetch navigation routes on ${
|
|
41
|
+
log_1.default.warn(`Failed to fetch navigation routes on ${platforms_1.observePlatformDisplayNames[target.key]}: ${error.message}`);
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -49,9 +49,9 @@ async function fetchObserveNavigationRoutesAsync(graphqlClient, appId, options)
|
|
|
49
49
|
if (!result) {
|
|
50
50
|
continue;
|
|
51
51
|
}
|
|
52
|
-
pageInfoByPlatform.set(result.
|
|
52
|
+
pageInfoByPlatform.set(result.target.key, result.pageInfo);
|
|
53
53
|
for (const route of result.routes) {
|
|
54
|
-
routes.push({ platform: result.
|
|
54
|
+
routes.push({ platform: result.target.key, route });
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
return { routes, pageInfoByPlatform };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import {
|
|
2
|
+
import { AppObserveMetric, AppObserveUserEvent } from '../graphql/generated';
|
|
3
3
|
export interface SessionEventEntry {
|
|
4
4
|
source: 'metric' | 'log';
|
|
5
|
+
id: string;
|
|
5
6
|
timestamp: string;
|
|
6
7
|
sessionId: string;
|
|
8
|
+
name: string;
|
|
7
9
|
appVersion: string;
|
|
8
10
|
appBuildNumber: string;
|
|
9
11
|
appUpdateId: string | null;
|
|
@@ -12,13 +14,11 @@ export interface SessionEventEntry {
|
|
|
12
14
|
deviceOsVersion: string;
|
|
13
15
|
countryCode: string | null;
|
|
14
16
|
easClientId: string;
|
|
15
|
-
|
|
16
|
-
metricValue?: number;
|
|
17
|
+
value?: number;
|
|
17
18
|
customParams?: {
|
|
18
19
|
[key: string]: any;
|
|
19
20
|
} | null;
|
|
20
21
|
routeName?: string | null;
|
|
21
|
-
eventName?: string;
|
|
22
22
|
severityText?: string | null;
|
|
23
23
|
severityNumber?: number | null;
|
|
24
24
|
properties?: Array<{
|
|
@@ -61,7 +61,7 @@ export declare function fetchObserveSessionEventsAsync(graphqlClient: ExpoGraphq
|
|
|
61
61
|
* A metric event that is guaranteed to belong to a session — used as a
|
|
62
62
|
* candidate when picking a session to inspect via `observe:session`.
|
|
63
63
|
*/
|
|
64
|
-
export type SessionMetricCandidate =
|
|
64
|
+
export type SessionMetricCandidate = AppObserveMetric & {
|
|
65
65
|
sessionId: string;
|
|
66
66
|
};
|
|
67
67
|
export interface FetchSessionMetricCandidatesOptions {
|
|
@@ -71,18 +71,19 @@ export interface FetchSessionMetricCandidatesOptions {
|
|
|
71
71
|
startTime: string;
|
|
72
72
|
endTime: string;
|
|
73
73
|
limit: number;
|
|
74
|
+
environment?: string;
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Fetch a page of metric events for the given metricName + window, ordered
|
|
77
|
-
* per `sort`, and filtered to events that have a sessionId. The
|
|
78
|
+
* per `sort`, and filtered to events that have a sessionId. The metrics query
|
|
78
79
|
* supports server-side ordering, so `sort` is passed straight through.
|
|
79
80
|
*/
|
|
80
81
|
export declare function fetchSessionMetricCandidatesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchSessionMetricCandidatesOptions): Promise<SessionMetricCandidate[]>;
|
|
81
82
|
/**
|
|
82
|
-
* A
|
|
83
|
-
* candidate when picking a session to inspect via `observe:session`.
|
|
83
|
+
* A user-defined log event that is guaranteed to belong to a session — used as
|
|
84
|
+
* a candidate when picking a session to inspect via `observe:session`.
|
|
84
85
|
*/
|
|
85
|
-
export type SessionLogCandidate =
|
|
86
|
+
export type SessionLogCandidate = AppObserveUserEvent & {
|
|
86
87
|
sessionId: string;
|
|
87
88
|
};
|
|
88
89
|
export interface FetchSessionLogCandidatesOptions {
|
|
@@ -92,9 +93,10 @@ export interface FetchSessionLogCandidatesOptions {
|
|
|
92
93
|
startTime: string;
|
|
93
94
|
endTime: string;
|
|
94
95
|
limit: number;
|
|
96
|
+
environment?: string;
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
|
-
* Fetch a page of
|
|
98
|
-
* by timestamp server-side, and filtered to events that have a sessionId.
|
|
99
|
+
* Fetch a page of user-defined log events for the given eventName + window,
|
|
100
|
+
* ordered by timestamp server-side, and filtered to events that have a sessionId.
|
|
99
101
|
*/
|
|
100
102
|
export declare function fetchSessionLogCandidatesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchSessionLogCandidatesOptions): Promise<SessionLogCandidate[]>;
|