@8bitbish/screenshot-service 1.2.0 → 1.2.1
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/dist/device.d.ts +10 -4
- package/dist/device.d.ts.map +1 -1
- package/dist/device.js +11 -5
- package/dist/device.js.map +1 -1
- package/dist/wizard/renderer/index.html +7 -10
- package/package.json +1 -1
package/dist/device.d.ts
CHANGED
|
@@ -17,10 +17,16 @@ export declare const MODEL_NAMES: Record<string, string>;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function getDeveloperModeStatus(python: string, udid?: string | null): Promise<boolean>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* Trigger the Developer Mode setup flow on the iPhone.
|
|
21
|
+
*
|
|
22
|
+
* iOS blocks the silent enable-developer-mode AMFI call when the device has a
|
|
23
|
+
* passcode set (which is effectively always). So instead we call
|
|
24
|
+
* reveal-developer-mode, which opens Settings → Privacy & Security → Developer
|
|
25
|
+
* Mode on the iPhone — the user still has to toggle it and restart, but they
|
|
26
|
+
* don't have to navigate Settings themselves.
|
|
27
|
+
*
|
|
28
|
+
* The device must be paired and trusted first. Resolves once the Settings
|
|
29
|
+
* jump-to is sent. State change happens after the user's on-device action.
|
|
24
30
|
*/
|
|
25
31
|
export declare function enableDeveloperMode(python: string, udid?: string | null): Promise<void>;
|
|
26
32
|
export declare function getDeviceInfo(python: string, udid?: string | null): Promise<DeviceInfo>;
|
package/dist/device.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../device.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CA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BAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBnG;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA2BhH"}
|
package/dist/device.js
CHANGED
|
@@ -56,13 +56,19 @@ async function getDeveloperModeStatus(python, udid = null) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
59
|
+
* Trigger the Developer Mode setup flow on the iPhone.
|
|
60
|
+
*
|
|
61
|
+
* iOS blocks the silent enable-developer-mode AMFI call when the device has a
|
|
62
|
+
* passcode set (which is effectively always). So instead we call
|
|
63
|
+
* reveal-developer-mode, which opens Settings → Privacy & Security → Developer
|
|
64
|
+
* Mode on the iPhone — the user still has to toggle it and restart, but they
|
|
65
|
+
* don't have to navigate Settings themselves.
|
|
66
|
+
*
|
|
67
|
+
* The device must be paired and trusted first. Resolves once the Settings
|
|
68
|
+
* jump-to is sent. State change happens after the user's on-device action.
|
|
63
69
|
*/
|
|
64
70
|
async function enableDeveloperMode(python, udid = null) {
|
|
65
|
-
await execFileAsync(python, pmd3Args(udid, "amfi", "
|
|
71
|
+
await execFileAsync(python, pmd3Args(udid, "amfi", "reveal-developer-mode"), { timeout: 10000 });
|
|
66
72
|
}
|
|
67
73
|
async function getDeviceInfo(python, udid = null) {
|
|
68
74
|
// usbmux list returns ALL connected devices; pick the one matching udid, else the first.
|
package/dist/device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../device.ts"],"names":[],"mappings":";;;AAmBA,4BAEC;AAmCD,wDASC;
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot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,MAAM,IAAI,GAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,4BAA4B,CAAkB,IAAI,IAAI,CAAC;QAC1E,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAA6B,IAAI,IAAI,CAAC;QAC1E,MAAM,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC;QAEhF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -568,9 +568,9 @@
|
|
|
568
568
|
let rightSide = '';
|
|
569
569
|
if (needsDevMode) {
|
|
570
570
|
if (devModeRequested.has(d.id)) {
|
|
571
|
-
rightSide = `<span class="row-pending">
|
|
571
|
+
rightSide = `<span class="row-pending">On iPhone: toggle on & restart</span>`;
|
|
572
572
|
} else {
|
|
573
|
-
rightSide = `<button class="row-action" data-action="enable-dev-mode">
|
|
573
|
+
rightSide = `<button class="row-action" data-action="enable-dev-mode">Open on iPhone</button>`;
|
|
574
574
|
}
|
|
575
575
|
} else if (!d.available && d.unavailableReason) {
|
|
576
576
|
rightSide = `<span class="status">${escapeHtml(d.unavailableReason)}</span>`;
|
|
@@ -595,20 +595,17 @@
|
|
|
595
595
|
|
|
596
596
|
async function sendEnableDevMode(deviceId, buttonEl) {
|
|
597
597
|
buttonEl.disabled = true;
|
|
598
|
-
buttonEl.textContent = '
|
|
598
|
+
buttonEl.textContent = 'Opening…';
|
|
599
599
|
try {
|
|
600
600
|
await window.wizard.enableIosDevMode(deviceId);
|
|
601
601
|
devModeRequested.add(deviceId);
|
|
602
|
-
// Re-render the row immediately so the
|
|
603
|
-
const
|
|
604
|
-
if (
|
|
605
|
-
const fresh = lastDevices.find(x => x.id === deviceId);
|
|
606
|
-
if (fresh) renderDeviceRow($('device-list'), fresh, new Set());
|
|
607
|
-
}
|
|
602
|
+
// Re-render the row immediately so the action swaps to instructions.
|
|
603
|
+
const fresh = lastDevices.find(x => x.id === deviceId);
|
|
604
|
+
if (fresh) renderDeviceRow($('device-list'), fresh, new Set());
|
|
608
605
|
} catch (err) {
|
|
609
606
|
buttonEl.disabled = false;
|
|
610
607
|
buttonEl.textContent = 'Try again';
|
|
611
|
-
alert(`Couldn't
|
|
608
|
+
alert(`Couldn't open Developer Mode on the iPhone: ${err.message || err}`);
|
|
612
609
|
}
|
|
613
610
|
}
|
|
614
611
|
function escapeHtml(s) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8bitbish/screenshot-service",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Capture screenshots and recordings from connected iPhone and Android devices, with a built-in visual setup wizard.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|