eas-cli 21.0.1 → 21.0.3
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 -170
- package/build/chat/chatClient.d.ts +37 -0
- package/build/chat/chatClient.js +359 -0
- package/build/chat/detectProject.d.ts +5 -0
- package/build/chat/detectProject.js +41 -0
- package/build/chat/renderMarkdown.d.ts +7 -0
- package/build/chat/renderMarkdown.js +47 -0
- package/build/chat/replInput.d.ts +10 -0
- package/build/chat/replInput.js +52 -0
- package/build/commands/build/inspect.d.ts +1 -0
- package/build/commands/build/inspect.js +10 -0
- package/build/commands/chat.d.ts +18 -0
- package/build/commands/chat.js +221 -0
- package/build/commands/env/create.d.ts +1 -0
- package/build/commands/env/create.js +4 -1
- package/build/commands/env/set.d.ts +27 -0
- package/build/commands/env/set.js +222 -0
- package/build/commands/env/update.d.ts +1 -0
- package/build/commands/env/update.js +4 -1
- package/build/commands/observe/events.js +6 -5
- package/build/commands/observe/metrics-summary.js +4 -3
- package/build/commands/observe/metrics.js +5 -4
- package/build/commands/observe/routes.js +4 -3
- package/build/commands/observe/session.d.ts +6 -1
- package/build/commands/observe/session.js +133 -7
- package/build/commands/observe/versions.js +4 -3
- package/build/graphql/generated.d.ts +101 -2
- package/build/graphql/queries/AccountQuery.js +6 -0
- package/build/graphql/queries/DeviceRunSessionQuery.js +0 -1
- package/build/graphql/queries/ObserveQuery.d.ts +2 -1
- package/build/graphql/queries/ObserveQuery.js +7 -1
- package/build/observe/fetchCustomEvents.d.ts +2 -1
- package/build/observe/fetchCustomEvents.js +1 -0
- package/build/observe/fetchSessions.d.ts +42 -0
- package/build/observe/fetchSessions.js +36 -0
- package/build/observe/formatSessions.d.ts +16 -0
- package/build/observe/formatSessions.js +36 -0
- package/build/observe/metricNames.d.ts +7 -0
- package/build/observe/metricNames.js +13 -0
- package/build/utils/usage/checkForOverages.js +6 -1
- package/oclif.manifest.json +1821 -1519
- package/package.json +12 -14
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildObserveSessionEventsTable = buildObserveSessionEventsTable;
|
|
4
4
|
exports.buildObserveSessionEventsJson = buildObserveSessionEventsJson;
|
|
5
|
+
exports.shortSessionId = shortSessionId;
|
|
6
|
+
exports.formatMetricCandidateTitle = formatMetricCandidateTitle;
|
|
7
|
+
exports.formatLogCandidateTitle = formatLogCandidateTitle;
|
|
5
8
|
const tslib_1 = require("tslib");
|
|
6
9
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
10
|
const formatUtils_1 = require("./formatUtils");
|
|
@@ -98,3 +101,36 @@ function buildObserveSessionEventsJson(entries, sessionId, metadata, hasMoreMetr
|
|
|
98
101
|
hasMoreLogEvents,
|
|
99
102
|
};
|
|
100
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Compact session ID for display in candidate lists — long UUIDs are
|
|
106
|
+
* truncated to `<first-8>…<last-4>` so a row stays scannable.
|
|
107
|
+
*/
|
|
108
|
+
function shortSessionId(sessionId) {
|
|
109
|
+
if (sessionId.length <= 12) {
|
|
110
|
+
return sessionId;
|
|
111
|
+
}
|
|
112
|
+
return `${sessionId.slice(0, 8)}…${sessionId.slice(-4)}`;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* One-line title for a metric event shown in the observe:session candidate
|
|
116
|
+
* picker, e.g. `Jan 15, 10:00:00.000 AM · Startup TTI 1.23s · 1.0.0 · iOS 17.0 · session abc…1234`.
|
|
117
|
+
*/
|
|
118
|
+
function formatMetricCandidateTitle(event) {
|
|
119
|
+
const displayName = (0, metricNames_1.getMetricDisplayName)(event.metricName);
|
|
120
|
+
const value = `${event.metricValue.toFixed(2)}s`;
|
|
121
|
+
const timestamp = (0, formatUtils_1.formatLogTimestamp)(event.timestamp);
|
|
122
|
+
const shortSession = shortSessionId(event.sessionId ?? '');
|
|
123
|
+
const device = `${event.deviceOs} ${event.deviceOsVersion}`;
|
|
124
|
+
return `${timestamp} · ${displayName} ${value} · ${event.appVersion} · ${device} · session ${shortSession}`;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* One-line title for a custom log event shown in the observe:session
|
|
128
|
+
* candidate picker.
|
|
129
|
+
*/
|
|
130
|
+
function formatLogCandidateTitle(event) {
|
|
131
|
+
const timestamp = (0, formatUtils_1.formatLogTimestamp)(event.timestamp);
|
|
132
|
+
const severity = event.severityText ?? (event.severityNumber != null ? String(event.severityNumber) : '-');
|
|
133
|
+
const shortSession = shortSessionId(event.sessionId ?? '');
|
|
134
|
+
const device = `${event.deviceOs} ${event.deviceOsVersion}`;
|
|
135
|
+
return `${timestamp} · ${event.eventName} · ${severity} · ${event.appVersion} · ${device} · session ${shortSession}`;
|
|
136
|
+
}
|
|
@@ -4,3 +4,10 @@ export declare const METRIC_SHORT_NAMES: Record<string, string>;
|
|
|
4
4
|
export declare function resolveMetricName(input: string): string;
|
|
5
5
|
export declare function resolveNavigationMetricName(input: string): string;
|
|
6
6
|
export declare function getMetricDisplayName(metricName: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Non-throwing predicate: true when `input` is a known metric alias (either
|
|
9
|
+
* app-startup or navigation) or a known full metric name. Used to decide
|
|
10
|
+
* whether an event name should be treated as a metric or as a custom log
|
|
11
|
+
* event without forcing the caller into a try/catch around `resolveMetricName`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isKnownMetricName(input: string): boolean;
|
|
@@ -4,6 +4,7 @@ exports.METRIC_SHORT_NAMES = exports.METRIC_ALIASES = exports.NAVIGATION_METRIC_
|
|
|
4
4
|
exports.resolveMetricName = resolveMetricName;
|
|
5
5
|
exports.resolveNavigationMetricName = resolveNavigationMetricName;
|
|
6
6
|
exports.getMetricDisplayName = getMetricDisplayName;
|
|
7
|
+
exports.isKnownMetricName = isKnownMetricName;
|
|
7
8
|
const errors_1 = require("../commandUtils/errors");
|
|
8
9
|
exports.NAVIGATION_METRIC_ALIASES = {
|
|
9
10
|
nav_cold_ttr: 'expo.navigation.cold_ttr',
|
|
@@ -53,3 +54,15 @@ function resolveNavigationMetricName(input) {
|
|
|
53
54
|
function getMetricDisplayName(metricName) {
|
|
54
55
|
return exports.METRIC_SHORT_NAMES[metricName] ?? metricName;
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Non-throwing predicate: true when `input` is a known metric alias (either
|
|
59
|
+
* app-startup or navigation) or a known full metric name. Used to decide
|
|
60
|
+
* whether an event name should be treated as a metric or as a custom log
|
|
61
|
+
* event without forcing the caller into a try/catch around `resolveMetricName`.
|
|
62
|
+
*/
|
|
63
|
+
function isKnownMetricName(input) {
|
|
64
|
+
return (input in exports.METRIC_ALIASES ||
|
|
65
|
+
input in exports.NAVIGATION_METRIC_ALIASES ||
|
|
66
|
+
KNOWN_FULL_NAMES.has(input) ||
|
|
67
|
+
KNOWN_FULL_NAVIGATION_NAMES.has(input));
|
|
68
|
+
}
|
|
@@ -23,7 +23,12 @@ async function maybeWarnAboutUsageOveragesAsync({ graphqlClient, accountId, }) {
|
|
|
23
23
|
if (!planMetric || !subscription) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
// Count only genuine per-worker build overage rows. `overageMetrics` can also
|
|
27
|
+
// contain rows without build metadata (e.g. rollups), which must not be summed
|
|
28
|
+
// in — otherwise the displayed "N builds beyond your credits" count is inflated.
|
|
29
|
+
const overageCount = buildMetrics.overageMetrics
|
|
30
|
+
.filter(o => o.metadata?.billingResourceClass && o.metadata?.platform)
|
|
31
|
+
.reduce((sum, o) => sum + o.value, 0);
|
|
27
32
|
const overageCostCents = buildMetrics.totalCost;
|
|
28
33
|
const hasFreePlan = subscription.name === 'Free';
|
|
29
34
|
const tier = classifyUsageTier({
|