eas-cli 23.1.0 → 24.0.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 +424 -226
- package/build/api.d.ts +1 -0
- package/build/api.js +12 -0
- 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/commandUtils/workflow/logs/fetchLogs.d.ts +5 -0
- package/build/commandUtils/workflow/logs/fetchLogs.js +24 -0
- package/build/commandUtils/workflow/logs/parseLogs.d.ts +14 -0
- package/build/commandUtils/workflow/logs/parseLogs.js +69 -0
- package/build/commandUtils/workflow/logs/watcher.d.ts +32 -0
- package/build/commandUtils/workflow/logs/watcher.js +162 -0
- package/build/commandUtils/workflow/stateMachine.js +2 -1
- package/build/commandUtils/workflow/types.d.ts +12 -5
- package/build/commandUtils/workflow/utils.d.ts +9 -5
- package/build/commandUtils/workflow/utils.js +144 -146
- 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/get.js +5 -1
- package/build/commands/simulator/index.d.ts +1 -0
- package/build/commands/simulator/index.js +16 -2
- package/build/commands/simulator/list.d.ts +1 -0
- package/build/commands/simulator/list.js +9 -0
- package/build/commands/workflow/run.d.ts +8 -0
- package/build/commands/workflow/run.js +27 -0
- package/build/commands/workflow/ssh.d.ts +31 -0
- package/build/commands/workflow/ssh.js +190 -0
- package/build/credentials/ios/credentials.d.ts +5 -3
- package/build/credentials/ios/utils/printCredentials.js +6 -1
- package/build/graphql/generated.d.ts +2474 -1079
- package/build/graphql/generated.js +71 -16
- package/build/graphql/mutations/RealtimeLogsMutation.d.ts +6 -0
- package/build/graphql/mutations/RealtimeLogsMutation.js +40 -0
- package/build/graphql/mutations/WorkflowRunMutation.d.ts +3 -2
- package/build/graphql/mutations/WorkflowRunMutation.js +4 -1
- 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 +10 -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/queries/WorkflowJobSshQuery.d.ts +20 -0
- package/build/graphql/queries/WorkflowJobSshQuery.js +133 -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/ora.d.ts +7 -0
- package/build/ora.js +12 -0
- package/build/project/projectStatus.d.ts +96 -0
- package/build/project/projectStatus.js +314 -0
- package/build/simulator/utils.d.ts +11 -0
- package/build/simulator/utils.js +51 -4
- package/build/submit/utils/urls.js +2 -3
- package/build/utils/centrifuge.d.ts +10 -0
- package/build/utils/centrifuge.js +89 -0
- package/build/utils/expodash/uniqBy.js +3 -2
- package/oclif.manifest.json +2947 -2328
- package/package.json +10 -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/commandUtils/workflow/fetchLogs.d.ts +0 -6
- package/build/commandUtils/workflow/fetchLogs.js +0 -44
- package/build/commands/chat.d.ts +0 -18
- package/build/commands/chat.js +0 -221
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowJobSshQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
const client_1 = require("../client");
|
|
7
|
+
const generated_1 = require("../generated");
|
|
8
|
+
const FINAL_WORKFLOW_JOB_STATUSES = new Set([
|
|
9
|
+
generated_1.WorkflowJobStatus.Success,
|
|
10
|
+
generated_1.WorkflowJobStatus.Failure,
|
|
11
|
+
generated_1.WorkflowJobStatus.Canceled,
|
|
12
|
+
generated_1.WorkflowJobStatus.Skipped,
|
|
13
|
+
]);
|
|
14
|
+
const FINAL_JOB_RUN_STATUSES = new Set([
|
|
15
|
+
generated_1.JobRunStatus.Errored,
|
|
16
|
+
generated_1.JobRunStatus.Finished,
|
|
17
|
+
generated_1.JobRunStatus.Canceled,
|
|
18
|
+
]);
|
|
19
|
+
function toConnectInfo(job) {
|
|
20
|
+
const hasTurtleTarget = job.turtleJobRun != null || job.turtleBuild != null;
|
|
21
|
+
return {
|
|
22
|
+
sshRequested: hasTurtleTarget && job.workflowRun.sshSettings != null,
|
|
23
|
+
jobCompleted: FINAL_WORKFLOW_JOB_STATUSES.has(job.status),
|
|
24
|
+
session: job.turtleJobRun?.sshSession ?? job.turtleBuild?.sshSession ?? null,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function isNotFoundError(error) {
|
|
28
|
+
if (!(error instanceof client_1.GraphqlError)) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return error.graphQLErrors.some(e => {
|
|
32
|
+
const code = e?.extensions?.errorCode ?? e?.extensions?.code;
|
|
33
|
+
return (code === 'ENTITY_NOT_FOUND' ||
|
|
34
|
+
/Entity not found/i.test(e?.message ?? '') ||
|
|
35
|
+
/not found/i.test(e?.message ?? ''));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
exports.WorkflowJobSshQuery = {
|
|
39
|
+
async connectInfoForWorkflowJobAsync(graphqlClient, workflowJobId) {
|
|
40
|
+
let data;
|
|
41
|
+
try {
|
|
42
|
+
data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
43
|
+
.query((0, graphql_tag_1.default) `
|
|
44
|
+
query WorkflowJobSshPoll($workflowJobId: ID!) {
|
|
45
|
+
workflowJobs {
|
|
46
|
+
byId(workflowJobId: $workflowJobId) {
|
|
47
|
+
id
|
|
48
|
+
status
|
|
49
|
+
workflowRun {
|
|
50
|
+
id
|
|
51
|
+
sshSettings {
|
|
52
|
+
idleTimeoutSeconds
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
turtleJobRun {
|
|
56
|
+
id
|
|
57
|
+
sshSession {
|
|
58
|
+
id
|
|
59
|
+
connectionConfig {
|
|
60
|
+
host
|
|
61
|
+
secret
|
|
62
|
+
reconnecting
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
turtleBuild {
|
|
67
|
+
id
|
|
68
|
+
sshSession {
|
|
69
|
+
id
|
|
70
|
+
connectionConfig {
|
|
71
|
+
host
|
|
72
|
+
secret
|
|
73
|
+
reconnecting
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`, { workflowJobId }, { requestPolicy: 'network-only' })
|
|
81
|
+
.toPromise());
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
if (isNotFoundError(error)) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
return toConnectInfo(data.workflowJobs.byId);
|
|
90
|
+
},
|
|
91
|
+
async connectInfoForJobRunAsync(graphqlClient, jobRunId) {
|
|
92
|
+
let data;
|
|
93
|
+
try {
|
|
94
|
+
data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
95
|
+
.query((0, graphql_tag_1.default) `
|
|
96
|
+
query JobRunSshPoll($jobRunId: ID!) {
|
|
97
|
+
jobRun {
|
|
98
|
+
byId(jobRunId: $jobRunId) {
|
|
99
|
+
id
|
|
100
|
+
status
|
|
101
|
+
sshSession {
|
|
102
|
+
id
|
|
103
|
+
connectionConfig {
|
|
104
|
+
host
|
|
105
|
+
secret
|
|
106
|
+
reconnecting
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`, { jobRunId }, { requestPolicy: 'network-only' })
|
|
113
|
+
.toPromise());
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
if (isNotFoundError(error)) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
const jobRun = data.jobRun.byId;
|
|
122
|
+
const jobCompleted = FINAL_JOB_RUN_STATUSES.has(jobRun.status);
|
|
123
|
+
return {
|
|
124
|
+
sshRequested: jobRun.sshSession != null || jobCompleted,
|
|
125
|
+
jobCompleted,
|
|
126
|
+
session: jobRun.sshSession,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
async connectInfoForResourceIdAsync(graphqlClient, resourceId) {
|
|
130
|
+
return ((await exports.WorkflowJobSshQuery.connectInfoForWorkflowJobAsync(graphqlClient, resourceId)) ??
|
|
131
|
+
(await exports.WorkflowJobSshQuery.connectInfoForJobRunAsync(graphqlClient, resourceId)));
|
|
132
|
+
},
|
|
133
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
export declare const AppObserveUserEventFragmentNode: import("graphql").DocumentNode;
|
|
2
|
+
export declare const AppObserveErrorFragmentNode: import("graphql").DocumentNode;
|
|
3
|
+
export declare const AppObserveErrorOccurrenceFragmentNode: import("graphql").DocumentNode;
|
|
4
|
+
export declare const AppObserveMetricFragmentNode: import("graphql").DocumentNode;
|
|
5
|
+
export declare const AppObserveErrorGroupFragmentNode: import("graphql").DocumentNode;
|
|
4
6
|
export declare const AppObserveAppVersionFragmentNode: import("graphql").DocumentNode;
|
|
@@ -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>;
|