11/**
2- * Cloud simulators from EAS Simulator . A device exists only while a session
2+ * Cloud simulators from Expo Simulators . A device exists only while a session
33 * runs, and every session bills the Expo account until it stops, so this host
44 * bounds each one, stops all of them when it stops, and stops sessions a
55 * previous server left behind. It never touches sessions it did not start.
@@ -59,22 +59,22 @@ const decodeServeEmuApi = Schema.decodeUnknownEffect(
5959 */
6060const PLATFORMS = {
6161 ios : {
62- name : "iPhone (EAS Simulator)" ,
62+ name : "iPhone (Expo Simulator)" ,
6363 hubPrefix : "/vendor/serve-sim" ,
6464 previewPrefix : "" ,
6565 protocol : "serve-sim" ,
6666 remoteDeviceId : ( api : unknown ) => decodeServeSimApi ( api ) . pipe ( Effect . map ( ( api ) => api . device ) ) ,
6767 } ,
6868 android : {
69- name : "Android (EAS Simulator)" ,
69+ name : "Android (Expo Simulator)" ,
7070 hubPrefix : "/vendor/serve-emu" ,
7171 previewPrefix : "/vendor/serve-emu" ,
7272 protocol : "serve-emu" ,
7373 remoteDeviceId : ( api : unknown ) => decodeServeEmuApi ( api ) . pipe ( Effect . map ( ( api ) => api . serial ) ) ,
7474 } ,
7575} as const ;
7676
77- /** EAS picks the simulator model; one entry starts a session. */
77+ /** Expo picks the simulator model; one entry starts a session. */
7878const CATALOG : ReadonlyArray < DeviceHost . HostDevice > = [
7979 {
8080 id : "eas-ios" ,
@@ -163,7 +163,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
163163 > ( ) ;
164164 const hostId = config . id ;
165165 const ledgerPath = path . join ( server . stateDir , "device" , "eas" , `${ hostId } .json` ) ;
166- // Keyed by Expo's session id, which is also the device id: every EAS
166+ // Keyed by Expo's session id, which is also the device id: every Expo
167167 // simulator reports the same remote device id, so that id cannot tell sessions apart.
168168 const sessions = new Map < string , RunningSession > ( ) ;
169169 const checkedAt = new Map < string , number > ( ) ;
@@ -239,7 +239,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
239239 Effect . flatMap ( decodeLedger ) ,
240240 Effect . mapError ( ( cause ) =>
241241 unavailable (
242- `The record of running EAS sessions at ${ ledgerPath } could not be read. Fix or remove it.` ,
242+ `The record of running Expo Simulators sessions at ${ ledgerPath } could not be read. Fix or remove it.` ,
243243 cause ,
244244 ) ,
245245 ) ,
@@ -256,7 +256,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
256256 Effect . provide ( services ) ,
257257 Effect . mapError ( ( cause ) =>
258258 unavailable (
259- `The record of running EAS sessions at ${ ledgerPath } could not be written.` ,
259+ `The record of running Expo Simulators sessions at ${ ledgerPath } could not be written.` ,
260260 cause ,
261261 ) ,
262262 ) ,
@@ -267,13 +267,13 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
267267 entries . map ( ( entry ) => ( entry . name === name ? { ...entry , refused : true } : entry ) ) ,
268268 ) . pipe (
269269 Effect . catch ( ( cause ) =>
270- Effect . logWarning ( "Could not update the EAS session record" , { name, cause } ) ,
270+ Effect . logWarning ( "Could not update the Expo Simulators session record" , { name, cause } ) ,
271271 ) ,
272272 ) ;
273273 const forgetEntry = ( name : string ) =>
274274 writeLedger ( ( entries ) => entries . filter ( ( entry ) => entry . name !== name ) ) . pipe (
275275 Effect . catch ( ( cause ) =>
276- Effect . logWarning ( "Could not update the EAS session record" , { name, cause } ) ,
276+ Effect . logWarning ( "Could not update the Expo Simulators session record" , { name, cause } ) ,
277277 ) ,
278278 ) ;
279279
@@ -282,7 +282,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
282282 expo . stop ( sessionId ) . pipe (
283283 Effect . andThen ( forgetEntry ( name ) ) ,
284284 Effect . tapError ( ( cause ) =>
285- Effect . logWarning ( "Could not stop EAS Simulator session" , { sessionId, cause } ) ,
285+ Effect . logWarning ( "Could not stop Expo Simulators session" , { sessionId, cause } ) ,
286286 ) ,
287287 ) ;
288288
@@ -403,7 +403,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
403403 } ,
404404 reapLock . withPermit ,
405405 Effect . catch ( ( cause ) =>
406- Effect . logWarning ( "Could not stop recorded EAS Simulator sessions" , { cause } ) ,
406+ Effect . logWarning ( "Could not stop recorded Expo Simulators sessions" , { cause } ) ,
407407 ) ,
408408 ) ;
409409
@@ -439,7 +439,9 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
439439 hostId,
440440 deviceId : sessionId ,
441441 reason : "launch_failed" ,
442- cause : new Error ( `EAS Simulator session ended (${ session . status } ) before it was ready` ) ,
442+ cause : new Error (
443+ `Expo Simulators session ended (${ session . status } ) before it was ready` ,
444+ ) ,
443445 } ) ;
444446 }
445447 if ( session . status === "IN_PROGRESS" && session . endpoints ) return session . endpoints ;
@@ -456,7 +458,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
456458 hostId,
457459 deviceId : sessionId ,
458460 reason : "timeout" ,
459- cause : new Error ( "EAS Simulator session did not start in time" ) ,
461+ cause : new Error ( "Expo Simulators session did not start in time" ) ,
460462 } ) ,
461463 ) ,
462464 } ) ,
@@ -504,15 +506,15 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
504506 ) ;
505507 if ( ! appId ) {
506508 return yield * unavailable (
507- "No EAS project to run the session under. Choose one for this host in Settings, or open the device from a thread whose project names extra.eas.projectId in app.json or its app config." ,
509+ "No Expo project to run the session under. Choose one for this host in Settings, or open the device from a thread whose project names extra.eas.projectId in app.json or its app config." ,
508510 ) ;
509511 }
510512 const access = yield * expo
511513 . availability ( appId )
512514 . pipe ( Effect . mapError ( ( error ) => unavailable ( error . message , error ) ) ) ;
513515 if ( ! access . available ) {
514516 return yield * unavailable (
515- `EAS Simulator is not enabled for the ${ access . account } Expo account.` ,
517+ `Expo Simulators is not enabled for the ${ access . account } Expo account.` ,
516518 ) ;
517519 }
518520 const entry = { name, appId, recordedAt : yield * Clock . currentTimeMillis } ;
@@ -593,7 +595,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
593595 hostId,
594596 deviceId : sessionId ,
595597 reason : "launch_failed" ,
596- cause : new Error ( "EAS Simulator returned no preview endpoint" ) ,
598+ cause : new Error ( "Expo Simulators returned no preview endpoint" ) ,
597599 } ) ;
598600 }
599601 const origin = new URL ( endpoints . preview . url ) . origin ;
@@ -767,7 +769,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
767769 new DeviceOperationError ( {
768770 operation : "screenshot" ,
769771 reason : "request_failed" ,
770- cause : new Error ( "The EAS Simulator session is not running" ) ,
772+ cause : new Error ( "The Expo Simulator is not running" ) ,
771773 } ) ,
772774 ) ,
773775 onSome : ( session ) =>
@@ -795,7 +797,7 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
795797 } ) ,
796798 agentEndpoint : ( deviceId ) =>
797799 Option . match ( sessionFor ( deviceId ) , {
798- onNone : ( ) => Effect . fail ( unavailable ( "This EAS Simulator device is no longer running." ) ) ,
800+ onNone : ( ) => Effect . fail ( unavailable ( "This Expo Simulator is no longer running." ) ) ,
799801 onSome : ( session ) =>
800802 Effect . succeed ( { ...session . agent , agentDeviceId : session . remoteDeviceId } ) ,
801803 } ) ,
@@ -858,11 +860,11 @@ export const make = Effect.fn("EasDeviceHost.make")(function* (config: EasDevice
858860 onNone : ( ) => Effect . void ,
859861 onSome : ( running ) => releaseAgentDeviceSession ( http , running . agent ) ( session ) ,
860862 } ) ,
861- // Device settings run simctl on the simulator's own machine, which EAS does not expose.
863+ // Device settings run simctl on the simulator's own machine, which Expo does not expose.
862864 run : ( ) =>
863865 Effect . succeed ( {
864866 stdout : "" ,
865- stderr : "EAS Simulator devices cannot run host commands." ,
867+ stderr : "Devices from Expo Simulators cannot run host commands." ,
866868 code : 127 ,
867869 } ) ,
868870 helpers : { serveSimAxSettings : null , serveSimCli : null } ,
0 commit comments