@expo/serve-sim 0.1.39 → 0.1.40
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
|
@@ -163,7 +163,7 @@ Usage:
|
|
|
163
163
|
serve-sim permissions reset <permission|all> <bundle-id> [-d <udid|name>]
|
|
164
164
|
serve-sim permissions list [bundle-id] [-d <udid|name>]
|
|
165
165
|
|
|
166
|
-
Permissions: ${n$().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:HZ(Y,J.bundleId),location:MZ(Y,J.bundleId),notifications:NZ(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 n$())F9(Y,"reset",G,void 0,X);else F9(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)}Y6();z6();function n9($,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,`${W1($)}${X?` (${X.trim()})`:""}`].filter(Boolean).join(" ")}function W1($){if($.kind==="tap"){let Q=J$($.details,"current")??J$($.details,"start");return Q?`Tap at ${V6(Q)}`:"Tap"}if($.kind==="drag"){let Q=J$($.details,"start"),Z=J$($.details,"current");if(Q&&Z)return`Drag from ${V6(Q)} to ${V6(Z)}`;return"Drag"}if($.kind==="key"){let Q=z1($.details,"key")??$.action??"key",Z=$.action==="down"?"down":$.action==="up"?"up":$.action;return Z?`Key ${Z} ${d9(Q)}`:`Key ${d9(Q)}`}if($.kind==="rotate"){let Q=$.action?i9($.action):"";return Q?`Rotate ${Q}`:"Rotate"}return H1($.msg??$.summary)}function J$($,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 z1($,Q){let Z=$?.[Q];return typeof Z==="string"&&Z.length>0?Z:null}function V6($){return`${p9($.x)}, ${p9($.y)}`}function p9($){if(!Number.isFinite($))return"?";return(Math.round((V1($,0,1)+Number.EPSILON)*100)/100).toFixed(2)}function V1($,Q,Z){return Math.min(Z,Math.max(Q,$))}function H1($){return $.replace(/\b[a-z]+(?:_[a-z]+)+\b/g,i9)}function i9($){return $.replace(/[-_]+/g," ")}function d9($){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"}[$]??$}M6();V$();function _6($,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 U6($,Q){let Z=$??{transport:"http"},J=Q??{transport:"http"};if(Z.transport!==J.transport)return!1;let Y=X4(Z),X=X4(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??[],W=J.iceServers??[];if(G.length!==W.length)return!1;return G.every((K,z)=>{let V=W[z];return K.username===V.username&&K.credential===V.credential&&K.urls.length===V.urls.length&&K.urls.every((L,B)=>L===V.urls[B])})}function ZQ($,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 F1($){for(let Q of $??[])if(Q.urls.some((Z)=>/^turns?:/i.test(Z)))return Q;return null}function j1($){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=ZQ($.iceServers,["stun:","stuns:"]);if(Z.length)Q.push("--stun-url",Z.join(","));let J=ZQ($.iceServers,["turn:","turns:"]);if(J.length){Q.push("--turn-url",J.join(","));let Y=F1($.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 JQ($,Q,Z,J){return[$,"--port",String(Q),"--host",Z,...j1(J)]}var k0=a4(import.meta.url);function gX(){return"0.1.
|
|
166
|
+
Permissions: ${n$().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:HZ(Y,J.bundleId),location:MZ(Y,J.bundleId),notifications:NZ(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 n$())F9(Y,"reset",G,void 0,X);else F9(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)}Y6();z6();function n9($,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,`${W1($)}${X?` (${X.trim()})`:""}`].filter(Boolean).join(" ")}function W1($){if($.kind==="tap"){let Q=J$($.details,"current")??J$($.details,"start");return Q?`Tap at ${V6(Q)}`:"Tap"}if($.kind==="drag"){let Q=J$($.details,"start"),Z=J$($.details,"current");if(Q&&Z)return`Drag from ${V6(Q)} to ${V6(Z)}`;return"Drag"}if($.kind==="key"){let Q=z1($.details,"key")??$.action??"key",Z=$.action==="down"?"down":$.action==="up"?"up":$.action;return Z?`Key ${Z} ${d9(Q)}`:`Key ${d9(Q)}`}if($.kind==="rotate"){let Q=$.action?i9($.action):"";return Q?`Rotate ${Q}`:"Rotate"}return H1($.msg??$.summary)}function J$($,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 z1($,Q){let Z=$?.[Q];return typeof Z==="string"&&Z.length>0?Z:null}function V6($){return`${p9($.x)}, ${p9($.y)}`}function p9($){if(!Number.isFinite($))return"?";return(Math.round((V1($,0,1)+Number.EPSILON)*100)/100).toFixed(2)}function V1($,Q,Z){return Math.min(Z,Math.max(Q,$))}function H1($){return $.replace(/\b[a-z]+(?:_[a-z]+)+\b/g,i9)}function i9($){return $.replace(/[-_]+/g," ")}function d9($){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"}[$]??$}M6();V$();function _6($,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 U6($,Q){let Z=$??{transport:"http"},J=Q??{transport:"http"};if(Z.transport!==J.transport)return!1;let Y=X4(Z),X=X4(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??[],W=J.iceServers??[];if(G.length!==W.length)return!1;return G.every((K,z)=>{let V=W[z];return K.username===V.username&&K.credential===V.credential&&K.urls.length===V.urls.length&&K.urls.every((L,B)=>L===V.urls[B])})}function ZQ($,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 F1($){for(let Q of $??[])if(Q.urls.some((Z)=>/^turns?:/i.test(Z)))return Q;return null}function j1($){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=ZQ($.iceServers,["stun:","stuns:"]);if(Z.length)Q.push("--stun-url",Z.join(","));let J=ZQ($.iceServers,["turn:","turns:"]);if(J.length){Q.push("--turn-url",J.join(","));let Y=F1($.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 JQ($,Q,Z,J){return[$,"--port",String(Q),"--host",Z,...j1(J)]}var k0=a4(import.meta.url);function gX(){return"0.1.40"}function N5(){if(!H0(L0))O8(L0,{recursive:!0})}function $0($){if($)return j8(p4($));for(let Q of n4()){let Z=j8(Q);if(Z)return Z}return null}var x$={at:0,booted:null};function uX(){let $=Date.now();if(x$.booted&&$-x$.at<1000)return x$.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 x$={at:$,booted:J},J}catch{return null}}function j8($){try{if(!H0($))return _0("state file missing %s",$),null;let Q=JSON.parse(i0($,"utf-8"));try{process.kill(Q.pid,0)}catch{return _0("helper pid %d dead, removing stale state %s",Q.pid,$),n0($),null}let Z=uX();if(Z&&!Z.has(Q.device)){if(Q.pid===process.pid){_0("dropping own stale state for non-booted device %s",Q.device);try{n0($)}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{n0($)}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 g4(){let $=[];for(let Q of n4()){let Z=j8(Q);if(Z)$.push(Z)}return $}function mX($){N5(),d4($),_0("wrote state pid=%d device=%s port=%d",$.pid,$.device,$.port)}function A0($){if($){_0("clearState device=%s",$);try{n0(p4($))}catch{}}else{_0("clearState (all)");for(let Q of n4())try{n0(Q)}catch{}}}function E8(){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 _5($){return R5().get($)??null}function R5(){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 F5($){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 T8($){try{return process.kill($,0),!0}catch{return!1}}function w$($){try{process.kill($,"SIGTERM")}catch{return}let Q=Date.now()+500;while(Date.now()<Q)try{process.kill($,0),f0(25)}catch{return}try{process.kill($,"SIGKILL")}catch{}let Z=Date.now()+500;while(Date.now()<Z)try{process.kill($,0),f0(25)}catch{return}}function cX($){if(!F5($))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 lX(){let $=hX();for(let Q of Object.values($))for(let Z of Q??[])if(Z.family==="IPv4"&&!Z.internal)return Z.address;return null}async function j5($){let Q=new Set(g4().map((Z)=>Z.port));for(let Z=$;Z<$+100;Z++){if(Q.has(Z))continue;if(await _9(Z))return Z}throw Error(`No available port found in range ${$}-${$+99}`)}async function pX($){cX($);try{J0(`xcrun simctl bootstatus ${$} -b`,{encoding:"utf-8",stdio:"pipe",timeout:60000})}catch(Q){if(!F5($))console.error(`Device ${$} failed to reach booted state: ${Q.stderr||Q.message}`),process.exit(1)}}function dX($){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 nX($,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 T5($,Q,Z){W6("startHelper udid=%s port=%d detach=%s",$,Q,Z.detach);let J="127.0.0.1";N5(),A0($),N9(Q);let Y=B0(L0,`server-${$}.log`),X=A8(Y,"w"),{command:G,args:W}=dX(JQ($,Q,J,Z.stream)),K=U5(G,W,{detached:Z.detach,stdio:["ignore",X,X]});if(D8(X),Z.detach)K.unref();let z=await nX($);if(!z){if(K.pid)w$(K.pid);let V="";try{V=i0(Y,"utf-8").trim()}catch{}console.error(V?`Preview server failed:
|
|
167
167
|
${V}`:"Preview server failed to start"),process.exit(1)}return Z.detach?{pid:z.pid}:{pid:z.pid,child:K}}async function iX($,Q,Z,J,Y=!1){K6("follow devices=%o startPort=%d",$,Q);let X=$.length>0?$.map(s):(()=>{let L=G0();if(L)return[L];let B=E8();if(!B)console.error("No device specified and no available iOS simulator found."),process.exit(1);if(!Z)console.log(`No booted simulator — booting ${B.name}...`);return[B.udid]})(),G=new Map,W=[],K=Q;for(let L of X){let B=$0(L);if(B)if(Y&&!U6(B.streamSettings,J))w$(B.pid),A0(L);else{if(!Z){let O=_5(L)??L;if(X.length>1)console.log(`
|
|
168
168
|
==> ${O} (${L}) <==`);console.log(` Already running on port ${B.port}`),console.log(` Stream: ${B.streamUrl}`),console.log(` WebSocket: ${B.wsUrl}`)}W.push(B);continue}K=await j5(K);let{child:R}=await T5(L,K,{detach:!1,stream:J});if(R)G.set(L,R);let M=$0(L)??e0(L,K,"/","127.0.0.1");if(W.push(M),!Z){let O=_5(L)??L;if(X.length>1)console.log(`
|
|
169
169
|
==> ${O} (${L}) <==`);console.log(` Stream: ${M.streamUrl}`),console.log(` WebSocket: ${M.wsUrl}`),console.log(` Port: ${K}`)}K++}if(W.length===1){let L=W[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:W.map((L)=>({url:L.url,streamUrl:L.streamUrl,wsUrl:L.wsUrl,port:L.port,device:L.device}))}));if(G.size===0)return;let z=!1,V=(L)=>{if(z)return;if(z=!0,!Z)console.log(`
|
|
@@ -218,5 +218,5 @@ Examples:
|
|
|
218
218
|
serve-sim --list Show all running streams
|
|
219
219
|
serve-sim --kill Stop all streams`).action(async($,Q)=>{if(Q.list!==void 0){rX(typeof Q.list==="string"?Q.list:void 0);return}if(Q.kill!==void 0){tX(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=(L)=>Y0.getOptionValueSource(L)==="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"],W={...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}:{},...W}:{transport:"http",codec:Q.codec,...W},z=Q.port,V=Z("transport")||Z("codec")||J||G.some(Z);if(Q.detach){let L=await oX($,z??3100,K,V);aX(L)}else if(Q.preview===!1)await iX($,z??3100,!!Q.quiet,K,V);else await FG(z??3200,$,z!==void 0,Q.host,{stream:K,metricsCorsOrigins:Q.metricsCorsOrigin})});var y0=["-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(...y0).action(($,Q)=>QG($,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(...y0).action(($,Q,Z)=>ZG($,Q,Z.device));Y0.command("button").description("Send a hardware button press").argument("[name]","Button name","home").option(...y0).action(($,Q)=>GG($,Q.device));Y0.command("type").description("Type text (US keyboard only)").argument("[text...]","Text to type").option(...y0).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(...y0).action(($,Q)=>YG($,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(...y0).action(($,Q,Z)=>KG($,Q,Z.device));Y0.command("memory-warning").description("Simulate a memory warning on the device").option(...y0).action(($)=>WG($.device));Y0.command("event-log").description("Show recent simulator events").option(...y0).option("-j, --json","Print JSON").option("-n, --limit <count>","Maximum number of events").action(($)=>sX($.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(($)=>NG($));Y0.command("permissions").description("Manage app permissions (see `permissions` with no args for usage)").allowUnknownOption(!0).helpOption(!1).argument("[args...]").action(($)=>C9($));Y0.command("ui").description("Get or set simulator-wide UI options (see `ui --help`)").allowUnknownOption(!0).helpOption(!1).argument("[args...]").action(($)=>k9($));await Y0.parseAsync(process.argv);
|
|
220
220
|
|
|
221
|
-
//# debugId=
|
|
221
|
+
//# debugId=F1789E98B447EFDA64756E2164756E21
|
|
222
222
|
//# sourceMappingURL=serve-sim.js.map
|