@expo/serve-sim 0.1.41 → 0.1.42
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.
|
Binary file
|
package/dist/serve-sim.js
CHANGED
|
@@ -164,7 +164,7 @@ Usage:
|
|
|
164
164
|
serve-sim permissions reset <permission|all> <bundle-id> [-d <udid|name>]
|
|
165
165
|
serve-sim permissions list [bundle-id] [-d <udid|name>]
|
|
166
166
|
|
|
167
|
-
Permissions: ${r$().join(", ")}`),process.exit(1);let Y=J.device?s(J.device):G0();if(!Y)console.error("No booted simulator. Boot one or pass -d <udid|name>."),process.exit(1);if(J.verb==="list"){let G={udid:Y,bundleId:J.bundleId??null,tcc:DZ(Y,J.bundleId),location:CZ(Y,J.bundleId),notifications:xZ(Y,J.bundleId)};console.log(JSON.stringify(G,null,Q?0:2)),process.exit(0)}let X=J.bundleId;try{if(J.permission==="all")for(let G of r$())C9(Y,"reset",G,void 0,X);else C9(Y,J.verb,J.permission,J.value,X)}catch(G){console.error(G?.message??String(G)),process.exit(1)}if(Q)console.log(JSON.stringify({udid:Y,verb:J.verb,permission:J.permission,value:J.value??null,bundleId:X}));else{let G=J.value?` (${J.value})`:"";console.log(`\uD83D\uDD10 ${J.verb} ${J.permission}${G} for ${X} on ${Y}`)}process.exit(0)}z6();M6();function e9($,Q={}){let Z=new Date($.timestamp),J=Number.isNaN(Z.getTime())?$.timestamp:Z.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),Y=Q.deviceLabel??($.device?$.device.slice(0,8):null),X=$.status==="error"?" failed":"";return[J,Y,`${T1($)}${X?` (${X.trim()})`:""}`].filter(Boolean).join(" ")}function T1($){if($.kind==="tap"){let Q=X$($.details,"current")??X$($.details,"start");return Q?`Tap at ${_6(Q)}`:"Tap"}if($.kind==="drag"){let Q=X$($.details,"start"),Z=X$($.details,"current");if(Q&&Z)return`Drag from ${_6(Q)} to ${_6(Z)}`;return"Drag"}if($.kind==="key"){let Q=O1($.details,"key")??$.action??"key",Z=$.action==="down"?"down":$.action==="up"?"up":$.action;return Z?`Key ${Z} ${s9(Q)}`:`Key ${s9(Q)}`}if($.kind==="rotate"){let Q=$.action?$2($.action):"";return Q?`Rotate ${Q}`:"Rotate"}return D1($.msg??$.summary)}function X$($,Q){let Z=$?.[Q];if(!Z||typeof Z!=="object"||Array.isArray(Z))return null;let J=Z;return typeof J.x==="number"&&typeof J.y==="number"?{x:J.x,y:J.y}:null}function O1($,Q){let Z=$?.[Q];return typeof Z==="string"&&Z.length>0?Z:null}function _6($){return`${t9($.x)}, ${t9($.y)}`}function t9($){if(!Number.isFinite($))return"?";return(Math.round((A1($,0,1)+Number.EPSILON)*100)/100).toFixed(2)}function A1($,Q,Z){return Math.min(Z,Math.max(Q,$))}function D1($){return $.replace(/\b[a-z]+(?:_[a-z]+)+\b/g,$2)}function $2($){return $.replace(/[-_]+/g," ")}function s9($){return{MetaLeft:"Left Command",MetaRight:"Right Command",AltLeft:"Left Option",AltRight:"Right Option",ControlLeft:"Left Control",ControlRight:"Right Control",ShiftLeft:"Left Shift",ShiftRight:"Right Shift",ArrowLeft:"Left Arrow",ArrowRight:"Right Arrow",ArrowUp:"Up Arrow",ArrowDown:"Down Arrow"}[$]??$}R6();L$();function N6($,Q){let Z=$.split(",").map((Y)=>Y.trim()).filter(Boolean),J=Q==="stun"?/^stuns?:/i:/^turns?:/i;if(Z.length===0||Z.length>16||Z.some((Y)=>Y.length>2048||!J.test(Y)))throw Error(`Expected one or more comma-separated ${Q.toUpperCase()} URLs`);return Z}function F6($,Q){let Z=$??{transport:"http"},J=Q??{transport:"http"};if(Z.transport!==J.transport)return!1;let Y=K4(Z),X=K4(J);if(Y.mjpegFps!==X.mjpegFps||Y.mjpegQuality!==X.mjpegQuality||Y.maxDimension!==X.maxDimension||Y.h264Bitrate!==X.h264Bitrate||Y.h264Fps!==X.h264Fps)return!1;if(Z.transport==="http"&&J.transport==="http")return(Z.codec??"auto")===(J.codec??"auto");if(Z.transport!=="webrtc"||J.transport!=="webrtc")return!1;if(Z.codec!==J.codec)return!1;let G=Z.iceServers??[],z=J.iceServers??[];if(G.length!==z.length)return!1;return G.every((K,W)=>{let V=z[W];return K.username===V.username&&K.credential===V.credential&&K.urls.length===V.urls.length&&K.urls.every((L,U)=>L===V.urls[U])})}function W2($,Q){let Z=[];for(let J of $??[])for(let Y of J.urls){let X=Y.toLowerCase();if(Q.some((G)=>X.startsWith(G)))Z.push(Y)}return Z}function w1($){for(let Q of $??[])if(Q.urls.some((Z)=>/^turns?:/i.test(Z)))return Q;return null}function k1($){if(!$)return[];let Q=[];if(Q.push("--transport",$.transport),$.transport==="http"){if($.codec)Q.push("--codec",$.codec)}else{Q.push("--webrtc-codec",$.codec);let Z=W2($.iceServers,["stun:","stuns:"]);if(Z.length)Q.push("--stun-url",Z.join(","));let J=W2($.iceServers,["turn:","turns:"]);if(J.length){Q.push("--turn-url",J.join(","));let Y=w1($.iceServers);if(Y?.username)Q.push("--turn-username",Y.username);if(Y?.credential)Q.push("--turn-credential",Y.credential)}}if($.mjpegFps!==void 0)Q.push("--mjpeg-fps",String($.mjpegFps));if($.mjpegQuality!==void 0)Q.push("--mjpeg-quality",String($.mjpegQuality));if($.maxDimension!==void 0)Q.push("--max-dimension",String($.maxDimension));if($.h264Bitrate!==void 0)Q.push("--video-bitrate",String($.h264Bitrate));if($.h264Fps!==void 0)Q.push("--video-fps",String($.h264Fps));return Q}function V2($,Q,Z,J){return[$,"--port",String(Q),"--host",Z,...k1(J)]}var f0=t4(import.meta.url);function ZG(){return"0.1.
|
|
167
|
+
Permissions: ${r$().join(", ")}`),process.exit(1);let Y=J.device?s(J.device):G0();if(!Y)console.error("No booted simulator. Boot one or pass -d <udid|name>."),process.exit(1);if(J.verb==="list"){let G={udid:Y,bundleId:J.bundleId??null,tcc:DZ(Y,J.bundleId),location:CZ(Y,J.bundleId),notifications:xZ(Y,J.bundleId)};console.log(JSON.stringify(G,null,Q?0:2)),process.exit(0)}let X=J.bundleId;try{if(J.permission==="all")for(let G of r$())C9(Y,"reset",G,void 0,X);else C9(Y,J.verb,J.permission,J.value,X)}catch(G){console.error(G?.message??String(G)),process.exit(1)}if(Q)console.log(JSON.stringify({udid:Y,verb:J.verb,permission:J.permission,value:J.value??null,bundleId:X}));else{let G=J.value?` (${J.value})`:"";console.log(`\uD83D\uDD10 ${J.verb} ${J.permission}${G} for ${X} on ${Y}`)}process.exit(0)}z6();M6();function e9($,Q={}){let Z=new Date($.timestamp),J=Number.isNaN(Z.getTime())?$.timestamp:Z.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),Y=Q.deviceLabel??($.device?$.device.slice(0,8):null),X=$.status==="error"?" failed":"";return[J,Y,`${T1($)}${X?` (${X.trim()})`:""}`].filter(Boolean).join(" ")}function T1($){if($.kind==="tap"){let Q=X$($.details,"current")??X$($.details,"start");return Q?`Tap at ${_6(Q)}`:"Tap"}if($.kind==="drag"){let Q=X$($.details,"start"),Z=X$($.details,"current");if(Q&&Z)return`Drag from ${_6(Q)} to ${_6(Z)}`;return"Drag"}if($.kind==="key"){let Q=O1($.details,"key")??$.action??"key",Z=$.action==="down"?"down":$.action==="up"?"up":$.action;return Z?`Key ${Z} ${s9(Q)}`:`Key ${s9(Q)}`}if($.kind==="rotate"){let Q=$.action?$2($.action):"";return Q?`Rotate ${Q}`:"Rotate"}return D1($.msg??$.summary)}function X$($,Q){let Z=$?.[Q];if(!Z||typeof Z!=="object"||Array.isArray(Z))return null;let J=Z;return typeof J.x==="number"&&typeof J.y==="number"?{x:J.x,y:J.y}:null}function O1($,Q){let Z=$?.[Q];return typeof Z==="string"&&Z.length>0?Z:null}function _6($){return`${t9($.x)}, ${t9($.y)}`}function t9($){if(!Number.isFinite($))return"?";return(Math.round((A1($,0,1)+Number.EPSILON)*100)/100).toFixed(2)}function A1($,Q,Z){return Math.min(Z,Math.max(Q,$))}function D1($){return $.replace(/\b[a-z]+(?:_[a-z]+)+\b/g,$2)}function $2($){return $.replace(/[-_]+/g," ")}function s9($){return{MetaLeft:"Left Command",MetaRight:"Right Command",AltLeft:"Left Option",AltRight:"Right Option",ControlLeft:"Left Control",ControlRight:"Right Control",ShiftLeft:"Left Shift",ShiftRight:"Right Shift",ArrowLeft:"Left Arrow",ArrowRight:"Right Arrow",ArrowUp:"Up Arrow",ArrowDown:"Down Arrow"}[$]??$}R6();L$();function N6($,Q){let Z=$.split(",").map((Y)=>Y.trim()).filter(Boolean),J=Q==="stun"?/^stuns?:/i:/^turns?:/i;if(Z.length===0||Z.length>16||Z.some((Y)=>Y.length>2048||!J.test(Y)))throw Error(`Expected one or more comma-separated ${Q.toUpperCase()} URLs`);return Z}function F6($,Q){let Z=$??{transport:"http"},J=Q??{transport:"http"};if(Z.transport!==J.transport)return!1;let Y=K4(Z),X=K4(J);if(Y.mjpegFps!==X.mjpegFps||Y.mjpegQuality!==X.mjpegQuality||Y.maxDimension!==X.maxDimension||Y.h264Bitrate!==X.h264Bitrate||Y.h264Fps!==X.h264Fps)return!1;if(Z.transport==="http"&&J.transport==="http")return(Z.codec??"auto")===(J.codec??"auto");if(Z.transport!=="webrtc"||J.transport!=="webrtc")return!1;if(Z.codec!==J.codec)return!1;let G=Z.iceServers??[],z=J.iceServers??[];if(G.length!==z.length)return!1;return G.every((K,W)=>{let V=z[W];return K.username===V.username&&K.credential===V.credential&&K.urls.length===V.urls.length&&K.urls.every((L,U)=>L===V.urls[U])})}function W2($,Q){let Z=[];for(let J of $??[])for(let Y of J.urls){let X=Y.toLowerCase();if(Q.some((G)=>X.startsWith(G)))Z.push(Y)}return Z}function w1($){for(let Q of $??[])if(Q.urls.some((Z)=>/^turns?:/i.test(Z)))return Q;return null}function k1($){if(!$)return[];let Q=[];if(Q.push("--transport",$.transport),$.transport==="http"){if($.codec)Q.push("--codec",$.codec)}else{Q.push("--webrtc-codec",$.codec);let Z=W2($.iceServers,["stun:","stuns:"]);if(Z.length)Q.push("--stun-url",Z.join(","));let J=W2($.iceServers,["turn:","turns:"]);if(J.length){Q.push("--turn-url",J.join(","));let Y=w1($.iceServers);if(Y?.username)Q.push("--turn-username",Y.username);if(Y?.credential)Q.push("--turn-credential",Y.credential)}}if($.mjpegFps!==void 0)Q.push("--mjpeg-fps",String($.mjpegFps));if($.mjpegQuality!==void 0)Q.push("--mjpeg-quality",String($.mjpegQuality));if($.maxDimension!==void 0)Q.push("--max-dimension",String($.maxDimension));if($.h264Bitrate!==void 0)Q.push("--video-bitrate",String($.h264Bitrate));if($.h264Fps!==void 0)Q.push("--video-fps",String($.h264Fps));return Q}function V2($,Q,Z,J){return[$,"--port",String(Q),"--host",Z,...k1(J)]}var f0=t4(import.meta.url);function ZG(){return"0.1.42"}function C5(){if(!H0(L0))P8(L0,{recursive:!0})}function $0($){if($)return E8(n4($));for(let Q of o4()){let Z=E8(Q);if(Z)return Z}return null}var y$={at:0,booted:null};function JG(){let $=Date.now();if(y$.booted&&$-y$.at<1000)return y$.booted;try{let Q=J0("xcrun simctl list devices booted -j",{encoding:"utf-8",stdio:["ignore","pipe","pipe"],timeout:3000}),Z=JSON.parse(Q),J=new Set;for(let Y of Object.values(Z.devices))for(let X of Y)if(X.state==="Booted")J.add(X.udid);return y$={at:$,booted:J},J}catch{return null}}function E8($){try{if(!H0($))return _0("state file missing %s",$),null;let Q=JSON.parse(a0($,"utf-8"));try{process.kill(Q.pid,0)}catch{return _0("helper pid %d dead, removing stale state %s",Q.pid,$),o0($),null}let Z=JG();if(Z&&!Z.has(Q.device)){if(Q.pid===process.pid){_0("dropping own stale state for non-booted device %s",Q.device);try{o0($)}catch{}return null}_0("helper pid %d bound to non-booted device %s — killing stale helper",Q.pid,Q.device),console.error(`[serve-sim] Helper pid ${Q.pid} is bound to device ${Q.device} which is no longer booted — killing stale helper.`);try{process.kill(Q.pid,"SIGTERM")}catch{}try{o0($)}catch{}return null}return _0("state ok pid=%d device=%s port=%d",Q.pid,Q.device,Q.port),Q}catch(Q){return _0("readStateFile threw for %s: %o",$,Q),null}}function m4(){let $=[];for(let Q of o4()){let Z=E8(Q);if(Z)$.push(Z)}return $}function YG($){C5(),i4($),_0("wrote state pid=%d device=%s port=%d",$.pid,$.device,$.port)}function D0($){if($){_0("clearState device=%s",$);try{o0(n4($))}catch{}}else{_0("clearState (all)");for(let Q of o4())try{o0(Q)}catch{}}}function x8(){try{let $=J0("xcrun simctl list devices -j",{encoding:"utf-8"}),Q=JSON.parse($),Z=Object.keys(Q.devices).filter((J)=>/SimRuntime\.iOS-/i.test(J)).sort((J,Y)=>{let X=(J.match(/iOS-(\d+)-(\d+)/)??[]).slice(1).map(Number),G=(Y.match(/iOS-(\d+)-(\d+)/)??[]).slice(1).map(Number);return(G[0]??0)-(X[0]??0)||(G[1]??0)-(X[1]??0)});for(let J of Z){let X=(Q.devices[J]??[]).find((G)=>G.isAvailable!==!1&&/^iPhone\b/i.test(G.name));if(X)return{udid:X.udid,name:X.name}}}catch{}return null}function A5($){return P5().get($)??null}function P5(){let $=new Map;try{let Q=J0("xcrun simctl list devices -j",{encoding:"utf-8"}),Z=JSON.parse(Q);for(let J of Object.values(Z.devices))for(let Y of J)$.set(Y.udid,Y.name)}catch{}return $}function q5($){try{let Q=J0("xcrun simctl list devices -j",{encoding:"utf-8"}),Z=JSON.parse(Q);for(let J of Object.values(Z.devices))for(let Y of J)if(Y.udid===$)return Y.state==="Booted"}catch{}return!1}function C8($){try{return process.kill($,0),!0}catch{return!1}}function f$($){try{process.kill($,"SIGTERM")}catch{return}let Q=Date.now()+500;while(Date.now()<Q)try{process.kill($,0),v0(25)}catch{return}try{process.kill($,"SIGKILL")}catch{}let Z=Date.now()+500;while(Date.now()<Z)try{process.kill($,0),v0(25)}catch{return}}function XG($){if(!q5($))try{J0(`xcrun simctl boot ${$}`,{encoding:"utf-8",stdio:"pipe"})}catch(Q){let Z=(Q.stderr??Q.message??"").toLowerCase();if(!Z.includes("booted")&&!Z.includes("current state"))throw Error(`Failed to boot device ${$}: ${Q.stderr||Q.message}`)}try{J0("open -ga Simulator",{encoding:"utf-8",stdio:"pipe",timeout:3000})}catch{}}function GG(){let $=QG();for(let Q of Object.values($))for(let Z of Q??[])if(Z.family==="IPv4"&&!Z.internal)return Z.address;return null}async function I5($){let Q=new Set(m4().map((Z)=>Z.port));for(let Z=$;Z<$+100;Z++){if(Q.has(Z))continue;if(await F9(Z))return Z}throw Error(`No available port found in range ${$}-${$+99}`)}async function KG($){XG($);try{J0(`xcrun simctl bootstatus ${$} -b`,{encoding:"utf-8",stdio:"pipe",timeout:60000})}catch(Q){if(!q5($))console.error(`Device ${$} failed to reach booted state: ${Q.stderr||Q.message}`),process.exit(1)}}function zG($){if(process.argv[0]&&/(^|\/)serve-sim$/.test(process.argv[0]))return{command:process.argv[0],args:$};return{command:process.argv[0],args:[process.argv[1],...$]}}async function WG($,Q=150000){let Z=Date.now();while(Date.now()-Z<Q){let J=$0($);if(J)return J;await new Promise((Y)=>setTimeout(Y,200))}return null}async function x5($,Q,Z){L6("startHelper udid=%s port=%d detach=%s",$,Q,Z.detach);let J="127.0.0.1";C5(),D0($),O9(Q);let Y=R0(L0,`server-${$}.log`),X=q8(Y,"w"),{command:G,args:z}=zG(V2($,Q,J,Z.stream)),K=D5(G,z,{detached:Z.detach,stdio:["ignore",X,X]});if(I8(X),Z.detach)K.unref();let W=await WG($);if(!W){if(K.pid)f$(K.pid);let V="";try{V=a0(Y,"utf-8").trim()}catch{}console.error(V?`Preview server failed:
|
|
168
168
|
${V}`:"Preview server failed to start"),process.exit(1)}return Z.detach?{pid:W.pid}:{pid:W.pid,child:K}}async function VG($,Q,Z,J,Y=!1){H6("follow devices=%o startPort=%d",$,Q);let X=$.length>0?$.map(s):(()=>{let L=G0();if(L)return[L];let U=x8();if(!U)console.error("No device specified and no available iOS simulator found."),process.exit(1);if(!Z)console.log(`No booted simulator — booting ${U.name}...`);return[U.udid]})(),G=new Map,z=[],K=Q;for(let L of X){let U=$0(L);if(U)if(Y&&!F6(U.streamSettings,J))f$(U.pid),D0(L);else{if(!Z){let O=A5(L)??L;if(X.length>1)console.log(`
|
|
169
169
|
==> ${O} (${L}) <==`);console.log(` Already running on port ${U.port}`),console.log(` Stream: ${U.streamUrl}`),console.log(` WebSocket: ${U.wsUrl}`)}z.push(U);continue}K=await I5(K);let{child:N}=await x5(L,K,{detach:!1,stream:J});if(N)G.set(L,N);let M=$0(L)??Q4(L,K,"/","127.0.0.1");if(z.push(M),!Z){let O=A5(L)??L;if(X.length>1)console.log(`
|
|
170
170
|
==> ${O} (${L}) <==`);console.log(` Stream: ${M.streamUrl}`),console.log(` WebSocket: ${M.wsUrl}`),console.log(` Port: ${K}`)}K++}if(z.length===1){let L=z[0];console.log(JSON.stringify({url:L.url,streamUrl:L.streamUrl,wsUrl:L.wsUrl,port:L.port,device:L.device}))}else console.log(JSON.stringify({devices:z.map((L)=>({url:L.url,streamUrl:L.streamUrl,wsUrl:L.wsUrl,port:L.port,device:L.device}))}));if(G.size===0)return;let W=!1,V=(L)=>{if(W)return;if(W=!0,!Z)console.log(`
|
|
@@ -219,5 +219,5 @@ Examples:
|
|
|
219
219
|
serve-sim --list Show all running streams
|
|
220
220
|
serve-sim --kill Stop all streams`).action(async($,Q)=>{if(Q.list!==void 0){MG(typeof Q.list==="string"?Q.list:void 0);return}if(Q.kill!==void 0){_G(typeof Q.kill==="string"?Q.kill:void 0);return}if(Q.transport!=="http"&&Q.transport!=="webrtc")console.error("--transport must be one of: http, webrtc."),process.exit(1);let Z=(U)=>Y0.getOptionValueSource(U)==="cli",J=["webrtcCodec","stunUrl","turnUrl","turnUsername","turnCredential"].some(Z);if(Q.transport==="http"&&J)console.error("WebRTC options require --transport webrtc."),process.exit(1);if(Q.transport==="webrtc"&&Z("codec"))console.error("--codec configures HTTP streaming; use --webrtc-codec with --transport webrtc."),process.exit(1);if(Q.turnUsername===void 0!==(Q.turnCredential===void 0))console.error("--turn-username and --turn-credential must be provided together."),process.exit(1);if((Q.turnUsername!==void 0||Q.turnCredential!==void 0)&&!Q.turnUrl)console.error("--turn-username and --turn-credential require --turn-url."),process.exit(1);let Y=Q.stunUrl??[],X=[];if(Y.length)X.push({urls:Y});if(Q.turnUrl)X.push({urls:Q.turnUrl,username:Q.turnUsername,credential:Q.turnCredential});let G=["mjpegFps","mjpegQuality","maxDimension","videoBitrate","videoFps"],z={...Z("mjpegFps")?{mjpegFps:Q.mjpegFps}:{},...Z("mjpegQuality")?{mjpegQuality:Q.mjpegQuality}:{},...Z("maxDimension")?{maxDimension:Q.maxDimension}:{},...Z("videoBitrate")?{h264Bitrate:Q.videoBitrate}:{},...Z("videoFps")?{h264Fps:Q.videoFps}:{}},K=Q.transport==="webrtc"?{transport:"webrtc",codec:Q.webrtcCodec,...X.length?{iceServers:X}:{},...z}:{transport:"http",codec:Q.codec,...z},W=Q.port,V=Z("transport")||Z("codec")||J||G.some(Z),L=Q.debugStream?.trim();if(Q.debugStream!==void 0){let U=!L?"--debug-stream needs a file path, for example --debug-stream ./stream.ndjson":Q.detach||Q.preview===!1?"--debug-stream needs the preview server, so drop --detach/--no-preview.":K.transport!=="webrtc"?"--debug-stream records sender statistics, which only exist on --transport webrtc.":null;if(U!==null)console.error(U),process.exit(1)}if(Q.detach){let U=await HG($,W??3100,K,V);LG(U)}else if(Q.preview===!1)await VG($,W??3100,!!Q.quiet,K,V);else await bG(W??3200,$,W!==void 0,Q.host,{stream:K,metricsCorsOrigins:Q.metricsCorsOrigin,debugStreamPath:L})});var b0=["-d, --device <udid>","Target a specific simulator (udid or name)"];Y0.command("gesture").description("Send a touch gesture").argument("<json>",`Gesture JSON, e.g. '{"type":"begin","x":0.5,"y":0.5}'`).option(...b0).action(($,Q)=>NG($,Q.device));Y0.command("tap").description("Tap at normalized 0..1 coords").argument("<x>","X coord, normalized 0..1").argument("<y>","Y coord, normalized 0..1").option(...b0).action(($,Q,Z)=>FG($,Q,Z.device));Y0.command("button").description("Send a hardware button press").argument("[name]","Button name","home").option(...b0).action(($,Q)=>AG($,Q.device));Y0.command("type").description("Type text (US keyboard only)").argument("[text...]","Text to type").option(...b0).option("--stdin","Read text from stdin").option("--file <path>","Read text from a file").action(($,Q)=>jG($,{device:Q.device,stdin:Q.stdin,file:Q.file}));Y0.command("rotate").description("Set device orientation (portrait|portrait_upside_down|landscape_left|landscape_right)").argument("<orientation>").option(...b0).action(($,Q)=>TG($,Q.device));Y0.command("ca-debug").description("Toggle a CoreAnimation debug render flag (blended|copies|misaligned|offscreen|slow-animations)").argument("<option>").argument("<state>","on|off").option(...b0).action(($,Q,Z)=>DG($,Q,Z.device));Y0.command("memory-warning").description("Simulate a memory warning on the device").option(...b0).action(($)=>EG($.device));Y0.command("event-log").description("Show recent simulator events").option(...b0).option("-j, --json","Print JSON").option("-n, --limit <count>","Maximum number of events").action(($)=>UG($.device,{json:$.json,limit:$.limit}));Y0.command("camera").description("Inject a synthetic camera feed and launch an app (see `camera --help`)").allowUnknownOption(!0).helpOption(!1).argument("[args...]").action(($)=>yG($));Y0.command("permissions").description("Manage app permissions (see `permissions` with no args for usage)").allowUnknownOption(!0).helpOption(!1).argument("[args...]").action(($)=>k9($));Y0.command("ui").description("Get or set simulator-wide UI options (see `ui --help`)").allowUnknownOption(!0).helpOption(!1).argument("[args...]").action(($)=>u9($));await Y0.parseAsync(process.argv);
|
|
221
221
|
|
|
222
|
-
//# debugId=
|
|
222
|
+
//# debugId=BE8719F014DBEC4C64756E2164756E21
|
|
223
223
|
//# sourceMappingURL=serve-sim.js.map
|