@limrun/ui 0.9.0-rc.10 → 0.9.0-rc.12
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 +0 -9
- package/dist/components/remote-control.d.ts +28 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +965 -945
- package/package.json +2 -15
- package/src/components/remote-control.tsx +65 -1
- package/src/index.ts +0 -3
- package/vite.config.ts +2 -6
- package/dist/components/device-install/device-install-dialog.d.ts +0 -5
- package/dist/components/device-install/index.d.ts +0 -2
- package/dist/core/device-install/apple/client.d.ts +0 -17
- package/dist/core/device-install/apple/crypto.d.ts +0 -20
- package/dist/core/device-install/apple/gsa-srp.d.ts +0 -26
- package/dist/core/device-install/apple/index.d.ts +0 -5
- package/dist/core/device-install/apple/provisioning.d.ts +0 -161
- package/dist/core/device-install/apple/relay.d.ts +0 -29
- package/dist/core/device-install/index.d.ts +0 -4
- package/dist/core/device-install/operations/index.d.ts +0 -6
- package/dist/core/device-install/operations/limbuild-client.d.ts +0 -28
- package/dist/core/device-install/operations/operations.d.ts +0 -32
- package/dist/core/device-install/operations/relay-client.d.ts +0 -25
- package/dist/core/device-install/operations/relay-protocol.d.ts +0 -27
- package/dist/core/device-install/operations/usbmux.d.ts +0 -32
- package/dist/core/device-install/operations/webusb.d.ts +0 -21
- package/dist/core/device-install/storage/browser-storage.d.ts +0 -44
- package/dist/core/device-install/storage/index.d.ts +0 -1
- package/dist/core/device-install/types.d.ts +0 -48
- package/dist/device-install/index.cjs +0 -1
- package/dist/device-install/index.d.ts +0 -3
- package/dist/device-install/index.js +0 -78
- package/dist/device-install/react.cjs +0 -1
- package/dist/device-install/react.d.ts +0 -1
- package/dist/device-install/react.js +0 -4
- package/dist/device-install-dialog-DJkKg8y6.mjs +0 -443
- package/dist/device-install-dialog-DfRemlSg.js +0 -2
- package/dist/device-install-dialog.css +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/use-device-install.d.ts +0 -73
- package/dist/use-device-install-CS201taa.js +0 -31
- package/dist/use-device-install-jz1BMMQx.mjs +0 -13627
- package/src/components/device-install/device-install-dialog.css +0 -325
- package/src/components/device-install/device-install-dialog.tsx +0 -495
- package/src/components/device-install/index.ts +0 -2
- package/src/core/device-install/apple/client.ts +0 -152
- package/src/core/device-install/apple/crypto.ts +0 -202
- package/src/core/device-install/apple/gsa-srp.ts +0 -127
- package/src/core/device-install/apple/index.ts +0 -5
- package/src/core/device-install/apple/provisioning.ts +0 -298
- package/src/core/device-install/apple/relay.ts +0 -221
- package/src/core/device-install/index.ts +0 -4
- package/src/core/device-install/operations/index.ts +0 -6
- package/src/core/device-install/operations/limbuild-client.ts +0 -104
- package/src/core/device-install/operations/operations.ts +0 -217
- package/src/core/device-install/operations/relay-client.ts +0 -255
- package/src/core/device-install/operations/relay-protocol.ts +0 -71
- package/src/core/device-install/operations/usbmux.ts +0 -270
- package/src/core/device-install/operations/webusb-dom.d.ts +0 -54
- package/src/core/device-install/operations/webusb.ts +0 -105
- package/src/core/device-install/storage/browser-storage.ts +0 -263
- package/src/core/device-install/storage/index.ts +0 -1
- package/src/core/device-install/types.ts +0 -65
- package/src/device-install/index.ts +0 -3
- package/src/device-install/react.ts +0 -1
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-device-install.ts +0 -1221
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ProvisioningProfileInfo, PutSigningAssetsInput, StoredPairRecord, StoredSigningAssets, PairRecordPayload } from '../types';
|
|
2
|
-
export declare function normalizeUDID(udid?: string): string;
|
|
3
|
-
export declare function normalizeBundleID(bundleID?: string): string;
|
|
4
|
-
export declare function getPairRecord(udid?: string): Promise<StoredPairRecord | undefined>;
|
|
5
|
-
export declare function putPairRecord(record: PairRecordPayload, metadata?: {
|
|
6
|
-
productName?: string;
|
|
7
|
-
}): Promise<StoredPairRecord>;
|
|
8
|
-
export declare function getSigningAssets({ deviceUDID, bundleID, }: {
|
|
9
|
-
deviceUDID?: string;
|
|
10
|
-
bundleID?: string;
|
|
11
|
-
}): Promise<StoredSigningAssets | undefined>;
|
|
12
|
-
export declare function getLatestSigningAssets(): Promise<StoredSigningAssets>;
|
|
13
|
-
export declare function getLatestSigningAssetsWithCertificate(teamID?: string): Promise<StoredSigningAssets>;
|
|
14
|
-
export declare function putSigningAssets(input: PutSigningAssetsInput): Promise<StoredSigningAssets>;
|
|
15
|
-
export declare function findSigningAssetsForBundle(bundleID?: string): Promise<StoredSigningAssets[]>;
|
|
16
|
-
export declare function profileContainsDevice(profile: ProvisioningProfileInfo, deviceUDID?: string): boolean;
|
|
17
|
-
export declare function profileMatchesBundleID(profile: ProvisioningProfileInfo, bundleID?: string): boolean;
|
|
18
|
-
export declare function parseProvisioningProfile(file: File): Promise<{
|
|
19
|
-
name: string | undefined;
|
|
20
|
-
uuid: string | undefined;
|
|
21
|
-
teamID: string;
|
|
22
|
-
applicationIdentifier: string | undefined;
|
|
23
|
-
bundleID: string | undefined;
|
|
24
|
-
provisionedDevices: string[];
|
|
25
|
-
expirationDate: string | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
export declare function parseProvisioningProfileBase64(base64: string): {
|
|
28
|
-
name: string | undefined;
|
|
29
|
-
uuid: string | undefined;
|
|
30
|
-
teamID: string;
|
|
31
|
-
applicationIdentifier: string | undefined;
|
|
32
|
-
bundleID: string | undefined;
|
|
33
|
-
provisionedDevices: string[];
|
|
34
|
-
expirationDate: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
export declare function parseProvisioningProfileBytes(bytes: Uint8Array): {
|
|
37
|
-
name: string | undefined;
|
|
38
|
-
uuid: string | undefined;
|
|
39
|
-
teamID: string;
|
|
40
|
-
applicationIdentifier: string | undefined;
|
|
41
|
-
bundleID: string | undefined;
|
|
42
|
-
provisionedDevices: string[];
|
|
43
|
-
expirationDate: string | undefined;
|
|
44
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './browser-storage';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export type DeviceInstallLog = (message: string, detail?: string) => void;
|
|
2
|
-
export type DeviceInstallStep = 'signing' | 'connect' | 'build' | 'install';
|
|
3
|
-
export type DeviceInstallStepStatus = 'idle' | 'active' | 'complete' | 'error';
|
|
4
|
-
export type DeviceInstallBusyAction = 'signing' | 'usb' | 'pair' | 'build' | 'install';
|
|
5
|
-
export type DeviceInstallBuildStatus = 'idle' | 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
6
|
-
export type BuildLogLine = {
|
|
7
|
-
type: 'command' | 'stdout' | 'stderr' | 'meta';
|
|
8
|
-
data: string;
|
|
9
|
-
};
|
|
10
|
-
export type DeviceHello = {
|
|
11
|
-
serialNumber?: string;
|
|
12
|
-
productName?: string;
|
|
13
|
-
manufacturerName?: string;
|
|
14
|
-
productId: number;
|
|
15
|
-
vendorId: number;
|
|
16
|
-
};
|
|
17
|
-
export type PairRecordPayload = {
|
|
18
|
-
udid: string;
|
|
19
|
-
pairRecordBase64: string;
|
|
20
|
-
};
|
|
21
|
-
export type StoredPairRecord = PairRecordPayload & {
|
|
22
|
-
productName?: string;
|
|
23
|
-
updatedAt: string;
|
|
24
|
-
};
|
|
25
|
-
export type ProvisioningProfileInfo = {
|
|
26
|
-
name?: string;
|
|
27
|
-
uuid?: string;
|
|
28
|
-
teamID?: string;
|
|
29
|
-
applicationIdentifier?: string;
|
|
30
|
-
bundleID?: string;
|
|
31
|
-
provisionedDevices: string[];
|
|
32
|
-
expirationDate?: string;
|
|
33
|
-
};
|
|
34
|
-
export type StoredSigningAssets = {
|
|
35
|
-
id: string;
|
|
36
|
-
deviceUDID?: string;
|
|
37
|
-
teamID?: string;
|
|
38
|
-
bundleID: string;
|
|
39
|
-
certificateID?: string;
|
|
40
|
-
certificateP12Base64: string;
|
|
41
|
-
certificateFileName?: string;
|
|
42
|
-
certificatePassword: string;
|
|
43
|
-
provisioningProfileBase64: string;
|
|
44
|
-
profileFileName?: string;
|
|
45
|
-
profile: ProvisioningProfileInfo;
|
|
46
|
-
updatedAt: string;
|
|
47
|
-
};
|
|
48
|
-
export type PutSigningAssetsInput = Omit<StoredSigningAssets, 'id' | 'updatedAt'>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CS201taa.js"),t=require("../device-install-dialog-DfRemlSg.js");exports.AppleGsaSrpClient=e.AppleGsaSrpClient;exports.RELAY_HEADER_BYTES=e.RELAY_HEADER_BYTES;exports.RELAY_PROTOCOL_VERSION=e.RELAY_PROTOCOL_VERSION;exports.RelayClient=e.RelayClient;exports.RelayMessageType=e.RelayMessageType;exports.claimUsbmux=e.claimUsbmux;exports.closeDeviceRelayTarget=e.closeDeviceRelayTarget;exports.closeUsbmuxSession=e.closeUsbmuxSession;exports.createAppleRelaySession=e.createAppleRelaySession;exports.createBundleIDRequest=e.createBundleIDRequest;exports.createDevelopmentProfileRequest=e.createDevelopmentProfileRequest;exports.createUsbmuxSession=e.createUsbmuxSession;exports.decodeFrame=e.decodeFrame;exports.decodeJson=e.decodeJson;exports.deleteAppleRelaySession=e.deleteAppleRelaySession;exports.deviceRelayWebSocketUrl=e.deviceRelayWebSocketUrl;exports.downloadCertificateRequest=e.downloadCertificateRequest;exports.downloadProfileRequest=e.downloadProfileRequest;exports.encodeFrame=e.encodeFrame;exports.encodeJson=e.encodeJson;exports.exportAppleCertificateP12=e.exportAppleCertificateP12;exports.fetchAppleAccountSession=e.fetchAppleAccountSession;exports.fetchLimbuildInfo=e.fetchLimbuildInfo;exports.findBundleIDRequest=e.findBundleIDRequest;exports.findDevelopmentCertificatesRequest=e.findDevelopmentCertificatesRequest;exports.findDevelopmentProfilesRequest=e.findDevelopmentProfilesRequest;exports.findDeviceRequest=e.findDeviceRequest;exports.findSigningAssetsForBundle=e.findSigningAssetsForBundle;exports.findUsbmuxCandidates=e.findUsbmuxCandidates;exports.generateAppleSigningKeyAndCSR=e.generateAppleSigningKeyAndCSR;exports.getBulkEndpoints=e.getBulkEndpoints;exports.getLatestSigningAssets=e.getLatestSigningAssets;exports.getLatestSigningAssetsWithCertificate=e.getLatestSigningAssetsWithCertificate;exports.getPairRecord=e.getPairRecord;exports.getReusableAppleSigningAssets=e.getReusableAppleSigningAssets;exports.getSigningAssets=e.getSigningAssets;exports.listTeamsRequest=e.listTeamsRequest;exports.normalizeBundleID=e.normalizeBundleID;exports.normalizeUDID=e.normalizeUDID;exports.openStream=e.openStream;exports.parseProvisioningProfile=e.parseProvisioningProfile;exports.parseProvisioningProfileBase64=e.parseProvisioningProfileBase64;exports.parseProvisioningProfileBytes=e.parseProvisioningProfileBytes;exports.profileContainsDevice=e.profileContainsDevice;exports.profileMatchesBundleID=e.profileMatchesBundleID;exports.proxyPhoneTwoFactorCode=e.proxyPhoneTwoFactorCode;exports.proxyProvisioningRequest=e.proxyProvisioningRequest;exports.proxySrpComplete=e.proxySrpComplete;exports.proxySrpInit=e.proxySrpInit;exports.proxyTwoFactorCode=e.proxyTwoFactorCode;exports.putAppleGeneratedSigningAssets=e.putAppleGeneratedSigningAssets;exports.putPairRecord=e.putPairRecord;exports.putSigningAssets=e.putSigningAssets;exports.receiveStreamData=e.receiveStreamData;exports.registerDeviceRequest=e.registerDeviceRequest;exports.requestAppleDevice=e.requestAppleDevice;exports.requestUSBAccess=e.requestUSBAccess;exports.selectDeveloperPortalTeam=e.selectDeveloperPortalTeam;exports.sendStreamData=e.sendStreamData;exports.startBrowserOwnedAppleIDLogin=e.startBrowserOwnedAppleIDLogin;exports.startInstallRelay=e.startInstallRelay;exports.startPairingRelay=e.startPairingRelay;exports.startSignedDeviceBuild=e.startSignedDeviceBuild;exports.storedSigningAssetsReusable=e.storedSigningAssetsReusable;exports.submitDevelopmentCSRRequest=e.submitDevelopmentCSRRequest;exports.teamIDCandidates=e.teamIDCandidates;exports.transferIn=e.transferIn;exports.transferOutWithZlp=e.transferOutWithZlp;exports.triggerPhoneTwoFactor=e.triggerPhoneTwoFactor;exports.triggerTrustedDeviceTwoFactor=e.triggerTrustedDeviceTwoFactor;exports.useDeviceInstall=e.useDeviceInstall;exports.watchBuildLogEvents=e.watchBuildLogEvents;exports.DeviceInstallDialog=t.DeviceInstallDialog;exports.DeviceInstallRelay=t.DeviceInstallDialog;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { A as a, O as t, N as i, R as n, P as r, a0 as o, L as l, Z as p, q as c, d, j as g, V as u, S as R, U as D, v as S, M as f, i as m, k as A, Q as v, T as P, e as y, D as C, F as I, f as q, b as B, c as x, a as T, ac as b, $ as h, g as w, a1 as E, a9 as L, aa as F, a6 as U, m as O, a8 as _, l as W, a5 as Y, a4 as k, W as z, af as G, ag as J, ah as M, ad as H, ae as K, C as N, E as V, x as Z, w as j, B as Q, p as X, a7 as $, ab as ee, Y as se, r as ae, _ as te, I as ie, o as ne, X as re, s as oe, K as le, J as pe, G as ce, n as de, h as ge, t as ue, a3 as Re, a2 as De, z as Se, y as fe, u as me, H as Ae } from "../use-device-install-jz1BMMQx.mjs";
|
|
2
|
-
import { D as Pe, D as ye } from "../device-install-dialog-DJkKg8y6.mjs";
|
|
3
|
-
export {
|
|
4
|
-
a as AppleGsaSrpClient,
|
|
5
|
-
Pe as DeviceInstallDialog,
|
|
6
|
-
ye as DeviceInstallRelay,
|
|
7
|
-
t as RELAY_HEADER_BYTES,
|
|
8
|
-
i as RELAY_PROTOCOL_VERSION,
|
|
9
|
-
n as RelayClient,
|
|
10
|
-
r as RelayMessageType,
|
|
11
|
-
o as claimUsbmux,
|
|
12
|
-
l as closeDeviceRelayTarget,
|
|
13
|
-
p as closeUsbmuxSession,
|
|
14
|
-
c as createAppleRelaySession,
|
|
15
|
-
d as createBundleIDRequest,
|
|
16
|
-
g as createDevelopmentProfileRequest,
|
|
17
|
-
u as createUsbmuxSession,
|
|
18
|
-
R as decodeFrame,
|
|
19
|
-
D as decodeJson,
|
|
20
|
-
S as deleteAppleRelaySession,
|
|
21
|
-
f as deviceRelayWebSocketUrl,
|
|
22
|
-
m as downloadCertificateRequest,
|
|
23
|
-
A as downloadProfileRequest,
|
|
24
|
-
v as encodeFrame,
|
|
25
|
-
P as encodeJson,
|
|
26
|
-
y as exportAppleCertificateP12,
|
|
27
|
-
C as fetchAppleAccountSession,
|
|
28
|
-
I as fetchLimbuildInfo,
|
|
29
|
-
q as findBundleIDRequest,
|
|
30
|
-
B as findDevelopmentCertificatesRequest,
|
|
31
|
-
x as findDevelopmentProfilesRequest,
|
|
32
|
-
T as findDeviceRequest,
|
|
33
|
-
b as findSigningAssetsForBundle,
|
|
34
|
-
h as findUsbmuxCandidates,
|
|
35
|
-
w as generateAppleSigningKeyAndCSR,
|
|
36
|
-
E as getBulkEndpoints,
|
|
37
|
-
L as getLatestSigningAssets,
|
|
38
|
-
F as getLatestSigningAssetsWithCertificate,
|
|
39
|
-
U as getPairRecord,
|
|
40
|
-
O as getReusableAppleSigningAssets,
|
|
41
|
-
_ as getSigningAssets,
|
|
42
|
-
W as listTeamsRequest,
|
|
43
|
-
Y as normalizeBundleID,
|
|
44
|
-
k as normalizeUDID,
|
|
45
|
-
z as openStream,
|
|
46
|
-
G as parseProvisioningProfile,
|
|
47
|
-
J as parseProvisioningProfileBase64,
|
|
48
|
-
M as parseProvisioningProfileBytes,
|
|
49
|
-
H as profileContainsDevice,
|
|
50
|
-
K as profileMatchesBundleID,
|
|
51
|
-
N as proxyPhoneTwoFactorCode,
|
|
52
|
-
V as proxyProvisioningRequest,
|
|
53
|
-
Z as proxySrpComplete,
|
|
54
|
-
j as proxySrpInit,
|
|
55
|
-
Q as proxyTwoFactorCode,
|
|
56
|
-
X as putAppleGeneratedSigningAssets,
|
|
57
|
-
$ as putPairRecord,
|
|
58
|
-
ee as putSigningAssets,
|
|
59
|
-
se as receiveStreamData,
|
|
60
|
-
ae as registerDeviceRequest,
|
|
61
|
-
te as requestAppleDevice,
|
|
62
|
-
ie as requestUSBAccess,
|
|
63
|
-
ne as selectDeveloperPortalTeam,
|
|
64
|
-
re as sendStreamData,
|
|
65
|
-
oe as startBrowserOwnedAppleIDLogin,
|
|
66
|
-
le as startInstallRelay,
|
|
67
|
-
pe as startPairingRelay,
|
|
68
|
-
ce as startSignedDeviceBuild,
|
|
69
|
-
de as storedSigningAssetsReusable,
|
|
70
|
-
ge as submitDevelopmentCSRRequest,
|
|
71
|
-
ue as teamIDCandidates,
|
|
72
|
-
Re as transferIn,
|
|
73
|
-
De as transferOutWithZlp,
|
|
74
|
-
Se as triggerPhoneTwoFactor,
|
|
75
|
-
fe as triggerTrustedDeviceTwoFactor,
|
|
76
|
-
me as useDeviceInstall,
|
|
77
|
-
Ae as watchBuildLogEvents
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CS201taa.js");exports.useDeviceInstall=e.useDeviceInstall;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useDeviceInstall } from '../hooks/use-device-install';
|
|
@@ -1,443 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useState as p, useId as T, useEffect as D } from "react";
|
|
3
|
-
import { u as k } from "./use-device-install-jz1BMMQx.mjs";
|
|
4
|
-
import './device-install-dialog.css';function C(t) {
|
|
5
|
-
var r, s, a = "";
|
|
6
|
-
if (typeof t == "string" || typeof t == "number") a += t;
|
|
7
|
-
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
8
|
-
var d = t.length;
|
|
9
|
-
for (r = 0; r < d; r++) t[r] && (s = C(t[r])) && (a && (a += " "), a += s);
|
|
10
|
-
} else for (s in t) t[s] && (a && (a += " "), a += s);
|
|
11
|
-
return a;
|
|
12
|
-
}
|
|
13
|
-
function g() {
|
|
14
|
-
for (var t, r, s = 0, a = "", d = arguments.length; s < d; s++) (t = arguments[s]) && (r = C(t)) && (a && (a += " "), a += r);
|
|
15
|
-
return a;
|
|
16
|
-
}
|
|
17
|
-
const x = [
|
|
18
|
-
{
|
|
19
|
-
id: "signing",
|
|
20
|
-
title: "Prepare signing",
|
|
21
|
-
description: "Choose Apple ID login or upload certificates for a registered developer device."
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: "build",
|
|
25
|
-
title: "Build for device",
|
|
26
|
-
description: "Start the signed iPhone build before connecting over USB."
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: "connect",
|
|
30
|
-
title: "Connect and pair",
|
|
31
|
-
description: "After the build succeeds, connect the iPhone with WebUSB and pair this browser."
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: "install",
|
|
35
|
-
title: "Start installation",
|
|
36
|
-
description: "Relay the last successful device build to the paired iPhone."
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
function $({
|
|
40
|
-
disabled: t,
|
|
41
|
-
...r
|
|
42
|
-
}) {
|
|
43
|
-
const [s, a] = p(!1), [d, h] = p("signing"), [o, N] = p(), [m, w] = p(""), [_, P] = p(""), [b, I] = p(""), y = T(), e = k(r);
|
|
44
|
-
D(() => {
|
|
45
|
-
h(e.currentStep);
|
|
46
|
-
}, [e.currentStep]);
|
|
47
|
-
const S = (c, u) => {
|
|
48
|
-
e.setSigningFiles({
|
|
49
|
-
[c]: u.currentTarget.files?.[0]
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
return /* @__PURE__ */ l("div", { className: "lr-device-install", children: [
|
|
53
|
-
/* @__PURE__ */ i(
|
|
54
|
-
"button",
|
|
55
|
-
{
|
|
56
|
-
type: "button",
|
|
57
|
-
className: "lr-device-install__trigger",
|
|
58
|
-
disabled: t || !r.apiUrl,
|
|
59
|
-
onClick: () => a(!0),
|
|
60
|
-
children: "Install to iPhone"
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
s && /* @__PURE__ */ i("div", { className: "lr-device-install__backdrop", role: "presentation", children: /* @__PURE__ */ l(
|
|
64
|
-
"section",
|
|
65
|
-
{
|
|
66
|
-
"aria-labelledby": y,
|
|
67
|
-
"aria-modal": "true",
|
|
68
|
-
className: "lr-device-install__dialog",
|
|
69
|
-
role: "dialog",
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ l("header", { className: "lr-device-install__header", children: [
|
|
72
|
-
/* @__PURE__ */ l("div", { children: [
|
|
73
|
-
/* @__PURE__ */ i("h2", { id: y, children: "Install to a real iPhone" }),
|
|
74
|
-
/* @__PURE__ */ i("p", { children: "Prepare signing, build for the registered device, connect and pair, then install from this browser." })
|
|
75
|
-
] }),
|
|
76
|
-
/* @__PURE__ */ i("button", { type: "button", className: "lr-device-install__icon-button", onClick: () => a(!1), children: "Close" })
|
|
77
|
-
] }),
|
|
78
|
-
e.error && /* @__PURE__ */ i("div", { className: "lr-device-install__error", children: e.error }),
|
|
79
|
-
/* @__PURE__ */ i("div", { className: "lr-device-install__steps", children: x.map((c, u) => /* @__PURE__ */ l(
|
|
80
|
-
B,
|
|
81
|
-
{
|
|
82
|
-
index: u + 1,
|
|
83
|
-
step: c,
|
|
84
|
-
active: e.currentStep === c.id,
|
|
85
|
-
open: d === c.id,
|
|
86
|
-
status: e.stepStatuses[c.id],
|
|
87
|
-
onToggle: () => h(c.id),
|
|
88
|
-
children: [
|
|
89
|
-
c.id === "signing" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
|
|
90
|
-
/* @__PURE__ */ l("div", { className: "lr-device-install__choice-grid", children: [
|
|
91
|
-
/* @__PURE__ */ l(
|
|
92
|
-
"button",
|
|
93
|
-
{
|
|
94
|
-
type: "button",
|
|
95
|
-
className: g(
|
|
96
|
-
"lr-device-install__choice",
|
|
97
|
-
o === "apple-id" && "lr-device-install__choice--active"
|
|
98
|
-
),
|
|
99
|
-
onClick: () => N("apple-id"),
|
|
100
|
-
children: [
|
|
101
|
-
/* @__PURE__ */ i("strong", { children: "Apple ID login" }),
|
|
102
|
-
/* @__PURE__ */ i("span", { children: "Sign in, choose team, bundle ID, and registered devices, then generate signing assets." })
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ l(
|
|
107
|
-
"button",
|
|
108
|
-
{
|
|
109
|
-
type: "button",
|
|
110
|
-
className: g(
|
|
111
|
-
"lr-device-install__choice",
|
|
112
|
-
o === "upload" && "lr-device-install__choice--active"
|
|
113
|
-
),
|
|
114
|
-
onClick: () => N("upload"),
|
|
115
|
-
children: [
|
|
116
|
-
/* @__PURE__ */ i("strong", { children: "Upload certificates" }),
|
|
117
|
-
/* @__PURE__ */ i("span", { children: "Use an existing .p12 certificate and provisioning profile." })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
] }),
|
|
122
|
-
o === "apple-id" && /* @__PURE__ */ l("div", { className: "lr-device-install__section-panel", children: [
|
|
123
|
-
/* @__PURE__ */ l("div", { className: "lr-device-install__grid", children: [
|
|
124
|
-
/* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
125
|
-
/* @__PURE__ */ i("span", { children: "Apple ID" }),
|
|
126
|
-
/* @__PURE__ */ i(
|
|
127
|
-
"input",
|
|
128
|
-
{
|
|
129
|
-
type: "email",
|
|
130
|
-
autoComplete: "username",
|
|
131
|
-
placeholder: "name@example.com",
|
|
132
|
-
value: m,
|
|
133
|
-
onChange: (n) => w(n.currentTarget.value)
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
] }),
|
|
137
|
-
/* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
138
|
-
/* @__PURE__ */ i("span", { children: "Apple ID password" }),
|
|
139
|
-
/* @__PURE__ */ i(
|
|
140
|
-
"input",
|
|
141
|
-
{
|
|
142
|
-
type: "password",
|
|
143
|
-
autoComplete: "current-password",
|
|
144
|
-
placeholder: "Password stays in this browser",
|
|
145
|
-
value: _,
|
|
146
|
-
onChange: (n) => P(n.currentTarget.value)
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
] }),
|
|
150
|
-
!e.hasReusableAppleCertificate && /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
151
|
-
/* @__PURE__ */ i("span", { children: "Generated .p12 password" }),
|
|
152
|
-
/* @__PURE__ */ i(
|
|
153
|
-
"input",
|
|
154
|
-
{
|
|
155
|
-
type: "password",
|
|
156
|
-
placeholder: "Used when exporting Apple certificate",
|
|
157
|
-
onChange: (n) => e.setSigningFiles({ certificatePassword: n.currentTarget.value })
|
|
158
|
-
}
|
|
159
|
-
)
|
|
160
|
-
] })
|
|
161
|
-
] }),
|
|
162
|
-
/* @__PURE__ */ l("div", { className: "lr-device-install__actions", children: [
|
|
163
|
-
/* @__PURE__ */ i(
|
|
164
|
-
"button",
|
|
165
|
-
{
|
|
166
|
-
type: "button",
|
|
167
|
-
className: "lr-device-install__secondary",
|
|
168
|
-
disabled: t || !r.apiUrl || !m || !_ || e.busyAction === "signing",
|
|
169
|
-
onClick: () => void e.startAppleIDLogin({
|
|
170
|
-
accountName: m,
|
|
171
|
-
password: _
|
|
172
|
-
}),
|
|
173
|
-
children: e.appleSigningStatus === "authenticating" ? "Signing in..." : "Sign in with Apple ID"
|
|
174
|
-
}
|
|
175
|
-
),
|
|
176
|
-
/* @__PURE__ */ l("span", { className: "lr-device-install__hint", children: [
|
|
177
|
-
"Apple password is used only by browser-side SRP. Status: ",
|
|
178
|
-
e.appleSigningStatus
|
|
179
|
-
] })
|
|
180
|
-
] }),
|
|
181
|
-
e.appleSigningStatus === "two-factor-required" && /* @__PURE__ */ l("div", { className: "lr-device-install__grid", children: [
|
|
182
|
-
/* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
183
|
-
/* @__PURE__ */ i("span", { children: "Two-factor code" }),
|
|
184
|
-
/* @__PURE__ */ i(
|
|
185
|
-
"input",
|
|
186
|
-
{
|
|
187
|
-
type: "text",
|
|
188
|
-
inputMode: "numeric",
|
|
189
|
-
autoComplete: "one-time-code",
|
|
190
|
-
value: b,
|
|
191
|
-
onChange: (n) => I(n.currentTarget.value)
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
] }),
|
|
195
|
-
/* @__PURE__ */ i(
|
|
196
|
-
"button",
|
|
197
|
-
{
|
|
198
|
-
type: "button",
|
|
199
|
-
className: "lr-device-install__secondary",
|
|
200
|
-
disabled: !b || e.busyAction === "signing",
|
|
201
|
-
onClick: () => void e.submitAppleTwoFactorCode(b),
|
|
202
|
-
children: "Submit Apple ID code"
|
|
203
|
-
}
|
|
204
|
-
)
|
|
205
|
-
] }),
|
|
206
|
-
e.appleTeams.length > 0 && /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
207
|
-
/* @__PURE__ */ i("span", { children: "Apple Developer team" }),
|
|
208
|
-
/* @__PURE__ */ i(
|
|
209
|
-
"select",
|
|
210
|
-
{
|
|
211
|
-
value: e.selectedAppleTeamID ?? "",
|
|
212
|
-
onChange: (n) => e.setSelectedAppleTeamID(n.currentTarget.value || void 0),
|
|
213
|
-
children: e.appleTeams.map((n, f) => {
|
|
214
|
-
const v = n.teamId ?? (n.providerId === void 0 ? void 0 : String(n.providerId)) ?? n.publicProviderId ?? "";
|
|
215
|
-
return /* @__PURE__ */ l("option", { value: v, children: [
|
|
216
|
-
n.name ?? "Apple Developer Team",
|
|
217
|
-
" ",
|
|
218
|
-
v ? `(${v})` : ""
|
|
219
|
-
] }, `${v}-${f}`);
|
|
220
|
-
})
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
] }),
|
|
224
|
-
e.appleDevices.length > 0 && /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
225
|
-
/* @__PURE__ */ i("span", { children: "Apple Developer devices" }),
|
|
226
|
-
/* @__PURE__ */ i(
|
|
227
|
-
"select",
|
|
228
|
-
{
|
|
229
|
-
multiple: !0,
|
|
230
|
-
value: e.selectedAppleDeviceIDs,
|
|
231
|
-
onChange: (n) => e.setSelectedAppleDeviceIDs(
|
|
232
|
-
Array.from(n.currentTarget.selectedOptions).map((f) => f.value)
|
|
233
|
-
),
|
|
234
|
-
children: e.appleDevices.map((n) => /* @__PURE__ */ l(
|
|
235
|
-
"option",
|
|
236
|
-
{
|
|
237
|
-
value: n.deviceId ?? "",
|
|
238
|
-
children: [
|
|
239
|
-
n.name ?? n.model ?? "Apple device",
|
|
240
|
-
" ",
|
|
241
|
-
n.deviceNumber ?? ""
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
n.deviceId ?? n.deviceNumber
|
|
245
|
-
))
|
|
246
|
-
}
|
|
247
|
-
)
|
|
248
|
-
] }),
|
|
249
|
-
e.applePortalSummary && /* @__PURE__ */ l("p", { className: "lr-device-install__hint", children: [
|
|
250
|
-
"Found ",
|
|
251
|
-
e.applePortalSummary.certificateCount,
|
|
252
|
-
" certificates and",
|
|
253
|
-
" ",
|
|
254
|
-
e.applePortalSummary.profileCount,
|
|
255
|
-
" provisioning profiles."
|
|
256
|
-
] }),
|
|
257
|
-
e.hasReusableAppleCertificate && /* @__PURE__ */ i("p", { className: "lr-device-install__hint", children: "Reusing the certificate and private key stored in this browser." }),
|
|
258
|
-
/* @__PURE__ */ i(
|
|
259
|
-
"button",
|
|
260
|
-
{
|
|
261
|
-
type: "button",
|
|
262
|
-
className: "lr-device-install__primary",
|
|
263
|
-
disabled: t || !e.canPrepareAppleSigningAssets,
|
|
264
|
-
onClick: () => void e.prepareAppleSigningAssets(),
|
|
265
|
-
children: e.appleSigningStatus === "preparing-assets" ? "Preparing signing assets..." : "Generate certificate and profile"
|
|
266
|
-
}
|
|
267
|
-
)
|
|
268
|
-
] }),
|
|
269
|
-
o === "upload" && /* @__PURE__ */ l("div", { className: "lr-device-install__section-panel", children: [
|
|
270
|
-
/* @__PURE__ */ l("div", { className: "lr-device-install__grid", children: [
|
|
271
|
-
/* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
272
|
-
/* @__PURE__ */ i("span", { children: "Certificate (.p12)" }),
|
|
273
|
-
/* @__PURE__ */ i(
|
|
274
|
-
"input",
|
|
275
|
-
{
|
|
276
|
-
type: "file",
|
|
277
|
-
accept: ".p12,application/x-pkcs12",
|
|
278
|
-
onChange: (n) => S("certificateFile", n)
|
|
279
|
-
}
|
|
280
|
-
)
|
|
281
|
-
] }),
|
|
282
|
-
/* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
283
|
-
/* @__PURE__ */ i("span", { children: "Provisioning profile" }),
|
|
284
|
-
/* @__PURE__ */ i(
|
|
285
|
-
"input",
|
|
286
|
-
{
|
|
287
|
-
type: "file",
|
|
288
|
-
accept: ".mobileprovision",
|
|
289
|
-
onChange: (n) => S("provisioningProfileFile", n)
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
] }),
|
|
293
|
-
/* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
|
|
294
|
-
/* @__PURE__ */ i("span", { children: "Uploaded .p12 password" }),
|
|
295
|
-
/* @__PURE__ */ i(
|
|
296
|
-
"input",
|
|
297
|
-
{
|
|
298
|
-
type: "password",
|
|
299
|
-
placeholder: "Export password",
|
|
300
|
-
onChange: (n) => e.setSigningFiles({ certificatePassword: n.currentTarget.value })
|
|
301
|
-
}
|
|
302
|
-
)
|
|
303
|
-
] })
|
|
304
|
-
] }),
|
|
305
|
-
/* @__PURE__ */ i("p", { className: "lr-device-install__hint", children: "The provisioning profile will be checked against the connected iPhone before installation." })
|
|
306
|
-
] }),
|
|
307
|
-
e.hasSigningAssets && /* @__PURE__ */ i("p", { children: "Signing assets are stored in this browser for the selected bundle and device." })
|
|
308
|
-
] }),
|
|
309
|
-
c.id === "connect" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
|
|
310
|
-
/* @__PURE__ */ i("p", { children: "WebUSB works in Chromium browsers on secure origins. Once the build succeeds, connect the iPhone over USB, approve the browser permission prompt, then pair this browser." }),
|
|
311
|
-
/* @__PURE__ */ l("div", { className: "lr-device-install__actions", children: [
|
|
312
|
-
/* @__PURE__ */ i(
|
|
313
|
-
"button",
|
|
314
|
-
{
|
|
315
|
-
type: "button",
|
|
316
|
-
className: "lr-device-install__primary",
|
|
317
|
-
disabled: t || !e.canRequestUSBAccess,
|
|
318
|
-
onClick: () => void e.requestUSBAccess(),
|
|
319
|
-
children: e.busyAction === "usb" ? "Selecting iPhone..." : "Allow USB access"
|
|
320
|
-
}
|
|
321
|
-
),
|
|
322
|
-
/* @__PURE__ */ i(
|
|
323
|
-
"button",
|
|
324
|
-
{
|
|
325
|
-
type: "button",
|
|
326
|
-
className: "lr-device-install__secondary",
|
|
327
|
-
disabled: t || !e.canPairBrowser,
|
|
328
|
-
onClick: () => void e.pairBrowser(),
|
|
329
|
-
children: e.busyAction === "pair" ? "Pairing..." : e.pairConfirmationRequired ? "Confirm pair record" : "Pair browser"
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
] }),
|
|
333
|
-
e.device && /* @__PURE__ */ i("div", { className: "lr-device-install__device", children: `${e.device.productName ?? "iPhone"} ${e.device.serialNumber ?? ""}`.trim() }),
|
|
334
|
-
e.pairConfirmationRequired && /* @__PURE__ */ l("p", { children: [
|
|
335
|
-
"Unlock the iPhone and tap ",
|
|
336
|
-
/* @__PURE__ */ i("strong", { children: "Trust" }),
|
|
337
|
-
" in the system dialog, then confirm the pair record."
|
|
338
|
-
] }),
|
|
339
|
-
/* @__PURE__ */ i("p", { children: e.hasPairRecord ? "Pair record is stored locally. Continue to installation." : "Pair this browser once before installing." })
|
|
340
|
-
] }),
|
|
341
|
-
c.id === "build" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
|
|
342
|
-
/* @__PURE__ */ l("div", { className: "lr-device-install__checklist", children: [
|
|
343
|
-
/* @__PURE__ */ i(A, { label: "Signing assets", ready: e.hasSigningInputs }),
|
|
344
|
-
/* @__PURE__ */ i(A, { label: "Device build", ready: e.buildStatus === "succeeded" ? !0 : void 0, pendingText: "Not started" })
|
|
345
|
-
] }),
|
|
346
|
-
/* @__PURE__ */ i(
|
|
347
|
-
"button",
|
|
348
|
-
{
|
|
349
|
-
type: "button",
|
|
350
|
-
className: "lr-device-install__primary",
|
|
351
|
-
disabled: t || !e.canBuild,
|
|
352
|
-
onClick: () => void e.startDeviceBuild(),
|
|
353
|
-
children: e.busyAction === "build" ? "Starting build..." : "Start device build"
|
|
354
|
-
}
|
|
355
|
-
),
|
|
356
|
-
/* @__PURE__ */ l(
|
|
357
|
-
"details",
|
|
358
|
-
{
|
|
359
|
-
className: "lr-device-install__build-logs",
|
|
360
|
-
open: e.buildLogPanelOpen,
|
|
361
|
-
onToggle: (n) => e.setBuildLogPanelOpen(n.currentTarget.open),
|
|
362
|
-
children: [
|
|
363
|
-
/* @__PURE__ */ l("summary", { children: [
|
|
364
|
-
"Build logs (",
|
|
365
|
-
e.buildStatus,
|
|
366
|
-
")"
|
|
367
|
-
] }),
|
|
368
|
-
/* @__PURE__ */ i("pre", { children: e.buildLogs.length > 0 ? e.buildLogs.filter((n) => n.type !== "meta").map((n) => n.data).join(`
|
|
369
|
-
`) : "Build logs will appear here while the device build is running." })
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
)
|
|
373
|
-
] }),
|
|
374
|
-
c.id === "install" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
|
|
375
|
-
/* @__PURE__ */ i(
|
|
376
|
-
"button",
|
|
377
|
-
{
|
|
378
|
-
type: "button",
|
|
379
|
-
className: "lr-device-install__primary",
|
|
380
|
-
disabled: t || !e.canInstall,
|
|
381
|
-
onClick: () => void e.startInstallation(),
|
|
382
|
-
children: e.busyAction === "install" ? "Installing..." : "Install last build"
|
|
383
|
-
}
|
|
384
|
-
),
|
|
385
|
-
/* @__PURE__ */ i("button", { type: "button", className: "lr-device-install__secondary", onClick: e.stopRelay, children: "Stop relay" })
|
|
386
|
-
] })
|
|
387
|
-
]
|
|
388
|
-
},
|
|
389
|
-
c.id
|
|
390
|
-
)) }),
|
|
391
|
-
/* @__PURE__ */ l("footer", { className: "lr-device-install__logs", children: [
|
|
392
|
-
/* @__PURE__ */ i("h3", { children: "Progress" }),
|
|
393
|
-
/* @__PURE__ */ i("ol", { children: e.logs.map((c, u) => /* @__PURE__ */ i("li", { children: c }, `${u}-${c.slice(0, 24)}`)) })
|
|
394
|
-
] })
|
|
395
|
-
]
|
|
396
|
-
}
|
|
397
|
-
) })
|
|
398
|
-
] });
|
|
399
|
-
}
|
|
400
|
-
function B({
|
|
401
|
-
index: t,
|
|
402
|
-
step: r,
|
|
403
|
-
active: s,
|
|
404
|
-
open: a,
|
|
405
|
-
status: d,
|
|
406
|
-
onToggle: h,
|
|
407
|
-
children: o
|
|
408
|
-
}) {
|
|
409
|
-
return /* @__PURE__ */ l("article", { className: g("lr-device-install__step", s && "lr-device-install__step--active"), children: [
|
|
410
|
-
/* @__PURE__ */ l(
|
|
411
|
-
"button",
|
|
412
|
-
{
|
|
413
|
-
type: "button",
|
|
414
|
-
className: "lr-device-install__step-header",
|
|
415
|
-
"aria-expanded": a,
|
|
416
|
-
onClick: h,
|
|
417
|
-
children: [
|
|
418
|
-
/* @__PURE__ */ i("div", { className: "lr-device-install__step-number", children: t }),
|
|
419
|
-
/* @__PURE__ */ l("div", { children: [
|
|
420
|
-
/* @__PURE__ */ i("h3", { children: r.title }),
|
|
421
|
-
/* @__PURE__ */ i("p", { children: r.description })
|
|
422
|
-
] }),
|
|
423
|
-
/* @__PURE__ */ i("span", { className: g("lr-device-install__status", `lr-device-install__status--${d}`), children: d === "complete" ? "✓ Completed" : d })
|
|
424
|
-
]
|
|
425
|
-
}
|
|
426
|
-
),
|
|
427
|
-
a && o
|
|
428
|
-
] });
|
|
429
|
-
}
|
|
430
|
-
function A({
|
|
431
|
-
label: t,
|
|
432
|
-
ready: r,
|
|
433
|
-
pendingText: s = "Not ready"
|
|
434
|
-
}) {
|
|
435
|
-
return /* @__PURE__ */ l("div", { className: "lr-device-install__check-row", children: [
|
|
436
|
-
/* @__PURE__ */ i("span", { children: t }),
|
|
437
|
-
/* @__PURE__ */ i("strong", { children: r === void 0 ? s : r ? "Ready" : "Needs attention" })
|
|
438
|
-
] });
|
|
439
|
-
}
|
|
440
|
-
export {
|
|
441
|
-
$ as D,
|
|
442
|
-
g as c
|
|
443
|
-
};
|