eas-cli 18.9.1 → 18.11.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 +230 -95
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +12 -4
- package/build/build/utils/repository.js +15 -3
- package/build/build/validateLockfile.d.ts +1 -0
- package/build/build/validateLockfile.js +37 -0
- package/build/commandUtils/buildFlags.d.ts +1 -0
- package/build/commandUtils/buildFlags.js +18 -0
- package/build/commandUtils/convex.d.ts +12 -0
- package/build/commandUtils/convex.js +77 -0
- package/build/commands/build/dev.d.ts +1 -0
- package/build/commands/build/dev.js +12 -2
- package/build/commands/build/resign.js +0 -1
- package/build/commands/build/run.d.ts +1 -0
- package/build/commands/build/run.js +12 -3
- package/build/commands/integrations/convex/connect.d.ts +24 -0
- package/build/commands/integrations/convex/connect.js +266 -0
- package/build/commands/integrations/convex/dashboard.d.ts +9 -0
- package/build/commands/integrations/convex/dashboard.js +42 -0
- package/build/commands/integrations/convex/project/delete.d.ts +13 -0
- package/build/commands/integrations/convex/project/delete.js +65 -0
- package/build/commands/integrations/convex/project.d.ts +9 -0
- package/build/commands/integrations/convex/project.js +28 -0
- package/build/commands/integrations/convex/team/delete.d.ts +17 -0
- package/build/commands/integrations/convex/team/delete.js +93 -0
- package/build/commands/integrations/convex/team/invite.d.ts +19 -0
- package/build/commands/integrations/convex/team/invite.js +113 -0
- package/build/commands/integrations/convex/team.d.ts +9 -0
- package/build/commands/integrations/convex/team.js +35 -0
- package/build/commands/observe/events.js +12 -24
- package/build/commands/observe/logs.d.ts +29 -0
- package/build/commands/observe/logs.js +163 -0
- package/build/commands/observe/metrics.js +11 -19
- package/build/commands/observe/versions.js +11 -19
- package/build/commands/simulator/start.js +84 -5
- package/build/commands/simulator/stop.js +1 -1
- package/build/fingerprint/cli.js +1 -0
- package/build/graphql/generated.d.ts +421 -7
- package/build/graphql/generated.js +16 -3
- package/build/graphql/mutations/ConvexMutation.d.ts +10 -0
- package/build/graphql/mutations/ConvexMutation.js +89 -0
- package/build/graphql/mutations/DeviceRunSessionMutation.d.ts +2 -2
- package/build/graphql/mutations/DeviceRunSessionMutation.js +4 -4
- package/build/graphql/queries/ConvexQuery.d.ts +6 -0
- package/build/graphql/queries/ConvexQuery.js +49 -0
- package/build/graphql/queries/ObserveQuery.d.ts +21 -1
- package/build/graphql/queries/ObserveQuery.js +80 -0
- package/build/graphql/types/ConvexTeamConnection.d.ts +11 -0
- package/build/graphql/types/ConvexTeamConnection.js +43 -0
- package/build/graphql/types/Observe.d.ts +1 -0
- package/build/graphql/types/Observe.js +26 -1
- package/build/observe/fetchCustomEvents.d.ts +19 -0
- package/build/observe/fetchCustomEvents.js +21 -0
- package/build/observe/formatCustomEvents.d.ts +70 -0
- package/build/observe/formatCustomEvents.js +140 -0
- package/build/observe/formatEvents.js +5 -34
- package/build/observe/formatMetrics.js +2 -7
- package/build/observe/formatUtils.d.ts +27 -0
- package/build/observe/formatUtils.js +64 -0
- package/build/observe/formatVersions.js +2 -9
- package/build/observe/platforms.d.ts +21 -0
- package/build/observe/platforms.js +48 -0
- package/build/observe/resolveProjectContext.d.ts +22 -0
- package/build/observe/resolveProjectContext.js +21 -0
- package/build/run/ios/run.d.ts +2 -1
- package/build/run/ios/run.js +6 -2
- package/build/run/ios/simulator.d.ts +4 -1
- package/build/run/ios/simulator.js +14 -2
- package/build/run/run.d.ts +2 -1
- package/build/run/run.js +2 -2
- package/oclif.manifest.json +3984 -3243
- package/package.json +4 -4
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConvexMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
|
+
const client_1 = require("../client");
|
|
8
|
+
const ConvexTeamConnection_1 = require("../types/ConvexTeamConnection");
|
|
9
|
+
exports.ConvexMutation = {
|
|
10
|
+
async createConvexTeamConnectionAsync(graphqlClient, input) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.mutation((0, graphql_tag_1.default) `
|
|
13
|
+
mutation CreateConvexTeamConnection(
|
|
14
|
+
$convexTeamConnectionData: CreateConvexTeamConnectionInput!
|
|
15
|
+
) {
|
|
16
|
+
convexTeamConnection {
|
|
17
|
+
createConvexTeamConnection(
|
|
18
|
+
convexTeamConnectionData: $convexTeamConnectionData
|
|
19
|
+
) {
|
|
20
|
+
id
|
|
21
|
+
...ConvexTeamConnectionFragment
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexTeamConnectionFragmentNode)}
|
|
26
|
+
`, { convexTeamConnectionData: input })
|
|
27
|
+
.toPromise());
|
|
28
|
+
return data.convexTeamConnection.createConvexTeamConnection;
|
|
29
|
+
},
|
|
30
|
+
async deleteConvexTeamConnectionAsync(graphqlClient, convexTeamConnectionId) {
|
|
31
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
32
|
+
.mutation((0, graphql_tag_1.default) `
|
|
33
|
+
mutation DeleteConvexTeamConnection($convexTeamConnectionId: ID!) {
|
|
34
|
+
convexTeamConnection {
|
|
35
|
+
deleteConvexTeamConnection(
|
|
36
|
+
convexTeamConnectionId: $convexTeamConnectionId
|
|
37
|
+
) {
|
|
38
|
+
id
|
|
39
|
+
...ConvexTeamConnectionFragment
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexTeamConnectionFragmentNode)}
|
|
44
|
+
`, { convexTeamConnectionId })
|
|
45
|
+
.toPromise());
|
|
46
|
+
return data.convexTeamConnection.deleteConvexTeamConnection;
|
|
47
|
+
},
|
|
48
|
+
async setupConvexProjectAsync(graphqlClient, input) {
|
|
49
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
50
|
+
.mutation((0, graphql_tag_1.default) `
|
|
51
|
+
mutation SetupConvexProject($input: SetupConvexProjectInput!) {
|
|
52
|
+
convexProject {
|
|
53
|
+
setupConvexProject(input: $input) {
|
|
54
|
+
...SetupConvexProjectResultFragment
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexTeamConnectionFragmentNode)}
|
|
59
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexProjectFragmentNode)}
|
|
60
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.SetupConvexProjectResultFragmentNode)}
|
|
61
|
+
`, { input })
|
|
62
|
+
.toPromise());
|
|
63
|
+
return data.convexProject.setupConvexProject;
|
|
64
|
+
},
|
|
65
|
+
async deleteConvexProjectAsync(graphqlClient, convexProjectId) {
|
|
66
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
67
|
+
.mutation((0, graphql_tag_1.default) `
|
|
68
|
+
mutation DeleteConvexProject($convexProjectId: ID!) {
|
|
69
|
+
convexProject {
|
|
70
|
+
deleteConvexProject(convexProjectId: $convexProjectId)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`, { convexProjectId })
|
|
74
|
+
.toPromise());
|
|
75
|
+
return data.convexProject.deleteConvexProject;
|
|
76
|
+
},
|
|
77
|
+
async sendConvexTeamInviteToVerifiedEmailAsync(graphqlClient, input) {
|
|
78
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
79
|
+
.mutation((0, graphql_tag_1.default) `
|
|
80
|
+
mutation SendConvexTeamInviteToVerifiedEmail($input: SendConvexTeamInviteToVerifiedEmailInput!) {
|
|
81
|
+
convexTeamConnection {
|
|
82
|
+
sendConvexTeamInviteToVerifiedEmail(input: $input)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`, { input })
|
|
86
|
+
.toPromise());
|
|
87
|
+
return data.convexTeamConnection.sendConvexTeamInviteToVerifiedEmail;
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { CreateDeviceRunSessionInput, CreateDeviceRunSessionMutation,
|
|
2
|
+
import { CreateDeviceRunSessionInput, CreateDeviceRunSessionMutation, EnsureDeviceRunSessionStoppedMutation } from '../generated';
|
|
3
3
|
export declare const DeviceRunSessionMutation: {
|
|
4
4
|
createDeviceRunSessionAsync(graphqlClient: ExpoGraphqlClient, deviceRunSessionInput: CreateDeviceRunSessionInput): Promise<CreateDeviceRunSessionMutation["deviceRunSession"]["createDeviceRunSession"]>;
|
|
5
|
-
|
|
5
|
+
ensureDeviceRunSessionStoppedAsync(graphqlClient: ExpoGraphqlClient, deviceRunSessionId: string): Promise<EnsureDeviceRunSessionStoppedMutation["deviceRunSession"]["ensureDeviceRunSessionStopped"]>;
|
|
6
6
|
};
|
|
@@ -31,12 +31,12 @@ exports.DeviceRunSessionMutation = {
|
|
|
31
31
|
.toPromise());
|
|
32
32
|
return data.deviceRunSession.createDeviceRunSession;
|
|
33
33
|
},
|
|
34
|
-
async
|
|
34
|
+
async ensureDeviceRunSessionStoppedAsync(graphqlClient, deviceRunSessionId) {
|
|
35
35
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
36
36
|
.mutation((0, graphql_tag_1.default) `
|
|
37
|
-
mutation
|
|
37
|
+
mutation EnsureDeviceRunSessionStoppedMutation($deviceRunSessionId: ID!) {
|
|
38
38
|
deviceRunSession {
|
|
39
|
-
|
|
39
|
+
ensureDeviceRunSessionStopped(deviceRunSessionId: $deviceRunSessionId) {
|
|
40
40
|
id
|
|
41
41
|
status
|
|
42
42
|
}
|
|
@@ -44,6 +44,6 @@ exports.DeviceRunSessionMutation = {
|
|
|
44
44
|
}
|
|
45
45
|
`, { deviceRunSessionId }, { noRetry: true })
|
|
46
46
|
.toPromise());
|
|
47
|
-
return data.deviceRunSession.
|
|
47
|
+
return data.deviceRunSession.ensureDeviceRunSessionStopped;
|
|
48
48
|
},
|
|
49
49
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { ConvexProjectData, ConvexTeamConnectionData } from '../types/ConvexTeamConnection';
|
|
3
|
+
export declare const ConvexQuery: {
|
|
4
|
+
getConvexTeamConnectionsByAccountIdAsync(graphqlClient: ExpoGraphqlClient, accountId: string): Promise<ConvexTeamConnectionData[]>;
|
|
5
|
+
getConvexProjectByAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<ConvexProjectData | null>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConvexQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
|
+
const client_1 = require("../client");
|
|
8
|
+
const ConvexTeamConnection_1 = require("../types/ConvexTeamConnection");
|
|
9
|
+
exports.ConvexQuery = {
|
|
10
|
+
async getConvexTeamConnectionsByAccountIdAsync(graphqlClient, accountId) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.query((0, graphql_tag_1.default) `
|
|
13
|
+
query ConvexTeamConnectionsByAccountId($accountId: String!) {
|
|
14
|
+
account {
|
|
15
|
+
byId(accountId: $accountId) {
|
|
16
|
+
id
|
|
17
|
+
convexTeamConnections {
|
|
18
|
+
id
|
|
19
|
+
...ConvexTeamConnectionFragment
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexTeamConnectionFragmentNode)}
|
|
25
|
+
`, { accountId })
|
|
26
|
+
.toPromise());
|
|
27
|
+
return data.account.byId.convexTeamConnections;
|
|
28
|
+
},
|
|
29
|
+
async getConvexProjectByAppIdAsync(graphqlClient, appId) {
|
|
30
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
31
|
+
.query((0, graphql_tag_1.default) `
|
|
32
|
+
query ConvexProjectByAppId($appId: String!) {
|
|
33
|
+
app {
|
|
34
|
+
byId(appId: $appId) {
|
|
35
|
+
id
|
|
36
|
+
convexProject {
|
|
37
|
+
id
|
|
38
|
+
...ConvexProjectFragment
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexTeamConnectionFragmentNode)}
|
|
44
|
+
${(0, graphql_1.print)(ConvexTeamConnection_1.ConvexProjectFragmentNode)}
|
|
45
|
+
`, { appId }, { additionalTypenames: ['App', 'ConvexProject'] })
|
|
46
|
+
.toPromise());
|
|
47
|
+
return data.app.byId.convexProject ?? null;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AppObserveAppVersion, AppObserveEvent, AppObserveEventsFilter, AppObserveEventsOrderBy, AppObservePlatform, AppObserveTimeSeriesStatistics, PageInfo } from '../generated';
|
|
2
|
+
import { AppObserveAppVersion, AppObserveCustomEvent, AppObserveCustomEventListFilter, AppObserveCustomEventName, AppObserveEvent, AppObserveEventsFilter, AppObserveEventsOrderBy, AppObservePlatform, AppObserveTimeSeriesStatistics, PageInfo } from '../generated';
|
|
3
3
|
export type AppObserveTimeSeriesResult = {
|
|
4
4
|
appVersionMarkers: AppObserveAppVersion[];
|
|
5
5
|
eventCount: number;
|
|
@@ -12,6 +12,12 @@ type AppObserveEventsQueryVariables = {
|
|
|
12
12
|
after?: string;
|
|
13
13
|
orderBy?: AppObserveEventsOrderBy;
|
|
14
14
|
};
|
|
15
|
+
type AppObserveCustomEventListQueryVariables = {
|
|
16
|
+
appId: string;
|
|
17
|
+
filter?: AppObserveCustomEventListFilter;
|
|
18
|
+
first?: number;
|
|
19
|
+
after?: string;
|
|
20
|
+
};
|
|
15
21
|
export declare const ObserveQuery: {
|
|
16
22
|
timeSeriesAsync(graphqlClient: ExpoGraphqlClient, { appId, metricName, platform, startTime, endTime, }: {
|
|
17
23
|
appId: string;
|
|
@@ -31,5 +37,19 @@ export declare const ObserveQuery: {
|
|
|
31
37
|
events: AppObserveEvent[];
|
|
32
38
|
pageInfo: PageInfo;
|
|
33
39
|
}>;
|
|
40
|
+
customEventListAsync(graphqlClient: ExpoGraphqlClient, variables: AppObserveCustomEventListQueryVariables): Promise<{
|
|
41
|
+
events: AppObserveCustomEvent[];
|
|
42
|
+
pageInfo: PageInfo;
|
|
43
|
+
}>;
|
|
44
|
+
customEventNamesAsync(graphqlClient: ExpoGraphqlClient, { appId, startTime, endTime, platform, environment, }: {
|
|
45
|
+
appId: string;
|
|
46
|
+
startTime: string;
|
|
47
|
+
endTime: string;
|
|
48
|
+
platform?: AppObservePlatform;
|
|
49
|
+
environment?: string;
|
|
50
|
+
}): Promise<{
|
|
51
|
+
names: AppObserveCustomEventName[];
|
|
52
|
+
isTruncated: boolean;
|
|
53
|
+
}>;
|
|
34
54
|
};
|
|
35
55
|
export {};
|
|
@@ -106,4 +106,84 @@ exports.ObserveQuery = {
|
|
|
106
106
|
pageInfo,
|
|
107
107
|
};
|
|
108
108
|
},
|
|
109
|
+
async customEventListAsync(graphqlClient, variables) {
|
|
110
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
111
|
+
.query((0, graphql_tag_1.default) `
|
|
112
|
+
query AppObserveCustomEventList(
|
|
113
|
+
$appId: String!
|
|
114
|
+
$filter: AppObserveCustomEventListFilter
|
|
115
|
+
$first: Int
|
|
116
|
+
$after: String
|
|
117
|
+
) {
|
|
118
|
+
app {
|
|
119
|
+
byId(appId: $appId) {
|
|
120
|
+
id
|
|
121
|
+
observe {
|
|
122
|
+
customEventList(filter: $filter, first: $first, after: $after) {
|
|
123
|
+
pageInfo {
|
|
124
|
+
hasNextPage
|
|
125
|
+
hasPreviousPage
|
|
126
|
+
endCursor
|
|
127
|
+
}
|
|
128
|
+
edges {
|
|
129
|
+
cursor
|
|
130
|
+
node {
|
|
131
|
+
id
|
|
132
|
+
...AppObserveCustomEventFragment
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
${(0, graphql_1.print)(Observe_1.AppObserveCustomEventFragmentNode)}
|
|
141
|
+
`, variables)
|
|
142
|
+
.toPromise());
|
|
143
|
+
const { edges, pageInfo } = data.app.byId.observe.customEventList;
|
|
144
|
+
return {
|
|
145
|
+
events: edges.map(edge => edge.node),
|
|
146
|
+
pageInfo,
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
async customEventNamesAsync(graphqlClient, { appId, startTime, endTime, platform, environment, }) {
|
|
150
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
151
|
+
.query((0, graphql_tag_1.default) `
|
|
152
|
+
query AppObserveCustomEventNames(
|
|
153
|
+
$appId: String!
|
|
154
|
+
$startTime: DateTime!
|
|
155
|
+
$endTime: DateTime!
|
|
156
|
+
$platform: AppObservePlatform
|
|
157
|
+
$environment: String
|
|
158
|
+
) {
|
|
159
|
+
app {
|
|
160
|
+
byId(appId: $appId) {
|
|
161
|
+
id
|
|
162
|
+
observe {
|
|
163
|
+
customEventNames(
|
|
164
|
+
startTime: $startTime
|
|
165
|
+
endTime: $endTime
|
|
166
|
+
platform: $platform
|
|
167
|
+
environment: $environment
|
|
168
|
+
) {
|
|
169
|
+
isTruncated
|
|
170
|
+
names {
|
|
171
|
+
eventName
|
|
172
|
+
count
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
`, {
|
|
180
|
+
appId,
|
|
181
|
+
startTime,
|
|
182
|
+
endTime,
|
|
183
|
+
...(platform && { platform }),
|
|
184
|
+
...(environment && { environment }),
|
|
185
|
+
})
|
|
186
|
+
.toPromise());
|
|
187
|
+
return data.app.byId.observe.customEventNames;
|
|
188
|
+
},
|
|
109
189
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConvexProject, ConvexTeamConnection, SetupConvexProjectResult } from '../generated';
|
|
2
|
+
export type ConvexTeamConnectionData = Pick<ConvexTeamConnection, 'id' | 'convexTeamIdentifier' | 'convexTeamName' | 'convexTeamSlug' | 'hasBeenClaimed' | 'createdAt' | 'updatedAt' | 'invitedAt' | 'invitedEmail'>;
|
|
3
|
+
export type ConvexProjectData = Pick<ConvexProject, 'id' | 'convexProjectIdentifier' | 'convexProjectName' | 'convexProjectSlug' | 'createdAt' | 'updatedAt'> & {
|
|
4
|
+
convexTeamConnection: ConvexTeamConnectionData;
|
|
5
|
+
};
|
|
6
|
+
export type SetupConvexProjectResultData = Pick<SetupConvexProjectResult, 'convexDeploymentName' | 'convexDeploymentUrl' | 'deployKey'> & {
|
|
7
|
+
convexProject: ConvexProjectData;
|
|
8
|
+
};
|
|
9
|
+
export declare const ConvexTeamConnectionFragmentNode: import("graphql").DocumentNode;
|
|
10
|
+
export declare const ConvexProjectFragmentNode: import("graphql").DocumentNode;
|
|
11
|
+
export declare const SetupConvexProjectResultFragmentNode: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetupConvexProjectResultFragmentNode = exports.ConvexProjectFragmentNode = exports.ConvexTeamConnectionFragmentNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
exports.ConvexTeamConnectionFragmentNode = (0, graphql_tag_1.default) `
|
|
7
|
+
fragment ConvexTeamConnectionFragment on ConvexTeamConnection {
|
|
8
|
+
id
|
|
9
|
+
convexTeamIdentifier
|
|
10
|
+
convexTeamName
|
|
11
|
+
convexTeamSlug
|
|
12
|
+
hasBeenClaimed
|
|
13
|
+
createdAt
|
|
14
|
+
updatedAt
|
|
15
|
+
invitedAt
|
|
16
|
+
invitedEmail
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
exports.ConvexProjectFragmentNode = (0, graphql_tag_1.default) `
|
|
20
|
+
fragment ConvexProjectFragment on ConvexProject {
|
|
21
|
+
id
|
|
22
|
+
convexProjectIdentifier
|
|
23
|
+
convexProjectName
|
|
24
|
+
convexProjectSlug
|
|
25
|
+
createdAt
|
|
26
|
+
updatedAt
|
|
27
|
+
convexTeamConnection {
|
|
28
|
+
id
|
|
29
|
+
...ConvexTeamConnectionFragment
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
exports.SetupConvexProjectResultFragmentNode = (0, graphql_tag_1.default) `
|
|
34
|
+
fragment SetupConvexProjectResultFragment on SetupConvexProjectResult {
|
|
35
|
+
convexDeploymentName
|
|
36
|
+
convexDeploymentUrl
|
|
37
|
+
deployKey
|
|
38
|
+
convexProject {
|
|
39
|
+
id
|
|
40
|
+
...ConvexProjectFragment
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const AppObserveTimeSeriesFragmentNode: import("graphql").DocumentNode;
|
|
2
|
+
export declare const AppObserveCustomEventFragmentNode: import("graphql").DocumentNode;
|
|
2
3
|
export declare const AppObserveEventFragmentNode: import("graphql").DocumentNode;
|
|
3
4
|
export declare const AppObserveAppVersionFragmentNode: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppObserveAppVersionFragmentNode = exports.AppObserveEventFragmentNode = exports.AppObserveTimeSeriesFragmentNode = void 0;
|
|
3
|
+
exports.AppObserveAppVersionFragmentNode = exports.AppObserveEventFragmentNode = exports.AppObserveCustomEventFragmentNode = exports.AppObserveTimeSeriesFragmentNode = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
6
|
exports.AppObserveTimeSeriesFragmentNode = (0, graphql_tag_1.default) `
|
|
@@ -20,6 +20,31 @@ exports.AppObserveTimeSeriesFragmentNode = (0, graphql_tag_1.default) `
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
|
+
exports.AppObserveCustomEventFragmentNode = (0, graphql_tag_1.default) `
|
|
24
|
+
fragment AppObserveCustomEventFragment on AppObserveCustomEvent {
|
|
25
|
+
id
|
|
26
|
+
eventName
|
|
27
|
+
timestamp
|
|
28
|
+
sessionId
|
|
29
|
+
severityNumber
|
|
30
|
+
severityText
|
|
31
|
+
properties {
|
|
32
|
+
key
|
|
33
|
+
value
|
|
34
|
+
type
|
|
35
|
+
}
|
|
36
|
+
appVersion
|
|
37
|
+
appBuildNumber
|
|
38
|
+
appUpdateId
|
|
39
|
+
appEasBuildId
|
|
40
|
+
deviceOs
|
|
41
|
+
deviceOsVersion
|
|
42
|
+
deviceModel
|
|
43
|
+
environment
|
|
44
|
+
easClientId
|
|
45
|
+
countryCode
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
23
48
|
exports.AppObserveEventFragmentNode = (0, graphql_tag_1.default) `
|
|
24
49
|
fragment AppObserveEventFragment on AppObserveEvent {
|
|
25
50
|
id
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { AppObserveCustomEvent, AppObservePlatform, PageInfo } from '../graphql/generated';
|
|
3
|
+
interface FetchCustomEventsOptions {
|
|
4
|
+
eventName?: string;
|
|
5
|
+
limit: number;
|
|
6
|
+
after?: string;
|
|
7
|
+
startTime: string;
|
|
8
|
+
endTime: string;
|
|
9
|
+
platform?: AppObservePlatform;
|
|
10
|
+
appVersion?: string;
|
|
11
|
+
updateId?: string;
|
|
12
|
+
sessionId?: string;
|
|
13
|
+
}
|
|
14
|
+
interface FetchCustomEventsResult {
|
|
15
|
+
events: AppObserveCustomEvent[];
|
|
16
|
+
pageInfo: PageInfo;
|
|
17
|
+
}
|
|
18
|
+
export declare function fetchObserveCustomEventsAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchCustomEventsOptions): Promise<FetchCustomEventsResult>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchObserveCustomEventsAsync = fetchObserveCustomEventsAsync;
|
|
4
|
+
const ObserveQuery_1 = require("../graphql/queries/ObserveQuery");
|
|
5
|
+
async function fetchObserveCustomEventsAsync(graphqlClient, appId, options) {
|
|
6
|
+
const filter = {
|
|
7
|
+
startTime: options.startTime,
|
|
8
|
+
endTime: options.endTime,
|
|
9
|
+
...(options.eventName && { eventName: options.eventName }),
|
|
10
|
+
...(options.platform && { platform: options.platform }),
|
|
11
|
+
...(options.appVersion && { appVersion: options.appVersion }),
|
|
12
|
+
...(options.updateId && { appUpdateId: options.updateId }),
|
|
13
|
+
...(options.sessionId && { sessionId: options.sessionId }),
|
|
14
|
+
};
|
|
15
|
+
return await ObserveQuery_1.ObserveQuery.customEventListAsync(graphqlClient, {
|
|
16
|
+
appId,
|
|
17
|
+
filter,
|
|
18
|
+
first: options.limit,
|
|
19
|
+
...(options.after && { after: options.after }),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { AppObserveCustomEvent, AppObserveCustomEventName, PageInfo } from '../graphql/generated';
|
|
2
|
+
export interface ObserveCustomEventPropertyJson {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
type: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ObserveCustomEventJson {
|
|
8
|
+
id: string;
|
|
9
|
+
eventName: string;
|
|
10
|
+
timestamp: string;
|
|
11
|
+
sessionId: string | null;
|
|
12
|
+
severityNumber: number | null;
|
|
13
|
+
severityText: string | null;
|
|
14
|
+
properties: ObserveCustomEventPropertyJson[];
|
|
15
|
+
appVersion: string;
|
|
16
|
+
appBuildNumber: string;
|
|
17
|
+
appUpdateId: string | null;
|
|
18
|
+
appEasBuildId: string | null;
|
|
19
|
+
deviceModel: string;
|
|
20
|
+
deviceOs: string;
|
|
21
|
+
deviceOsVersion: string;
|
|
22
|
+
countryCode: string | null;
|
|
23
|
+
environment: string | null;
|
|
24
|
+
easClientId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface BuildCustomEventsTableOptions {
|
|
27
|
+
eventName?: string;
|
|
28
|
+
daysBack?: number;
|
|
29
|
+
startTime?: string;
|
|
30
|
+
endTime?: string;
|
|
31
|
+
totalEventCount?: number;
|
|
32
|
+
}
|
|
33
|
+
export declare function buildObserveCustomEventsTable(events: AppObserveCustomEvent[], pageInfo: PageInfo, options?: BuildCustomEventsTableOptions): string;
|
|
34
|
+
export declare function buildObserveCustomEventsJson(events: AppObserveCustomEvent[], pageInfo: PageInfo): {
|
|
35
|
+
events: ObserveCustomEventJson[];
|
|
36
|
+
pageInfo: {
|
|
37
|
+
hasNextPage: boolean;
|
|
38
|
+
endCursor: string | null;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export interface BuildEmptyCustomEventsWithSuggestionsOptions {
|
|
42
|
+
daysBack?: number;
|
|
43
|
+
startTime?: string;
|
|
44
|
+
endTime?: string;
|
|
45
|
+
isTruncated?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare function buildObserveCustomEventsEmptyWithSuggestionsTable(eventName: string, names: AppObserveCustomEventName[], options?: BuildEmptyCustomEventsWithSuggestionsOptions): string;
|
|
48
|
+
export declare function buildObserveCustomEventsEmptyWithSuggestionsJson(eventName: string, names: AppObserveCustomEventName[], isTruncated: boolean): {
|
|
49
|
+
filteredEventName: string;
|
|
50
|
+
events: [];
|
|
51
|
+
availableEventNames: Array<{
|
|
52
|
+
eventName: string;
|
|
53
|
+
count: number;
|
|
54
|
+
}>;
|
|
55
|
+
availableEventNamesIsTruncated: boolean;
|
|
56
|
+
};
|
|
57
|
+
export interface BuildCustomEventNamesTableOptions {
|
|
58
|
+
daysBack?: number;
|
|
59
|
+
startTime?: string;
|
|
60
|
+
endTime?: string;
|
|
61
|
+
isTruncated?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare function buildObserveCustomEventNamesTable(names: AppObserveCustomEventName[], options?: BuildCustomEventNamesTableOptions): string;
|
|
64
|
+
export declare function buildObserveCustomEventNamesJson(names: AppObserveCustomEventName[], isTruncated: boolean): {
|
|
65
|
+
names: Array<{
|
|
66
|
+
eventName: string;
|
|
67
|
+
count: number;
|
|
68
|
+
}>;
|
|
69
|
+
isTruncated: boolean;
|
|
70
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildObserveCustomEventsTable = buildObserveCustomEventsTable;
|
|
4
|
+
exports.buildObserveCustomEventsJson = buildObserveCustomEventsJson;
|
|
5
|
+
exports.buildObserveCustomEventsEmptyWithSuggestionsTable = buildObserveCustomEventsEmptyWithSuggestionsTable;
|
|
6
|
+
exports.buildObserveCustomEventsEmptyWithSuggestionsJson = buildObserveCustomEventsEmptyWithSuggestionsJson;
|
|
7
|
+
exports.buildObserveCustomEventNamesTable = buildObserveCustomEventNamesTable;
|
|
8
|
+
exports.buildObserveCustomEventNamesJson = buildObserveCustomEventNamesJson;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
11
|
+
const renderTextTable_1 = tslib_1.__importDefault(require("../utils/renderTextTable"));
|
|
12
|
+
const formatUtils_1 = require("./formatUtils");
|
|
13
|
+
function formatSeverity(event) {
|
|
14
|
+
if (event.severityText) {
|
|
15
|
+
return event.severityText;
|
|
16
|
+
}
|
|
17
|
+
if (event.severityNumber != null) {
|
|
18
|
+
return String(event.severityNumber);
|
|
19
|
+
}
|
|
20
|
+
return '-';
|
|
21
|
+
}
|
|
22
|
+
function buildObserveCustomEventsTable(events, pageInfo, options) {
|
|
23
|
+
if (events.length === 0) {
|
|
24
|
+
return chalk_1.default.yellow('No custom events found.');
|
|
25
|
+
}
|
|
26
|
+
const showEventName = !options?.eventName;
|
|
27
|
+
const hasSeverity = events.some(e => e.severityText != null || e.severityNumber != null);
|
|
28
|
+
const headers = [
|
|
29
|
+
'Timestamp',
|
|
30
|
+
...(showEventName ? ['Event'] : []),
|
|
31
|
+
...(hasSeverity ? ['Severity'] : []),
|
|
32
|
+
'App Version',
|
|
33
|
+
'Platform',
|
|
34
|
+
'Device',
|
|
35
|
+
'Country',
|
|
36
|
+
];
|
|
37
|
+
const rows = events.map(event => [
|
|
38
|
+
(0, formatUtils_1.formatLogTimestamp)(event.timestamp),
|
|
39
|
+
...(showEventName ? [event.eventName] : []),
|
|
40
|
+
...(hasSeverity ? [formatSeverity(event)] : []),
|
|
41
|
+
`${event.appVersion} (${event.appBuildNumber})`,
|
|
42
|
+
`${event.deviceOs} ${event.deviceOsVersion}`,
|
|
43
|
+
event.deviceModel,
|
|
44
|
+
event.countryCode ?? '-',
|
|
45
|
+
]);
|
|
46
|
+
const lines = [];
|
|
47
|
+
if (options) {
|
|
48
|
+
const timeDesc = (0, formatUtils_1.buildTimeRangeDescription)(options);
|
|
49
|
+
const totalDesc = options.totalEventCount != null
|
|
50
|
+
? ` — ${options.totalEventCount.toLocaleString()} total events`
|
|
51
|
+
: '';
|
|
52
|
+
const subject = options.eventName ? `${options.eventName} events` : 'Custom events';
|
|
53
|
+
lines.push(chalk_1.default.bold(`${subject} ${timeDesc}${totalDesc}`.trim()), '');
|
|
54
|
+
}
|
|
55
|
+
lines.push((0, renderTextTable_1.default)(headers, rows));
|
|
56
|
+
if (pageInfo.hasNextPage && pageInfo.endCursor) {
|
|
57
|
+
lines.push('', `Next page: --after ${pageInfo.endCursor}`);
|
|
58
|
+
}
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
}
|
|
61
|
+
function buildObserveCustomEventsJson(events, pageInfo) {
|
|
62
|
+
return {
|
|
63
|
+
events: events.map(event => ({
|
|
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
|
+
})),
|
|
86
|
+
pageInfo: {
|
|
87
|
+
hasNextPage: pageInfo.hasNextPage,
|
|
88
|
+
endCursor: pageInfo.endCursor ?? null,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function buildObserveCustomEventsEmptyWithSuggestionsTable(eventName, names, options) {
|
|
93
|
+
const lines = [];
|
|
94
|
+
const timeDesc = options ? (0, formatUtils_1.buildTimeRangeDescription)(options) : '';
|
|
95
|
+
lines.push(chalk_1.default.yellow(`No events found matching "${eventName}" ${timeDesc}.`.trim()));
|
|
96
|
+
if (names.length === 0) {
|
|
97
|
+
lines.push('', chalk_1.default.yellow('No custom event names found in this time range.'));
|
|
98
|
+
return lines.join('\n');
|
|
99
|
+
}
|
|
100
|
+
lines.push('', 'Available event names in this time range:', '');
|
|
101
|
+
const headers = ['Event Name', 'Count'];
|
|
102
|
+
const rows = names.map(n => [n.eventName, n.count.toLocaleString()]);
|
|
103
|
+
lines.push((0, renderTextTable_1.default)(headers, rows));
|
|
104
|
+
if (options?.isTruncated) {
|
|
105
|
+
lines.push('', chalk_1.default.yellow('Result is truncated; not all event names are shown.'));
|
|
106
|
+
}
|
|
107
|
+
return lines.join('\n');
|
|
108
|
+
}
|
|
109
|
+
function buildObserveCustomEventsEmptyWithSuggestionsJson(eventName, names, isTruncated) {
|
|
110
|
+
return {
|
|
111
|
+
filteredEventName: eventName,
|
|
112
|
+
events: [],
|
|
113
|
+
availableEventNames: names.map(n => ({ eventName: n.eventName, count: n.count })),
|
|
114
|
+
availableEventNamesIsTruncated: isTruncated,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function buildObserveCustomEventNamesTable(names, options) {
|
|
118
|
+
if (names.length === 0) {
|
|
119
|
+
return chalk_1.default.yellow('No custom event names found.');
|
|
120
|
+
}
|
|
121
|
+
const headers = ['Event Name', 'Count'];
|
|
122
|
+
const rows = names.map(n => [n.eventName, n.count.toLocaleString()]);
|
|
123
|
+
const lines = [];
|
|
124
|
+
if (options) {
|
|
125
|
+
const timeDesc = (0, formatUtils_1.buildTimeRangeDescription)(options);
|
|
126
|
+
const subject = 'Custom event names';
|
|
127
|
+
lines.push(chalk_1.default.bold(`${subject} ${timeDesc}`.trim()), '');
|
|
128
|
+
}
|
|
129
|
+
lines.push((0, renderTextTable_1.default)(headers, rows));
|
|
130
|
+
if (options?.isTruncated) {
|
|
131
|
+
lines.push('', chalk_1.default.yellow('Result is truncated; not all event names are shown.'));
|
|
132
|
+
}
|
|
133
|
+
return lines.join('\n');
|
|
134
|
+
}
|
|
135
|
+
function buildObserveCustomEventNamesJson(names, isTruncated) {
|
|
136
|
+
return {
|
|
137
|
+
names: names.map(n => ({ eventName: n.eventName, count: n.count })),
|
|
138
|
+
isTruncated,
|
|
139
|
+
};
|
|
140
|
+
}
|