@limrun/ui 0.9.0-rc.1 → 0.9.0-rc.11
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-CjH25hnN.js +2 -0
- package/dist/device-install-dialog-W5Xv9kWL.mjs +443 -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-Y1u6vIBB.js +31 -0
- package/dist/use-device-install-sDVvby1V.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/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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AxElement, AxSnapshot } from '../core/ax-tree';
|
|
3
|
+
export interface InspectOverlayGeometry {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export type InspectMode = 'select' | 'hover-only';
|
|
10
|
+
export interface InspectOverlayProps {
|
|
11
|
+
snapshot: AxSnapshot | null;
|
|
12
|
+
geometry: InspectOverlayGeometry | null;
|
|
13
|
+
highlightedId: string | null;
|
|
14
|
+
selectedId: string | null;
|
|
15
|
+
mode: InspectMode;
|
|
16
|
+
cursorPosition: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
} | null;
|
|
20
|
+
frozenCursorPosition: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
} | null;
|
|
24
|
+
onSelectChange: (element: AxElement | null, clickPosition?: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
} | null) => void;
|
|
28
|
+
onTapElement: (element: AxElement, tapAt: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const InspectOverlay: React.NamedExoticComponent<InspectOverlayProps>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { AxStatus } from '../core/ax-fetcher';
|
|
3
|
+
import { AxElement, AxSnapshot } from '../core/ax-tree';
|
|
2
4
|
declare global {
|
|
3
5
|
interface Window {
|
|
4
6
|
debugRemoteControl?: boolean;
|
|
@@ -12,6 +14,85 @@ interface RemoteControlProps {
|
|
|
12
14
|
openUrl?: string;
|
|
13
15
|
showFrame?: boolean;
|
|
14
16
|
autoReconnect?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Enable the inspect overlay. When set, the component starts polling the
|
|
19
|
+
* accessibility tree and draws boxes over each element on top of the
|
|
20
|
+
* video stream.
|
|
21
|
+
*
|
|
22
|
+
* - `true` — Select mode. Boxes are clickable, click pins a selection
|
|
23
|
+
* with action buttons (Tap / Copy selector / Copy id), ESC clears.
|
|
24
|
+
* Device input is blocked while in this mode.
|
|
25
|
+
* - `'hover-only'` — Boxes follow the cursor as a visual preview. Device
|
|
26
|
+
* input still passes through, so you can drive the simulator while
|
|
27
|
+
* inspecting.
|
|
28
|
+
* - `undefined` / `false` (default) — overlay disabled, no polling.
|
|
29
|
+
*/
|
|
30
|
+
inspectMode?: boolean | 'hover-only';
|
|
31
|
+
/**
|
|
32
|
+
* Fires whenever a fresh accessibility snapshot is delivered.
|
|
33
|
+
*
|
|
34
|
+
* Customers use this to drive their own side panels, agent prompts,
|
|
35
|
+
* analytics, etc. The built-in overlay does not require this callback —
|
|
36
|
+
* it renders from internal state regardless.
|
|
37
|
+
*
|
|
38
|
+
* Identical-to-previous snapshots (per `axSnapshotsEqual`) are NOT
|
|
39
|
+
* re-emitted, so a stable UI doesn't generate callback noise.
|
|
40
|
+
*
|
|
41
|
+
* Invoked in a microtask so customer code doesn't run synchronously
|
|
42
|
+
* inside React's commit phase.
|
|
43
|
+
*/
|
|
44
|
+
onAxSnapshotChange?: (snapshot: AxSnapshot | null) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Fires when the user clicks an overlay element (only emitted when
|
|
47
|
+
* `inspectMode === true`). `null` indicates a deselection (ESC, click
|
|
48
|
+
* outside any box, or programmatic clear).
|
|
49
|
+
*
|
|
50
|
+
* The `snapshot` field is the snapshot active at the moment of the
|
|
51
|
+
* click — useful for capturing context without races against the next
|
|
52
|
+
* poll cycle.
|
|
53
|
+
*/
|
|
54
|
+
onInspectSelectionChange?: (selection: {
|
|
55
|
+
element: AxElement;
|
|
56
|
+
snapshot: AxSnapshot;
|
|
57
|
+
} | null) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Fires whenever the accessibility subsystem changes coarse-grained
|
|
60
|
+
* status. Useful for rendering readiness indicators or error banners in
|
|
61
|
+
* a customer-built side panel.
|
|
62
|
+
*
|
|
63
|
+
* Transitions are deduplicated; no self-loops are emitted. The `error`
|
|
64
|
+
* argument is populated when status is `error` or `unavailable`.
|
|
65
|
+
*
|
|
66
|
+
* Lifecycle: `idle` → `starting` → `ready` (or `unavailable` / `error`).
|
|
67
|
+
* Recovery from `error` / `unavailable` is automatic — the fetcher
|
|
68
|
+
* keeps polling and transitions back to `ready` on the next success.
|
|
69
|
+
*/
|
|
70
|
+
onAxStatusChange?: (status: AxStatus, error?: string) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Base interval (ms) between successful AX-tree fetches.
|
|
73
|
+
*
|
|
74
|
+
* The fetcher will:
|
|
75
|
+
* - Wait `axPollIntervalMs` after a successful fetch with NEW data.
|
|
76
|
+
* - Double the wait (up to `axMaxBackoffMs`) when consecutive snapshots
|
|
77
|
+
* are byte-identical (e.g. static screen).
|
|
78
|
+
* - Wait 5 s when the server reports AX is unavailable.
|
|
79
|
+
*
|
|
80
|
+
* In addition, after user input (taps, scrolls, keypresses, openUrl,
|
|
81
|
+
* terminateApp, orientation flips), the fetcher enters a short
|
|
82
|
+
* "activity boost" window (~1.2 s) during which fetches happen at
|
|
83
|
+
* ~250 ms regardless of this setting. This captures mid-animation UI
|
|
84
|
+
* changes without you having to manually call `refreshAxTree`.
|
|
85
|
+
*
|
|
86
|
+
* @default 500
|
|
87
|
+
*/
|
|
88
|
+
axPollIntervalMs?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Maximum backoff (ms) for the AX-tree polling loop when consecutive
|
|
91
|
+
* snapshots are unchanged.
|
|
92
|
+
*
|
|
93
|
+
* @default 2000
|
|
94
|
+
*/
|
|
95
|
+
axMaxBackoffMs?: number;
|
|
15
96
|
}
|
|
16
97
|
interface ScreenshotData {
|
|
17
98
|
dataUri: string;
|
|
@@ -30,6 +111,11 @@ export interface RemoteControlHandle {
|
|
|
30
111
|
screenshot: () => Promise<ScreenshotData>;
|
|
31
112
|
terminateApp: (bundleId: string) => Promise<void>;
|
|
32
113
|
reconnect: () => void;
|
|
114
|
+
refreshAxTree: () => Promise<AxSnapshot>;
|
|
115
|
+
getAxSnapshot: () => AxSnapshot | null;
|
|
116
|
+
setInspectHighlight: (element: AxElement | null) => void;
|
|
117
|
+
setInspectSelection: (element: AxElement | null) => void;
|
|
118
|
+
getAxStatus: () => AxStatus;
|
|
33
119
|
}
|
|
34
120
|
export declare const RemoteControl: React.ForwardRefExoticComponent<RemoteControlProps & React.RefAttributes<RemoteControlHandle>>;
|
|
35
121
|
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AxPlatform, AxSnapshot } from './ax-tree';
|
|
2
|
+
export type AxStatus = 'idle' | 'starting' | 'ready' | 'unavailable' | 'error';
|
|
3
|
+
export type AxFetcherSendFn = (payload: Record<string, unknown>) => boolean;
|
|
4
|
+
export interface AxFetcherOptions {
|
|
5
|
+
platform: AxPlatform;
|
|
6
|
+
send: AxFetcherSendFn;
|
|
7
|
+
onSnapshot: (snapshot: AxSnapshot | null) => void;
|
|
8
|
+
onStatusChange?: (status: AxStatus, error?: string) => void;
|
|
9
|
+
baseIntervalMs?: number;
|
|
10
|
+
maxBackoffMs?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class AxFetcher {
|
|
13
|
+
private readonly platform;
|
|
14
|
+
private readonly send;
|
|
15
|
+
private readonly onSnapshot;
|
|
16
|
+
private readonly onStatusChange?;
|
|
17
|
+
private readonly baseIntervalMs;
|
|
18
|
+
private readonly maxBackoffMs;
|
|
19
|
+
private readonly pending;
|
|
20
|
+
private running;
|
|
21
|
+
private timer;
|
|
22
|
+
private currentInterval;
|
|
23
|
+
private lastSnapshot;
|
|
24
|
+
private inflight;
|
|
25
|
+
private lastBumpAtMs;
|
|
26
|
+
private boostUntilMs;
|
|
27
|
+
private status;
|
|
28
|
+
constructor(opts: AxFetcherOptions);
|
|
29
|
+
start(): void;
|
|
30
|
+
stop(): void;
|
|
31
|
+
getStatus(): AxStatus;
|
|
32
|
+
private setStatus;
|
|
33
|
+
bumpActivity(): void;
|
|
34
|
+
refresh(): Promise<AxSnapshot>;
|
|
35
|
+
getLatest(): AxSnapshot | null;
|
|
36
|
+
handleMessage(message: {
|
|
37
|
+
type?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
[k: string]: unknown;
|
|
40
|
+
}): boolean;
|
|
41
|
+
private buildRequest;
|
|
42
|
+
private requestOnce;
|
|
43
|
+
private runOnce;
|
|
44
|
+
private deliver;
|
|
45
|
+
private scheduleNext;
|
|
46
|
+
private settleResolve;
|
|
47
|
+
private settleReject;
|
|
48
|
+
private failAllPending;
|
|
49
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export interface AxRect {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export interface AxSelectors {
|
|
8
|
+
AXUniqueId?: string;
|
|
9
|
+
AXLabel?: string;
|
|
10
|
+
resourceId?: string;
|
|
11
|
+
contentDesc?: string;
|
|
12
|
+
text?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AxElement {
|
|
16
|
+
id: string;
|
|
17
|
+
path: string;
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
role: string;
|
|
21
|
+
type: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
focused: boolean;
|
|
24
|
+
frame: AxRect;
|
|
25
|
+
selectors: AxSelectors;
|
|
26
|
+
raw: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export type AxPlatform = 'ios' | 'android';
|
|
29
|
+
export interface AxSnapshot {
|
|
30
|
+
platform: AxPlatform;
|
|
31
|
+
screen: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
elements: AxElement[];
|
|
36
|
+
capturedAt: number;
|
|
37
|
+
errors?: string[];
|
|
38
|
+
}
|
|
39
|
+
export declare const AX_UNAVAILABLE_ERROR = "Accessibility unavailable on this device.";
|
|
40
|
+
interface RawIosNode {
|
|
41
|
+
AXLabel?: string | null;
|
|
42
|
+
AXValue?: string | null;
|
|
43
|
+
AXUniqueId?: string | null;
|
|
44
|
+
frame?: {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
role?: string;
|
|
51
|
+
role_description?: string;
|
|
52
|
+
type?: string;
|
|
53
|
+
subrole?: string | null;
|
|
54
|
+
title?: string | null;
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
focused?: boolean;
|
|
57
|
+
pid?: number;
|
|
58
|
+
traits?: string[];
|
|
59
|
+
children?: RawIosNode[];
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
export declare function normalizeIosTree(roots: RawIosNode[] | RawIosNode): AxSnapshot;
|
|
63
|
+
interface RawAndroidParsedBounds {
|
|
64
|
+
left: number;
|
|
65
|
+
top: number;
|
|
66
|
+
right: number;
|
|
67
|
+
bottom: number;
|
|
68
|
+
centerX: number;
|
|
69
|
+
centerY: number;
|
|
70
|
+
}
|
|
71
|
+
interface RawAndroidNode {
|
|
72
|
+
index?: string;
|
|
73
|
+
text?: string;
|
|
74
|
+
resourceId?: string;
|
|
75
|
+
className?: string;
|
|
76
|
+
packageName?: string;
|
|
77
|
+
contentDesc?: string;
|
|
78
|
+
clickable?: boolean;
|
|
79
|
+
enabled?: boolean;
|
|
80
|
+
focusable?: boolean;
|
|
81
|
+
focused?: boolean;
|
|
82
|
+
scrollable?: boolean;
|
|
83
|
+
selected?: boolean;
|
|
84
|
+
bounds?: string;
|
|
85
|
+
parsedBounds?: RawAndroidParsedBounds;
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
}
|
|
88
|
+
export declare function normalizeAndroidTree(nodes: RawAndroidNode[]): AxSnapshot;
|
|
89
|
+
export declare function clampAxFrameForScreen(frame: AxRect, screen: {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
}): AxRect | null;
|
|
93
|
+
export declare function axElementsEqual(a: AxElement, b: AxElement): boolean;
|
|
94
|
+
export declare function axSnapshotsEqual(a: AxSnapshot | null, b: AxSnapshot | null): boolean;
|
|
95
|
+
export declare function axElementAtPoint(snapshot: AxSnapshot, x: number, y: number): AxElement | null;
|
|
96
|
+
export declare function axElementSelectorExpression(el: AxElement, platform: AxPlatform): string | null;
|
|
97
|
+
export declare function axElementRoleLabel(el: AxElement): string;
|
|
98
|
+
export declare function axElementSummary(el: AxElement): string;
|
|
99
|
+
export {};
|
|
@@ -8,6 +8,7 @@ export type AppleIDLoginInput = {
|
|
|
8
8
|
export type AppleIDLoginResult = {
|
|
9
9
|
appleSessionId: string;
|
|
10
10
|
completeResponse: AppleRelayResponse;
|
|
11
|
+
twoFactorChallengeResponse?: AppleRelayResponse;
|
|
11
12
|
requiresTwoFactor: boolean;
|
|
12
13
|
finishTwoFactor: (code: string) => Promise<AppleRelayResponse>;
|
|
13
14
|
finalize: () => Promise<AppleRelayResponse>;
|
|
@@ -8,13 +8,37 @@ export type AppleDeveloperPortalTeam = {
|
|
|
8
8
|
type?: string;
|
|
9
9
|
subType?: string;
|
|
10
10
|
};
|
|
11
|
+
export type AppleDeveloperPortalDevice = {
|
|
12
|
+
deviceId?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
deviceNumber?: string;
|
|
15
|
+
deviceClass?: string;
|
|
16
|
+
model?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
};
|
|
19
|
+
export type AppleDeveloperPortalAppID = {
|
|
20
|
+
appId?: string;
|
|
21
|
+
appIdId?: string;
|
|
22
|
+
identifier?: string;
|
|
23
|
+
bundleId?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
prefix?: string;
|
|
26
|
+
platform?: string;
|
|
27
|
+
};
|
|
11
28
|
export type AppleDeveloperPortalResponse = {
|
|
29
|
+
resultCode?: number;
|
|
30
|
+
resultString?: string;
|
|
31
|
+
userString?: string;
|
|
12
32
|
teams?: AppleDeveloperPortalTeam[];
|
|
13
33
|
provider?: AppleDeveloperPortalTeam;
|
|
14
34
|
availableProviders?: AppleDeveloperPortalTeam[];
|
|
15
|
-
appIds?:
|
|
16
|
-
devices?:
|
|
35
|
+
appIds?: AppleDeveloperPortalAppID[];
|
|
36
|
+
devices?: AppleDeveloperPortalDevice[];
|
|
17
37
|
certRequests?: Array<Record<string, unknown>>;
|
|
38
|
+
certRequest?: Record<string, unknown>;
|
|
39
|
+
appId?: Record<string, unknown>;
|
|
40
|
+
device?: Record<string, unknown>;
|
|
41
|
+
provisioningProfile?: Record<string, unknown>;
|
|
18
42
|
provisioningProfiles?: Array<Record<string, unknown>>;
|
|
19
43
|
};
|
|
20
44
|
export type AppleProvisioningContext = {
|
|
@@ -41,49 +65,34 @@ export declare function listTeamsRequest(): AppleProvisioningRequest;
|
|
|
41
65
|
export declare function findBundleIDRequest({ bundleID, teamID }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'>): {
|
|
42
66
|
method: "POST";
|
|
43
67
|
path: string;
|
|
44
|
-
payload:
|
|
45
|
-
pageNumber: number;
|
|
46
|
-
pageSize: number;
|
|
47
|
-
teamId: string;
|
|
48
|
-
};
|
|
68
|
+
payload: Record<string, unknown>;
|
|
49
69
|
};
|
|
50
70
|
export declare function findDeviceRequest({ deviceUDID, teamID }: Pick<AppleProvisioningContext, 'deviceUDID' | 'teamID'>): {
|
|
51
71
|
method: "POST";
|
|
52
72
|
path: string;
|
|
53
|
-
payload:
|
|
54
|
-
pageNumber: number;
|
|
55
|
-
pageSize: number;
|
|
56
|
-
teamId: string;
|
|
57
|
-
};
|
|
73
|
+
payload: Record<string, unknown>;
|
|
58
74
|
};
|
|
59
75
|
export declare function findDevelopmentCertificatesRequest(teamID?: string): {
|
|
60
76
|
method: "POST";
|
|
61
77
|
path: string;
|
|
62
|
-
payload:
|
|
63
|
-
pageNumber: number;
|
|
64
|
-
pageSize: number;
|
|
65
|
-
teamId: string;
|
|
66
|
-
};
|
|
78
|
+
payload: Record<string, unknown>;
|
|
67
79
|
};
|
|
68
80
|
export declare function findDevelopmentProfilesRequest({ bundleID, teamID, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'>): {
|
|
69
81
|
method: "POST";
|
|
70
82
|
path: string;
|
|
71
|
-
payload:
|
|
72
|
-
pageNumber: number;
|
|
73
|
-
pageSize: number;
|
|
74
|
-
teamId: string;
|
|
75
|
-
};
|
|
83
|
+
payload: Record<string, unknown>;
|
|
76
84
|
};
|
|
77
|
-
export declare function registerDeviceRequest({ deviceUDID, teamID, name, }: AppleProvisioningContext & {
|
|
85
|
+
export declare function registerDeviceRequest({ deviceUDID, teamID, name, }: Pick<AppleProvisioningContext, 'deviceUDID' | 'teamID'> & {
|
|
78
86
|
name?: string;
|
|
79
87
|
}): {
|
|
80
88
|
method: "POST";
|
|
81
89
|
path: string;
|
|
82
90
|
payload: {
|
|
83
91
|
teamId: string;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
deviceNames: string;
|
|
93
|
+
deviceNumbers: string;
|
|
94
|
+
deviceClasses: string;
|
|
95
|
+
register: string;
|
|
87
96
|
};
|
|
88
97
|
};
|
|
89
98
|
export declare function createBundleIDRequest({ bundleID, teamID, name, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'> & {
|
|
@@ -106,15 +115,17 @@ export declare function submitDevelopmentCSRRequest({ csrPEM, teamID, }: {
|
|
|
106
115
|
path: string;
|
|
107
116
|
payload: {
|
|
108
117
|
teamId: string;
|
|
118
|
+
type: string;
|
|
109
119
|
csrContent: string;
|
|
110
120
|
};
|
|
111
121
|
};
|
|
112
122
|
export declare function downloadCertificateRequest(certificateID: string, teamID?: string): {
|
|
113
|
-
method: "
|
|
123
|
+
method: "GET";
|
|
114
124
|
path: string;
|
|
115
125
|
payload: {
|
|
116
126
|
teamId: string;
|
|
117
127
|
certificateId: string;
|
|
128
|
+
type: string;
|
|
118
129
|
};
|
|
119
130
|
};
|
|
120
131
|
export declare function createDevelopmentProfileRequest({ bundleID, teamID, appIDID, certificateID, deviceIDs, name, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'> & {
|
|
@@ -127,16 +138,16 @@ export declare function createDevelopmentProfileRequest({ bundleID, teamID, appI
|
|
|
127
138
|
path: string;
|
|
128
139
|
payload: {
|
|
129
140
|
teamId: string;
|
|
130
|
-
|
|
141
|
+
provisioningProfileName: string;
|
|
131
142
|
certificateIds: string[];
|
|
143
|
+
appIdId: string;
|
|
132
144
|
deviceIds: string[];
|
|
133
|
-
|
|
134
|
-
name: string;
|
|
145
|
+
distributionType: string;
|
|
135
146
|
subPlatform: string;
|
|
136
147
|
};
|
|
137
148
|
};
|
|
138
149
|
export declare function downloadProfileRequest(profileID: string, teamID?: string): {
|
|
139
|
-
method: "
|
|
150
|
+
method: "GET";
|
|
140
151
|
path: string;
|
|
141
152
|
payload: {
|
|
142
153
|
teamId: string;
|
|
@@ -5,13 +5,7 @@ export type AppleRelayResponse<T = unknown> = {
|
|
|
5
5
|
headers?: Record<string, string>;
|
|
6
6
|
body?: T;
|
|
7
7
|
rawBody?: string;
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
export type AppleRelayRequest = {
|
|
11
|
-
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
12
|
-
url: string;
|
|
13
|
-
headers?: Record<string, string>;
|
|
14
|
-
body?: BodyInit;
|
|
8
|
+
rawBodyBase64?: string;
|
|
15
9
|
};
|
|
16
10
|
export type AppleProvisioningRequest = {
|
|
17
11
|
method?: 'GET' | 'POST';
|
|
@@ -22,12 +16,14 @@ export declare function createAppleRelaySession(limbuildApiUrl: string, token?:
|
|
|
22
16
|
appleSessionId: string;
|
|
23
17
|
}>;
|
|
24
18
|
export declare function deleteAppleRelaySession(limbuildApiUrl: string, appleSessionId: string, token?: string): Promise<void>;
|
|
25
|
-
export declare function relayAppleRequest<T = unknown>(limbuildApiUrl: string, appleSessionId: string, request: AppleRelayRequest, token?: string): Promise<AppleRelayResponse<T>>;
|
|
26
19
|
export declare function proxySrpInit(limbuildApiUrl: string, appleSessionId: string, payload: AppleSRPInitRequest, token?: string): Promise<AppleRelayResponse<AppleSRPInitResponse>>;
|
|
27
20
|
export declare function proxySrpComplete(limbuildApiUrl: string, appleSessionId: string, payload: AppleSRPCompleteProof & {
|
|
28
21
|
rememberMe: boolean;
|
|
29
22
|
trustTokens: string[];
|
|
30
23
|
}, token?: string): Promise<AppleRelayResponse<unknown>>;
|
|
24
|
+
export declare function triggerTrustedDeviceTwoFactor(limbuildApiUrl: string, appleSessionId: string, token?: string): Promise<AppleRelayResponse<unknown>>;
|
|
25
|
+
export declare function triggerPhoneTwoFactor(limbuildApiUrl: string, appleSessionId: string, phoneNumberId: number, mode?: string, token?: string): Promise<AppleRelayResponse<unknown>>;
|
|
31
26
|
export declare function proxyTwoFactorCode(limbuildApiUrl: string, appleSessionId: string, code: string, token?: string): Promise<AppleRelayResponse<unknown>>;
|
|
32
|
-
export declare function
|
|
27
|
+
export declare function proxyPhoneTwoFactorCode(limbuildApiUrl: string, appleSessionId: string, phoneNumberId: number, code: string, mode?: string, token?: string): Promise<AppleRelayResponse<unknown>>;
|
|
28
|
+
export declare function fetchAppleAccountSession(limbuildApiUrl: string, appleSessionId: string, token?: string): Promise<AppleRelayResponse<unknown>>;
|
|
33
29
|
export declare function proxyProvisioningRequest<T = unknown>(limbuildApiUrl: string, appleSessionId: string, request: AppleProvisioningRequest, token?: string): Promise<AppleRelayResponse<T>>;
|
|
@@ -10,6 +10,7 @@ export declare function getSigningAssets({ deviceUDID, bundleID, }: {
|
|
|
10
10
|
bundleID?: string;
|
|
11
11
|
}): Promise<StoredSigningAssets | undefined>;
|
|
12
12
|
export declare function getLatestSigningAssets(): Promise<StoredSigningAssets>;
|
|
13
|
+
export declare function getLatestSigningAssetsWithCertificate(teamID?: string): Promise<StoredSigningAssets>;
|
|
13
14
|
export declare function putSigningAssets(input: PutSigningAssetsInput): Promise<StoredSigningAssets>;
|
|
14
15
|
export declare function findSigningAssetsForBundle(bundleID?: string): Promise<StoredSigningAssets[]>;
|
|
15
16
|
export declare function profileContainsDevice(profile: ProvisioningProfileInfo, deviceUDID?: string): boolean;
|
|
@@ -23,3 +24,21 @@ export declare function parseProvisioningProfile(file: File): Promise<{
|
|
|
23
24
|
provisionedDevices: string[];
|
|
24
25
|
expirationDate: string | undefined;
|
|
25
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,7 +1,7 @@
|
|
|
1
1
|
export type DeviceInstallLog = (message: string, detail?: string) => void;
|
|
2
|
-
export type DeviceInstallStep = '
|
|
2
|
+
export type DeviceInstallStep = 'signing' | 'connect' | 'build' | 'install';
|
|
3
3
|
export type DeviceInstallStepStatus = 'idle' | 'active' | 'complete' | 'error';
|
|
4
|
-
export type DeviceInstallBusyAction = '
|
|
4
|
+
export type DeviceInstallBusyAction = 'signing' | 'usb' | 'pair' | 'build' | 'install';
|
|
5
5
|
export type DeviceInstallBuildStatus = 'idle' | 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
6
6
|
export type BuildLogLine = {
|
|
7
7
|
type: 'command' | 'stdout' | 'stderr' | 'meta';
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-
|
|
2
|
-
${i.join(`
|
|
3
|
-
`)}
|
|
4
|
-
-----END ${t}-----
|
|
5
|
-
`}function C(t,n){const r=n.match(/.{1,64}/g)??[];return`-----BEGIN ${t}-----
|
|
6
|
-
${r.join(`
|
|
7
|
-
`)}
|
|
8
|
-
-----END ${t}-----
|
|
9
|
-
`}function c(t){let n="";for(const r of t)n+=String.fromCharCode(r);return btoa(n)}function q(t){return btoa(t)}function h(t){return atob(t)}function U(t){const n=new Uint8Array(t.byteLength);return n.set(t),n.buffer}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.fetchLimbuildInfo=e.fetchLimbuildInfo;exports.finalizeAppleRelaySession=e.finalizeAppleRelaySession;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.getBulkEndpoints=e.getBulkEndpoints;exports.getLatestSigningAssets=e.getLatestSigningAssets;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.profileContainsDevice=e.profileContainsDevice;exports.profileMatchesBundleID=e.profileMatchesBundleID;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.relayAppleRequest=e.relayAppleRequest;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.useDeviceInstall=e.useDeviceInstall;exports.watchBuildLogEvents=e.watchBuildLogEvents;exports.DeviceInstallDialog=d.DeviceInstallDialog;exports.DeviceInstallRelay=d.DeviceInstallDialog;exports.exportAppleCertificateP12=S;exports.generateAppleSigningKeyAndCSR=A;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-Y1u6vIBB.js"),t=require("../device-install-dialog-CjH25hnN.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;
|