@limrun/ui 0.9.0-rc.8 → 0.13.3-rc.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/README.md +25 -8
- package/dist/app-store-relay/index.cjs +9 -0
- package/dist/app-store-relay/index.d.ts +102 -0
- package/dist/app-store-relay/index.js +430 -0
- package/dist/app-store-relay/react.cjs +1 -0
- package/dist/app-store-relay/react.d.ts +15 -0
- package/dist/app-store-relay/react.js +65 -0
- package/dist/browser-storage-BJ__DGJ6.mjs +202 -0
- package/dist/browser-storage-C1jQLXat.js +1 -0
- package/dist/client-Bk1N3XIF.mjs +228 -0
- package/dist/client-CnbCWvCs.js +1 -0
- package/dist/components/device-install/index.d.ts +1 -2
- package/dist/core/device-install/apple/provisioning.d.ts +55 -4
- package/dist/core/device-install/operations/limbuild-client.d.ts +15 -1
- package/dist/core/device-install/storage/browser-storage.d.ts +9 -5
- package/dist/core/device-install/types.d.ts +4 -1
- package/dist/device-build/index.cjs +1 -0
- package/dist/device-build/index.d.ts +4 -0
- package/dist/device-build/index.js +84 -0
- package/dist/device-build/react.cjs +1 -0
- package/dist/device-build/react.d.ts +20 -0
- package/dist/device-build/react.js +66 -0
- package/dist/device-build/signing.d.ts +20 -0
- package/dist/device-install/index.cjs +1 -1
- package/dist/device-install/index.d.ts +18 -3
- package/dist/device-install/index.js +570 -76
- package/dist/device-install/react.cjs +1 -1
- package/dist/device-install/react.d.ts +23 -1
- package/dist/device-install/react.js +93 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index-BXg7HdIs.mjs +11547 -0
- package/dist/index-CMeQfhYy.js +22 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +502 -495
- package/dist/limbuild-client-CFJhYsRx.mjs +79 -0
- package/dist/limbuild-client-C_CMNLYV.js +1 -0
- package/dist/provisioning-CdseoMJQ.mjs +239 -0
- package/dist/provisioning-D2ZZQeyX.js +1 -0
- package/package.json +21 -1
- package/src/app-store-relay/index.test.ts +74 -0
- package/src/app-store-relay/index.ts +447 -0
- package/src/app-store-relay/react.ts +125 -0
- package/src/components/device-install/index.ts +1 -2
- package/src/core/device-install/apple/provisioning.test.ts +84 -0
- package/src/core/device-install/apple/provisioning.ts +91 -7
- package/src/core/device-install/operations/limbuild-client.ts +32 -2
- package/src/core/device-install/storage/browser-storage.ts +29 -14
- package/src/core/device-install/types.ts +5 -1
- package/src/device-build/index.ts +42 -0
- package/src/device-build/react.ts +128 -0
- package/src/device-build/signing.ts +94 -0
- package/src/device-install/index.ts +49 -3
- package/src/device-install/react.ts +180 -1
- package/src/hooks/index.ts +1 -1
- package/src/index.ts +1 -4
- package/vite.config.ts +4 -0
- package/dist/components/device-install/device-install-dialog.d.ts +0 -5
- package/dist/device-install-dialog-DGn2ZdBB.js +0 -2
- package/dist/device-install-dialog-DgWsZF6o.mjs +0 -443
- package/dist/device-install-dialog.css +0 -1
- package/dist/hooks/use-device-install.d.ts +0 -73
- package/dist/use-device-install-ByUSmeYz.js +0 -31
- package/dist/use-device-install-Y42p84we.mjs +0 -13624
- package/src/components/device-install/device-install-dialog.css +0 -325
- package/src/components/device-install/device-install-dialog.tsx +0 -495
- package/src/hooks/use-device-install.ts +0 -1219
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { ProvisioningProfileInfo, PutSigningAssetsInput, StoredPairRecord, StoredSigningAssets, PairRecordPayload } from '../types';
|
|
1
|
+
import { DeviceInstallSigningMode, ProvisioningProfileInfo, PutSigningAssetsInput, StoredPairRecord, StoredSigningAssets, PairRecordPayload } from '../types';
|
|
2
2
|
export declare function normalizeUDID(udid?: string): string;
|
|
3
3
|
export declare function normalizeBundleID(bundleID?: string): string;
|
|
4
4
|
export declare function getPairRecord(udid?: string): Promise<StoredPairRecord | undefined>;
|
|
5
5
|
export declare function putPairRecord(record: PairRecordPayload, metadata?: {
|
|
6
6
|
productName?: string;
|
|
7
7
|
}): Promise<StoredPairRecord>;
|
|
8
|
-
export declare function getSigningAssets({ deviceUDID, bundleID, }: {
|
|
8
|
+
export declare function getSigningAssets({ deviceUDID, bundleID, signingMode, }: {
|
|
9
9
|
deviceUDID?: string;
|
|
10
10
|
bundleID?: string;
|
|
11
|
+
signingMode?: DeviceInstallSigningMode;
|
|
11
12
|
}): Promise<StoredSigningAssets | undefined>;
|
|
12
|
-
export declare function getLatestSigningAssets(): Promise<StoredSigningAssets>;
|
|
13
|
-
export declare function getLatestSigningAssetsWithCertificate(teamID?: string): Promise<StoredSigningAssets>;
|
|
13
|
+
export declare function getLatestSigningAssets(signingMode?: DeviceInstallSigningMode): Promise<StoredSigningAssets>;
|
|
14
|
+
export declare function getLatestSigningAssetsWithCertificate(teamID?: string, signingMode?: DeviceInstallSigningMode): Promise<StoredSigningAssets>;
|
|
14
15
|
export declare function putSigningAssets(input: PutSigningAssetsInput): Promise<StoredSigningAssets>;
|
|
15
|
-
export declare function findSigningAssetsForBundle(bundleID?: string): Promise<StoredSigningAssets[]>;
|
|
16
|
+
export declare function findSigningAssetsForBundle(bundleID?: string, signingMode?: DeviceInstallSigningMode): Promise<StoredSigningAssets[]>;
|
|
16
17
|
export declare function profileContainsDevice(profile: ProvisioningProfileInfo, deviceUDID?: string): boolean;
|
|
17
18
|
export declare function profileMatchesBundleID(profile: ProvisioningProfileInfo, bundleID?: string): boolean;
|
|
18
19
|
export declare function parseProvisioningProfile(file: File): Promise<{
|
|
@@ -22,6 +23,7 @@ export declare function parseProvisioningProfile(file: File): Promise<{
|
|
|
22
23
|
applicationIdentifier: string | undefined;
|
|
23
24
|
bundleID: string | undefined;
|
|
24
25
|
provisionedDevices: string[];
|
|
26
|
+
getTaskAllow: boolean | undefined;
|
|
25
27
|
expirationDate: string | undefined;
|
|
26
28
|
}>;
|
|
27
29
|
export declare function parseProvisioningProfileBase64(base64: string): {
|
|
@@ -31,6 +33,7 @@ export declare function parseProvisioningProfileBase64(base64: string): {
|
|
|
31
33
|
applicationIdentifier: string | undefined;
|
|
32
34
|
bundleID: string | undefined;
|
|
33
35
|
provisionedDevices: string[];
|
|
36
|
+
getTaskAllow: boolean | undefined;
|
|
34
37
|
expirationDate: string | undefined;
|
|
35
38
|
};
|
|
36
39
|
export declare function parseProvisioningProfileBytes(bytes: Uint8Array): {
|
|
@@ -40,5 +43,6 @@ export declare function parseProvisioningProfileBytes(bytes: Uint8Array): {
|
|
|
40
43
|
applicationIdentifier: string | undefined;
|
|
41
44
|
bundleID: string | undefined;
|
|
42
45
|
provisionedDevices: string[];
|
|
46
|
+
getTaskAllow: boolean | undefined;
|
|
43
47
|
expirationDate: string | undefined;
|
|
44
48
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type DeviceInstallLog = (message: string, detail?: string) => void;
|
|
2
|
+
export type DeviceInstallSigningMode = 'development' | 'adhoc';
|
|
2
3
|
export type DeviceInstallStep = 'signing' | 'connect' | 'build' | 'install';
|
|
3
4
|
export type DeviceInstallStepStatus = 'idle' | 'active' | 'complete' | 'error';
|
|
4
5
|
export type DeviceInstallBusyAction = 'signing' | 'usb' | 'pair' | 'build' | 'install';
|
|
@@ -29,17 +30,19 @@ export type ProvisioningProfileInfo = {
|
|
|
29
30
|
applicationIdentifier?: string;
|
|
30
31
|
bundleID?: string;
|
|
31
32
|
provisionedDevices: string[];
|
|
33
|
+
getTaskAllow?: boolean;
|
|
32
34
|
expirationDate?: string;
|
|
33
35
|
};
|
|
34
36
|
export type StoredSigningAssets = {
|
|
35
37
|
id: string;
|
|
36
38
|
deviceUDID?: string;
|
|
37
39
|
teamID?: string;
|
|
40
|
+
signingMode?: DeviceInstallSigningMode;
|
|
38
41
|
bundleID: string;
|
|
39
42
|
certificateID?: string;
|
|
40
43
|
certificateP12Base64: string;
|
|
41
44
|
certificateFileName?: string;
|
|
42
|
-
certificatePassword
|
|
45
|
+
certificatePassword?: string;
|
|
43
46
|
provisioningProfileBase64: string;
|
|
44
47
|
profileFileName?: string;
|
|
45
48
|
profile: ProvisioningProfileInfo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../limbuild-client-C_CMNLYV.js");require("../index-CMeQfhYy.js");const c=require("../provisioning-D2ZZQeyX.js"),i=require("../browser-storage-C1jQLXat.js");async function v({certificateFile:t,provisioningProfileFile:e,certificatePassword:n,bundleId:s,deviceUDID:r,teamId:d,signingMode:f="development",certificateId:p}){const[u,A,o]=await Promise.all([l(t),l(e),i.parseProvisioningProfile(e)]);return g({profile:o,bundleId:s,deviceUDID:r,signingMode:f}),i.putSigningAssets({bundleID:s??o.bundleID??o.applicationIdentifier??e.name,deviceUDID:r,teamID:d??o.teamID,signingMode:f,certificateID:p,certificateP12Base64:u,certificateFileName:t.name,certificatePassword:n||void 0,provisioningProfileBase64:A,profileFileName:e.name,profile:o})}function S(t,e={}){g({profile:t.profile,bundleId:e.bundleId,deviceUDID:e.deviceUDID,signingMode:e.signingMode??t.signingMode})}function g({profile:t,bundleId:e,deviceUDID:n,signingMode:s}){if(e&&!i.profileMatchesBundleID(t,e))throw new Error(`Provisioning profile does not match bundle ID ${e}.`);if(n&&!i.profileContainsDevice(t,n))throw new Error("Provisioning profile does not include the selected iPhone.");if(s==="adhoc"&&t.getTaskAllow)throw new Error("Ad Hoc mode requires an Ad Hoc provisioning profile, not a development profile.")}async function l(t){const e=await t.arrayBuffer();let n="";const s=new Uint8Array(e);for(const r of s)n+=String.fromCharCode(r);return btoa(n)}exports.fetchLimbuildInfo=a.fetchLimbuildInfo;exports.getIOSOTAInstall=a.getIOSOTAInstall;exports.startSignedDeviceBuild=a.startSignedDeviceBuild;exports.watchBuildLogEvents=a.watchBuildLogEvents;exports.getReusableAppleSigningAssets=c.getReusableAppleSigningAssets;exports.putAppleGeneratedSigningAssets=c.putAppleGeneratedSigningAssets;exports.getLatestSigningAssets=i.getLatestSigningAssets;exports.getLatestSigningAssetsWithCertificate=i.getLatestSigningAssetsWithCertificate;exports.getSigningAssets=i.getSigningAssets;exports.parseProvisioningProfile=i.parseProvisioningProfile;exports.parseProvisioningProfileBase64=i.parseProvisioningProfileBase64;exports.parseProvisioningProfileBytes=i.parseProvisioningProfileBytes;exports.profileContainsDevice=i.profileContainsDevice;exports.profileMatchesBundleID=i.profileMatchesBundleID;exports.putSigningAssets=i.putSigningAssets;exports.fileToBase64=l;exports.importSigningAssetsFromFiles=v;exports.validateProvisioningProfileForInstall=g;exports.validateSigningAssetsForInstall=S;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { fetchLimbuildInfo, getIOSOTAInstall, startSignedDeviceBuild, watchBuildLogEvents, type BuildLogEventsOptions, type GetIOSOTAInstallOptions, type IOSOTAInstall, type LimbuildInfo, type StartSignedDeviceBuildOptions, } from '../core/device-install/operations/limbuild-client';
|
|
2
|
+
export { getLatestSigningAssets, getLatestSigningAssetsWithCertificate, getReusableAppleSigningAssets, getSigningAssets, parseProvisioningProfile, parseProvisioningProfileBase64, parseProvisioningProfileBytes, profileContainsDevice, profileMatchesBundleID, putAppleGeneratedSigningAssets, putSigningAssets, type AppleSigningAssetCacheInput, type PutAppleGeneratedSigningAssetsInput, } from '../core/device-install';
|
|
3
|
+
export { fileToBase64, importSigningAssetsFromFiles, validateProvisioningProfileForInstall, validateSigningAssetsForInstall, type ImportSigningAssetsFromFilesInput, type ValidateSigningAssetsOptions, } from './signing';
|
|
4
|
+
export type { BuildLogLine, DeviceInstallBuildStatus, DeviceInstallSigningMode, ProvisioningProfileInfo, PutSigningAssetsInput, StoredSigningAssets, } from '../core/device-install/types';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { f as b, g as B, s as D, w as y } from "../limbuild-client-CFJhYsRx.mjs";
|
|
2
|
+
import "../index-BXg7HdIs.mjs";
|
|
3
|
+
import { o as C, p as E } from "../provisioning-CdseoMJQ.mjs";
|
|
4
|
+
import { p as d, a as m, b as u, c as A } from "../browser-storage-BJ__DGJ6.mjs";
|
|
5
|
+
import { g as M, d as T, e as F, f as H, h as N } from "../browser-storage-BJ__DGJ6.mjs";
|
|
6
|
+
async function w({
|
|
7
|
+
certificateFile: i,
|
|
8
|
+
provisioningProfileFile: e,
|
|
9
|
+
certificatePassword: t,
|
|
10
|
+
bundleId: n,
|
|
11
|
+
deviceUDID: o,
|
|
12
|
+
teamId: l,
|
|
13
|
+
signingMode: r = "development",
|
|
14
|
+
certificateId: g
|
|
15
|
+
}) {
|
|
16
|
+
const [c, p, s] = await Promise.all([
|
|
17
|
+
a(i),
|
|
18
|
+
a(e),
|
|
19
|
+
d(e)
|
|
20
|
+
]);
|
|
21
|
+
return f({ profile: s, bundleId: n, deviceUDID: o, signingMode: r }), m({
|
|
22
|
+
bundleID: n ?? s.bundleID ?? s.applicationIdentifier ?? e.name,
|
|
23
|
+
deviceUDID: o,
|
|
24
|
+
teamID: l ?? s.teamID,
|
|
25
|
+
signingMode: r,
|
|
26
|
+
certificateID: g,
|
|
27
|
+
certificateP12Base64: c,
|
|
28
|
+
certificateFileName: i.name,
|
|
29
|
+
certificatePassword: t || void 0,
|
|
30
|
+
provisioningProfileBase64: p,
|
|
31
|
+
profileFileName: e.name,
|
|
32
|
+
profile: s
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function I(i, e = {}) {
|
|
36
|
+
f({
|
|
37
|
+
profile: i.profile,
|
|
38
|
+
bundleId: e.bundleId,
|
|
39
|
+
deviceUDID: e.deviceUDID,
|
|
40
|
+
signingMode: e.signingMode ?? i.signingMode
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function f({
|
|
44
|
+
profile: i,
|
|
45
|
+
bundleId: e,
|
|
46
|
+
deviceUDID: t,
|
|
47
|
+
signingMode: n
|
|
48
|
+
}) {
|
|
49
|
+
if (e && !u(i, e))
|
|
50
|
+
throw new Error(`Provisioning profile does not match bundle ID ${e}.`);
|
|
51
|
+
if (t && !A(i, t))
|
|
52
|
+
throw new Error("Provisioning profile does not include the selected iPhone.");
|
|
53
|
+
if (n === "adhoc" && i.getTaskAllow)
|
|
54
|
+
throw new Error("Ad Hoc mode requires an Ad Hoc provisioning profile, not a development profile.");
|
|
55
|
+
}
|
|
56
|
+
async function a(i) {
|
|
57
|
+
const e = await i.arrayBuffer();
|
|
58
|
+
let t = "";
|
|
59
|
+
const n = new Uint8Array(e);
|
|
60
|
+
for (const o of n)
|
|
61
|
+
t += String.fromCharCode(o);
|
|
62
|
+
return btoa(t);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
b as fetchLimbuildInfo,
|
|
66
|
+
a as fileToBase64,
|
|
67
|
+
B as getIOSOTAInstall,
|
|
68
|
+
M as getLatestSigningAssets,
|
|
69
|
+
T as getLatestSigningAssetsWithCertificate,
|
|
70
|
+
C as getReusableAppleSigningAssets,
|
|
71
|
+
F as getSigningAssets,
|
|
72
|
+
w as importSigningAssetsFromFiles,
|
|
73
|
+
d as parseProvisioningProfile,
|
|
74
|
+
H as parseProvisioningProfileBase64,
|
|
75
|
+
N as parseProvisioningProfileBytes,
|
|
76
|
+
A as profileContainsDevice,
|
|
77
|
+
u as profileMatchesBundleID,
|
|
78
|
+
E as putAppleGeneratedSigningAssets,
|
|
79
|
+
m as putSigningAssets,
|
|
80
|
+
D as startSignedDeviceBuild,
|
|
81
|
+
f as validateProvisioningProfileForInstall,
|
|
82
|
+
I as validateSigningAssetsForInstall,
|
|
83
|
+
y as watchBuildLogEvents
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),f=require("../limbuild-client-C_CMNLYV.js");require("../index-CMeQfhYy.js");function P({apiUrl:e,token:o,signingAssets:g,loadOTAInstall:I=!1}){const[b,n]=t.useState("idle"),[w,d]=t.useState([]),[B,a]=t.useState(),[h,l]=t.useState(),[x,c]=t.useState(),i=t.useRef(void 0);t.useEffect(()=>()=>{i.current?.(),i.current=void 0},[]);const E=t.useCallback(()=>{i.current?.(),i.current=void 0,n("idle"),d([]),a(void 0),l(void 0),c(void 0)},[]),m=t.useCallback(async(q={})=>{if(!e)throw new Error("apiUrl is required to start a device build.");const u=q.signingAssets??g;if(!u)throw new Error("Signing assets are required to start a device build.");i.current?.(),n("queued"),d([]),a(void 0),l(void 0),c(void 0);try{const r=await f.startSignedDeviceBuild({limbuildApiUrl:e,token:o,certificateP12Base64:u.certificateP12Base64,certificatePassword:u.certificatePassword,provisioningProfileBase64:u.provisioningProfileBase64});if(!r.execId)throw new Error("Build request did not return an exec ID.");return a(r.execId),i.current=f.watchBuildLogEvents({limbuildApiUrl:e,token:o,execId:r.execId,onLine:s=>d(v=>[...v,s]),onStatus:s=>{n(s),s==="succeeded"&&I&&f.getIOSOTAInstall({limbuildApiUrl:e,token:o,execId:r.execId}).then(l).catch(v=>c(S(v)))},onError:s=>c(s.message)}),r.execId}catch(r){n("failed"),c(S(r));return}},[e,I,g,o]);return{status:b,logs:w,execId:B,otaInstall:h,error:x,startBuild:m,reset:E}}function S(e){return e instanceof Error?e.message:String(e)}exports.useDeviceBuild=P;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BuildLogLine, DeviceInstallBuildStatus, IOSOTAInstall, StoredSigningAssets } from './index';
|
|
2
|
+
export type UseDeviceBuildOptions = {
|
|
3
|
+
apiUrl?: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
signingAssets?: StoredSigningAssets;
|
|
6
|
+
loadOTAInstall?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type StartDeviceBuildInput = {
|
|
9
|
+
signingAssets?: StoredSigningAssets;
|
|
10
|
+
};
|
|
11
|
+
export type UseDeviceBuildResult = {
|
|
12
|
+
status: DeviceInstallBuildStatus;
|
|
13
|
+
logs: BuildLogLine[];
|
|
14
|
+
execId?: string;
|
|
15
|
+
otaInstall?: IOSOTAInstall;
|
|
16
|
+
error?: string;
|
|
17
|
+
startBuild: (input?: StartDeviceBuildInput) => Promise<string | undefined>;
|
|
18
|
+
reset: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function useDeviceBuild({ apiUrl, token, signingAssets, loadOTAInstall, }: UseDeviceBuildOptions): UseDeviceBuildResult;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useState as c, useRef as P, useEffect as A, useCallback as I } from "react";
|
|
2
|
+
import { s as q, w as D, g as L } from "../limbuild-client-CFJhYsRx.mjs";
|
|
3
|
+
import "../index-BXg7HdIs.mjs";
|
|
4
|
+
function C({
|
|
5
|
+
apiUrl: e,
|
|
6
|
+
token: o,
|
|
7
|
+
signingAssets: v,
|
|
8
|
+
loadOTAInstall: g = !1
|
|
9
|
+
}) {
|
|
10
|
+
const [m, n] = c("idle"), [x, a] = c([]), [h, u] = c(), [B, l] = c(), [E, s] = c(), r = P(void 0);
|
|
11
|
+
A(() => () => {
|
|
12
|
+
r.current?.(), r.current = void 0;
|
|
13
|
+
}, []);
|
|
14
|
+
const p = I(() => {
|
|
15
|
+
r.current?.(), r.current = void 0, n("idle"), a([]), u(void 0), l(void 0), s(void 0);
|
|
16
|
+
}, []), S = I(
|
|
17
|
+
async (b = {}) => {
|
|
18
|
+
if (!e)
|
|
19
|
+
throw new Error("apiUrl is required to start a device build.");
|
|
20
|
+
const d = b.signingAssets ?? v;
|
|
21
|
+
if (!d)
|
|
22
|
+
throw new Error("Signing assets are required to start a device build.");
|
|
23
|
+
r.current?.(), n("queued"), a([]), u(void 0), l(void 0), s(void 0);
|
|
24
|
+
try {
|
|
25
|
+
const t = await q({
|
|
26
|
+
limbuildApiUrl: e,
|
|
27
|
+
token: o,
|
|
28
|
+
certificateP12Base64: d.certificateP12Base64,
|
|
29
|
+
certificatePassword: d.certificatePassword,
|
|
30
|
+
provisioningProfileBase64: d.provisioningProfileBase64
|
|
31
|
+
});
|
|
32
|
+
if (!t.execId)
|
|
33
|
+
throw new Error("Build request did not return an exec ID.");
|
|
34
|
+
return u(t.execId), r.current = D({
|
|
35
|
+
limbuildApiUrl: e,
|
|
36
|
+
token: o,
|
|
37
|
+
execId: t.execId,
|
|
38
|
+
onLine: (i) => a((f) => [...f, i]),
|
|
39
|
+
onStatus: (i) => {
|
|
40
|
+
n(i), i === "succeeded" && g && L({ limbuildApiUrl: e, token: o, execId: t.execId }).then(l).catch((f) => s(w(f)));
|
|
41
|
+
},
|
|
42
|
+
onError: (i) => s(i.message)
|
|
43
|
+
}), t.execId;
|
|
44
|
+
} catch (t) {
|
|
45
|
+
n("failed"), s(w(t));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
[e, g, v, o]
|
|
50
|
+
);
|
|
51
|
+
return {
|
|
52
|
+
status: m,
|
|
53
|
+
logs: x,
|
|
54
|
+
execId: h,
|
|
55
|
+
otaInstall: B,
|
|
56
|
+
error: E,
|
|
57
|
+
startBuild: S,
|
|
58
|
+
reset: p
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function w(e) {
|
|
62
|
+
return e instanceof Error ? e.message : String(e);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
C as useDeviceBuild
|
|
66
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DeviceInstallSigningMode, StoredSigningAssets } from '../core/device-install/types';
|
|
2
|
+
export type ImportSigningAssetsFromFilesInput = {
|
|
3
|
+
certificateFile: File;
|
|
4
|
+
provisioningProfileFile: File;
|
|
5
|
+
certificatePassword?: string;
|
|
6
|
+
bundleId?: string;
|
|
7
|
+
deviceUDID?: string;
|
|
8
|
+
teamId?: string;
|
|
9
|
+
signingMode?: DeviceInstallSigningMode;
|
|
10
|
+
certificateId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type ValidateSigningAssetsOptions = {
|
|
13
|
+
bundleId?: string;
|
|
14
|
+
deviceUDID?: string;
|
|
15
|
+
signingMode?: DeviceInstallSigningMode;
|
|
16
|
+
};
|
|
17
|
+
export declare function importSigningAssetsFromFiles({ certificateFile, provisioningProfileFile, certificatePassword, bundleId, deviceUDID, teamId, signingMode, certificateId, }: ImportSigningAssetsFromFilesInput): Promise<StoredSigningAssets>;
|
|
18
|
+
export declare function validateSigningAssetsForInstall(assets: StoredSigningAssets, options?: ValidateSigningAssetsOptions): void;
|
|
19
|
+
export declare function validateProvisioningProfileForInstall({ profile, bundleId, deviceUDID, signingMode, }: Pick<StoredSigningAssets, 'profile'> & ValidateSigningAssetsOptions): void;
|
|
20
|
+
export declare function fileToBase64(file: File): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-ByUSmeYz.js"),t=require("../device-install-dialog-DGn2ZdBB.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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../browser-storage-C1jQLXat.js"),R=1,u=16,s={DeviceHello:1,OpenStream:2,OpenResult:3,StreamData:4,StreamClose:5,InstallProgress:6,Error:7,Ping:8,Pong:9,StartPairing:10,StartInstall:11,PairRecordReady:12};function L(e){const t=new Uint8Array(u+e.payload.byteLength),n=new DataView(t.buffer);return n.setUint8(0,R),n.setUint8(1,e.type),n.setUint8(2,0),n.setUint8(3,0),n.setUint32(4,e.requestId),n.setUint32(8,e.streamId),n.setUint32(12,e.payload.byteLength),t.set(e.payload,u),t}function T(e){if(e.byteLength<u)throw new Error(`Relay frame too short: ${e.byteLength}`);const t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint8(0);if(n!==R)throw new Error(`Unsupported relay protocol version ${n}`);const r=t.getUint32(12);if(e.byteLength!==u+r)throw new Error(`Relay frame length mismatch: got ${e.byteLength}, expected ${u+r}`);return{type:t.getUint8(1),requestId:t.getUint32(4),streamId:t.getUint32(8),payload:e.slice(u)}}function c(e){return new TextEncoder().encode(JSON.stringify(e))}function w(e){return JSON.parse(new TextDecoder().decode(e))}async function W(){if(!navigator.usb)throw new Error("WebUSB is not available in this browser.");return navigator.usb.requestDevice({filters:[{vendorId:1452}]})}function B(e){const t=[],n=e.configuration?.configurationValue,r=e.configurations.find(a=>a.configurationValue===n);r&&t.push(...U(r));for(const a of e.configurations)a.configurationValue!==n&&t.push(...U(a));return t}function U(e){const t=[];for(const n of e.interfaces)for(const r of n.alternates)r.interfaceClass===255&&r.interfaceSubclass===254&&r.interfaceProtocol===2&&t.push({configurationValue:e.configurationValue,interfaceNumber:n.interfaceNumber,alternateSetting:r.alternateSetting,endpoints:r.endpoints});return t}async function F(e,t){e.opened||await e.open(),(!e.configuration||e.configuration.configurationValue!==t.configurationValue)&&await e.selectConfiguration(t.configurationValue),await e.claimInterface(t.interfaceNumber),t.alternateSetting!==0&&await e.selectAlternateInterface(t.interfaceNumber,t.alternateSetting)}function _(e){const t=e.endpoints.find(r=>r.direction==="out"&&r.type==="bulk"),n=e.endpoints.find(r=>r.direction==="in"&&r.type==="bulk");if(!t||!n)throw new Error("Could not find usbmux bulk endpoints.");return{outEndpoint:t,inEndpoint:n}}async function k(e,t,n){const r=await e.transferOut(t.endpointNumber,n);if(r.status!=="ok")throw new Error(`USB transferOut failed: ${r.status}`);n.byteLength%t.packetSize===0&&await e.transferOut(t.endpointNumber,new Uint8Array)}async function M(e,t,n=16384){const r=await e.transferIn(t.endpointNumber,n);if(r.status!=="ok"||!r.data)throw new Error(`USB transferIn failed: ${r.status}`);return new Uint8Array(r.data.buffer,r.data.byteOffset,r.data.byteLength)}const I=0,j=2,P=6,H=4277009102,y=2,J=4,d=16,z=49152;async function G(e,t){const{inEndpoint:n,outEndpoint:r}=_(t),a=new Uint8Array(12),i=new DataView(a.buffer);i.setUint32(0,2),i.setUint32(4,0),i.setUint32(8,0),await k(e,r,D(I,a));const o=await O(e,n,1),l=new DataView(o.payload.buffer,o.payload.byteOffset).getUint32(0),p={device:e,candidate:t,inEndpoint:n,outEndpoint:r,muxVersion:l,txSeq:0,rxSeq:65535,nextSport:z,streams:new Map,writeChain:Promise.resolve(),closed:!1};return l>=2&&await x(p,j,new Uint8Array([7])),Z(p),p}async function Y(e,t){if(e.closed)throw new Error("usbmux session is closed.");let n,r;const a={session:e,sport:e.nextSport++,dport:t,seq:0,ack:0,queue:[],waiters:[],opened:new Promise((i,o)=>{n=i,r=o}),resolveOpened:n,rejectOpened:r};return e.streams.set(h(t,a.sport),a),await f(a,y,new Uint8Array),await a.opened,a}async function Q(e,t){if(e.session.closed)throw new Error("usbmux session is closed.");await f(e,d,t),e.seq+=t.byteLength}async function K(e){if(e.queue.length>0)return e.queue.shift();if(e.error)throw e.error;return new Promise(t=>{e.waiters.push(t)})}function E(e){e.closed=!0;for(const t of e.streams.values())for(t.error=new Error("usbmux session closed"),t.rejectOpened(t.error);t.waiters.length>0;)t.waiters.shift()(new Uint8Array);e.streams.clear()}async function f(e,t,n){const r=new Uint8Array(20+n.byteLength),a=new DataView(r.buffer);a.setUint16(0,e.sport),a.setUint16(2,e.dport),a.setUint32(4,e.seq),a.setUint32(8,e.ack),a.setUint8(12,80),a.setUint8(13,t),a.setUint16(14,512),r.set(n,20),await x(e.session,P,r)}async function x(e,t,n){if(e.closed)throw new Error("usbmux session is closed.");return e.writeChain=e.writeChain.then(async()=>{if(e.closed)return;const r=e.muxVersion>=2?X(t,n,e.txSeq++,e.rxSeq):D(t,n);await k(e.device,e.outEndpoint,r)}),e.writeChain}async function Z(e){try{for(;;){if(e.closed)return;const t=await O(e.device,e.inEndpoint,e.muxVersion);if(e.closed)return;if(t.rxSeq!==void 0&&(e.rxSeq=t.rxSeq),t.protocol!==P)continue;const n=te(t.payload),r=e.streams.get(h(n.sport,n.dport));if(r){if(n.flags&J){for(r.error=new Error(`Device reset stream ${r.dport}`),r.rejectOpened(r.error);r.waiters.length>0;)r.waiters.shift()(new Uint8Array);e.streams.delete(h(r.dport,r.sport));continue}if((n.flags&(y|d))===(y|d)){r.seq+=1,r.ack=n.seq+1,await f(r,d,new Uint8Array),r.resolveOpened();continue}n.payload.byteLength!==0&&(r.ack=n.seq+n.payload.byteLength,await f(r,d,new Uint8Array),r.waiters.length>0?r.waiters.shift()(n.payload):r.queue.push(n.payload))}}}catch{e.closed||E(e)}}async function O(e,t,n){for(;;){const r=await M(e,t),a=ee(r,n);if(!(n===1&&a.protocol!==I))return a}}function D(e,t){const n=new Uint8Array(8+t.byteLength),r=new DataView(n.buffer);return r.setUint32(0,e),r.setUint32(4,n.byteLength),n.set(t,8),n}function X(e,t,n,r){const a=new Uint8Array(16+t.byteLength),i=new DataView(a.buffer);return i.setUint32(0,e),i.setUint32(4,a.byteLength),i.setUint32(8,H),i.setUint16(12,n),i.setUint16(14,r),a.set(t,16),a}function ee(e,t){const n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n.getUint32(0),a=n.getUint32(4),i=t>=2?16:8;return{protocol:r,length:a,rxSeq:t>=2?n.getUint16(14):void 0,payload:e.slice(i,a)}}function te(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=(t.getUint8(12)>>4)*4;return{sport:t.getUint16(0),dport:t.getUint16(2),seq:t.getUint32(4),ack:t.getUint32(8),flags:t.getUint8(13),payload:e.slice(n)}}function h(e,t){return`${e}:${t}`}class q{constructor(t,n,r,a){this.webSocketUrl=t,this.session=n,this.deviceHello=r,this.log=a}socket;streams=new Map;frameQueue=Promise.resolve();closed=!1;pairRecordWaiter;async connect(){const t=new WebSocket(this.webSocketUrl);t.binaryType="arraybuffer",this.socket=t,t.onclose=()=>{this.closed=!0,this.log("Relay socket closed"),this.pairRecordWaiter&&(this.pairRecordWaiter.reject(new Error("Relay socket closed")),this.pairRecordWaiter=void 0)},await new Promise((n,r)=>{t.onopen=()=>n(),t.onerror=()=>r(new Error("WebSocket connection failed"))}),t.onmessage=n=>{const r=n.data instanceof ArrayBuffer?new Uint8Array(n.data):new Uint8Array;this.enqueueFrame(r)},await this.send({type:s.DeviceHello,requestId:0,streamId:0,payload:c(this.deviceHello)}),this.log("Connected WebSocket relay")}async startPairing(){const t=new Promise((n,r)=>{this.pairRecordWaiter={resolve:n,reject:r}});return await this.send({type:s.StartPairing,requestId:0,streamId:0,payload:c({})}),this.log("Pairing requested"),t}async startInstall(t){await this.send({type:s.StartInstall,requestId:0,streamId:0,payload:c(t)}),this.log("Installation requested")}close(){this.closed=!0,this.socket?.close()}enqueueFrame(t){this.frameQueue=this.frameQueue.then(()=>this.handleFrame(T(t))).catch(n=>{this.log("Relay frame handling failed",n instanceof Error?n.message:String(n))})}async handleFrame(t){switch(t.type){case s.OpenStream:await this.handleOpenStream(t.requestId,t.streamId,w(t.payload).port);break;case s.StreamData:{const n=this.streams.get(t.streamId);if(!n)throw new Error(`Unknown stream ${t.streamId}`);await Q(n,t.payload);break}case s.StreamClose:this.streams.delete(t.streamId);break;case s.InstallProgress:this.log(re(w(t.payload).message));break;case s.Error:this.handleError(t.payload);break;case s.PairRecordReady:this.handlePairRecordReady(w(t.payload));break;case s.Ping:await this.send({type:s.Pong,requestId:t.requestId,streamId:0,payload:new Uint8Array});break}}handleError(t){const n=ne(t);this.log("Server error",n),this.pairRecordWaiter&&(this.pairRecordWaiter.reject(new Error(n)),this.pairRecordWaiter=void 0)}handlePairRecordReady(t){this.log("Pair record received",t.udid),this.pairRecordWaiter?.resolve(t),this.pairRecordWaiter=void 0}async handleOpenStream(t,n,r){try{const a=await Y(this.session,r);this.streams.set(n,a),await this.send({type:s.OpenResult,requestId:t,streamId:n,payload:c({ok:!0})}),this.log(`Opened device stream ${n} to port ${r}`),this.pumpDeviceToServer(n,a)}catch(a){this.log(`Open device stream ${n} failed`,a instanceof Error?a.message:String(a)),await this.send({type:s.OpenResult,requestId:t,streamId:n,payload:c({ok:!1,error:a instanceof Error?a.message:String(a)})})}}async pumpDeviceToServer(t,n){try{for(;;){const r=await K(n);if(this.closed)return;await this.send({type:s.StreamData,requestId:0,streamId:t,payload:r})}}catch(r){this.log(`Device stream ${t} closed`,r instanceof Error?r.message:String(r)),await this.send({type:s.StreamClose,requestId:0,streamId:t,payload:c({reason:r instanceof Error?r.message:String(r)})})}}async send(t){if(!this.closed){if(!this.socket||this.socket.readyState!==WebSocket.OPEN){this.closed=!0;return}this.socket.send(L(t))}}}function ne(e){const t=new TextDecoder().decode(e);try{const n=JSON.parse(t);return v(n.error??t)}catch{return v(t)}}function v(e){return e.replace(/libimobiledevice/g,"").trim()}function re(e){const t="install status: ";if(!e.startsWith(t))return e;const n=e.slice(t.length),a=new DOMParser().parseFromString(n,"application/xml").querySelector("plist > dict");if(!a)return e;const i=ae(a),o=i.Status??"Unknown";return`Install progress: ${i.PercentComplete?`${i.PercentComplete}% `:""}${o}`}function ae(e){const t={},n=Array.from(e.children);for(let r=0;r<n.length;r+=2){const a=n[r],i=n[r+1];!a||a.tagName!=="key"||!i||(t[a.textContent??""]=i.textContent??"")}return t}async function ie({log:e}){e("Selecting USB device");const t=await W(),n=se(t);return e("Selected USB device",`${t.manufacturerName??""} ${t.productName??""} ${t.serialNumber??""}`.trim()),n}async function N({limbuildApiUrl:e,token:t,log:n,target:r}){const a=b(e,t);let i;try{i=await V(a,r,n);const o=await i.startPairing();return{relay:i,pairRecord:o,target:r}}catch(o){throw i?.close(),o}}async function A({limbuildApiUrl:e,token:t,log:n,target:r,pairRecord:a}){const i=b(e,t);let o;try{return o=await V(i,r,n),await o.startInstall(a),o}catch(l){throw o?.close(),l}}async function C(e,t){if(e){if(e.session&&(E(e.session),e.session=void 0),e.claimedInterfaceNumber!==void 0)try{await e.device.releaseInterface(e.claimedInterfaceNumber),t?.("Released usbmux interface")}catch(n){t?.("USB interface release failed",m(n))}finally{e.claimedInterfaceNumber=void 0}if(e.device.opened)try{await e.device.close(),t?.("Closed USB device")}catch(n){t?.("USB device close failed",m(n))}}}async function V(e,t,n){await oe(t,n);const r=new q(e,t.session,t.hello,n);return await r.connect(),r}async function oe(e,t){if(!e.session)try{e.candidate=await ce(e,t),e.session=await G(e.device,e.candidate),t("Created usbmux session")}catch(n){throw await C(e,t),n}}function se(e){return{device:e,candidate:ue(e),hello:{serialNumber:e.serialNumber,productName:e.productName,manufacturerName:e.manufacturerName,productId:e.productId,vendorId:e.vendorId}}}async function ce(e,t){const n=$(e.device);if(n.length===0)throw new Error("No Apple usbmux interface found.");let r;for(const a of n)for(const i of[1,2])try{return e.device.opened||await e.device.open(),t("Claiming usbmux interface",`configuration ${a.configurationValue}, interface ${a.interfaceNumber}, alternate ${a.alternateSetting}, attempt ${i}`),await F(e.device,a),e.claimedInterfaceNumber=a.interfaceNumber,t("Claimed usbmux interface",`configuration ${a.configurationValue}, interface ${a.interfaceNumber}`),a}catch(o){r=o,t("USB interface claim failed",`configuration ${a.configurationValue}, interface ${a.interfaceNumber}: ${m(o)}`),await le(e),await de(250)}throw r instanceof Error?r:new Error("Unable to claim any Apple usbmux interface.")}function ue(e){const t=$(e)[0];if(!t)throw new Error("No Apple usbmux interface found.");return t}function $(e){const t=B(e),n=e.configuration?.configurationValue;return[...t.filter(r=>r.configurationValue===n),...t.filter(r=>r.configurationValue!==n)]}function b(e,t){const n=new URL(e);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.pathname=`${n.pathname.replace(/\/$/,"")}/device/ws`,t&&n.searchParams.set("token",t),n.toString()}function m(e){return e instanceof Error?e.message:String(e)}async function le(e){if(e.claimedInterfaceNumber!==void 0){try{await e.device.releaseInterface(e.claimedInterfaceNumber)}catch{}e.claimedInterfaceNumber=void 0}if(e.device.opened)try{await e.device.close()}catch{}}function de(e){return new Promise(t=>setTimeout(t,e))}async function fe(e={}){return ie({log:e.log??S})}async function pe(e){return N({...e,log:e.log??S})}async function we(e){return A({...e,log:e.log??S})}function S(){}exports.getPairRecord=g.getPairRecord;exports.normalizeUDID=g.normalizeUDID;exports.putPairRecord=g.putPairRecord;exports.RelayClient=q;exports.closeDeviceRelayTarget=C;exports.deviceRelayWebSocketUrl=b;exports.pairDevice=pe;exports.requestUSBAccess=fe;exports.startDeviceInstall=we;exports.startDeviceInstallRelay=A;exports.startDevicePairingRelay=N;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
import { RequestUSBAccessOptions as CoreRequestUSBAccessOptions, StartInstallRelayOptions, StartPairingRelayOptions } from '../core/device-install/operations';
|
|
2
|
+
import { DeviceInstallLog } from '../core/device-install/types';
|
|
3
|
+
export { closeDeviceRelayTarget, deviceRelayWebSocketUrl, startInstallRelay as startDeviceInstallRelay, startPairingRelay as startDevicePairingRelay, type DeviceRelayTarget, type StartInstallRelayOptions, type StartPairingRelayOptions, } from '../core/device-install/operations';
|
|
4
|
+
export { getPairRecord, normalizeUDID, putPairRecord, } from '../core/device-install/storage';
|
|
5
|
+
export type { DeviceHello, DeviceInstallLog, PairRecordPayload, StoredPairRecord, } from '../core/device-install/types';
|
|
6
|
+
export { RelayClient } from '../core/device-install/operations';
|
|
7
|
+
export type RequestUSBAccessOptions = Partial<CoreRequestUSBAccessOptions>;
|
|
8
|
+
export declare function requestUSBAccess(options?: RequestUSBAccessOptions): Promise<import('.').DeviceRelayTarget>;
|
|
9
|
+
export declare function pairDevice(options: Omit<StartPairingRelayOptions, 'log'> & {
|
|
10
|
+
log?: DeviceInstallLog;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
relay: import('.').RelayClient;
|
|
13
|
+
pairRecord: import('.').PairRecordPayload;
|
|
14
|
+
target: import('.').DeviceRelayTarget;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function startDeviceInstall(options: Omit<StartInstallRelayOptions, 'log'> & {
|
|
17
|
+
log?: DeviceInstallLog;
|
|
18
|
+
}): Promise<import('.').RelayClient>;
|