eas-cli 24.2.0 → 24.4.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 +145 -142
- package/build/commands/simulator/get.js +3 -1
- package/build/commands/simulator/index.js +2 -1
- package/build/simulator/utils.d.ts +7 -1
- package/build/simulator/utils.js +4 -1
- package/oclif.manifest.json +1766 -1766
- package/package.json +6 -6
|
@@ -78,7 +78,9 @@ class SimulatorGet extends EasCommand_1.default {
|
|
|
78
78
|
if (session.status === generated_1.DeviceRunSessionStatus.InProgress) {
|
|
79
79
|
log_1.default.newLine();
|
|
80
80
|
if (session.remoteConfig) {
|
|
81
|
-
log_1.default.log((0, utils_1.formatRemoteSessionInstructions)(session.remoteConfig, 'env'
|
|
81
|
+
log_1.default.log((0, utils_1.formatRemoteSessionInstructions)(session.remoteConfig, 'env', {
|
|
82
|
+
sessionUrl: deviceRunSessionUrl,
|
|
83
|
+
}));
|
|
82
84
|
}
|
|
83
85
|
else {
|
|
84
86
|
log_1.default.log('⏳ Session is starting up — remote config is not available yet. Re-run this command in a moment.');
|
|
@@ -96,7 +96,7 @@ class Simulator extends EasCommand_1.default {
|
|
|
96
96
|
options: Object.values(utils_1.DEVICE_RUN_SESSION_RESOURCE_CLASS_FLAG_VALUES),
|
|
97
97
|
})(),
|
|
98
98
|
egress: core_1.Flags.option({
|
|
99
|
-
description: 'With "local", the simulator system proxy points at this machine: HTTP(S) and WebSocket requests that honor it (WebKit, URLSession) exit from this machine and fail while the egress client is disconnected.
|
|
99
|
+
description: 'With "local", the simulator system proxy points at this machine: HTTP(S) and WebSocket requests that honor it (WebKit, URLSession) and clients that read proxy environment variables (gRPC, libcurl) exit from this machine and fail while the egress client is disconnected. Connections that ignore both are refused inside the simulator and listed, with the library that tried, in the Logs section of the session page on expo.dev. The egress client must keep running for the life of the session. Only supported with --platform ios.',
|
|
100
100
|
options: EGRESS_FLAG_VALUES,
|
|
101
101
|
})(),
|
|
102
102
|
'egress-allow': core_1.Flags.string({
|
|
@@ -319,6 +319,7 @@ class Simulator extends EasCommand_1.default {
|
|
|
319
319
|
log_1.default.log((0, utils_1.formatRemoteSessionInstructions)(remoteConfig, flags['out-config-type'], {
|
|
320
320
|
egressAllow,
|
|
321
321
|
egressClientRunsInline: !nonInteractive,
|
|
322
|
+
sessionUrl: deviceRunSessionUrl,
|
|
322
323
|
}));
|
|
323
324
|
log_1.default.newLine();
|
|
324
325
|
const localEgress = (0, utils_1.getLocalEgressConfig)(remoteConfig, egressAllow);
|
|
@@ -27,6 +27,12 @@ export type LocalEgressConfig = {
|
|
|
27
27
|
};
|
|
28
28
|
export type LocalEgressOptions = {
|
|
29
29
|
egressAllow?: readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Link to the session on expo.dev. Its Logs section lists every connection
|
|
32
|
+
* the local egress guard refused inside the simulator, with the process and
|
|
33
|
+
* the calling frameworks, so the banner points readers there.
|
|
34
|
+
*/
|
|
35
|
+
sessionUrl?: string;
|
|
30
36
|
/**
|
|
31
37
|
* Whether the calling command runs the egress client itself in the current
|
|
32
38
|
* terminal, as interactive `simulator:start` does. When false the reader must
|
|
@@ -76,5 +82,5 @@ export declare function formatPreviewUrl(url: string, token: string | null | und
|
|
|
76
82
|
* it has to know to combine.
|
|
77
83
|
*/
|
|
78
84
|
export declare function sanitizeRemoteConfigForJson(remoteConfig: DeviceRunSessionRemoteConfig): DeviceRunSessionRemoteConfig;
|
|
79
|
-
export declare function formatRemoteSessionInstructions(remoteConfig: DeviceRunSessionRemoteConfig, configType: RemoteSessionInstructionsConfigType, { egressAllow, egressClientRunsInline }?: LocalEgressOptions): string;
|
|
85
|
+
export declare function formatRemoteSessionInstructions(remoteConfig: DeviceRunSessionRemoteConfig, configType: RemoteSessionInstructionsConfigType, { egressAllow, egressClientRunsInline, sessionUrl }?: LocalEgressOptions): string;
|
|
80
86
|
export {};
|
package/build/simulator/utils.js
CHANGED
|
@@ -179,7 +179,7 @@ function sanitizeRemoteConfigForJson(remoteConfig) {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
function formatRemoteSessionInstructions(remoteConfig, configType, { egressAllow, egressClientRunsInline = false } = {}) {
|
|
182
|
+
function formatRemoteSessionInstructions(remoteConfig, configType, { egressAllow, egressClientRunsInline = false, sessionUrl } = {}) {
|
|
183
183
|
const instructions = formatControllerInstructions(remoteConfig, configType);
|
|
184
184
|
const egress = getLocalEgressConfig(remoteConfig, egressAllow);
|
|
185
185
|
if (!egress) {
|
|
@@ -188,10 +188,13 @@ function formatRemoteSessionInstructions(remoteConfig, configType, { egressAllow
|
|
|
188
188
|
const egressCommand = configType === 'env' ? 'eas simulator:egress --config-type env' : 'eas simulator:egress';
|
|
189
189
|
const summary = "🔀 Local egress: the simulator's HTTP(S) traffic exits from this machine." +
|
|
190
190
|
(egress.allow.length > 0 ? ` It can also reach ${egress.allow.join(', ')}.` : '');
|
|
191
|
+
const guardNotice = 'Connections that bypass the proxy are refused inside the simulator. The Logs section of the ' +
|
|
192
|
+
`session page lists what was refused and which library tried${sessionUrl ? `: ${(0, log_1.link)(sessionUrl)}` : '.'}`;
|
|
191
193
|
return [
|
|
192
194
|
instructions,
|
|
193
195
|
'',
|
|
194
196
|
summary,
|
|
197
|
+
guardNotice,
|
|
195
198
|
...formatLoopbackForwardNotice(getLoopbackForwardPlan(egress.allow, egress.port)),
|
|
196
199
|
// In interactive mode the client starts in this terminal once the session is
|
|
197
200
|
// ready and stops with it, so there is nothing for the reader to run.
|