eas-cli 24.12.1 → 24.13.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 +144 -144
- package/bin/run +8 -0
- package/build/build/runBuildAndSubmit.js +0 -1
- package/build/commands/workflow/insights/index.js +1 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +5 -5
- package/build/env.d.ts +0 -4
- package/build/env.js +0 -4
- package/build/graphql/generated.d.ts +70 -1
- package/build/graphql/generated.js +4 -0
- package/build/graphql/queries/WorkflowsInsightsQuery.js +10 -0
- package/build/insights/metrics.d.ts +11 -0
- package/build/insights/metrics.js +14 -0
- package/build/project/projectUtils.d.ts +0 -1
- package/build/project/projectUtils.js +0 -13
- package/build/workflow/insights/formatInsights.d.ts +5 -1
- package/build/workflow/insights/formatInsights.js +36 -1
- package/build/workflow/insights/formatMaestroInsights.d.ts +1 -6
- package/build/workflow/insights/formatMaestroInsights.js +7 -14
- package/oclif.manifest.json +143 -143
- package/package.json +9 -9
package/bin/run
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
if (require('semver').lt(process.version, '22.0.0')) {
|
|
4
|
+
console.warn(
|
|
5
|
+
require('chalk').yellow(
|
|
6
|
+
`Node.js ${process.version} is deprecated. A future release of EAS CLI will require Node.js 22 or newer.`
|
|
7
|
+
)
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
(async () => {
|
|
4
12
|
const oclif = require('@oclif/core');
|
|
5
13
|
await oclif.execute({ dir: __dirname });
|
|
@@ -293,7 +293,6 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
await (0, projectUtils_1.validateAppVersionRuntimePolicySupportAsync)(buildCtx.projectDir, buildCtx.exp);
|
|
297
296
|
if (easJsonCliConfig?.appVersionSource === undefined &&
|
|
298
297
|
buildProfile.profile.autoIncrement !== 'version') {
|
|
299
298
|
if (buildProfile.profile.autoIncrement !== true) {
|
|
@@ -17,7 +17,7 @@ const planGating_1 = require("../../../workflow/insights/planGating");
|
|
|
17
17
|
const DEFAULT_WORKFLOWS_LIMIT = 50;
|
|
18
18
|
const MAX_WORKFLOWS_LIMIT = 100;
|
|
19
19
|
class WorkflowInsights extends EasCommand_1.default {
|
|
20
|
-
static description = 'display run counts, success rate, and per-workflow trends for a time range';
|
|
20
|
+
static description = 'display run counts, success rate, run durations, and per-workflow trends for a time range';
|
|
21
21
|
static flags = {
|
|
22
22
|
...filters_1.WorkflowsInsightsSharedFilterFlags,
|
|
23
23
|
status: core_1.Flags.option({
|
|
@@ -20,7 +20,6 @@ const nanoid_1 = require("nanoid");
|
|
|
20
20
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
21
21
|
const apple_utils_1 = require("@expo/apple-utils");
|
|
22
22
|
const AppleTeamFormatting_1 = require("./AppleTeamFormatting");
|
|
23
|
-
const env_1 = tslib_1.__importDefault(require("../../../env"));
|
|
24
23
|
const AppStoreConnectApiKeyQuery_1 = require("../../../graphql/queries/AppStoreConnectApiKeyQuery");
|
|
25
24
|
const log_1 = tslib_1.__importStar(require("../../../log"));
|
|
26
25
|
const prompts_1 = require("../../../prompts");
|
|
@@ -39,10 +38,7 @@ var AppStoreApiKeyPurpose;
|
|
|
39
38
|
async function promptForAscApiKeyPathAsync(ctx, purpose) {
|
|
40
39
|
// Individual keys are valid only as submission keys. Every other purpose
|
|
41
40
|
// requires a team key, so the key type question is not asked there.
|
|
42
|
-
|
|
43
|
-
// path runs a fastlane version that accepts keys without an issuer ID.
|
|
44
|
-
const isIndividualKey = !!env_1.default.enableIndividualAscApiKeys &&
|
|
45
|
-
purpose === AppStoreApiKeyPurpose.SUBMISSION_SERVICE &&
|
|
41
|
+
const isIndividualKey = purpose === AppStoreApiKeyPurpose.SUBMISSION_SERVICE &&
|
|
46
42
|
!ctx.nonInteractive &&
|
|
47
43
|
(await promptForAscApiKeyTypeIsIndividualAsync());
|
|
48
44
|
const { keyId, keyP8Path } = await promptForKeyP8AndIdAsync();
|
|
@@ -90,6 +86,10 @@ async function provideOrGenerateAscApiKeyAsync(ctx, purpose) {
|
|
|
90
86
|
if (!userProvided) {
|
|
91
87
|
return await generateAscApiKeyAsync(ctx, purpose);
|
|
92
88
|
}
|
|
89
|
+
// The validation below supports team keys only.
|
|
90
|
+
if (!userProvided.issuerId) {
|
|
91
|
+
return userProvided;
|
|
92
|
+
}
|
|
93
93
|
if (!ctx.appStore.authCtx) {
|
|
94
94
|
log_1.default.warn('Unable to validate App Store Connect API Key, you are not authenticated with Apple.');
|
|
95
95
|
return userProvided;
|
package/build/env.d.ts
CHANGED
|
@@ -20,9 +20,5 @@ declare const _default: {
|
|
|
20
20
|
* Comma separated list of feature gate keys of feature gates to evaluate override to false.
|
|
21
21
|
*/
|
|
22
22
|
featureGateDisable: string | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Enables the individual App Store Connect API key option in the interactive submission key prompt.
|
|
25
|
-
*/
|
|
26
|
-
enableIndividualAscApiKeys: string | undefined;
|
|
27
23
|
};
|
|
28
24
|
export default _default;
|
package/build/env.js
CHANGED
|
@@ -22,8 +22,4 @@ exports.default = {
|
|
|
22
22
|
* Comma separated list of feature gate keys of feature gates to evaluate override to false.
|
|
23
23
|
*/
|
|
24
24
|
featureGateDisable: process.env.EAS_FG_DISABLE,
|
|
25
|
-
/**
|
|
26
|
-
* Enables the individual App Store Connect API key option in the interactive submission key prompt.
|
|
27
|
-
*/
|
|
28
|
-
enableIndividualAscApiKeys: process.env.EAS_ENABLE_INDIVIDUAL_ASC_API_KEYS,
|
|
29
25
|
};
|
|
@@ -6436,6 +6436,7 @@ export declare enum EasService {
|
|
|
6436
6436
|
Jobs = "JOBS",
|
|
6437
6437
|
Mcp = "MCP",
|
|
6438
6438
|
Observe = "OBSERVE",
|
|
6439
|
+
Simulator = "SIMULATOR",
|
|
6439
6440
|
Updates = "UPDATES"
|
|
6440
6441
|
}
|
|
6441
6442
|
export declare enum EasServiceMetric {
|
|
@@ -6447,6 +6448,7 @@ export declare enum EasServiceMetric {
|
|
|
6447
6448
|
McpRequests = "MCP_REQUESTS",
|
|
6448
6449
|
ObserveEvents = "OBSERVE_EVENTS",
|
|
6449
6450
|
RunTime = "RUN_TIME",
|
|
6451
|
+
SimulatorUsage = "SIMULATOR_USAGE",
|
|
6450
6452
|
UniqueUpdaters = "UNIQUE_UPDATERS",
|
|
6451
6453
|
UniqueUsers = "UNIQUE_USERS"
|
|
6452
6454
|
}
|
|
@@ -6460,6 +6462,7 @@ export declare enum EasTotalPlanEnablementUnit {
|
|
|
6460
6462
|
Byte = "BYTE",
|
|
6461
6463
|
Concurrency = "CONCURRENCY",
|
|
6462
6464
|
Event = "EVENT",
|
|
6465
|
+
Minute = "MINUTE",
|
|
6463
6466
|
Request = "REQUEST",
|
|
6464
6467
|
Updater = "UPDATER",
|
|
6465
6468
|
User = "USER"
|
|
@@ -7305,6 +7308,7 @@ export type EstimatedOverageAndCost = {
|
|
|
7305
7308
|
export type EstimatedUsage = {
|
|
7306
7309
|
__typename?: 'EstimatedUsage';
|
|
7307
7310
|
id: Scalars['ID']['output'];
|
|
7311
|
+
jobTypeBreakdown?: Maybe<EstimatedUsageJobTypeBreakdown>;
|
|
7308
7312
|
limit: Scalars['Float']['output'];
|
|
7309
7313
|
metricType: UsageMetricType;
|
|
7310
7314
|
platformBreakdown?: Maybe<EstimatedUsagePlatformBreakdown>;
|
|
@@ -7312,6 +7316,12 @@ export type EstimatedUsage = {
|
|
|
7312
7316
|
serviceMetric: EasServiceMetric;
|
|
7313
7317
|
value: Scalars['Float']['output'];
|
|
7314
7318
|
};
|
|
7319
|
+
export type EstimatedUsageJobTypeBreakdown = {
|
|
7320
|
+
__typename?: 'EstimatedUsageJobTypeBreakdown';
|
|
7321
|
+
other: Scalars['Float']['output'];
|
|
7322
|
+
simulator: Scalars['Float']['output'];
|
|
7323
|
+
workflows: Scalars['Float']['output'];
|
|
7324
|
+
};
|
|
7315
7325
|
export type EstimatedUsagePlatformBreakdown = {
|
|
7316
7326
|
__typename?: 'EstimatedUsagePlatformBreakdown';
|
|
7317
7327
|
android: EstimatedUsagePlatformDetail;
|
|
@@ -9420,6 +9430,7 @@ export type RootQuery = {
|
|
|
9420
9430
|
updates: UpdateQuery;
|
|
9421
9431
|
/** fetch all updates in a group */
|
|
9422
9432
|
updatesByGroup: Array<Update>;
|
|
9433
|
+
usageBudget: UsageBudgetQuery;
|
|
9423
9434
|
/** Top-level query object for querying UserActorPublicData publicly. */
|
|
9424
9435
|
userActorPublicData: UserActorPublicDataQuery;
|
|
9425
9436
|
/** Top-level query object for querying User Audit Logs. */
|
|
@@ -10087,6 +10098,7 @@ export type SubmissionMutation = {
|
|
|
10087
10098
|
createAndroidSubmission: CreateSubmissionResult;
|
|
10088
10099
|
/** Create an iOS EAS Submit submission */
|
|
10089
10100
|
createIosSubmission: CreateSubmissionResult;
|
|
10101
|
+
generateSubmissionArchiveDownloadUrl: Scalars['String']['output'];
|
|
10090
10102
|
/** Retry an EAS Submit submission */
|
|
10091
10103
|
retrySubmission: CreateSubmissionResult;
|
|
10092
10104
|
};
|
|
@@ -10099,6 +10111,9 @@ export type SubmissionMutation_CreateAndroidSubmissionArgs = {
|
|
|
10099
10111
|
export type SubmissionMutation_CreateIosSubmissionArgs = {
|
|
10100
10112
|
input: CreateIosSubmissionInput;
|
|
10101
10113
|
};
|
|
10114
|
+
export type SubmissionMutation_GenerateSubmissionArchiveDownloadUrlArgs = {
|
|
10115
|
+
submissionId: Scalars['ID']['input'];
|
|
10116
|
+
};
|
|
10102
10117
|
export type SubmissionMutation_RetrySubmissionArgs = {
|
|
10103
10118
|
parentSubmissionId: Scalars['ID']['input'];
|
|
10104
10119
|
};
|
|
@@ -10985,6 +11000,7 @@ export type UsageBudget = {
|
|
|
10985
11000
|
__typename?: 'UsageBudget';
|
|
10986
11001
|
id: Scalars['ID']['output'];
|
|
10987
11002
|
limits: UsageBudgetLimits;
|
|
11003
|
+
remaining: UsageBudgetRemaining;
|
|
10988
11004
|
};
|
|
10989
11005
|
export type UsageBudgetLimits = {
|
|
10990
11006
|
__typename?: 'UsageBudgetLimits';
|
|
@@ -11002,6 +11018,20 @@ export type UsageBudgetMutation = {
|
|
|
11002
11018
|
export type UsageBudgetMutation_CreateUsageBudgetArgs = {
|
|
11003
11019
|
limits: UsageBudgetLimitsInput;
|
|
11004
11020
|
};
|
|
11021
|
+
export type UsageBudgetQuery = {
|
|
11022
|
+
__typename?: 'UsageBudgetQuery';
|
|
11023
|
+
byId: UsageBudget;
|
|
11024
|
+
};
|
|
11025
|
+
export type UsageBudgetQuery_ByIdArgs = {
|
|
11026
|
+
id: Scalars['ID']['input'];
|
|
11027
|
+
};
|
|
11028
|
+
export type UsageBudgetRemaining = {
|
|
11029
|
+
__typename?: 'UsageBudgetRemaining';
|
|
11030
|
+
/** Available builds, or null when there is no build limit. */
|
|
11031
|
+
builds?: Maybe<Scalars['Int']['output']>;
|
|
11032
|
+
/** Available minutes after completed usage and active reservations, or null when unlimited. */
|
|
11033
|
+
simulatorMinutes?: Maybe<Scalars['Float']['output']>;
|
|
11034
|
+
};
|
|
11005
11035
|
export type UsageMetricTotal = {
|
|
11006
11036
|
__typename?: 'UsageMetricTotal';
|
|
11007
11037
|
billingPeriod: BillingPeriod;
|
|
@@ -12610,6 +12640,7 @@ export declare enum WorkflowJobStatus {
|
|
|
12610
12640
|
Success = "SUCCESS"
|
|
12611
12641
|
}
|
|
12612
12642
|
export declare enum WorkflowJobType {
|
|
12643
|
+
Agent = "AGENT",
|
|
12613
12644
|
AppleDeviceRegistrationRequest = "APPLE_DEVICE_REGISTRATION_REQUEST",
|
|
12614
12645
|
BranchDelete = "BRANCH_DELETE",
|
|
12615
12646
|
Build = "BUILD",
|
|
@@ -12742,7 +12773,7 @@ export type WorkflowRun = ActivityTimelineProjectActivity & {
|
|
|
12742
12773
|
workflow: Workflow;
|
|
12743
12774
|
workflowRevision?: Maybe<WorkflowRevision>;
|
|
12744
12775
|
};
|
|
12745
|
-
export type WorkflowRunCancelReason = WorkflowRunCancelReasonConcurrencyGroup;
|
|
12776
|
+
export type WorkflowRunCancelReason = WorkflowRunCancelReasonConcurrencyGroup | WorkflowRunCancelReasonWorkflowCall;
|
|
12746
12777
|
export type WorkflowRunCancelReasonConcurrencyGroup = {
|
|
12747
12778
|
__typename?: 'WorkflowRunCancelReasonConcurrencyGroup';
|
|
12748
12779
|
/**
|
|
@@ -12751,6 +12782,14 @@ export type WorkflowRunCancelReasonConcurrencyGroup = {
|
|
|
12751
12782
|
*/
|
|
12752
12783
|
cancelingWorkflowRun?: Maybe<WorkflowRun>;
|
|
12753
12784
|
};
|
|
12785
|
+
export type WorkflowRunCancelReasonWorkflowCall = {
|
|
12786
|
+
__typename?: 'WorkflowRunCancelReasonWorkflowCall';
|
|
12787
|
+
/**
|
|
12788
|
+
* The run that called this run through workflow_call and whose cancellation
|
|
12789
|
+
* canceled this run. Null if that run no longer exists.
|
|
12790
|
+
*/
|
|
12791
|
+
parentWorkflowRun?: Maybe<WorkflowRun>;
|
|
12792
|
+
};
|
|
12754
12793
|
export type WorkflowRunEdge = {
|
|
12755
12794
|
__typename?: 'WorkflowRunEdge';
|
|
12756
12795
|
cursor: Scalars['String']['output'];
|
|
@@ -12898,11 +12937,27 @@ export type WorkflowsInsightsMutation = {
|
|
|
12898
12937
|
export type WorkflowsInsightsMutation_ExportWorkflowRunsArgs = {
|
|
12899
12938
|
input: WorkflowsInsightsExportInput;
|
|
12900
12939
|
};
|
|
12940
|
+
/**
|
|
12941
|
+
* Same shape as WorkflowsInsightsMetric but nullable on both sides. Null means the window had
|
|
12942
|
+
* no qualifying run, which is different from 0.
|
|
12943
|
+
*/
|
|
12944
|
+
export type WorkflowsInsightsNullableMetric = {
|
|
12945
|
+
__typename?: 'WorkflowsInsightsNullableMetric';
|
|
12946
|
+
currentValue?: Maybe<Scalars['Float']['output']>;
|
|
12947
|
+
previousValue?: Maybe<Scalars['Float']['output']>;
|
|
12948
|
+
};
|
|
12901
12949
|
export type WorkflowsInsightsOverviewMetrics = {
|
|
12902
12950
|
__typename?: 'WorkflowsInsightsOverviewMetrics';
|
|
12903
12951
|
activeWorkflows: WorkflowsInsightsMetric;
|
|
12952
|
+
/**
|
|
12953
|
+
* Mean milliseconds from run creation to finalization, the same duration the run page shows,
|
|
12954
|
+
* so queue and approval wait count. Canceled runs are excluded.
|
|
12955
|
+
*/
|
|
12956
|
+
avgDurationMs: WorkflowsInsightsNullableMetric;
|
|
12904
12957
|
canceledRuns: WorkflowsInsightsMetric;
|
|
12905
12958
|
failedRuns: WorkflowsInsightsMetric;
|
|
12959
|
+
/** Approximate 75th percentile of the same duration, excluding canceled runs. */
|
|
12960
|
+
p75DurationMs: WorkflowsInsightsNullableMetric;
|
|
12906
12961
|
successfulRuns: WorkflowsInsightsMetric;
|
|
12907
12962
|
totalRuns: WorkflowsInsightsMetric;
|
|
12908
12963
|
};
|
|
@@ -12939,10 +12994,12 @@ export type WorkflowsInsightsWorkflowMetrics = {
|
|
|
12939
12994
|
};
|
|
12940
12995
|
export type WorkflowsInsightsWorkflowNode = {
|
|
12941
12996
|
__typename?: 'WorkflowsInsightsWorkflowNode';
|
|
12997
|
+
avgDurationMs?: Maybe<Scalars['Float']['output']>;
|
|
12942
12998
|
canceledRuns: Scalars['Int']['output'];
|
|
12943
12999
|
failedRuns: Scalars['Int']['output'];
|
|
12944
13000
|
lastRunAt: Scalars['DateTime']['output'];
|
|
12945
13001
|
name: Scalars['String']['output'];
|
|
13002
|
+
p75DurationMs?: Maybe<Scalars['Float']['output']>;
|
|
12946
13003
|
successfulRuns: Scalars['Int']['output'];
|
|
12947
13004
|
totalRuns: Scalars['Int']['output'];
|
|
12948
13005
|
workflowId: Scalars['ID']['output'];
|
|
@@ -23299,6 +23356,16 @@ export type WorkflowsInsightsByAppIdQuery = {
|
|
|
23299
23356
|
currentValue: number;
|
|
23300
23357
|
previousValue: number;
|
|
23301
23358
|
};
|
|
23359
|
+
avgDurationMs: {
|
|
23360
|
+
__typename?: 'WorkflowsInsightsNullableMetric';
|
|
23361
|
+
currentValue?: number | null;
|
|
23362
|
+
previousValue?: number | null;
|
|
23363
|
+
};
|
|
23364
|
+
p75DurationMs: {
|
|
23365
|
+
__typename?: 'WorkflowsInsightsNullableMetric';
|
|
23366
|
+
currentValue?: number | null;
|
|
23367
|
+
previousValue?: number | null;
|
|
23368
|
+
};
|
|
23302
23369
|
};
|
|
23303
23370
|
runsOverTime: {
|
|
23304
23371
|
__typename?: 'WorkflowsInsightsRunsOverTimeData';
|
|
@@ -23324,6 +23391,8 @@ export type WorkflowsInsightsByAppIdQuery = {
|
|
|
23324
23391
|
successfulRuns: number;
|
|
23325
23392
|
failedRuns: number;
|
|
23326
23393
|
canceledRuns: number;
|
|
23394
|
+
avgDurationMs?: number | null;
|
|
23395
|
+
p75DurationMs?: number | null;
|
|
23327
23396
|
lastRunAt: any;
|
|
23328
23397
|
};
|
|
23329
23398
|
}>;
|
|
@@ -597,6 +597,7 @@ var EasService;
|
|
|
597
597
|
EasService["Jobs"] = "JOBS";
|
|
598
598
|
EasService["Mcp"] = "MCP";
|
|
599
599
|
EasService["Observe"] = "OBSERVE";
|
|
600
|
+
EasService["Simulator"] = "SIMULATOR";
|
|
600
601
|
EasService["Updates"] = "UPDATES";
|
|
601
602
|
})(EasService || (exports.EasService = EasService = {}));
|
|
602
603
|
var EasServiceMetric;
|
|
@@ -609,6 +610,7 @@ var EasServiceMetric;
|
|
|
609
610
|
EasServiceMetric["McpRequests"] = "MCP_REQUESTS";
|
|
610
611
|
EasServiceMetric["ObserveEvents"] = "OBSERVE_EVENTS";
|
|
611
612
|
EasServiceMetric["RunTime"] = "RUN_TIME";
|
|
613
|
+
EasServiceMetric["SimulatorUsage"] = "SIMULATOR_USAGE";
|
|
612
614
|
EasServiceMetric["UniqueUpdaters"] = "UNIQUE_UPDATERS";
|
|
613
615
|
EasServiceMetric["UniqueUsers"] = "UNIQUE_USERS";
|
|
614
616
|
})(EasServiceMetric || (exports.EasServiceMetric = EasServiceMetric = {}));
|
|
@@ -618,6 +620,7 @@ var EasTotalPlanEnablementUnit;
|
|
|
618
620
|
EasTotalPlanEnablementUnit["Byte"] = "BYTE";
|
|
619
621
|
EasTotalPlanEnablementUnit["Concurrency"] = "CONCURRENCY";
|
|
620
622
|
EasTotalPlanEnablementUnit["Event"] = "EVENT";
|
|
623
|
+
EasTotalPlanEnablementUnit["Minute"] = "MINUTE";
|
|
621
624
|
EasTotalPlanEnablementUnit["Request"] = "REQUEST";
|
|
622
625
|
EasTotalPlanEnablementUnit["Updater"] = "UPDATER";
|
|
623
626
|
EasTotalPlanEnablementUnit["User"] = "USER";
|
|
@@ -1370,6 +1373,7 @@ var WorkflowJobStatus;
|
|
|
1370
1373
|
})(WorkflowJobStatus || (exports.WorkflowJobStatus = WorkflowJobStatus = {}));
|
|
1371
1374
|
var WorkflowJobType;
|
|
1372
1375
|
(function (WorkflowJobType) {
|
|
1376
|
+
WorkflowJobType["Agent"] = "AGENT";
|
|
1373
1377
|
WorkflowJobType["AppleDeviceRegistrationRequest"] = "APPLE_DEVICE_REGISTRATION_REQUEST";
|
|
1374
1378
|
WorkflowJobType["BranchDelete"] = "BRANCH_DELETE";
|
|
1375
1379
|
WorkflowJobType["Build"] = "BUILD";
|
|
@@ -41,6 +41,14 @@ exports.WorkflowsInsightsQuery = {
|
|
|
41
41
|
currentValue
|
|
42
42
|
previousValue
|
|
43
43
|
}
|
|
44
|
+
avgDurationMs {
|
|
45
|
+
currentValue
|
|
46
|
+
previousValue
|
|
47
|
+
}
|
|
48
|
+
p75DurationMs {
|
|
49
|
+
currentValue
|
|
50
|
+
previousValue
|
|
51
|
+
}
|
|
44
52
|
}
|
|
45
53
|
runsOverTime(timespan: $timespan, filters: $filters, granularity: $granularity) {
|
|
46
54
|
lineChart {
|
|
@@ -60,6 +68,8 @@ exports.WorkflowsInsightsQuery = {
|
|
|
60
68
|
successfulRuns
|
|
61
69
|
failedRuns
|
|
62
70
|
canceledRuns
|
|
71
|
+
avgDurationMs
|
|
72
|
+
p75DurationMs
|
|
63
73
|
lastRunAt
|
|
64
74
|
}
|
|
65
75
|
}
|
|
@@ -7,6 +7,14 @@ export declare function toMetricSummary(metric: {
|
|
|
7
7
|
currentValue: number;
|
|
8
8
|
previousValue: number;
|
|
9
9
|
}): InsightsMetricSummary;
|
|
10
|
+
export interface NullableMetricSummary {
|
|
11
|
+
current: number | null;
|
|
12
|
+
previous: number | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function toNullableMetricSummary(metric: {
|
|
15
|
+
currentValue?: number | null;
|
|
16
|
+
previousValue?: number | null;
|
|
17
|
+
}): NullableMetricSummary;
|
|
10
18
|
export declare function ratePercent(part: number, total: number): number;
|
|
11
19
|
export declare function formatPercent(value: number): string;
|
|
12
20
|
export declare function formatCountWithTrend(metric: InsightsMetricSummary, options?: {
|
|
@@ -20,3 +28,6 @@ export declare function formatRateWithDelta(rate: InsightsMetricSummary, totalRu
|
|
|
20
28
|
export declare function formatTrend(metric: InsightsMetricSummary, { lowerIsBetter }?: {
|
|
21
29
|
lowerIsBetter?: boolean;
|
|
22
30
|
}): string;
|
|
31
|
+
export declare function formatNullableMetricWithTrend(metric: NullableMetricSummary, formatValue: (value: number) => string, options?: {
|
|
32
|
+
lowerIsBetter?: boolean;
|
|
33
|
+
}): string;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toMetricSummary = toMetricSummary;
|
|
4
|
+
exports.toNullableMetricSummary = toNullableMetricSummary;
|
|
4
5
|
exports.ratePercent = ratePercent;
|
|
5
6
|
exports.formatPercent = formatPercent;
|
|
6
7
|
exports.formatCountWithTrend = formatCountWithTrend;
|
|
7
8
|
exports.formatRateWithDelta = formatRateWithDelta;
|
|
8
9
|
exports.formatTrend = formatTrend;
|
|
10
|
+
exports.formatNullableMetricWithTrend = formatNullableMetricWithTrend;
|
|
9
11
|
const tslib_1 = require("tslib");
|
|
10
12
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
11
13
|
function toMetricSummary(metric) {
|
|
12
14
|
return { current: metric.currentValue, previous: metric.previousValue };
|
|
13
15
|
}
|
|
16
|
+
function toNullableMetricSummary(metric) {
|
|
17
|
+
return { current: metric.currentValue ?? null, previous: metric.previousValue ?? null };
|
|
18
|
+
}
|
|
14
19
|
function ratePercent(part, total) {
|
|
15
20
|
return total === 0 ? 0 : (part / total) * 100;
|
|
16
21
|
}
|
|
@@ -39,6 +44,15 @@ function formatTrend(metric, { lowerIsBetter = false } = {}) {
|
|
|
39
44
|
const pct = ((metric.current - metric.previous) / metric.previous) * 100;
|
|
40
45
|
return formatSignedChange(pct, '%', lowerIsBetter ? pct < 0 : pct > 0);
|
|
41
46
|
}
|
|
47
|
+
function formatNullableMetricWithTrend(metric, formatValue, options) {
|
|
48
|
+
if (metric.current === null) {
|
|
49
|
+
return chalk_1.default.dim('n/a');
|
|
50
|
+
}
|
|
51
|
+
const trend = metric.previous === null
|
|
52
|
+
? chalk_1.default.dim('n/a')
|
|
53
|
+
: formatTrend({ current: metric.current, previous: metric.previous }, options);
|
|
54
|
+
return `${formatValue(metric.current)} (${trend})`;
|
|
55
|
+
}
|
|
42
56
|
function formatSignedChange(value, unit, isImprovement) {
|
|
43
57
|
if (value === 0) {
|
|
44
58
|
return chalk_1.default.dim(`0.0${unit}`);
|
|
@@ -16,7 +16,6 @@ export declare function isExpoUpdatesInstalledAsDevDependency(projectDir: string
|
|
|
16
16
|
export declare function isExpoUpdatesInstalledOrAvailable(projectDir: string, sdkVersion?: string): boolean;
|
|
17
17
|
export declare function isUsingEASUpdate(exp: ExpoConfig, projectId: string, manifestHostOverride: string | null): boolean;
|
|
18
18
|
export declare function getExpoUpdatesPackageVersionIfInstalledAsync(projectDir: string): Promise<string | null>;
|
|
19
|
-
export declare function validateAppVersionRuntimePolicySupportAsync(projectDir: string, exp: ExpoConfig): Promise<void>;
|
|
20
19
|
export declare function enforceRollBackToEmbeddedUpdateSupportAsync(projectDir: string): Promise<void>;
|
|
21
20
|
export declare function isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync(projectDir: string): Promise<boolean>;
|
|
22
21
|
export declare function installExpoUpdatesAsync(projectDir: string, options?: {
|
|
@@ -8,7 +8,6 @@ exports.isExpoUpdatesInstalledAsDevDependency = isExpoUpdatesInstalledAsDevDepen
|
|
|
8
8
|
exports.isExpoUpdatesInstalledOrAvailable = isExpoUpdatesInstalledOrAvailable;
|
|
9
9
|
exports.isUsingEASUpdate = isUsingEASUpdate;
|
|
10
10
|
exports.getExpoUpdatesPackageVersionIfInstalledAsync = getExpoUpdatesPackageVersionIfInstalledAsync;
|
|
11
|
-
exports.validateAppVersionRuntimePolicySupportAsync = validateAppVersionRuntimePolicySupportAsync;
|
|
12
11
|
exports.enforceRollBackToEmbeddedUpdateSupportAsync = enforceRollBackToEmbeddedUpdateSupportAsync;
|
|
13
12
|
exports.isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync = isModernExpoUpdatesCLIWithRuntimeVersionCommandSupportedAsync;
|
|
14
13
|
exports.installExpoUpdatesAsync = installExpoUpdatesAsync;
|
|
@@ -98,18 +97,6 @@ async function getExpoUpdatesPackageVersionIfInstalledAsync(projectDir) {
|
|
|
98
97
|
const { version } = await fs_extra_1.default.readJson(maybePackageJson);
|
|
99
98
|
return version ?? null;
|
|
100
99
|
}
|
|
101
|
-
async function validateAppVersionRuntimePolicySupportAsync(projectDir, exp) {
|
|
102
|
-
if (typeof exp.runtimeVersion !== 'object' || exp.runtimeVersion?.policy !== 'appVersion') {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const expoUpdatesPackageVersion = await getExpoUpdatesPackageVersionIfInstalledAsync(projectDir);
|
|
106
|
-
if (expoUpdatesPackageVersion !== null &&
|
|
107
|
-
(semver_1.default.gte(expoUpdatesPackageVersion, '0.14.4') ||
|
|
108
|
-
expoUpdatesPackageVersion.includes('canary'))) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
log_1.default.warn(`You need to be on SDK 46 or higher, and use expo-updates >= 0.14.4 to use appVersion runtime policy.`);
|
|
112
|
-
}
|
|
113
100
|
async function enforceRollBackToEmbeddedUpdateSupportAsync(projectDir) {
|
|
114
101
|
const expoUpdatesPackageVersion = await getExpoUpdatesPackageVersionIfInstalledAsync(projectDir);
|
|
115
102
|
if (expoUpdatesPackageVersion !== null &&
|
|
@@ -2,7 +2,7 @@ import { WorkflowsInsightsRunsOverTimeGranularity } from '../../graphql/generate
|
|
|
2
2
|
import { AppWithWorkflowsInsightsObject } from '../../graphql/queries/WorkflowsInsightsQuery';
|
|
3
3
|
import { InsightsTimespanFields } from '../../insights/formatTimespan';
|
|
4
4
|
import { AppliedWorkflowsInsightsFilters } from './filters';
|
|
5
|
-
import { InsightsMetricSummary } from '../../insights/metrics';
|
|
5
|
+
import { InsightsMetricSummary, NullableMetricSummary } from '../../insights/metrics';
|
|
6
6
|
export interface WorkflowsInsightsBucket {
|
|
7
7
|
start: string;
|
|
8
8
|
totalRuns: number;
|
|
@@ -19,6 +19,8 @@ export interface WorkflowsInsightsWorkflowSummary {
|
|
|
19
19
|
failedRuns: number;
|
|
20
20
|
canceledRuns: number;
|
|
21
21
|
successRatePercent: number;
|
|
22
|
+
avgDurationMs: number | null;
|
|
23
|
+
p75DurationMs: number | null;
|
|
22
24
|
lastRunAt: string;
|
|
23
25
|
}
|
|
24
26
|
export interface WorkflowsInsightsSummary extends InsightsTimespanFields {
|
|
@@ -30,6 +32,8 @@ export interface WorkflowsInsightsSummary extends InsightsTimespanFields {
|
|
|
30
32
|
successRatePercent: InsightsMetricSummary;
|
|
31
33
|
activeWorkflows: InsightsMetricSummary;
|
|
32
34
|
failedRuns: InsightsMetricSummary;
|
|
35
|
+
avgDurationMs: NullableMetricSummary;
|
|
36
|
+
p75DurationMs: NullableMetricSummary;
|
|
33
37
|
};
|
|
34
38
|
runsOverTime: WorkflowsInsightsBucket[];
|
|
35
39
|
workflows: WorkflowsInsightsWorkflowSummary[];
|
|
@@ -11,6 +11,7 @@ const formatTimespan_1 = require("../../insights/formatTimespan");
|
|
|
11
11
|
const formatFilters_1 = require("../../insights/formatFilters");
|
|
12
12
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
13
13
|
const renderTextTable_1 = tslib_1.__importDefault(require("../../utils/renderTextTable"));
|
|
14
|
+
const timer_1 = require("../../utils/timer");
|
|
14
15
|
const metrics_1 = require("../../insights/metrics");
|
|
15
16
|
// Dataset ids assigned by the server's `runsOverTime` resolver.
|
|
16
17
|
const RUNS_OVER_TIME_DATASET_IDS = {
|
|
@@ -37,6 +38,8 @@ function toWorkflowsInsightsSummary(app, { timespan, granularity, filters, }) {
|
|
|
37
38
|
},
|
|
38
39
|
activeWorkflows: (0, metrics_1.toMetricSummary)(overviewMetrics.activeWorkflows),
|
|
39
40
|
failedRuns: (0, metrics_1.toMetricSummary)(overviewMetrics.failedRuns),
|
|
41
|
+
avgDurationMs: (0, metrics_1.toNullableMetricSummary)(overviewMetrics.avgDurationMs),
|
|
42
|
+
p75DurationMs: (0, metrics_1.toNullableMetricSummary)(overviewMetrics.p75DurationMs),
|
|
40
43
|
},
|
|
41
44
|
runsOverTime: toBuckets(runsOverTime.lineChart),
|
|
42
45
|
workflows: workflows.edges.map(({ node }) => ({
|
|
@@ -48,6 +51,8 @@ function toWorkflowsInsightsSummary(app, { timespan, granularity, filters, }) {
|
|
|
48
51
|
failedRuns: node.failedRuns,
|
|
49
52
|
canceledRuns: node.canceledRuns,
|
|
50
53
|
successRatePercent: (0, metrics_1.ratePercent)(node.successfulRuns, node.totalRuns),
|
|
54
|
+
avgDurationMs: node.avgDurationMs ?? null,
|
|
55
|
+
p75DurationMs: node.p75DurationMs ?? null,
|
|
51
56
|
lastRunAt: node.lastRunAt,
|
|
52
57
|
})),
|
|
53
58
|
hasMoreWorkflows: workflows.pageInfo.hasNextPage,
|
|
@@ -109,6 +114,18 @@ function buildWorkflowsInsightsTable(summary) {
|
|
|
109
114
|
label: 'Failed runs',
|
|
110
115
|
value: (0, metrics_1.formatCountWithTrend)(overview.failedRuns, { lowerIsBetter: true }),
|
|
111
116
|
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Avg duration',
|
|
119
|
+
value: (0, metrics_1.formatNullableMetricWithTrend)(overview.avgDurationMs, formatRunDuration, {
|
|
120
|
+
lowerIsBetter: true,
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: 'P75 duration',
|
|
125
|
+
value: (0, metrics_1.formatNullableMetricWithTrend)(overview.p75DurationMs, formatRunDuration, {
|
|
126
|
+
lowerIsBetter: true,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
112
129
|
]));
|
|
113
130
|
sections.push(...(0, formatRunsOverTime_1.buildRunsOverTimeSection)(summary.runsOverTime, summary.granularity, {
|
|
114
131
|
runs: bucket => bucket.totalRuns,
|
|
@@ -143,13 +160,31 @@ function formatFilters(filters) {
|
|
|
143
160
|
]);
|
|
144
161
|
}
|
|
145
162
|
function renderWorkflowsTable(workflows) {
|
|
146
|
-
return (0, renderTextTable_1.default)([
|
|
163
|
+
return (0, renderTextTable_1.default)([
|
|
164
|
+
'Workflow',
|
|
165
|
+
'Runs',
|
|
166
|
+
'Successful',
|
|
167
|
+
'Failed',
|
|
168
|
+
'Canceled',
|
|
169
|
+
'Success rate',
|
|
170
|
+
'Avg duration',
|
|
171
|
+
'P75 duration',
|
|
172
|
+
'Last run',
|
|
173
|
+
], workflows.map(workflow => [
|
|
147
174
|
workflow.fileName,
|
|
148
175
|
workflow.totalRuns.toLocaleString(),
|
|
149
176
|
workflow.successfulRuns.toLocaleString(),
|
|
150
177
|
workflow.failedRuns.toLocaleString(),
|
|
151
178
|
workflow.canceledRuns.toLocaleString(),
|
|
152
179
|
(0, metrics_1.formatPercent)(workflow.successRatePercent),
|
|
180
|
+
formatRunDuration(workflow.avgDurationMs),
|
|
181
|
+
formatRunDuration(workflow.p75DurationMs),
|
|
153
182
|
(0, formatTimespan_1.toDateTime)(workflow.lastRunAt),
|
|
154
183
|
]));
|
|
155
184
|
}
|
|
185
|
+
function formatRunDuration(ms) {
|
|
186
|
+
if (ms === null) {
|
|
187
|
+
return 'n/a';
|
|
188
|
+
}
|
|
189
|
+
return ms < 1000 ? `${Math.round(ms)}ms` : (0, timer_1.formatMilliseconds)(ms);
|
|
190
|
+
}
|
|
@@ -3,12 +3,7 @@ import { AppWithMaestroFlowHistoryObject, AppWithMaestroInsightsObject } from '.
|
|
|
3
3
|
import { InsightsTimespanFields } from '../../insights/formatTimespan';
|
|
4
4
|
import { AppliedMaestroInsightsFilters } from './maestroFilters';
|
|
5
5
|
import { MaestroSortDirection, MaestroSortOption } from './maestroSort';
|
|
6
|
-
import { InsightsMetricSummary } from '../../insights/metrics';
|
|
7
|
-
/** Durations are unknown until at least one run in the window reported one. */
|
|
8
|
-
export interface NullableMetricSummary {
|
|
9
|
-
current: number | null;
|
|
10
|
-
previous: number | null;
|
|
11
|
-
}
|
|
6
|
+
import { InsightsMetricSummary, NullableMetricSummary } from '../../insights/metrics';
|
|
12
7
|
/** The Maestro tab's overview tiles. */
|
|
13
8
|
export interface MaestroInsightsTotals {
|
|
14
9
|
totalRuns: InsightsMetricSummary;
|
|
@@ -83,10 +83,7 @@ function toOverviewTotals(totals) {
|
|
|
83
83
|
previous: (0, metrics_1.ratePercent)(passedClean.previous + flaky.previous, totalRuns.previous),
|
|
84
84
|
},
|
|
85
85
|
distinctFlakyFlows: (0, metrics_1.toMetricSummary)(totals.distinctFlakyTestCount),
|
|
86
|
-
avgDurationMs:
|
|
87
|
-
current: totals.avgDurationMs.currentValue ?? null,
|
|
88
|
-
previous: totals.avgDurationMs.previousValue ?? null,
|
|
89
|
-
},
|
|
86
|
+
avgDurationMs: (0, metrics_1.toNullableMetricSummary)(totals.avgDurationMs),
|
|
90
87
|
};
|
|
91
88
|
}
|
|
92
89
|
function toFlowTotals(totals) {
|
|
@@ -203,7 +200,12 @@ function buildOverviewTotalsFields(totals) {
|
|
|
203
200
|
label: 'Flaky flows',
|
|
204
201
|
value: (0, metrics_1.formatCountWithTrend)(totals.distinctFlakyFlows, { lowerIsBetter: true }),
|
|
205
202
|
},
|
|
206
|
-
{
|
|
203
|
+
{
|
|
204
|
+
label: 'Avg duration',
|
|
205
|
+
value: (0, metrics_1.formatNullableMetricWithTrend)(totals.avgDurationMs, formatDurationMs, {
|
|
206
|
+
lowerIsBetter: true,
|
|
207
|
+
}),
|
|
208
|
+
},
|
|
207
209
|
];
|
|
208
210
|
}
|
|
209
211
|
function buildFlowTotalsFields(totals) {
|
|
@@ -287,12 +289,3 @@ function formatDurationMs(ms) {
|
|
|
287
289
|
}
|
|
288
290
|
return `${(ms / 1000).toFixed(1)}s`;
|
|
289
291
|
}
|
|
290
|
-
function formatDurationWithTrend(metric) {
|
|
291
|
-
if (metric.current === null) {
|
|
292
|
-
return chalk_1.default.dim('n/a');
|
|
293
|
-
}
|
|
294
|
-
const trend = metric.previous === null
|
|
295
|
-
? chalk_1.default.dim('n/a')
|
|
296
|
-
: (0, metrics_1.formatTrend)({ current: metric.current, previous: metric.previous }, { lowerIsBetter: true });
|
|
297
|
-
return `${formatDurationMs(metric.current)} (${trend})`;
|
|
298
|
-
}
|