@limrun/ui 0.9.0-rc.1 → 0.9.0-rc.10
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/components/inspect-overlay.d.ts +33 -0
- package/dist/components/remote-control.d.ts +86 -0
- package/dist/core/ax-fetcher.d.ts +49 -0
- package/dist/core/ax-tree.d.ts +99 -0
- package/dist/core/device-install/apple/client.d.ts +1 -0
- package/dist/core/device-install/apple/provisioning.d.ts +42 -31
- package/dist/core/device-install/apple/relay.d.ts +5 -9
- package/dist/core/device-install/storage/browser-storage.d.ts +19 -0
- package/dist/core/device-install/types.d.ts +2 -2
- package/dist/device-install/index.cjs +1 -9
- package/dist/device-install/index.js +76 -210
- package/dist/device-install/react.cjs +1 -1
- package/dist/device-install/react.js +1 -1
- package/dist/device-install-dialog-DJkKg8y6.mjs +443 -0
- package/dist/device-install-dialog-DfRemlSg.js +2 -0
- package/dist/device-install-dialog.css +1 -1
- package/dist/hooks/use-device-install.d.ts +21 -3
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1485 -778
- package/dist/use-device-install-CS201taa.js +31 -0
- package/dist/use-device-install-jz1BMMQx.mjs +13627 -0
- package/package.json +7 -3
- package/src/components/device-install/device-install-dialog.css +82 -1
- package/src/components/device-install/device-install-dialog.tsx +319 -187
- package/src/components/inspect-overlay.css +223 -0
- package/src/components/inspect-overlay.tsx +437 -0
- package/src/components/remote-control.tsx +547 -9
- package/src/core/ax-fetcher.test.ts +418 -0
- package/src/core/ax-fetcher.ts +377 -0
- package/src/core/ax-tree.test.ts +491 -0
- package/src/core/ax-tree.ts +416 -0
- package/src/core/device-install/apple/client.ts +92 -4
- package/src/core/device-install/apple/provisioning.ts +67 -24
- package/src/core/device-install/apple/relay.ts +121 -205
- package/src/core/device-install/operations/limbuild-client.ts +1 -1
- package/src/core/device-install/storage/browser-storage.ts +26 -1
- package/src/core/device-install/types.ts +2 -2
- package/src/demo.tsx +93 -10
- package/src/hooks/use-device-install.ts +766 -67
- package/src/index.ts +19 -1
- package/vitest.config.ts +23 -0
- package/dist/device-install-dialog-CTwVViYY.js +0 -2
- package/dist/device-install-dialog-zzKJu7SM.mjs +0 -328
- package/dist/use-device-install-CgrOKKyi.mjs +0 -13042
- package/dist/use-device-install-DDKRf6IL.js +0 -23
|
@@ -1,212 +1,78 @@
|
|
|
1
|
-
import { f as o } from "../use-device-install-
|
|
2
|
-
import {
|
|
3
|
-
import { D as Ve, D as We } from "../device-install-dialog-zzKJu7SM.mjs";
|
|
4
|
-
const y = {
|
|
5
|
-
name: "RSASSA-PKCS1-v1_5",
|
|
6
|
-
modulusLength: 2048,
|
|
7
|
-
publicExponent: new Uint8Array([1, 0, 1]),
|
|
8
|
-
hash: "SHA-256"
|
|
9
|
-
};
|
|
10
|
-
async function K(e) {
|
|
11
|
-
if (!crypto.subtle)
|
|
12
|
-
throw new Error("WebCrypto is not available in this browser.");
|
|
13
|
-
const t = await crypto.subtle.generateKey(y, !0, ["sign", "verify"]), r = new Uint8Array(await crypto.subtle.exportKey("spki", t.publicKey)), s = c(
|
|
14
|
-
S(0),
|
|
15
|
-
g(e),
|
|
16
|
-
r,
|
|
17
|
-
A(0, new Uint8Array())
|
|
18
|
-
), n = new Uint8Array(
|
|
19
|
-
await crypto.subtle.sign("RSASSA-PKCS1-v1_5", t.privateKey, h(s))
|
|
20
|
-
), a = c(
|
|
21
|
-
s,
|
|
22
|
-
c(p("1.2.840.113549.1.1.11"), R()),
|
|
23
|
-
D(n)
|
|
24
|
-
), d = new Uint8Array(await crypto.subtle.exportKey("pkcs8", t.privateKey));
|
|
25
|
-
return {
|
|
26
|
-
privateKey: t.privateKey,
|
|
27
|
-
privateKeyPKCS8Base64: u(d),
|
|
28
|
-
publicKeySPKIBase64: u(r),
|
|
29
|
-
csrPEM: B("CERTIFICATE REQUEST", a),
|
|
30
|
-
csrBase64: u(a)
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function U(e) {
|
|
34
|
-
if (!e.certificateBase64 && !e.certificatePEM)
|
|
35
|
-
throw new Error("certificateBase64 or certificatePEM is required.");
|
|
36
|
-
const t = o.pki.privateKeyFromPem(
|
|
37
|
-
E("PRIVATE KEY", e.privateKeyPKCS8Base64)
|
|
38
|
-
), r = e.certificatePEM ? o.pki.certificateFromPem(e.certificatePEM) : o.pki.certificateFromAsn1(
|
|
39
|
-
o.asn1.fromDer(o.util.createBuffer(P(e.certificateBase64)))
|
|
40
|
-
), s = o.pkcs12.toPkcs12Asn1(t, [r], e.password, {
|
|
41
|
-
algorithm: "3des",
|
|
42
|
-
friendlyName: e.friendlyName
|
|
43
|
-
}), n = o.asn1.toDer(s).getBytes();
|
|
44
|
-
return I(n);
|
|
45
|
-
}
|
|
46
|
-
function g(e) {
|
|
47
|
-
const t = [f("2.5.4.3", b(e.commonName))];
|
|
48
|
-
return e.emailAddress && t.push(f("1.2.840.113549.1.9.1", w(e.emailAddress))), c(...t);
|
|
49
|
-
}
|
|
50
|
-
function f(e, t) {
|
|
51
|
-
return m(c(p(e), t));
|
|
52
|
-
}
|
|
53
|
-
function c(...e) {
|
|
54
|
-
return i(48, l(...e));
|
|
55
|
-
}
|
|
56
|
-
function m(...e) {
|
|
57
|
-
return i(49, l(...e));
|
|
58
|
-
}
|
|
59
|
-
function A(e, t) {
|
|
60
|
-
return i(160 + e, t);
|
|
61
|
-
}
|
|
62
|
-
function S(e) {
|
|
63
|
-
return i(2, new Uint8Array([e]));
|
|
64
|
-
}
|
|
65
|
-
function R() {
|
|
66
|
-
return new Uint8Array([5, 0]);
|
|
67
|
-
}
|
|
68
|
-
function b(e) {
|
|
69
|
-
return i(12, new TextEncoder().encode(e));
|
|
70
|
-
}
|
|
71
|
-
function w(e) {
|
|
72
|
-
return i(22, new TextEncoder().encode(e));
|
|
73
|
-
}
|
|
74
|
-
function D(e) {
|
|
75
|
-
return i(3, l(new Uint8Array([0]), e));
|
|
76
|
-
}
|
|
77
|
-
function p(e) {
|
|
78
|
-
const t = e.split(".").map((s) => parseInt(s, 10));
|
|
79
|
-
if (t.length < 2 || t.some((s) => !Number.isFinite(s)))
|
|
80
|
-
throw new Error(`Invalid OID: ${e}`);
|
|
81
|
-
const r = [t[0] * 40 + t[1]];
|
|
82
|
-
for (const s of t.slice(2)) {
|
|
83
|
-
const n = [s & 127];
|
|
84
|
-
let a = s >> 7;
|
|
85
|
-
for (; a > 0; )
|
|
86
|
-
n.unshift(a & 127 | 128), a >>= 7;
|
|
87
|
-
r.push(...n);
|
|
88
|
-
}
|
|
89
|
-
return i(6, new Uint8Array(r));
|
|
90
|
-
}
|
|
91
|
-
function i(e, t) {
|
|
92
|
-
return l(new Uint8Array([e]), v(t.byteLength), t);
|
|
93
|
-
}
|
|
94
|
-
function v(e) {
|
|
95
|
-
if (e < 128)
|
|
96
|
-
return new Uint8Array([e]);
|
|
97
|
-
const t = [];
|
|
98
|
-
let r = e;
|
|
99
|
-
for (; r > 0; )
|
|
100
|
-
t.unshift(r & 255), r >>= 8;
|
|
101
|
-
return new Uint8Array([128 | t.length, ...t]);
|
|
102
|
-
}
|
|
103
|
-
function l(...e) {
|
|
104
|
-
const t = e.reduce((n, a) => n + a.byteLength, 0), r = new Uint8Array(t);
|
|
105
|
-
let s = 0;
|
|
106
|
-
for (const n of e)
|
|
107
|
-
r.set(n, s), s += n.byteLength;
|
|
108
|
-
return r;
|
|
109
|
-
}
|
|
110
|
-
function B(e, t) {
|
|
111
|
-
const s = u(t).match(/.{1,64}/g) ?? [];
|
|
112
|
-
return `-----BEGIN ${e}-----
|
|
113
|
-
${s.join(`
|
|
114
|
-
`)}
|
|
115
|
-
-----END ${e}-----
|
|
116
|
-
`;
|
|
117
|
-
}
|
|
118
|
-
function E(e, t) {
|
|
119
|
-
const r = t.match(/.{1,64}/g) ?? [];
|
|
120
|
-
return `-----BEGIN ${e}-----
|
|
121
|
-
${r.join(`
|
|
122
|
-
`)}
|
|
123
|
-
-----END ${e}-----
|
|
124
|
-
`;
|
|
125
|
-
}
|
|
126
|
-
function u(e) {
|
|
127
|
-
let t = "";
|
|
128
|
-
for (const r of e)
|
|
129
|
-
t += String.fromCharCode(r);
|
|
130
|
-
return btoa(t);
|
|
131
|
-
}
|
|
132
|
-
function I(e) {
|
|
133
|
-
return btoa(e);
|
|
134
|
-
}
|
|
135
|
-
function P(e) {
|
|
136
|
-
return atob(e);
|
|
137
|
-
}
|
|
138
|
-
function h(e) {
|
|
139
|
-
const t = new Uint8Array(e.byteLength);
|
|
140
|
-
return t.set(e), t.buffer;
|
|
141
|
-
}
|
|
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";
|
|
142
3
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
|
212
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CS201taa.js");exports.useDeviceInstall=e.useDeviceInstall;
|