eas-cli 23.2.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 +380 -205
- 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/get.js +3 -1
- package/build/commands/simulator/index.js +6 -2
- package/build/credentials/ios/credentials.d.ts +5 -3
- package/build/credentials/ios/utils/printCredentials.js +6 -1
- package/build/graphql/generated.d.ts +2288 -1133
- package/build/graphql/generated.js +48 -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 +5 -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/utils.d.ts +11 -0
- package/build/simulator/utils.js +44 -5
- package/build/submit/utils/urls.js +2 -3
- package/build/utils/centrifuge.d.ts +2 -2
- package/oclif.manifest.json +2502 -1986
- 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
|
@@ -5,13 +5,16 @@ exports.fetchObserveSessionEventsAsync = fetchObserveSessionEventsAsync;
|
|
|
5
5
|
exports.fetchSessionMetricCandidatesAsync = fetchSessionMetricCandidatesAsync;
|
|
6
6
|
exports.fetchSessionLogCandidatesAsync = fetchSessionLogCandidatesAsync;
|
|
7
7
|
const generated_1 = require("../graphql/generated");
|
|
8
|
+
const ObserveQuery_1 = require("../graphql/queries/ObserveQuery");
|
|
8
9
|
const fetchCustomEvents_1 = require("./fetchCustomEvents");
|
|
9
10
|
const fetchEvents_1 = require("./fetchEvents");
|
|
10
11
|
function metricEventToEntry(event) {
|
|
11
12
|
return {
|
|
12
13
|
source: 'metric',
|
|
14
|
+
id: event.id,
|
|
13
15
|
timestamp: event.timestamp,
|
|
14
16
|
sessionId: event.sessionId ?? '',
|
|
17
|
+
name: event.name,
|
|
15
18
|
appVersion: event.appVersion,
|
|
16
19
|
appBuildNumber: event.appBuildNumber,
|
|
17
20
|
appUpdateId: event.appUpdateId ?? null,
|
|
@@ -20,17 +23,18 @@ function metricEventToEntry(event) {
|
|
|
20
23
|
deviceOsVersion: event.deviceOsVersion,
|
|
21
24
|
countryCode: event.countryCode ?? null,
|
|
22
25
|
easClientId: event.easClientId,
|
|
23
|
-
|
|
24
|
-
metricValue: event.metricValue,
|
|
26
|
+
value: event.value,
|
|
25
27
|
customParams: event.customParams ?? null,
|
|
26
28
|
routeName: event.routeName ?? null,
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
|
-
function
|
|
31
|
+
function userEventToEntry(event) {
|
|
30
32
|
return {
|
|
31
33
|
source: 'log',
|
|
34
|
+
id: event.id,
|
|
32
35
|
timestamp: event.timestamp,
|
|
33
36
|
sessionId: event.sessionId ?? '',
|
|
37
|
+
name: event.name,
|
|
34
38
|
appVersion: event.appVersion,
|
|
35
39
|
appBuildNumber: event.appBuildNumber,
|
|
36
40
|
appUpdateId: event.appUpdateId ?? null,
|
|
@@ -39,13 +43,40 @@ function customEventToEntry(event) {
|
|
|
39
43
|
deviceOsVersion: event.deviceOsVersion,
|
|
40
44
|
countryCode: event.countryCode ?? null,
|
|
41
45
|
easClientId: event.easClientId,
|
|
42
|
-
eventName: event.eventName,
|
|
43
46
|
severityText: event.severityText ?? null,
|
|
44
47
|
severityNumber: event.severityNumber ?? null,
|
|
45
48
|
properties: event.properties.map(p => ({ key: p.key, value: p.value, type: p.type })),
|
|
46
49
|
environment: event.environment ?? null,
|
|
47
50
|
};
|
|
48
51
|
}
|
|
52
|
+
function errorToEntry(event) {
|
|
53
|
+
const properties = [
|
|
54
|
+
...(event.message ? [{ key: 'message', value: event.message, type: 'STRING' }] : []),
|
|
55
|
+
...event.properties.map(p => ({ key: p.key, value: p.value, type: p.type })),
|
|
56
|
+
];
|
|
57
|
+
return {
|
|
58
|
+
source: 'log',
|
|
59
|
+
id: event.id,
|
|
60
|
+
timestamp: event.timestamp,
|
|
61
|
+
sessionId: event.sessionId ?? '',
|
|
62
|
+
name: event.type ?? 'exception',
|
|
63
|
+
appVersion: event.appVersion,
|
|
64
|
+
appBuildNumber: event.appBuildNumber,
|
|
65
|
+
appUpdateId: event.appUpdateId ?? null,
|
|
66
|
+
deviceModel: event.deviceModel,
|
|
67
|
+
deviceOs: event.deviceOs,
|
|
68
|
+
deviceOsVersion: event.deviceOsVersion,
|
|
69
|
+
countryCode: event.countryCode ?? null,
|
|
70
|
+
easClientId: event.easClientId,
|
|
71
|
+
severityText: event.severityText ?? null,
|
|
72
|
+
severityNumber: event.severityNumber ?? null,
|
|
73
|
+
properties,
|
|
74
|
+
environment: event.environment ?? null,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function sessionLogToEntry(log) {
|
|
78
|
+
return log.__typename === 'AppObserveError' ? errorToEntry(log) : userEventToEntry(log);
|
|
79
|
+
}
|
|
49
80
|
// A syntactically valid UUID that matches no real session, used only to trip
|
|
50
81
|
// the server-side session-timeline plan gate without fetching real data.
|
|
51
82
|
const SESSION_ACCESS_PROBE_ID = '00000000-0000-0000-0000-000000000000';
|
|
@@ -62,24 +93,20 @@ async function verifyObserveSessionAccessAsync(graphqlClient, appId) {
|
|
|
62
93
|
});
|
|
63
94
|
}
|
|
64
95
|
async function fetchObserveSessionEventsAsync(graphqlClient, appId, options) {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
]);
|
|
79
|
-
const entries = [
|
|
80
|
-
...metricResult.events.map(metricEventToEntry),
|
|
81
|
-
...logResult.events.map(customEventToEntry),
|
|
82
|
-
].sort((a, b) => (a.timestamp < b.timestamp ? -1 : a.timestamp > b.timestamp ? 1 : 0));
|
|
96
|
+
const { metrics, logs, metricsPageInfo, logsPageInfo } = await ObserveQuery_1.ObserveQuery.sessionEventsAsync(graphqlClient, {
|
|
97
|
+
appId,
|
|
98
|
+
id: options.sessionId,
|
|
99
|
+
first: options.limit,
|
|
100
|
+
metricsOrderBy: {
|
|
101
|
+
field: generated_1.AppObserveMetricsListOrderByField.Timestamp,
|
|
102
|
+
direction: generated_1.AppObserveOrderDirection.Asc,
|
|
103
|
+
},
|
|
104
|
+
logsOrderBy: {
|
|
105
|
+
field: generated_1.AppObserveLogsOrderByField.Timestamp,
|
|
106
|
+
direction: generated_1.AppObserveOrderDirection.Asc,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
const entries = [...metrics.map(metricEventToEntry), ...logs.map(sessionLogToEntry)].sort((a, b) => (a.timestamp < b.timestamp ? -1 : a.timestamp > b.timestamp ? 1 : 0));
|
|
83
110
|
let metadata = null;
|
|
84
111
|
if (entries.length > 0) {
|
|
85
112
|
const newest = entries[entries.length - 1];
|
|
@@ -98,13 +125,13 @@ async function fetchObserveSessionEventsAsync(graphqlClient, appId, options) {
|
|
|
98
125
|
return {
|
|
99
126
|
entries,
|
|
100
127
|
metadata,
|
|
101
|
-
hasMoreMetricEvents:
|
|
102
|
-
hasMoreLogEvents:
|
|
128
|
+
hasMoreMetricEvents: metricsPageInfo.hasNextPage,
|
|
129
|
+
hasMoreLogEvents: logsPageInfo.hasNextPage,
|
|
103
130
|
};
|
|
104
131
|
}
|
|
105
132
|
/**
|
|
106
133
|
* Fetch a page of metric events for the given metricName + window, ordered
|
|
107
|
-
* per `sort`, and filtered to events that have a sessionId. The
|
|
134
|
+
* per `sort`, and filtered to events that have a sessionId. The metrics query
|
|
108
135
|
* supports server-side ordering, so `sort` is passed straight through.
|
|
109
136
|
*/
|
|
110
137
|
async function fetchSessionMetricCandidatesAsync(graphqlClient, appId, options) {
|
|
@@ -114,12 +141,13 @@ async function fetchSessionMetricCandidatesAsync(graphqlClient, appId, options)
|
|
|
114
141
|
limit: options.limit,
|
|
115
142
|
startTime: options.startTime,
|
|
116
143
|
endTime: options.endTime,
|
|
144
|
+
environment: options.environment,
|
|
117
145
|
});
|
|
118
146
|
return events.filter((e) => !!e.sessionId);
|
|
119
147
|
}
|
|
120
148
|
/**
|
|
121
|
-
* Fetch a page of
|
|
122
|
-
* by timestamp server-side, and filtered to events that have a sessionId.
|
|
149
|
+
* Fetch a page of user-defined log events for the given eventName + window,
|
|
150
|
+
* ordered by timestamp server-side, and filtered to events that have a sessionId.
|
|
123
151
|
*/
|
|
124
152
|
async function fetchSessionLogCandidatesAsync(graphqlClient, appId, options) {
|
|
125
153
|
const { events } = await (0, fetchCustomEvents_1.fetchObserveCustomEventsAsync)(graphqlClient, appId, {
|
|
@@ -127,11 +155,12 @@ async function fetchSessionLogCandidatesAsync(graphqlClient, appId, options) {
|
|
|
127
155
|
limit: options.limit,
|
|
128
156
|
startTime: options.startTime,
|
|
129
157
|
endTime: options.endTime,
|
|
158
|
+
environment: options.environment,
|
|
130
159
|
orderBy: {
|
|
131
|
-
field: generated_1.
|
|
160
|
+
field: generated_1.AppObserveUserEventListOrderByField.Timestamp,
|
|
132
161
|
direction: options.orderAscending
|
|
133
|
-
? generated_1.
|
|
134
|
-
: generated_1.
|
|
162
|
+
? generated_1.AppObserveOrderDirection.Asc
|
|
163
|
+
: generated_1.AppObserveOrderDirection.Desc,
|
|
135
164
|
},
|
|
136
165
|
});
|
|
137
166
|
return events.filter((e) => !!e.sessionId);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AppObserveAppVersion
|
|
2
|
+
import { AppObserveAppVersion } from '../graphql/generated';
|
|
3
|
+
import { ObservePlatformKey, ObservePlatformTarget } from './platforms';
|
|
3
4
|
export interface AppVersionsResult {
|
|
4
|
-
platform:
|
|
5
|
+
platform: ObservePlatformKey;
|
|
5
6
|
appVersions: AppObserveAppVersion[];
|
|
6
7
|
}
|
|
7
|
-
export declare function fetchObserveVersionsAsync(graphqlClient: ExpoGraphqlClient, appId: string,
|
|
8
|
+
export declare function fetchObserveVersionsAsync(graphqlClient: ExpoGraphqlClient, appId: string, targets: ObservePlatformTarget[], startTime: string, endTime: string, environment?: string): Promise<AppVersionsResult[]>;
|
|
@@ -2,27 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fetchObserveVersionsAsync = fetchObserveVersionsAsync;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const generated_1 = require("../graphql/generated");
|
|
6
5
|
const ObserveQuery_1 = require("../graphql/queries/ObserveQuery");
|
|
7
6
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
async function fetchObserveVersionsAsync(graphqlClient, appId, platforms, startTime, endTime) {
|
|
13
|
-
const queries = platforms.map(async (appPlatform) => {
|
|
14
|
-
const observePlatform = appPlatformToObservePlatform[appPlatform];
|
|
7
|
+
const platforms_1 = require("./platforms");
|
|
8
|
+
async function fetchObserveVersionsAsync(graphqlClient, appId, targets, startTime, endTime, environment) {
|
|
9
|
+
const queries = targets.map(async (target) => {
|
|
15
10
|
try {
|
|
16
11
|
const appVersions = await ObserveQuery_1.ObserveQuery.appVersionsAsync(graphqlClient, {
|
|
17
12
|
appId,
|
|
18
|
-
|
|
13
|
+
platforms: target.platforms,
|
|
19
14
|
startTime,
|
|
20
15
|
endTime,
|
|
16
|
+
environment,
|
|
21
17
|
});
|
|
22
|
-
return { platform:
|
|
18
|
+
return { platform: target.key, appVersions };
|
|
23
19
|
}
|
|
24
20
|
catch (error) {
|
|
25
|
-
log_1.default.warn(`Failed to fetch app versions for ${
|
|
21
|
+
log_1.default.warn(`Failed to fetch app versions for ${platforms_1.observePlatformDisplayNames[target.key]}: ${error.message}`);
|
|
26
22
|
return null;
|
|
27
23
|
}
|
|
28
24
|
});
|
package/build/observe/flags.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export declare const ObserveProjectIdFlag: {
|
|
|
4
4
|
export declare const ObservePlatformFlag: {
|
|
5
5
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
6
|
};
|
|
7
|
+
export declare const ObserveEnvironmentFlag: {
|
|
8
|
+
environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
7
10
|
export declare const ObserveTimeRangeFlags: {
|
|
8
11
|
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
12
|
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -18,3 +21,6 @@ export declare const ObserveAppVersionFlag: {
|
|
|
18
21
|
export declare const ObserveUpdateIdFlag: {
|
|
19
22
|
'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
23
|
};
|
|
24
|
+
export declare const ObserveBuildNumberFlag: {
|
|
25
|
+
'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
|
+
};
|
package/build/observe/flags.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObserveUpdateIdFlag = exports.ObserveAppVersionFlag = exports.ObserveAfterFlag = exports.ObserveTimeRangeFlags = exports.ObservePlatformFlag = exports.ObserveProjectIdFlag = void 0;
|
|
3
|
+
exports.ObserveBuildNumberFlag = exports.ObserveUpdateIdFlag = exports.ObserveAppVersionFlag = exports.ObserveAfterFlag = exports.ObserveTimeRangeFlags = exports.ObserveEnvironmentFlag = exports.ObservePlatformFlag = exports.ObserveProjectIdFlag = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const platforms_1 = require("./platforms");
|
|
6
6
|
exports.ObserveProjectIdFlag = {
|
|
@@ -10,10 +10,15 @@ exports.ObserveProjectIdFlag = {
|
|
|
10
10
|
};
|
|
11
11
|
exports.ObservePlatformFlag = {
|
|
12
12
|
platform: core_1.Flags.option({
|
|
13
|
-
description: 'Filter by platform',
|
|
13
|
+
description: 'Filter by platform ("apple" covers iOS, iPadOS, tvOS, and macOS)',
|
|
14
14
|
options: platforms_1.allowedPlatformFlagValues,
|
|
15
15
|
})(),
|
|
16
16
|
};
|
|
17
|
+
exports.ObserveEnvironmentFlag = {
|
|
18
|
+
environment: core_1.Flags.string({
|
|
19
|
+
description: 'Filter by environment (e.g. production, development)',
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
17
22
|
exports.ObserveTimeRangeFlags = {
|
|
18
23
|
start: core_1.Flags.string({
|
|
19
24
|
description: 'Start of time range (ISO date)',
|
|
@@ -44,3 +49,8 @@ exports.ObserveUpdateIdFlag = {
|
|
|
44
49
|
description: 'Filter by EAS update ID',
|
|
45
50
|
}),
|
|
46
51
|
};
|
|
52
|
+
exports.ObserveBuildNumberFlag = {
|
|
53
|
+
'build-number': core_1.Flags.string({
|
|
54
|
+
description: 'Filter by app build number',
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppObserveUserEvent, AppObserveUserEventName, PageInfo } from '../graphql/generated';
|
|
2
2
|
export interface ObserveCustomEventPropertyJson {
|
|
3
3
|
key: string;
|
|
4
4
|
value: string;
|
|
@@ -6,7 +6,7 @@ export interface ObserveCustomEventPropertyJson {
|
|
|
6
6
|
}
|
|
7
7
|
export interface ObserveCustomEventJson {
|
|
8
8
|
id: string;
|
|
9
|
-
|
|
9
|
+
name: string;
|
|
10
10
|
timestamp: string;
|
|
11
11
|
sessionId: string | null;
|
|
12
12
|
severityNumber: number | null;
|
|
@@ -23,6 +23,12 @@ export interface ObserveCustomEventJson {
|
|
|
23
23
|
environment: string | null;
|
|
24
24
|
easClientId: string;
|
|
25
25
|
}
|
|
26
|
+
export declare function buildObserveCustomEventJson(event: AppObserveUserEvent): ObserveCustomEventJson;
|
|
27
|
+
/**
|
|
28
|
+
* Render a single user-defined (log) event as a vertical Field/Value detail
|
|
29
|
+
* table, plus its properties, for `eas observe:event`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildObserveCustomEventDetail(event: AppObserveUserEvent): string;
|
|
26
32
|
export interface BuildCustomEventsTableOptions {
|
|
27
33
|
eventName?: string;
|
|
28
34
|
daysBack?: number;
|
|
@@ -30,8 +36,8 @@ export interface BuildCustomEventsTableOptions {
|
|
|
30
36
|
endTime?: string;
|
|
31
37
|
totalEventCount?: number;
|
|
32
38
|
}
|
|
33
|
-
export declare function buildObserveCustomEventsTable(events:
|
|
34
|
-
export declare function buildObserveCustomEventsJson(events:
|
|
39
|
+
export declare function buildObserveCustomEventsTable(events: AppObserveUserEvent[], pageInfo: PageInfo, options?: BuildCustomEventsTableOptions): string;
|
|
40
|
+
export declare function buildObserveCustomEventsJson(events: AppObserveUserEvent[], pageInfo: PageInfo): {
|
|
35
41
|
events: ObserveCustomEventJson[];
|
|
36
42
|
pageInfo: {
|
|
37
43
|
hasNextPage: boolean;
|
|
@@ -44,12 +50,12 @@ export interface BuildEmptyCustomEventsWithSuggestionsOptions {
|
|
|
44
50
|
endTime?: string;
|
|
45
51
|
isTruncated?: boolean;
|
|
46
52
|
}
|
|
47
|
-
export declare function buildObserveCustomEventsEmptyWithSuggestionsTable(eventName: string, names:
|
|
48
|
-
export declare function buildObserveCustomEventsEmptyWithSuggestionsJson(eventName: string, names:
|
|
53
|
+
export declare function buildObserveCustomEventsEmptyWithSuggestionsTable(eventName: string, names: AppObserveUserEventName[], options?: BuildEmptyCustomEventsWithSuggestionsOptions): string;
|
|
54
|
+
export declare function buildObserveCustomEventsEmptyWithSuggestionsJson(eventName: string, names: AppObserveUserEventName[], isTruncated: boolean): {
|
|
49
55
|
filteredEventName: string;
|
|
50
56
|
events: [];
|
|
51
57
|
availableEventNames: Array<{
|
|
52
|
-
|
|
58
|
+
name: string;
|
|
53
59
|
count: number;
|
|
54
60
|
}>;
|
|
55
61
|
availableEventNamesIsTruncated: boolean;
|
|
@@ -60,10 +66,10 @@ export interface BuildCustomEventNamesTableOptions {
|
|
|
60
66
|
endTime?: string;
|
|
61
67
|
isTruncated?: boolean;
|
|
62
68
|
}
|
|
63
|
-
export declare function buildObserveCustomEventNamesTable(names:
|
|
64
|
-
export declare function buildObserveCustomEventNamesJson(names:
|
|
69
|
+
export declare function buildObserveCustomEventNamesTable(names: AppObserveUserEventName[], options?: BuildCustomEventNamesTableOptions): string;
|
|
70
|
+
export declare function buildObserveCustomEventNamesJson(names: AppObserveUserEventName[], isTruncated: boolean): {
|
|
65
71
|
names: Array<{
|
|
66
|
-
|
|
72
|
+
name: string;
|
|
67
73
|
count: number;
|
|
68
74
|
}>;
|
|
69
75
|
isTruncated: boolean;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildObserveCustomEventJson = buildObserveCustomEventJson;
|
|
4
|
+
exports.buildObserveCustomEventDetail = buildObserveCustomEventDetail;
|
|
3
5
|
exports.buildObserveCustomEventsTable = buildObserveCustomEventsTable;
|
|
4
6
|
exports.buildObserveCustomEventsJson = buildObserveCustomEventsJson;
|
|
5
7
|
exports.buildObserveCustomEventsEmptyWithSuggestionsTable = buildObserveCustomEventsEmptyWithSuggestionsTable;
|
|
@@ -19,6 +21,59 @@ function formatSeverity(event) {
|
|
|
19
21
|
}
|
|
20
22
|
return '-';
|
|
21
23
|
}
|
|
24
|
+
function buildObserveCustomEventJson(event) {
|
|
25
|
+
return {
|
|
26
|
+
id: event.id,
|
|
27
|
+
name: event.name,
|
|
28
|
+
timestamp: event.timestamp,
|
|
29
|
+
sessionId: event.sessionId ?? null,
|
|
30
|
+
severityNumber: event.severityNumber ?? null,
|
|
31
|
+
severityText: event.severityText ?? null,
|
|
32
|
+
properties: event.properties.map(p => ({
|
|
33
|
+
key: p.key,
|
|
34
|
+
value: p.value,
|
|
35
|
+
type: p.type,
|
|
36
|
+
})),
|
|
37
|
+
appVersion: event.appVersion,
|
|
38
|
+
appBuildNumber: event.appBuildNumber,
|
|
39
|
+
appUpdateId: event.appUpdateId ?? null,
|
|
40
|
+
appEasBuildId: event.appEasBuildId ?? null,
|
|
41
|
+
deviceModel: event.deviceModel,
|
|
42
|
+
deviceOs: event.deviceOs,
|
|
43
|
+
deviceOsVersion: event.deviceOsVersion,
|
|
44
|
+
countryCode: event.countryCode ?? null,
|
|
45
|
+
environment: event.environment ?? null,
|
|
46
|
+
easClientId: event.easClientId,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Render a single user-defined (log) event as a vertical Field/Value detail
|
|
51
|
+
* table, plus its properties, for `eas observe:event`.
|
|
52
|
+
*/
|
|
53
|
+
function buildObserveCustomEventDetail(event) {
|
|
54
|
+
const rows = [
|
|
55
|
+
['ID', event.id],
|
|
56
|
+
['Type', 'Log'],
|
|
57
|
+
['Event Name', event.name],
|
|
58
|
+
['Timestamp', (0, formatUtils_1.formatLogTimestamp)(event.timestamp)],
|
|
59
|
+
['Severity', formatSeverity(event)],
|
|
60
|
+
['Session ID', event.sessionId ?? '-'],
|
|
61
|
+
['App Version', `${event.appVersion} (${event.appBuildNumber})`],
|
|
62
|
+
['Update ID', event.appUpdateId ?? '-'],
|
|
63
|
+
['EAS Build ID', event.appEasBuildId ?? '-'],
|
|
64
|
+
['Platform', `${event.deviceOs} ${event.deviceOsVersion}`],
|
|
65
|
+
['Device', event.deviceModel],
|
|
66
|
+
['Country', event.countryCode ?? '-'],
|
|
67
|
+
['Environment', event.environment ?? '-'],
|
|
68
|
+
['EAS Client ID', event.easClientId],
|
|
69
|
+
];
|
|
70
|
+
const lines = [chalk_1.default.bold('Log event'), '', (0, renderTextTable_1.default)(['Field', 'Value'], rows)];
|
|
71
|
+
if (event.properties.length > 0) {
|
|
72
|
+
const propertyRows = event.properties.map(p => [p.key, p.type, p.value]);
|
|
73
|
+
lines.push('', chalk_1.default.bold('Properties'), '', (0, renderTextTable_1.default)(['Key', 'Type', 'Value'], propertyRows));
|
|
74
|
+
}
|
|
75
|
+
return lines.join('\n');
|
|
76
|
+
}
|
|
22
77
|
function buildObserveCustomEventsTable(events, pageInfo, options) {
|
|
23
78
|
if (events.length === 0) {
|
|
24
79
|
return chalk_1.default.yellow('No events found.');
|
|
@@ -36,7 +91,7 @@ function buildObserveCustomEventsTable(events, pageInfo, options) {
|
|
|
36
91
|
];
|
|
37
92
|
const rows = events.map(event => [
|
|
38
93
|
(0, formatUtils_1.formatLogTimestamp)(event.timestamp),
|
|
39
|
-
...(showEventName ? [event.
|
|
94
|
+
...(showEventName ? [event.name] : []),
|
|
40
95
|
...(hasSeverity ? [formatSeverity(event)] : []),
|
|
41
96
|
`${event.appVersion} (${event.appBuildNumber})`,
|
|
42
97
|
`${event.deviceOs} ${event.deviceOsVersion}`,
|
|
@@ -60,29 +115,7 @@ function buildObserveCustomEventsTable(events, pageInfo, options) {
|
|
|
60
115
|
}
|
|
61
116
|
function buildObserveCustomEventsJson(events, pageInfo) {
|
|
62
117
|
return {
|
|
63
|
-
events: events.map(
|
|
64
|
-
id: event.id,
|
|
65
|
-
eventName: event.eventName,
|
|
66
|
-
timestamp: event.timestamp,
|
|
67
|
-
sessionId: event.sessionId ?? null,
|
|
68
|
-
severityNumber: event.severityNumber ?? null,
|
|
69
|
-
severityText: event.severityText ?? null,
|
|
70
|
-
properties: event.properties.map(p => ({
|
|
71
|
-
key: p.key,
|
|
72
|
-
value: p.value,
|
|
73
|
-
type: p.type,
|
|
74
|
-
})),
|
|
75
|
-
appVersion: event.appVersion,
|
|
76
|
-
appBuildNumber: event.appBuildNumber,
|
|
77
|
-
appUpdateId: event.appUpdateId ?? null,
|
|
78
|
-
appEasBuildId: event.appEasBuildId ?? null,
|
|
79
|
-
deviceModel: event.deviceModel,
|
|
80
|
-
deviceOs: event.deviceOs,
|
|
81
|
-
deviceOsVersion: event.deviceOsVersion,
|
|
82
|
-
countryCode: event.countryCode ?? null,
|
|
83
|
-
environment: event.environment ?? null,
|
|
84
|
-
easClientId: event.easClientId,
|
|
85
|
-
})),
|
|
118
|
+
events: events.map(buildObserveCustomEventJson),
|
|
86
119
|
pageInfo: {
|
|
87
120
|
hasNextPage: pageInfo.hasNextPage,
|
|
88
121
|
endCursor: pageInfo.endCursor ?? null,
|
|
@@ -99,7 +132,7 @@ function buildObserveCustomEventsEmptyWithSuggestionsTable(eventName, names, opt
|
|
|
99
132
|
}
|
|
100
133
|
lines.push('', 'Available event names in this time range:', '');
|
|
101
134
|
const headers = ['Event Name', 'Count'];
|
|
102
|
-
const rows = names.map(n => [n.
|
|
135
|
+
const rows = names.map(n => [n.name, n.count.toLocaleString()]);
|
|
103
136
|
lines.push((0, renderTextTable_1.default)(headers, rows));
|
|
104
137
|
if (options?.isTruncated) {
|
|
105
138
|
lines.push('', chalk_1.default.yellow('Result is truncated; not all event names are shown.'));
|
|
@@ -110,7 +143,7 @@ function buildObserveCustomEventsEmptyWithSuggestionsJson(eventName, names, isTr
|
|
|
110
143
|
return {
|
|
111
144
|
filteredEventName: eventName,
|
|
112
145
|
events: [],
|
|
113
|
-
availableEventNames: names.map(n => ({
|
|
146
|
+
availableEventNames: names.map(n => ({ name: n.name, count: n.count })),
|
|
114
147
|
availableEventNamesIsTruncated: isTruncated,
|
|
115
148
|
};
|
|
116
149
|
}
|
|
@@ -119,7 +152,7 @@ function buildObserveCustomEventNamesTable(names, options) {
|
|
|
119
152
|
return chalk_1.default.yellow('No event names found.');
|
|
120
153
|
}
|
|
121
154
|
const headers = ['Event Name', 'Count'];
|
|
122
|
-
const rows = names.map(n => [n.
|
|
155
|
+
const rows = names.map(n => [n.name, n.count.toLocaleString()]);
|
|
123
156
|
const lines = [];
|
|
124
157
|
if (options) {
|
|
125
158
|
const timeDesc = (0, formatUtils_1.buildTimeRangeDescription)(options);
|
|
@@ -134,7 +167,7 @@ function buildObserveCustomEventNamesTable(names, options) {
|
|
|
134
167
|
}
|
|
135
168
|
function buildObserveCustomEventNamesJson(names, isTruncated) {
|
|
136
169
|
return {
|
|
137
|
-
names: names.map(n => ({
|
|
170
|
+
names: names.map(n => ({ name: n.name, count: n.count })),
|
|
138
171
|
isTruncated,
|
|
139
172
|
};
|
|
140
173
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { AppObserveError, AppObserveErrorGroup, PageInfo } from '../graphql/generated';
|
|
2
|
+
export interface ObserveErrorGroupJson {
|
|
3
|
+
fingerprint: string | null;
|
|
4
|
+
type: string | null;
|
|
5
|
+
message: string | null;
|
|
6
|
+
source: string | null;
|
|
7
|
+
severity: string | null;
|
|
8
|
+
isFatal: boolean | null;
|
|
9
|
+
eventCount: number | null;
|
|
10
|
+
uniqueUserCount: number | null;
|
|
11
|
+
affectedSessionCount: number | null;
|
|
12
|
+
firstSeenAt: string | null;
|
|
13
|
+
lastSeenAt: string | null;
|
|
14
|
+
platforms: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface ObserveErrorJson {
|
|
17
|
+
id: string;
|
|
18
|
+
type: string | null;
|
|
19
|
+
message: string | null;
|
|
20
|
+
source: string | null;
|
|
21
|
+
fingerprint: string | null;
|
|
22
|
+
severityNumber: number | null;
|
|
23
|
+
severityText: string | null;
|
|
24
|
+
isFatal: boolean | null;
|
|
25
|
+
timestamp: string;
|
|
26
|
+
sessionId: string | null;
|
|
27
|
+
appVersion: string;
|
|
28
|
+
appBuildNumber: string;
|
|
29
|
+
appUpdateId: string | null;
|
|
30
|
+
appEasBuildId: string | null;
|
|
31
|
+
deviceModel: string;
|
|
32
|
+
deviceOs: string;
|
|
33
|
+
deviceOsVersion: string;
|
|
34
|
+
countryCode: string | null;
|
|
35
|
+
environment: string | null;
|
|
36
|
+
easClientId: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function buildObserveErrorJson(event: AppObserveError): ObserveErrorJson;
|
|
39
|
+
/**
|
|
40
|
+
* Render a single error (exception) event as a vertical Field/Value detail
|
|
41
|
+
* table, for `eas observe:event`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildObserveErrorDetail(event: AppObserveError): string;
|
|
44
|
+
export interface BuildErrorGroupsTableOptions {
|
|
45
|
+
daysBack?: number;
|
|
46
|
+
startTime?: string;
|
|
47
|
+
endTime?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function buildObserveErrorGroupsTable(groups: AppObserveErrorGroup[], options?: BuildErrorGroupsTableOptions): string;
|
|
50
|
+
export declare function buildObserveErrorGroupsJson(groups: AppObserveErrorGroup[], isTruncated: boolean): {
|
|
51
|
+
errors: ObserveErrorGroupJson[];
|
|
52
|
+
isTruncated: boolean;
|
|
53
|
+
};
|
|
54
|
+
export interface ObserveErrorOccurrenceJson {
|
|
55
|
+
id: string;
|
|
56
|
+
type: string | null;
|
|
57
|
+
message: string | null;
|
|
58
|
+
source: string | null;
|
|
59
|
+
fingerprint: string | null;
|
|
60
|
+
severityNumber: number | null;
|
|
61
|
+
severityText: string | null;
|
|
62
|
+
isFatal: boolean | null;
|
|
63
|
+
stacktrace: string | null;
|
|
64
|
+
body: string | null;
|
|
65
|
+
timestamp: string;
|
|
66
|
+
sessionId: string | null;
|
|
67
|
+
appVersion: string;
|
|
68
|
+
appBuildNumber: string;
|
|
69
|
+
appUpdateId: string | null;
|
|
70
|
+
appEasBuildId: string | null;
|
|
71
|
+
deviceModel: string;
|
|
72
|
+
deviceOs: string;
|
|
73
|
+
deviceOsVersion: string;
|
|
74
|
+
countryCode: string | null;
|
|
75
|
+
environment: string | null;
|
|
76
|
+
easClientId: string;
|
|
77
|
+
properties: Array<{
|
|
78
|
+
key: string;
|
|
79
|
+
value: string;
|
|
80
|
+
type: string;
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
83
|
+
export declare function buildObserveErrorOccurrenceJson(occurrence: AppObserveError): ObserveErrorOccurrenceJson;
|
|
84
|
+
export declare function buildObserveErrorOccurrencesJson(occurrences: AppObserveError[], pageInfo: PageInfo): {
|
|
85
|
+
occurrences: ObserveErrorOccurrenceJson[];
|
|
86
|
+
pageInfo: {
|
|
87
|
+
hasNextPage: boolean;
|
|
88
|
+
endCursor: string | null;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export interface BuildErrorOccurrencesOptions {
|
|
92
|
+
fingerprint: string;
|
|
93
|
+
daysBack?: number;
|
|
94
|
+
startTime?: string;
|
|
95
|
+
endTime?: string;
|
|
96
|
+
}
|
|
97
|
+
export declare function buildObserveErrorOccurrencesTable(occurrences: AppObserveError[], pageInfo: PageInfo, options: BuildErrorOccurrencesOptions): string;
|