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,6 +5,7 @@ export declare function getBuildLogsUrl(build: BuildFragment, hash?: string): st
|
|
|
5
5
|
export declare function getArtifactUrl(artifactId: string): string;
|
|
6
6
|
export declare function getInternalDistributionInstallUrl(build: BuildFragment): string;
|
|
7
7
|
export declare function getUpdateGroupUrl(accountName: string, projectName: string, updateGroupId: string): string;
|
|
8
|
+
export declare function getSubmissionUrl(accountName: string, projectName: string, submissionId: string): string;
|
|
8
9
|
export declare function getWorkflowRunUrl(accountName: string, projectName: string, workflowRunId: string): string;
|
|
9
10
|
export declare function getDeviceRunSessionUrl(accountName: string, projectName: string, deviceRunSessionId: string): string;
|
|
10
11
|
/**
|
package/build/build/utils/url.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.getBuildLogsUrl = getBuildLogsUrl;
|
|
|
6
6
|
exports.getArtifactUrl = getArtifactUrl;
|
|
7
7
|
exports.getInternalDistributionInstallUrl = getInternalDistributionInstallUrl;
|
|
8
8
|
exports.getUpdateGroupUrl = getUpdateGroupUrl;
|
|
9
|
+
exports.getSubmissionUrl = getSubmissionUrl;
|
|
9
10
|
exports.getWorkflowRunUrl = getWorkflowRunUrl;
|
|
10
11
|
exports.getDeviceRunSessionUrl = getDeviceRunSessionUrl;
|
|
11
12
|
exports.getBareJobRunUrl = getBareJobRunUrl;
|
|
@@ -40,6 +41,9 @@ function getInternalDistributionInstallUrl(build) {
|
|
|
40
41
|
function getUpdateGroupUrl(accountName, projectName, updateGroupId) {
|
|
41
42
|
return new URL(`/accounts/${encodeURIComponent(accountName)}/projects/${encodeURIComponent(projectName)}/updates/${encodeURIComponent(updateGroupId)}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
|
|
42
43
|
}
|
|
44
|
+
function getSubmissionUrl(accountName, projectName, submissionId) {
|
|
45
|
+
return new URL(`/accounts/${encodeURIComponent(accountName)}/projects/${encodeURIComponent(projectName)}/submissions/${encodeURIComponent(submissionId)}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
|
|
46
|
+
}
|
|
43
47
|
function getWorkflowRunUrl(accountName, projectName, workflowRunId) {
|
|
44
48
|
return new URL(`/accounts/${encodeURIComponent(accountName)}/projects/${encodeURIComponent(projectName)}/workflows/${workflowRunId}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
|
|
45
49
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { ProtectUpdateChannelMutationVariables, UnprotectUpdateChannelMutationVariables, UpdateChannelBasicInfoFragment } from '../graphql/generated';
|
|
3
|
+
export declare function protectUpdateChannelAsync(graphqlClient: ExpoGraphqlClient, { channelId }: ProtectUpdateChannelMutationVariables): Promise<UpdateChannelBasicInfoFragment>;
|
|
4
|
+
export declare function unprotectUpdateChannelAsync(graphqlClient: ExpoGraphqlClient, { channelId }: UnprotectUpdateChannelMutationVariables): Promise<UpdateChannelBasicInfoFragment>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.protectUpdateChannelAsync = protectUpdateChannelAsync;
|
|
4
|
+
exports.unprotectUpdateChannelAsync = unprotectUpdateChannelAsync;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const graphql_1 = require("graphql");
|
|
7
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
8
|
+
const client_1 = require("../graphql/client");
|
|
9
|
+
const UpdateChannelBasicInfo_1 = require("../graphql/types/UpdateChannelBasicInfo");
|
|
10
|
+
async function protectUpdateChannelAsync(graphqlClient, { channelId }) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.mutation((0, graphql_tag_1.default) `
|
|
13
|
+
mutation ProtectUpdateChannel($channelId: ID!) {
|
|
14
|
+
updateChannel {
|
|
15
|
+
protectUpdateChannel(channelId: $channelId) {
|
|
16
|
+
id
|
|
17
|
+
...UpdateChannelBasicInfoFragment
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
${(0, graphql_1.print)(UpdateChannelBasicInfo_1.UpdateChannelBasicInfoFragmentNode)}
|
|
22
|
+
`, { channelId })
|
|
23
|
+
.toPromise());
|
|
24
|
+
const channel = data.updateChannel.protectUpdateChannel;
|
|
25
|
+
if (!channel) {
|
|
26
|
+
throw new Error(`Could not find a channel with id: ${channelId}`);
|
|
27
|
+
}
|
|
28
|
+
return channel;
|
|
29
|
+
}
|
|
30
|
+
async function unprotectUpdateChannelAsync(graphqlClient, { channelId }) {
|
|
31
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
32
|
+
.mutation((0, graphql_tag_1.default) `
|
|
33
|
+
mutation UnprotectUpdateChannel($channelId: ID!) {
|
|
34
|
+
updateChannel {
|
|
35
|
+
unprotectUpdateChannel(channelId: $channelId) {
|
|
36
|
+
id
|
|
37
|
+
...UpdateChannelBasicInfoFragment
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
${(0, graphql_1.print)(UpdateChannelBasicInfo_1.UpdateChannelBasicInfoFragmentNode)}
|
|
42
|
+
`, { channelId })
|
|
43
|
+
.toPromise());
|
|
44
|
+
const channel = data.updateChannel.unprotectUpdateChannel;
|
|
45
|
+
if (!channel) {
|
|
46
|
+
throw new Error(`Could not find a channel with id: ${channelId}`);
|
|
47
|
+
}
|
|
48
|
+
return channel;
|
|
49
|
+
}
|
|
@@ -18,6 +18,12 @@ export declare function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlCli
|
|
|
18
18
|
channelName: string;
|
|
19
19
|
paginatedQueryOptions: PaginatedQueryOptions;
|
|
20
20
|
}): Promise<void>;
|
|
21
|
+
export declare function renderChannelHeaderContent({ channelName, channelId, isPaused, isProtected, }: {
|
|
22
|
+
channelName: string;
|
|
23
|
+
channelId: string;
|
|
24
|
+
isPaused: boolean;
|
|
25
|
+
isProtected: boolean;
|
|
26
|
+
}): void;
|
|
21
27
|
export declare function createChannelOnAppAsync(graphqlClient: ExpoGraphqlClient, { appId, branchId, channelName, }: {
|
|
22
28
|
appId: string;
|
|
23
29
|
branchId: string;
|
package/build/channel/queries.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.CHANNELS_LIMIT = void 0;
|
|
|
4
4
|
exports.selectChannelOnAppAsync = selectChannelOnAppAsync;
|
|
5
5
|
exports.listAndRenderChannelsOnAppAsync = listAndRenderChannelsOnAppAsync;
|
|
6
6
|
exports.listAndRenderBranchesAndUpdatesOnChannelAsync = listAndRenderBranchesAndUpdatesOnChannelAsync;
|
|
7
|
+
exports.renderChannelHeaderContent = renderChannelHeaderContent;
|
|
7
8
|
exports.createChannelOnAppAsync = createChannelOnAppAsync;
|
|
8
9
|
exports.ensureChannelExistsAsync = ensureChannelExistsAsync;
|
|
9
10
|
exports.doesChannelExistAsync = doesChannelExistAsync;
|
|
@@ -83,6 +84,7 @@ async function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient, { pr
|
|
|
83
84
|
channelName: channel.name,
|
|
84
85
|
channelId: channel.id,
|
|
85
86
|
isPaused: channel.isPaused,
|
|
87
|
+
isProtected: channel.isProtected,
|
|
86
88
|
});
|
|
87
89
|
if (paginatedQueryOptions.nonInteractive) {
|
|
88
90
|
const branches = await queryBranchesAndUpdateGroupsOnChannelAsync(graphqlClient, {
|
|
@@ -132,6 +134,7 @@ function renderPageOfChannels(currentPage, { json }) {
|
|
|
132
134
|
channelName: channel.name,
|
|
133
135
|
channelId: channel.id,
|
|
134
136
|
isPaused: channel.isPaused,
|
|
137
|
+
isProtected: channel.isProtected,
|
|
135
138
|
});
|
|
136
139
|
log_1.default.addNewLineIfNone();
|
|
137
140
|
(0, print_utils_1.logChannelDetails)(channel);
|
|
@@ -152,13 +155,14 @@ function renderPageOfBranchesOnChannel(channel, currentPage, { json }) {
|
|
|
152
155
|
(0, print_utils_1.logChannelDetails)(channelWithNewBranches);
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
|
-
function renderChannelHeaderContent({ channelName, channelId, isPaused, }) {
|
|
158
|
+
function renderChannelHeaderContent({ channelName, channelId, isPaused, isProtected, }) {
|
|
156
159
|
log_1.default.addNewLineIfNone();
|
|
157
160
|
log_1.default.log(chalk_1.default.bold('Channel:'));
|
|
158
161
|
log_1.default.log((0, formatFields_1.default)([
|
|
159
162
|
{ label: 'Name', value: channelName },
|
|
160
163
|
{ label: 'ID', value: channelId },
|
|
161
164
|
{ label: 'Status', value: isPaused ? 'Paused' : 'Active' },
|
|
165
|
+
{ label: 'Protection', value: isProtected ? 'Protected' : 'Unprotected' },
|
|
162
166
|
]));
|
|
163
167
|
log_1.default.addNewLineIfNone();
|
|
164
168
|
log_1.default.log((0, chalk_1.default) `{bold Branches pointed at this channel and their most recent update group:}`);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ChannelProtect extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
static contextDefinition: {
|
|
12
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
13
|
+
projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
|
|
14
|
+
};
|
|
15
|
+
runAsync(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const protection_1 = require("../../channel/protection");
|
|
7
|
+
const queries_1 = require("../../channel/queries");
|
|
8
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
10
|
+
const ChannelQuery_1 = require("../../graphql/queries/ChannelQuery");
|
|
11
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
|
+
const json_1 = require("../../utils/json");
|
|
13
|
+
class ChannelProtect extends EasCommand_1.default {
|
|
14
|
+
static description = 'protect a channel so only account admins can publish to it';
|
|
15
|
+
static args = {
|
|
16
|
+
name: core_1.Args.string({
|
|
17
|
+
required: false,
|
|
18
|
+
description: 'Name of the channel to protect',
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
static flags = {
|
|
22
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
23
|
+
};
|
|
24
|
+
static contextDefinition = {
|
|
25
|
+
...this.ContextOptions.ProjectId,
|
|
26
|
+
...this.ContextOptions.LoggedIn,
|
|
27
|
+
};
|
|
28
|
+
async runAsync() {
|
|
29
|
+
const { args, flags } = await this.parse(ChannelProtect);
|
|
30
|
+
const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
|
|
31
|
+
if (json) {
|
|
32
|
+
(0, json_1.enableJsonOutput)();
|
|
33
|
+
}
|
|
34
|
+
if (!args.name && nonInteractive) {
|
|
35
|
+
throw new Error('Channel name must be set when running in non-interactive mode');
|
|
36
|
+
}
|
|
37
|
+
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelProtect, { nonInteractive });
|
|
38
|
+
const existingChannel = args.name
|
|
39
|
+
? await ChannelQuery_1.ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
|
|
40
|
+
appId: projectId,
|
|
41
|
+
channelName: args.name,
|
|
42
|
+
})
|
|
43
|
+
: await (0, queries_1.selectChannelOnAppAsync)(graphqlClient, {
|
|
44
|
+
projectId,
|
|
45
|
+
selectionPromptTitle: 'Select a channel to protect',
|
|
46
|
+
paginatedQueryOptions: { json, nonInteractive, offset: 0 },
|
|
47
|
+
});
|
|
48
|
+
if (existingChannel.isProtected) {
|
|
49
|
+
if (json) {
|
|
50
|
+
(0, json_1.printJsonOnlyOutput)(existingChannel);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
log_1.default.log((0, chalk_1.default) `Channel {bold ${existingChannel.name}} is already protected.`);
|
|
54
|
+
}
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const channel = await (0, protection_1.protectUpdateChannelAsync)(graphqlClient, {
|
|
58
|
+
channelId: existingChannel.id,
|
|
59
|
+
});
|
|
60
|
+
if (json) {
|
|
61
|
+
(0, json_1.printJsonOnlyOutput)(channel);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
log_1.default.withTick((0, chalk_1.default) `Channel {bold ${channel.name}} is now protected.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.default = ChannelProtect;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ChannelUnprotect extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
static contextDefinition: {
|
|
12
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
13
|
+
projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
|
|
14
|
+
};
|
|
15
|
+
runAsync(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const protection_1 = require("../../channel/protection");
|
|
7
|
+
const queries_1 = require("../../channel/queries");
|
|
8
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
10
|
+
const ChannelQuery_1 = require("../../graphql/queries/ChannelQuery");
|
|
11
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
|
+
const prompts_1 = require("../../prompts");
|
|
13
|
+
const json_1 = require("../../utils/json");
|
|
14
|
+
class ChannelUnprotect extends EasCommand_1.default {
|
|
15
|
+
static description = "remove a channel's admin-only publishing restriction";
|
|
16
|
+
static args = {
|
|
17
|
+
name: core_1.Args.string({
|
|
18
|
+
required: false,
|
|
19
|
+
description: 'Name of the channel to unprotect',
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
static flags = {
|
|
23
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
24
|
+
};
|
|
25
|
+
static contextDefinition = {
|
|
26
|
+
...this.ContextOptions.ProjectId,
|
|
27
|
+
...this.ContextOptions.LoggedIn,
|
|
28
|
+
};
|
|
29
|
+
async runAsync() {
|
|
30
|
+
const { args, flags } = await this.parse(ChannelUnprotect);
|
|
31
|
+
const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
|
|
32
|
+
if (json) {
|
|
33
|
+
(0, json_1.enableJsonOutput)();
|
|
34
|
+
}
|
|
35
|
+
if (!args.name && nonInteractive) {
|
|
36
|
+
throw new Error('Channel name must be set when running in non-interactive mode');
|
|
37
|
+
}
|
|
38
|
+
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelUnprotect, { nonInteractive });
|
|
39
|
+
const existingChannel = args.name
|
|
40
|
+
? await ChannelQuery_1.ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
|
|
41
|
+
appId: projectId,
|
|
42
|
+
channelName: args.name,
|
|
43
|
+
})
|
|
44
|
+
: await (0, queries_1.selectChannelOnAppAsync)(graphqlClient, {
|
|
45
|
+
projectId,
|
|
46
|
+
selectionPromptTitle: 'Select a channel to unprotect',
|
|
47
|
+
paginatedQueryOptions: { json, nonInteractive, offset: 0 },
|
|
48
|
+
});
|
|
49
|
+
if (!existingChannel.isProtected) {
|
|
50
|
+
if (json) {
|
|
51
|
+
(0, json_1.printJsonOnlyOutput)(existingChannel);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
log_1.default.log((0, chalk_1.default) `Channel {bold ${existingChannel.name}} is already unprotected.`);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!nonInteractive) {
|
|
59
|
+
const confirmed = await (0, prompts_1.toggleConfirmAsync)({
|
|
60
|
+
message: (0, chalk_1.default) `Remove protection from channel {bold ${existingChannel.name}}?`,
|
|
61
|
+
});
|
|
62
|
+
if (!confirmed) {
|
|
63
|
+
log_1.default.error((0, chalk_1.default) `Canceled removing protection from channel {bold ${existingChannel.name}}.`);
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const channel = await (0, protection_1.unprotectUpdateChannelAsync)(graphqlClient, {
|
|
68
|
+
channelId: existingChannel.id,
|
|
69
|
+
});
|
|
70
|
+
if (json) {
|
|
71
|
+
(0, json_1.printJsonOnlyOutput)(channel);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
log_1.default.withTick((0, chalk_1.default) `Channel {bold ${channel.name}} is no longer protected.`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.default = ChannelUnprotect;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ObserveErrors extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
16
|
+
after: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
fingerprint: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
severity: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
static contextDefinition: {
|
|
22
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
23
|
+
projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
|
|
24
|
+
};
|
|
25
|
+
private static loggedInOnlyContextDefinition;
|
|
26
|
+
runAsync(): Promise<void>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
7
|
+
const pagination_1 = require("../../commandUtils/pagination");
|
|
8
|
+
const generated_1 = require("../../graphql/generated");
|
|
9
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
|
+
const fetchErrors_1 = require("../../observe/fetchErrors");
|
|
11
|
+
const flags_2 = require("../../observe/flags");
|
|
12
|
+
const formatErrors_1 = require("../../observe/formatErrors");
|
|
13
|
+
const planGating_1 = require("../../observe/planGating");
|
|
14
|
+
const platforms_1 = require("../../observe/platforms");
|
|
15
|
+
const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
|
|
16
|
+
const startAndEndTime_1 = require("../../observe/startAndEndTime");
|
|
17
|
+
const json_1 = require("../../utils/json");
|
|
18
|
+
const SEVERITY_BY_FLAG = {
|
|
19
|
+
fatal: generated_1.AppObserveErrorSeverity.Fatal,
|
|
20
|
+
error: generated_1.AppObserveErrorSeverity.Error,
|
|
21
|
+
};
|
|
22
|
+
const DEFAULT_OCCURRENCES_LIMIT = 10;
|
|
23
|
+
class ObserveErrors extends EasCommand_1.default {
|
|
24
|
+
static description = 'display error and exception issue groups (grouped by fingerprint) for the app';
|
|
25
|
+
static flags = {
|
|
26
|
+
...flags_2.ObservePlatformFlag,
|
|
27
|
+
fingerprint: core_1.Flags.string({
|
|
28
|
+
description: 'Show individual occurrences (with stack traces) for this error group fingerprint instead of the grouped summary',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
severity: core_1.Flags.option({
|
|
32
|
+
description: 'Filter by severity (ignored when --fingerprint is set)',
|
|
33
|
+
options: Object.keys(SEVERITY_BY_FLAG),
|
|
34
|
+
required: false,
|
|
35
|
+
})(),
|
|
36
|
+
...flags_2.ObserveAfterFlag,
|
|
37
|
+
limit: (0, pagination_1.getLimitFlagWithCustomValues)({
|
|
38
|
+
defaultTo: DEFAULT_OCCURRENCES_LIMIT,
|
|
39
|
+
limit: 100,
|
|
40
|
+
}),
|
|
41
|
+
...flags_2.ObserveTimeRangeFlags,
|
|
42
|
+
...flags_2.ObserveAppVersionFlag,
|
|
43
|
+
...flags_2.ObserveBuildNumberFlag,
|
|
44
|
+
...flags_2.ObserveUpdateIdFlag,
|
|
45
|
+
...flags_2.ObserveEnvironmentFlag,
|
|
46
|
+
...flags_2.ObserveProjectIdFlag,
|
|
47
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
48
|
+
};
|
|
49
|
+
static contextDefinition = {
|
|
50
|
+
...this.ContextOptions.ProjectId,
|
|
51
|
+
...this.ContextOptions.LoggedIn,
|
|
52
|
+
};
|
|
53
|
+
static loggedInOnlyContextDefinition = {
|
|
54
|
+
...this.ContextOptions.LoggedIn,
|
|
55
|
+
};
|
|
56
|
+
async runAsync() {
|
|
57
|
+
const { flags } = await this.parse(ObserveErrors);
|
|
58
|
+
const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
|
|
59
|
+
const { projectId, graphqlClient } = await (0, resolveProjectContext_1.resolveObserveCommandContextAsync)({
|
|
60
|
+
command: this,
|
|
61
|
+
commandClass: ObserveErrors,
|
|
62
|
+
loggedInOnlyContextDefinition: ObserveErrors.loggedInOnlyContextDefinition,
|
|
63
|
+
projectIdOverride: flags['project-id'],
|
|
64
|
+
nonInteractive,
|
|
65
|
+
});
|
|
66
|
+
if (!flags.fingerprint && (flags.after || flags.limit)) {
|
|
67
|
+
throw new Error('--after or --limit can only be used in combination with the --fingerprint flag.');
|
|
68
|
+
}
|
|
69
|
+
if (json) {
|
|
70
|
+
(0, json_1.enableJsonOutput)();
|
|
71
|
+
}
|
|
72
|
+
const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
|
|
73
|
+
if (flags.fingerprint) {
|
|
74
|
+
const { occurrences, pageInfo } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => (0, fetchErrors_1.fetchObserveErrorOccurrencesAsync)(graphqlClient, projectId, {
|
|
75
|
+
fingerprint: flags.fingerprint,
|
|
76
|
+
startTime,
|
|
77
|
+
endTime,
|
|
78
|
+
platforms: (0, platforms_1.observePlatformsFromFlag)(flags.platform),
|
|
79
|
+
appVersion: flags['app-version'],
|
|
80
|
+
buildNumber: flags['build-number'],
|
|
81
|
+
updateId: flags['update-id'],
|
|
82
|
+
environment: flags.environment,
|
|
83
|
+
limit: flags.limit ?? DEFAULT_OCCURRENCES_LIMIT,
|
|
84
|
+
...(flags.after && { after: flags.after }),
|
|
85
|
+
}));
|
|
86
|
+
if (json) {
|
|
87
|
+
(0, json_1.printJsonOnlyOutput)((0, formatErrors_1.buildObserveErrorOccurrencesJson)(occurrences, pageInfo));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
log_1.default.addNewLineIfNone();
|
|
91
|
+
log_1.default.log((0, formatErrors_1.buildObserveErrorOccurrencesTable)(occurrences, pageInfo, {
|
|
92
|
+
fingerprint: flags.fingerprint,
|
|
93
|
+
daysBack,
|
|
94
|
+
startTime,
|
|
95
|
+
endTime,
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const { groups, isTruncated } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => (0, fetchErrors_1.fetchObserveErrorGroupsAsync)(graphqlClient, projectId, {
|
|
101
|
+
startTime,
|
|
102
|
+
endTime,
|
|
103
|
+
platforms: (0, platforms_1.observePlatformsFromFlag)(flags.platform),
|
|
104
|
+
appVersion: flags['app-version'],
|
|
105
|
+
buildNumber: flags['build-number'],
|
|
106
|
+
updateId: flags['update-id'],
|
|
107
|
+
environment: flags.environment,
|
|
108
|
+
...(flags.severity && { severity: SEVERITY_BY_FLAG[flags.severity] }),
|
|
109
|
+
}));
|
|
110
|
+
if (json) {
|
|
111
|
+
(0, json_1.printJsonOnlyOutput)((0, formatErrors_1.buildObserveErrorGroupsJson)(groups, isTruncated));
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
log_1.default.addNewLineIfNone();
|
|
115
|
+
log_1.default.log((0, formatErrors_1.buildObserveErrorGroupsTable)(groups, { daysBack, startTime, endTime }));
|
|
116
|
+
if (isTruncated) {
|
|
117
|
+
log_1.default.warn('Result is truncated; not all error groups are shown.');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.default = ObserveErrors;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ObserveEvent extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static contextDefinition: {
|
|
13
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
|
+
projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
|
|
15
|
+
};
|
|
16
|
+
private static loggedInOnlyContextDefinition;
|
|
17
|
+
runAsync(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
7
|
+
const errors_1 = require("../../commandUtils/errors");
|
|
8
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
9
|
+
const client_1 = require("../../graphql/client");
|
|
10
|
+
const ObserveQuery_1 = require("../../graphql/queries/ObserveQuery");
|
|
11
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
|
+
const formatCustomEvents_1 = require("../../observe/formatCustomEvents");
|
|
13
|
+
const formatErrors_1 = require("../../observe/formatErrors");
|
|
14
|
+
const formatEvents_1 = require("../../observe/formatEvents");
|
|
15
|
+
const flags_2 = require("../../observe/flags");
|
|
16
|
+
const planGating_1 = require("../../observe/planGating");
|
|
17
|
+
const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
|
|
18
|
+
const json_1 = require("../../utils/json");
|
|
19
|
+
class ObserveEvent extends EasCommand_1.default {
|
|
20
|
+
static description = 'display a single Observe event (metric, log, or error) by its ID. IDs are included in event data when the `--json` flag is passed to `eas observe:session`, `eas observe:metrics`, or `eas observe:events`.';
|
|
21
|
+
static args = {
|
|
22
|
+
id: core_1.Args.string({
|
|
23
|
+
description: 'ID of the event to display',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
static flags = {
|
|
28
|
+
...flags_2.ObserveProjectIdFlag,
|
|
29
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
30
|
+
};
|
|
31
|
+
static contextDefinition = {
|
|
32
|
+
...this.ContextOptions.ProjectId,
|
|
33
|
+
...this.ContextOptions.LoggedIn,
|
|
34
|
+
};
|
|
35
|
+
static loggedInOnlyContextDefinition = {
|
|
36
|
+
...this.ContextOptions.LoggedIn,
|
|
37
|
+
};
|
|
38
|
+
async runAsync() {
|
|
39
|
+
const { flags, args } = await this.parse(ObserveEvent);
|
|
40
|
+
const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
|
|
41
|
+
const { projectId, graphqlClient } = await (0, resolveProjectContext_1.resolveObserveCommandContextAsync)({
|
|
42
|
+
command: this,
|
|
43
|
+
commandClass: ObserveEvent,
|
|
44
|
+
loggedInOnlyContextDefinition: ObserveEvent.loggedInOnlyContextDefinition,
|
|
45
|
+
projectIdOverride: flags['project-id'],
|
|
46
|
+
nonInteractive,
|
|
47
|
+
});
|
|
48
|
+
if (json) {
|
|
49
|
+
(0, json_1.enableJsonOutput)();
|
|
50
|
+
}
|
|
51
|
+
const id = args.id;
|
|
52
|
+
// A log event ID (user event or error) is a UUID; a metric event ID is
|
|
53
|
+
// base64url-encoded JSON. Route to the matching query so we never issue the
|
|
54
|
+
// query that is guaranteed to fail for this ID, and reject anything that is
|
|
55
|
+
// neither up front.
|
|
56
|
+
if ((0, uuid_1.validate)(id)) {
|
|
57
|
+
const log = await fetchObserveEventAsync(id, () => ObserveQuery_1.ObserveQuery.logByIdAsync(graphqlClient, { appId: projectId, id }));
|
|
58
|
+
if (!log) {
|
|
59
|
+
throw eventNotFoundError(id);
|
|
60
|
+
}
|
|
61
|
+
if (log.__typename === 'AppObserveError') {
|
|
62
|
+
if (json) {
|
|
63
|
+
(0, json_1.printJsonOnlyOutput)({ type: 'error', event: (0, formatErrors_1.buildObserveErrorJson)(log) });
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
log_1.default.addNewLineIfNone();
|
|
67
|
+
log_1.default.log((0, formatErrors_1.buildObserveErrorDetail)(log));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else if (json) {
|
|
71
|
+
(0, json_1.printJsonOnlyOutput)({ type: 'log', event: (0, formatCustomEvents_1.buildObserveCustomEventJson)(log) });
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
log_1.default.addNewLineIfNone();
|
|
75
|
+
log_1.default.log((0, formatCustomEvents_1.buildObserveCustomEventDetail)(log));
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (parsesAsBase64(id)) {
|
|
80
|
+
const event = await fetchObserveEventAsync(id, () => ObserveQuery_1.ObserveQuery.metricByIdAsync(graphqlClient, { appId: projectId, id }));
|
|
81
|
+
if (!event) {
|
|
82
|
+
throw eventNotFoundError(id);
|
|
83
|
+
}
|
|
84
|
+
if (json) {
|
|
85
|
+
(0, json_1.printJsonOnlyOutput)({ type: 'metric', event: (0, formatEvents_1.buildObserveEventJson)(event) });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
log_1.default.addNewLineIfNone();
|
|
89
|
+
log_1.default.log((0, formatEvents_1.buildObserveEventDetail)(event));
|
|
90
|
+
}
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
throw new errors_1.EasCommandError(`"${id}" is not a valid Observe event ID. IDs come from \`eas observe:events\` or \`eas observe:session\`.`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.default = ObserveEvent;
|
|
97
|
+
/**
|
|
98
|
+
* A metric event ID is canonical base64url (of JSON). Round-tripping rejects
|
|
99
|
+
* strings that only coincidentally contain base64 characters, so a value that
|
|
100
|
+
* is neither a UUID nor this is treated as an invalid ID.
|
|
101
|
+
*/
|
|
102
|
+
function parsesAsBase64(id) {
|
|
103
|
+
if (id.length === 0) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
return Buffer.from(id, 'base64url').toString('base64url') === id;
|
|
107
|
+
}
|
|
108
|
+
function eventNotFoundError(id) {
|
|
109
|
+
return new errors_1.EasCommandError(`No Observe event found with ID "${id}". IDs come from \`eas observe:events\` or \`eas observe:session\`, and events age out of retention.`);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Runs an Observe event lookup, translating plan-gate rejections to their
|
|
113
|
+
* upgrade message and any other server error into an actionable message that
|
|
114
|
+
* preserves the underlying error and request ID for support.
|
|
115
|
+
*/
|
|
116
|
+
async function fetchObserveEventAsync(id, fn) {
|
|
117
|
+
try {
|
|
118
|
+
return await (0, planGating_1.withObservePlanGateHandlingAsync)(fn);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
if (error instanceof errors_1.EasCommandError) {
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
throw new errors_1.EasCommandError(`Could not retrieve Observe event with ID "${id}". ` +
|
|
125
|
+
'The ID may be invalid or the event may not exist (events also age out of retention). ' +
|
|
126
|
+
'Verify it was copied in full from `eas observe:events` or `eas observe:session`.' +
|
|
127
|
+
`\n\n${describeObserveServerError(error)}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Extract a human-readable description from a GraphQL/server error, including
|
|
132
|
+
* the request ID(s) so a support request can reference them. Falls back to the
|
|
133
|
+
* error's own message for non-GraphQL errors.
|
|
134
|
+
*/
|
|
135
|
+
function describeObserveServerError(error) {
|
|
136
|
+
if (error instanceof client_1.GraphqlError && error.graphQLErrors.length > 0) {
|
|
137
|
+
return error.graphQLErrors
|
|
138
|
+
.map(graphQLError => {
|
|
139
|
+
const message = graphQLError.message.replace('[GraphQL] ', '');
|
|
140
|
+
const requestId = graphQLError.extensions?.requestId;
|
|
141
|
+
return requestId ? `${message} (Request ID: ${String(requestId)})` : message;
|
|
142
|
+
})
|
|
143
|
+
.join('\n');
|
|
144
|
+
}
|
|
145
|
+
if (error instanceof Error) {
|
|
146
|
+
return error.message;
|
|
147
|
+
}
|
|
148
|
+
return String(error);
|
|
149
|
+
}
|
|
@@ -10,7 +10,9 @@ export default class ObserveEvents extends EasCommand {
|
|
|
10
10
|
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
'session-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
'all-events': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
14
|
'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
16
|
'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
17
|
start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
18
|
end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|