@limrun/ui 0.9.0-rc.9 → 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 +33 -3
- 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-CqxDEH85.mjs +0 -443
- package/dist/device-install-dialog-jvqQ-fuo.js +0 -2
- package/dist/device-install-dialog.css +0 -1
- package/dist/hooks/use-device-install.d.ts +0 -73
- package/dist/use-device-install-CAPli9MR.js +0 -31
- package/dist/use-device-install-H8dqqvbR.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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useState as c, useRef as S, useCallback as a, useEffect as E } from "react";
|
|
2
|
+
import { s as b } from "../client-Bk1N3XIF.mjs";
|
|
3
|
+
import "../index-BXg7HdIs.mjs";
|
|
4
|
+
function T({ limbuildApiUrl: r, token: l }) {
|
|
5
|
+
const [w, o] = c("idle"), [g, u] = c(), [h, d] = c(), [v, p] = c(), [m, s] = c(), e = S(void 0), R = a(async () => {
|
|
6
|
+
await e.current?.close().catch(() => {
|
|
7
|
+
}), e.current = void 0, u(void 0), d(void 0), p(void 0), s(void 0), o("idle");
|
|
8
|
+
}, []);
|
|
9
|
+
E(() => () => {
|
|
10
|
+
e.current?.close(), e.current = void 0;
|
|
11
|
+
}, []);
|
|
12
|
+
const y = a(
|
|
13
|
+
async ({ accountName: n, password: i }) => {
|
|
14
|
+
o("authenticating"), s(void 0), await e.current?.close().catch(() => {
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
const t = await b({
|
|
18
|
+
limbuildApiUrl: r,
|
|
19
|
+
token: l,
|
|
20
|
+
accountName: n,
|
|
21
|
+
password: i
|
|
22
|
+
});
|
|
23
|
+
return e.current = t, u(t), d(t.completeResponse), p(t.twoFactorChallengeResponse), o(t.requiresTwoFactor ? "two-factor-required" : "authenticated"), t;
|
|
24
|
+
} catch (t) {
|
|
25
|
+
u(void 0), e.current = void 0, s(f(t)), o("error");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
[r, l]
|
|
30
|
+
), C = a(async (n) => {
|
|
31
|
+
const i = e.current;
|
|
32
|
+
if (!i)
|
|
33
|
+
throw new Error("Start Apple ID login before submitting a two-factor code.");
|
|
34
|
+
o("authenticating"), s(void 0);
|
|
35
|
+
try {
|
|
36
|
+
const t = await i.finishTwoFactor(n);
|
|
37
|
+
return o("authenticated"), t;
|
|
38
|
+
} catch (t) {
|
|
39
|
+
s(f(t)), o("error");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}, []), F = a(async () => {
|
|
43
|
+
const n = e.current;
|
|
44
|
+
if (!n)
|
|
45
|
+
throw new Error("Start Apple ID login before finalizing the Apple session.");
|
|
46
|
+
return n.finalize();
|
|
47
|
+
}, []);
|
|
48
|
+
return {
|
|
49
|
+
status: w,
|
|
50
|
+
session: g,
|
|
51
|
+
completeResponse: h,
|
|
52
|
+
twoFactorChallengeResponse: v,
|
|
53
|
+
error: m,
|
|
54
|
+
startLogin: y,
|
|
55
|
+
submitTwoFactorCode: C,
|
|
56
|
+
finalize: F,
|
|
57
|
+
close: R
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function f(r) {
|
|
61
|
+
return r instanceof Error ? r.message : String(r);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
T as useAppleIDLogin
|
|
65
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
const v = "limbuild-device-pairing";
|
|
2
|
+
const d = "pairRecords", m = "limbuild-device-signing";
|
|
3
|
+
const c = "signingAssets";
|
|
4
|
+
function l(e) {
|
|
5
|
+
return (e ?? "").replace(/-/g, "").replace(/[^a-fA-F0-9]/g, "");
|
|
6
|
+
}
|
|
7
|
+
function f(e) {
|
|
8
|
+
return (e ?? "").trim();
|
|
9
|
+
}
|
|
10
|
+
async function R(e) {
|
|
11
|
+
const n = l(e);
|
|
12
|
+
if (!n) return;
|
|
13
|
+
const r = await g(v, 1, d, "udid");
|
|
14
|
+
return p(
|
|
15
|
+
r.transaction(d, "readonly").objectStore(d).get(n)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
async function G(e, n = {}) {
|
|
19
|
+
const r = l(e.udid);
|
|
20
|
+
if (!r) throw new Error("Cannot store pair record without a UDID.");
|
|
21
|
+
const t = {
|
|
22
|
+
...e,
|
|
23
|
+
udid: r,
|
|
24
|
+
productName: n.productName,
|
|
25
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26
|
+
}, i = await g(v, 1, d, "udid");
|
|
27
|
+
return await p(
|
|
28
|
+
i.transaction(d, "readwrite").objectStore(d).put(t)
|
|
29
|
+
), t;
|
|
30
|
+
}
|
|
31
|
+
async function O({
|
|
32
|
+
deviceUDID: e,
|
|
33
|
+
bundleID: n,
|
|
34
|
+
signingMode: r = "development"
|
|
35
|
+
}) {
|
|
36
|
+
const t = f(n);
|
|
37
|
+
if (!t) return;
|
|
38
|
+
const i = l(e), s = await S(I("bundle", t, r));
|
|
39
|
+
if (s) return s;
|
|
40
|
+
if (i) {
|
|
41
|
+
const o = await S(I(i, t, r));
|
|
42
|
+
if (o) return o;
|
|
43
|
+
}
|
|
44
|
+
return (await B(t, r))[0];
|
|
45
|
+
}
|
|
46
|
+
async function V(e = "development") {
|
|
47
|
+
return (await w()).filter((r) => (r.signingMode ?? "development") === e).sort(
|
|
48
|
+
(r, t) => new Date(t.updatedAt).getTime() - new Date(r.updatedAt).getTime()
|
|
49
|
+
)[0];
|
|
50
|
+
}
|
|
51
|
+
async function z(e, n = "development") {
|
|
52
|
+
return (await w()).filter((t) => !t.certificateID || !t.certificateP12Base64 || (t.signingMode ?? "development") !== n ? !1 : !e || !t.teamID || t.teamID === e).sort((t, i) => new Date(i.updatedAt).getTime() - new Date(t.updatedAt).getTime())[0];
|
|
53
|
+
}
|
|
54
|
+
async function T(e) {
|
|
55
|
+
const n = f(e.bundleID);
|
|
56
|
+
if (!n)
|
|
57
|
+
throw new Error("Cannot store signing assets without a bundle ID.");
|
|
58
|
+
const r = l(e.deviceUDID), t = e.signingMode ?? "development", i = I("bundle", n, t), s = {
|
|
59
|
+
...e,
|
|
60
|
+
id: i,
|
|
61
|
+
deviceUDID: r || void 0,
|
|
62
|
+
signingMode: t,
|
|
63
|
+
bundleID: n,
|
|
64
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
65
|
+
}, a = await g(m, 1, c, "id");
|
|
66
|
+
return await p(
|
|
67
|
+
a.transaction(c, "readwrite").objectStore(c).put(s)
|
|
68
|
+
), s;
|
|
69
|
+
}
|
|
70
|
+
async function B(e, n = "development") {
|
|
71
|
+
const r = f(e);
|
|
72
|
+
return r ? (await w()).filter((i) => i.bundleID === r && (i.signingMode ?? "development") === n) : [];
|
|
73
|
+
}
|
|
74
|
+
function U(e, n) {
|
|
75
|
+
const r = l(n);
|
|
76
|
+
return !!r && e.provisionedDevices.some((t) => l(t) === r);
|
|
77
|
+
}
|
|
78
|
+
function j(e, n) {
|
|
79
|
+
const r = f(n), t = f(e.bundleID);
|
|
80
|
+
if (!r || !t) return !1;
|
|
81
|
+
if (t === r || t === "*") return !0;
|
|
82
|
+
if (!t.endsWith(".*")) return !1;
|
|
83
|
+
const i = t.slice(0, -1);
|
|
84
|
+
return r.startsWith(i);
|
|
85
|
+
}
|
|
86
|
+
async function M(e) {
|
|
87
|
+
return P(new Uint8Array(await e.arrayBuffer()));
|
|
88
|
+
}
|
|
89
|
+
function C(e) {
|
|
90
|
+
const n = atob(e), r = new Uint8Array(n.length);
|
|
91
|
+
for (let t = 0; t < n.length; t += 1)
|
|
92
|
+
r[t] = n.charCodeAt(t);
|
|
93
|
+
return P(r);
|
|
94
|
+
}
|
|
95
|
+
function P(e) {
|
|
96
|
+
const n = new TextDecoder("latin1").decode(e), r = n.indexOf("<?xml"), t = n.indexOf("</plist>");
|
|
97
|
+
if (r < 0 || t < r)
|
|
98
|
+
throw new Error("Provisioning profile plist not found.");
|
|
99
|
+
const i = n.slice(r, t + 8), s = new DOMParser().parseFromString(i, "application/xml");
|
|
100
|
+
if (s.querySelector("parsererror"))
|
|
101
|
+
throw new Error("Provisioning profile plist could not be parsed.");
|
|
102
|
+
const a = s.querySelector("plist > dict");
|
|
103
|
+
if (!a)
|
|
104
|
+
throw new Error("Provisioning profile plist dictionary not found.");
|
|
105
|
+
const o = A(a);
|
|
106
|
+
if (!N(o))
|
|
107
|
+
throw new Error("Provisioning profile plist has an unexpected shape.");
|
|
108
|
+
const D = N(o.Entitlements) ? o.Entitlements : {}, y = u(D["application-identifier"]), h = E(y);
|
|
109
|
+
return {
|
|
110
|
+
name: u(o.Name),
|
|
111
|
+
uuid: u(o.UUID),
|
|
112
|
+
teamID: u(D["com.apple.developer.team-identifier"]) ?? b(o.TeamIdentifier)[0],
|
|
113
|
+
applicationIdentifier: y,
|
|
114
|
+
bundleID: h,
|
|
115
|
+
provisionedDevices: b(o.ProvisionedDevices),
|
|
116
|
+
getTaskAllow: _(D["get-task-allow"]),
|
|
117
|
+
expirationDate: u(o.ExpirationDate)
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
async function S(e) {
|
|
121
|
+
if (!e) return;
|
|
122
|
+
const n = await g(m, 1, c, "id");
|
|
123
|
+
return p(
|
|
124
|
+
n.transaction(c, "readonly").objectStore(c).get(e)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
async function w() {
|
|
128
|
+
const e = await g(m, 1, c, "id");
|
|
129
|
+
return p(
|
|
130
|
+
e.transaction(c, "readonly").objectStore(c).getAll()
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
function I(e, n, r) {
|
|
134
|
+
return `${r}:${e}:${n}`;
|
|
135
|
+
}
|
|
136
|
+
function E(e) {
|
|
137
|
+
if (!e) return;
|
|
138
|
+
const n = e.indexOf(".");
|
|
139
|
+
return n >= 0 ? e.slice(n + 1) : void 0;
|
|
140
|
+
}
|
|
141
|
+
function A(e) {
|
|
142
|
+
switch (e.tagName) {
|
|
143
|
+
case "dict":
|
|
144
|
+
return x(e);
|
|
145
|
+
case "array":
|
|
146
|
+
return Array.from(e.children).map(A);
|
|
147
|
+
case "string":
|
|
148
|
+
case "date":
|
|
149
|
+
return e.textContent ?? "";
|
|
150
|
+
default:
|
|
151
|
+
return e.textContent ?? "";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function x(e) {
|
|
155
|
+
const n = {}, r = Array.from(e.children);
|
|
156
|
+
for (let t = 0; t < r.length; t += 2) {
|
|
157
|
+
const i = r[t], s = r[t + 1];
|
|
158
|
+
!i || i.tagName !== "key" || !s || (n[i.textContent ?? ""] = A(s));
|
|
159
|
+
}
|
|
160
|
+
return n;
|
|
161
|
+
}
|
|
162
|
+
function u(e) {
|
|
163
|
+
return typeof e == "string" && e ? e : void 0;
|
|
164
|
+
}
|
|
165
|
+
function b(e) {
|
|
166
|
+
return Array.isArray(e) ? e.filter((n) => typeof n == "string") : [];
|
|
167
|
+
}
|
|
168
|
+
function _(e) {
|
|
169
|
+
return typeof e == "boolean" ? e : void 0;
|
|
170
|
+
}
|
|
171
|
+
function N(e) {
|
|
172
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
173
|
+
}
|
|
174
|
+
function g(e, n, r, t) {
|
|
175
|
+
return new Promise((i, s) => {
|
|
176
|
+
const a = indexedDB.open(e, n);
|
|
177
|
+
a.onupgradeneeded = () => {
|
|
178
|
+
const o = a.result;
|
|
179
|
+
o.objectStoreNames.contains(r) || o.createObjectStore(r, { keyPath: t });
|
|
180
|
+
}, a.onsuccess = () => i(a.result), a.onerror = () => s(a.error ?? new Error("Open IndexedDB failed"));
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function p(e) {
|
|
184
|
+
return new Promise((n, r) => {
|
|
185
|
+
e.onsuccess = () => n(e.result), e.onerror = () => r(e.error ?? new Error("IndexedDB request failed"));
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
export {
|
|
189
|
+
T as a,
|
|
190
|
+
j as b,
|
|
191
|
+
U as c,
|
|
192
|
+
z as d,
|
|
193
|
+
O as e,
|
|
194
|
+
C as f,
|
|
195
|
+
V as g,
|
|
196
|
+
P as h,
|
|
197
|
+
f as i,
|
|
198
|
+
R as j,
|
|
199
|
+
G as k,
|
|
200
|
+
l as n,
|
|
201
|
+
M as p
|
|
202
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b="limbuild-device-pairing";const l="pairRecords",m="limbuild-device-signing";const c="signingAssets";function d(e){return(e??"").replace(/-/g,"").replace(/[^a-fA-F0-9]/g,"")}function u(e){return(e??"").trim()}async function h(e){const n=d(e);if(!n)return;const r=await g(b,1,l,"udid");return p(r.transaction(l,"readonly").objectStore(l).get(n))}async function E(e,n={}){const r=d(e.udid);if(!r)throw new Error("Cannot store pair record without a UDID.");const t={...e,udid:r,productName:n.productName,updatedAt:new Date().toISOString()},i=await g(b,1,l,"udid");return await p(i.transaction(l,"readwrite").objectStore(l).put(t)),t}async function x({deviceUDID:e,bundleID:n,signingMode:r="development"}){const t=u(n);if(!t)return;const i=d(e),s=await v(I("bundle",t,r));if(s)return s;if(i){const o=await v(I(i,t,r));if(o)return o}return(await O(t,r))[0]}async function _(e="development"){return(await A()).filter(r=>(r.signingMode??"development")===e).sort((r,t)=>new Date(t.updatedAt).getTime()-new Date(r.updatedAt).getTime())[0]}async function R(e,n="development"){return(await A()).filter(t=>!t.certificateID||!t.certificateP12Base64||(t.signingMode??"development")!==n?!1:!e||!t.teamID||t.teamID===e).sort((t,i)=>new Date(i.updatedAt).getTime()-new Date(t.updatedAt).getTime())[0]}async function G(e){const n=u(e.bundleID);if(!n)throw new Error("Cannot store signing assets without a bundle ID.");const r=d(e.deviceUDID),t=e.signingMode??"development",i=I("bundle",n,t),s={...e,id:i,deviceUDID:r||void 0,signingMode:t,bundleID:n,updatedAt:new Date().toISOString()},a=await g(m,1,c,"id");return await p(a.transaction(c,"readwrite").objectStore(c).put(s)),s}async function O(e,n="development"){const r=u(e);return r?(await A()).filter(i=>i.bundleID===r&&(i.signingMode??"development")===n):[]}function z(e,n){const r=d(n);return!!r&&e.provisionedDevices.some(t=>d(t)===r)}function U(e,n){const r=u(n),t=u(e.bundleID);if(!r||!t)return!1;if(t===r||t==="*")return!0;if(!t.endsWith(".*"))return!1;const i=t.slice(0,-1);return r.startsWith(i)}async function V(e){return w(new Uint8Array(await e.arrayBuffer()))}function C(e){const n=atob(e),r=new Uint8Array(n.length);for(let t=0;t<n.length;t+=1)r[t]=n.charCodeAt(t);return w(r)}function w(e){const n=new TextDecoder("latin1").decode(e),r=n.indexOf("<?xml"),t=n.indexOf("</plist>");if(r<0||t<r)throw new Error("Provisioning profile plist not found.");const i=n.slice(r,t+8),s=new DOMParser().parseFromString(i,"application/xml");if(s.querySelector("parsererror"))throw new Error("Provisioning profile plist could not be parsed.");const a=s.querySelector("plist > dict");if(!a)throw new Error("Provisioning profile plist dictionary not found.");const o=S(a);if(!P(o))throw new Error("Provisioning profile plist has an unexpected shape.");const D=P(o.Entitlements)?o.Entitlements:{},y=f(D["application-identifier"]),B=M(y);return{name:f(o.Name),uuid:f(o.UUID),teamID:f(D["com.apple.developer.team-identifier"])??N(o.TeamIdentifier)[0],applicationIdentifier:y,bundleID:B,provisionedDevices:N(o.ProvisionedDevices),getTaskAllow:j(D["get-task-allow"]),expirationDate:f(o.ExpirationDate)}}async function v(e){if(!e)return;const n=await g(m,1,c,"id");return p(n.transaction(c,"readonly").objectStore(c).get(e))}async function A(){const e=await g(m,1,c,"id");return p(e.transaction(c,"readonly").objectStore(c).getAll())}function I(e,n,r){return`${r}:${e}:${n}`}function M(e){if(!e)return;const n=e.indexOf(".");return n>=0?e.slice(n+1):void 0}function S(e){switch(e.tagName){case"dict":return T(e);case"array":return Array.from(e.children).map(S);case"string":case"date":return e.textContent??"";default:return e.textContent??""}}function T(e){const n={},r=Array.from(e.children);for(let t=0;t<r.length;t+=2){const i=r[t],s=r[t+1];!i||i.tagName!=="key"||!s||(n[i.textContent??""]=S(s))}return n}function f(e){return typeof e=="string"&&e?e:void 0}function N(e){return Array.isArray(e)?e.filter(n=>typeof n=="string"):[]}function j(e){return typeof e=="boolean"?e:void 0}function P(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function g(e,n,r,t){return new Promise((i,s)=>{const a=indexedDB.open(e,n);a.onupgradeneeded=()=>{const o=a.result;o.objectStoreNames.contains(r)||o.createObjectStore(r,{keyPath:t})},a.onsuccess=()=>i(a.result),a.onerror=()=>s(a.error??new Error("Open IndexedDB failed"))})}function p(e){return new Promise((n,r)=>{e.onsuccess=()=>n(e.result),e.onerror=()=>r(e.error??new Error("IndexedDB request failed"))})}exports.getLatestSigningAssets=_;exports.getLatestSigningAssetsWithCertificate=R;exports.getPairRecord=h;exports.getSigningAssets=x;exports.normalizeBundleID=u;exports.normalizeUDID=d;exports.parseProvisioningProfile=V;exports.parseProvisioningProfileBase64=C;exports.parseProvisioningProfileBytes=w;exports.profileContainsDevice=z;exports.profileMatchesBundleID=U;exports.putPairRecord=E;exports.putSigningAssets=G;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { A as S } from "./index-BXg7HdIs.mjs";
|
|
2
|
+
async function x(t, a) {
|
|
3
|
+
const r = await fetch(c(t, "/apple/auth/session", a), {
|
|
4
|
+
method: "POST",
|
|
5
|
+
headers: $(a)
|
|
6
|
+
});
|
|
7
|
+
if (!r.ok)
|
|
8
|
+
throw new Error(`Apple relay session failed: HTTP ${r.status} ${await r.text()}`);
|
|
9
|
+
return await r.json();
|
|
10
|
+
}
|
|
11
|
+
async function T(t, a, r) {
|
|
12
|
+
const e = await fetch(c(t, "/apple/auth/session/delete", r), {
|
|
13
|
+
method: "POST",
|
|
14
|
+
headers: u(r),
|
|
15
|
+
body: JSON.stringify({ appleSessionId: a })
|
|
16
|
+
});
|
|
17
|
+
if (!e.ok)
|
|
18
|
+
throw new Error(`Apple relay session delete failed: HTTP ${e.status} ${await e.text()}`);
|
|
19
|
+
}
|
|
20
|
+
async function A(t, a, r, e) {
|
|
21
|
+
return m(
|
|
22
|
+
t,
|
|
23
|
+
"/apple/auth/srp/init",
|
|
24
|
+
a,
|
|
25
|
+
r,
|
|
26
|
+
e
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
async function O(t, a, r, e) {
|
|
30
|
+
return m(t, "/apple/auth/srp/complete", a, r, e);
|
|
31
|
+
}
|
|
32
|
+
async function N(t, a, r) {
|
|
33
|
+
const e = await fetch(c(t, "/apple/auth/2fa/trigger", r), {
|
|
34
|
+
method: "POST",
|
|
35
|
+
headers: u(r),
|
|
36
|
+
body: JSON.stringify({ appleSessionId: a })
|
|
37
|
+
});
|
|
38
|
+
if (!e.ok)
|
|
39
|
+
throw new Error(`Apple 2FA trigger failed: HTTP ${e.status} ${await e.text()}`);
|
|
40
|
+
return await e.json();
|
|
41
|
+
}
|
|
42
|
+
async function b(t, a, r, e = "sms", o) {
|
|
43
|
+
const s = await fetch(c(t, "/apple/auth/2fa/phone/trigger", o), {
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers: u(o),
|
|
46
|
+
body: JSON.stringify({ appleSessionId: a, phoneNumberId: r, mode: e })
|
|
47
|
+
});
|
|
48
|
+
if (!s.ok)
|
|
49
|
+
throw new Error(`Apple phone 2FA trigger failed: HTTP ${s.status} ${await s.text()}`);
|
|
50
|
+
return await s.json();
|
|
51
|
+
}
|
|
52
|
+
async function E(t, a, r, e) {
|
|
53
|
+
const o = await fetch(c(t, "/apple/auth/2fa", e), {
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: u(e),
|
|
56
|
+
body: JSON.stringify({ appleSessionId: a, code: r })
|
|
57
|
+
});
|
|
58
|
+
if (!o.ok)
|
|
59
|
+
throw new Error(`Apple 2FA proxy failed: HTTP ${o.status} ${await o.text()}`);
|
|
60
|
+
return await o.json();
|
|
61
|
+
}
|
|
62
|
+
async function H(t, a, r, e, o = "sms", s) {
|
|
63
|
+
const n = await fetch(c(t, "/apple/auth/2fa/phone", s), {
|
|
64
|
+
method: "POST",
|
|
65
|
+
headers: u(s),
|
|
66
|
+
body: JSON.stringify({ appleSessionId: a, phoneNumberId: r, mode: o, code: e })
|
|
67
|
+
});
|
|
68
|
+
if (!n.ok)
|
|
69
|
+
throw new Error(`Apple phone 2FA proxy failed: HTTP ${n.status} ${await n.text()}`);
|
|
70
|
+
return await n.json();
|
|
71
|
+
}
|
|
72
|
+
async function F(t, a, r) {
|
|
73
|
+
const e = await fetch(c(t, "/apple/auth/finalize", r), {
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: u(r),
|
|
76
|
+
body: JSON.stringify({ appleSessionId: a })
|
|
77
|
+
});
|
|
78
|
+
if (!e.ok)
|
|
79
|
+
throw new Error(`Apple session finalization failed: HTTP ${e.status} ${await e.text()}`);
|
|
80
|
+
return await e.json();
|
|
81
|
+
}
|
|
82
|
+
async function j(t, a, r, e) {
|
|
83
|
+
const o = await fetch(c(t, "/apple/provisioning", e), {
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers: u(e),
|
|
86
|
+
body: JSON.stringify({ appleSessionId: a, ...r })
|
|
87
|
+
});
|
|
88
|
+
if (!o.ok)
|
|
89
|
+
throw new Error(`Apple provisioning proxy failed: HTTP ${o.status} ${await o.text()}`);
|
|
90
|
+
return P(await o.json());
|
|
91
|
+
}
|
|
92
|
+
async function m(t, a, r, e, o) {
|
|
93
|
+
const s = await fetch(c(t, a, o), {
|
|
94
|
+
method: "POST",
|
|
95
|
+
headers: u(o),
|
|
96
|
+
body: JSON.stringify({ appleSessionId: r, payload: e })
|
|
97
|
+
});
|
|
98
|
+
if (!s.ok)
|
|
99
|
+
throw new Error(`Apple proxy ${a} failed: HTTP ${s.status} ${await s.text()}`);
|
|
100
|
+
return P(await s.json());
|
|
101
|
+
}
|
|
102
|
+
function P(t) {
|
|
103
|
+
if (t.body !== void 0 || !t.rawBody)
|
|
104
|
+
return t;
|
|
105
|
+
try {
|
|
106
|
+
return {
|
|
107
|
+
...t,
|
|
108
|
+
body: JSON.parse(t.rawBody)
|
|
109
|
+
};
|
|
110
|
+
} catch {
|
|
111
|
+
return t;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function c(t, a, r) {
|
|
115
|
+
const e = t.replace(/\/$/, ""), o = a.startsWith("/") ? a : `/${a}`, s = new URL(`${e}${o}`);
|
|
116
|
+
return r && s.searchParams.set("token", r), s;
|
|
117
|
+
}
|
|
118
|
+
function u(t) {
|
|
119
|
+
return {
|
|
120
|
+
"Content-Type": "application/json",
|
|
121
|
+
...$(t)
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function $(t) {
|
|
125
|
+
return t ? { Authorization: `Bearer ${t}` } : {};
|
|
126
|
+
}
|
|
127
|
+
async function J({
|
|
128
|
+
limbuildApiUrl: t,
|
|
129
|
+
accountName: a,
|
|
130
|
+
password: r,
|
|
131
|
+
token: e
|
|
132
|
+
}) {
|
|
133
|
+
const { appleSessionId: o } = await x(t, e);
|
|
134
|
+
try {
|
|
135
|
+
const s = new S(a), n = await A(t, o, await s.init(), e);
|
|
136
|
+
if (n.status < 200 || n.status >= 300)
|
|
137
|
+
throw new Error(`Apple SRP init failed: HTTP ${n.status} ${n.rawBody ?? ""}`.trim());
|
|
138
|
+
if (!n.body)
|
|
139
|
+
throw new Error("Apple SRP init response did not include a body.");
|
|
140
|
+
const g = await s.complete(r, n.body), f = await O(
|
|
141
|
+
t,
|
|
142
|
+
o,
|
|
143
|
+
{
|
|
144
|
+
...g,
|
|
145
|
+
rememberMe: !1,
|
|
146
|
+
trustTokens: []
|
|
147
|
+
},
|
|
148
|
+
e
|
|
149
|
+
), l = f.status === 409;
|
|
150
|
+
let i, d = { type: "trustedDevice" };
|
|
151
|
+
if (l) {
|
|
152
|
+
i = await N(t, o, e);
|
|
153
|
+
const p = R(i.body);
|
|
154
|
+
if (p && (d = {
|
|
155
|
+
type: "phone",
|
|
156
|
+
phoneNumberId: p.id,
|
|
157
|
+
mode: p.pushMode ?? "sms"
|
|
158
|
+
}), i.status === 412) {
|
|
159
|
+
if (!p)
|
|
160
|
+
throw new Error("Apple requested phone verification but did not include a trusted phone number.");
|
|
161
|
+
i = await b(
|
|
162
|
+
t,
|
|
163
|
+
o,
|
|
164
|
+
p.id,
|
|
165
|
+
p.pushMode ?? "sms",
|
|
166
|
+
e
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
if (i.status < 200 || i.status >= 300)
|
|
170
|
+
throw new Error(
|
|
171
|
+
`Apple two-factor challenge failed: HTTP ${i.status} ${i.rawBody ?? ""}`.trim()
|
|
172
|
+
);
|
|
173
|
+
} else if (f.status < 200 || f.status >= 300)
|
|
174
|
+
throw new Error(`Apple SRP complete failed: HTTP ${f.status} ${f.rawBody ?? ""}`.trim());
|
|
175
|
+
return {
|
|
176
|
+
appleSessionId: o,
|
|
177
|
+
completeResponse: f,
|
|
178
|
+
twoFactorChallengeResponse: i,
|
|
179
|
+
requiresTwoFactor: l,
|
|
180
|
+
finishTwoFactor: async (p) => {
|
|
181
|
+
const h = d.type === "phone" ? await H(
|
|
182
|
+
t,
|
|
183
|
+
o,
|
|
184
|
+
d.phoneNumberId,
|
|
185
|
+
p,
|
|
186
|
+
d.mode,
|
|
187
|
+
e
|
|
188
|
+
) : await E(t, o, p, e);
|
|
189
|
+
if (h.status < 200 || h.status >= 300)
|
|
190
|
+
throw new Error(`Apple two-factor code failed: HTTP ${h.status} ${h.rawBody ?? ""}`.trim());
|
|
191
|
+
return h;
|
|
192
|
+
},
|
|
193
|
+
finalize: async () => F(t, o, e),
|
|
194
|
+
close: () => T(t, o, e)
|
|
195
|
+
};
|
|
196
|
+
} catch (s) {
|
|
197
|
+
throw await T(t, o, e).catch(() => {
|
|
198
|
+
}), s;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function R(t) {
|
|
202
|
+
if (!y(t)) return;
|
|
203
|
+
const a = y(t.phoneNumberVerification) ? t.phoneNumberVerification : void 0, r = w(a?.trustedPhoneNumber) ?? w(t.trustedPhoneNumber) ?? w(t.phoneNumber);
|
|
204
|
+
if (!r) return;
|
|
205
|
+
const e = r.id;
|
|
206
|
+
if (typeof e != "number") return;
|
|
207
|
+
const o = typeof r.pushMode == "string" ? r.pushMode : typeof t.mode == "string" ? t.mode : void 0;
|
|
208
|
+
return { id: e, pushMode: o };
|
|
209
|
+
}
|
|
210
|
+
function w(t) {
|
|
211
|
+
return y(t) ? t : void 0;
|
|
212
|
+
}
|
|
213
|
+
function y(t) {
|
|
214
|
+
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
215
|
+
}
|
|
216
|
+
export {
|
|
217
|
+
H as a,
|
|
218
|
+
O as b,
|
|
219
|
+
x as c,
|
|
220
|
+
T as d,
|
|
221
|
+
A as e,
|
|
222
|
+
F as f,
|
|
223
|
+
E as g,
|
|
224
|
+
N as h,
|
|
225
|
+
j as p,
|
|
226
|
+
J as s,
|
|
227
|
+
b as t
|
|
228
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const E=require("./index-CMeQfhYy.js");async function P(e,s){const r=await fetch(c(e,"/apple/auth/session",s),{method:"POST",headers:R(s)});if(!r.ok)throw new Error(`Apple relay session failed: HTTP ${r.status} ${await r.text()}`);return await r.json()}async function y(e,s,r){const t=await fetch(c(e,"/apple/auth/session/delete",r),{method:"POST",headers:u(r),body:JSON.stringify({appleSessionId:s})});if(!t.ok)throw new Error(`Apple relay session delete failed: HTTP ${t.status} ${await t.text()}`)}async function g(e,s,r,t){return N(e,"/apple/auth/srp/init",s,r,t)}async function m(e,s,r,t){return N(e,"/apple/auth/srp/complete",s,r,t)}async function S(e,s,r){const t=await fetch(c(e,"/apple/auth/2fa/trigger",r),{method:"POST",headers:u(r),body:JSON.stringify({appleSessionId:s})});if(!t.ok)throw new Error(`Apple 2FA trigger failed: HTTP ${t.status} ${await t.text()}`);return await t.json()}async function $(e,s,r,t="sms",o){const a=await fetch(c(e,"/apple/auth/2fa/phone/trigger",o),{method:"POST",headers:u(o),body:JSON.stringify({appleSessionId:s,phoneNumberId:r,mode:t})});if(!a.ok)throw new Error(`Apple phone 2FA trigger failed: HTTP ${a.status} ${await a.text()}`);return await a.json()}async function x(e,s,r,t){const o=await fetch(c(e,"/apple/auth/2fa",t),{method:"POST",headers:u(t),body:JSON.stringify({appleSessionId:s,code:r})});if(!o.ok)throw new Error(`Apple 2FA proxy failed: HTTP ${o.status} ${await o.text()}`);return await o.json()}async function A(e,s,r,t,o="sms",a){const n=await fetch(c(e,"/apple/auth/2fa/phone",a),{method:"POST",headers:u(a),body:JSON.stringify({appleSessionId:s,phoneNumberId:r,mode:o,code:t})});if(!n.ok)throw new Error(`Apple phone 2FA proxy failed: HTTP ${n.status} ${await n.text()}`);return await n.json()}async function O(e,s,r){const t=await fetch(c(e,"/apple/auth/finalize",r),{method:"POST",headers:u(r),body:JSON.stringify({appleSessionId:s})});if(!t.ok)throw new Error(`Apple session finalization failed: HTTP ${t.status} ${await t.text()}`);return await t.json()}async function H(e,s,r,t){const o=await fetch(c(e,"/apple/provisioning",t),{method:"POST",headers:u(t),body:JSON.stringify({appleSessionId:s,...r})});if(!o.ok)throw new Error(`Apple provisioning proxy failed: HTTP ${o.status} ${await o.text()}`);return F(await o.json())}async function N(e,s,r,t,o){const a=await fetch(c(e,s,o),{method:"POST",headers:u(o),body:JSON.stringify({appleSessionId:r,payload:t})});if(!a.ok)throw new Error(`Apple proxy ${s} failed: HTTP ${a.status} ${await a.text()}`);return F(await a.json())}function F(e){if(e.body!==void 0||!e.rawBody)return e;try{return{...e,body:JSON.parse(e.rawBody)}}catch{return e}}function c(e,s,r){const t=e.replace(/\/$/,""),o=s.startsWith("/")?s:`/${s}`,a=new URL(`${t}${o}`);return r&&a.searchParams.set("token",r),a}function u(e){return{"Content-Type":"application/json",...R(e)}}function R(e){return e?{Authorization:`Bearer ${e}`}:{}}async function v({limbuildApiUrl:e,accountName:s,password:r,token:t}){const{appleSessionId:o}=await P(e,t);try{const a=new E.AppleGsaSrpClient(s),n=await g(e,o,await a.init(),t);if(n.status<200||n.status>=300)throw new Error(`Apple SRP init failed: HTTP ${n.status} ${n.rawBody??""}`.trim());if(!n.body)throw new Error("Apple SRP init response did not include a body.");const b=await a.complete(r,n.body),f=await m(e,o,{...b,rememberMe:!1,trustTokens:[]},t),T=f.status===409;let i,d={type:"trustedDevice"};if(T){i=await S(e,o,t);const p=j(i.body);if(p&&(d={type:"phone",phoneNumberId:p.id,mode:p.pushMode??"sms"}),i.status===412){if(!p)throw new Error("Apple requested phone verification but did not include a trusted phone number.");i=await $(e,o,p.id,p.pushMode??"sms",t)}if(i.status<200||i.status>=300)throw new Error(`Apple two-factor challenge failed: HTTP ${i.status} ${i.rawBody??""}`.trim())}else if(f.status<200||f.status>=300)throw new Error(`Apple SRP complete failed: HTTP ${f.status} ${f.rawBody??""}`.trim());return{appleSessionId:o,completeResponse:f,twoFactorChallengeResponse:i,requiresTwoFactor:T,finishTwoFactor:async p=>{const w=d.type==="phone"?await A(e,o,d.phoneNumberId,p,d.mode,t):await x(e,o,p,t);if(w.status<200||w.status>=300)throw new Error(`Apple two-factor code failed: HTTP ${w.status} ${w.rawBody??""}`.trim());return w},finalize:async()=>O(e,o,t),close:()=>y(e,o,t)}}catch(a){throw await y(e,o,t).catch(()=>{}),a}}function j(e){if(!l(e))return;const s=l(e.phoneNumberVerification)?e.phoneNumberVerification:void 0,r=h(s?.trustedPhoneNumber)??h(e.trustedPhoneNumber)??h(e.phoneNumber);if(!r)return;const t=r.id;if(typeof t!="number")return;const o=typeof r.pushMode=="string"?r.pushMode:typeof e.mode=="string"?e.mode:void 0;return{id:t,pushMode:o}}function h(e){return l(e)?e:void 0}function l(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}exports.createAppleRelaySession=P;exports.deleteAppleRelaySession=y;exports.fetchAppleAccountSession=O;exports.proxyPhoneTwoFactorCode=A;exports.proxyProvisioningRequest=H;exports.proxySrpComplete=m;exports.proxySrpInit=g;exports.proxyTwoFactorCode=x;exports.startBrowserOwnedAppleIDLogin=v;exports.triggerPhoneTwoFactor=$;exports.triggerTrustedDeviceTwoFactor=S;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { DeviceInstallDialogProps } from './device-install-dialog';
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProvisioningProfileInfo, StoredSigningAssets } from '../types';
|
|
1
|
+
import { DeviceInstallSigningMode, ProvisioningProfileInfo, StoredSigningAssets } from '../types';
|
|
2
2
|
import { AppleProvisioningRequest } from './relay';
|
|
3
3
|
export type AppleDeveloperPortalTeam = {
|
|
4
4
|
name?: string;
|
|
@@ -50,14 +50,16 @@ export type AppleSigningAssetCacheInput = {
|
|
|
50
50
|
bundleID: string;
|
|
51
51
|
deviceUDID?: string;
|
|
52
52
|
teamID?: string;
|
|
53
|
+
signingMode?: DeviceInstallSigningMode;
|
|
53
54
|
};
|
|
54
55
|
export type PutAppleGeneratedSigningAssetsInput = {
|
|
55
56
|
bundleID: string;
|
|
56
57
|
deviceUDID?: string;
|
|
57
58
|
teamID?: string;
|
|
59
|
+
signingMode?: DeviceInstallSigningMode;
|
|
58
60
|
certificateID?: string;
|
|
59
61
|
certificateP12Base64: string;
|
|
60
|
-
certificatePassword
|
|
62
|
+
certificatePassword?: string;
|
|
61
63
|
provisioningProfileBase64: string;
|
|
62
64
|
profile: ProvisioningProfileInfo;
|
|
63
65
|
};
|
|
@@ -77,11 +79,21 @@ export declare function findDevelopmentCertificatesRequest(teamID?: string): {
|
|
|
77
79
|
path: string;
|
|
78
80
|
payload: Record<string, unknown>;
|
|
79
81
|
};
|
|
82
|
+
export declare function findDistributionCertificatesRequest(teamID?: string): {
|
|
83
|
+
method: "POST";
|
|
84
|
+
path: string;
|
|
85
|
+
payload: Record<string, unknown>;
|
|
86
|
+
};
|
|
80
87
|
export declare function findDevelopmentProfilesRequest({ bundleID, teamID, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'>): {
|
|
81
88
|
method: "POST";
|
|
82
89
|
path: string;
|
|
83
90
|
payload: Record<string, unknown>;
|
|
84
91
|
};
|
|
92
|
+
export declare function findAdHocProfilesRequest({ bundleID, teamID, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'>): {
|
|
93
|
+
method: "POST";
|
|
94
|
+
path: string;
|
|
95
|
+
payload: Record<string, unknown>;
|
|
96
|
+
};
|
|
85
97
|
export declare function registerDeviceRequest({ deviceUDID, teamID, name, }: Pick<AppleProvisioningContext, 'deviceUDID' | 'teamID'> & {
|
|
86
98
|
name?: string;
|
|
87
99
|
}): {
|
|
@@ -119,6 +131,18 @@ export declare function submitDevelopmentCSRRequest({ csrPEM, teamID, }: {
|
|
|
119
131
|
csrContent: string;
|
|
120
132
|
};
|
|
121
133
|
};
|
|
134
|
+
export declare function submitDistributionCSRRequest({ csrPEM, teamID, }: {
|
|
135
|
+
csrPEM: string;
|
|
136
|
+
teamID?: string;
|
|
137
|
+
}): {
|
|
138
|
+
method: "POST";
|
|
139
|
+
path: string;
|
|
140
|
+
payload: {
|
|
141
|
+
teamId: string;
|
|
142
|
+
type: string;
|
|
143
|
+
csrContent: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
122
146
|
export declare function downloadCertificateRequest(certificateID: string, teamID?: string): {
|
|
123
147
|
method: "GET";
|
|
124
148
|
path: string;
|
|
@@ -128,6 +152,15 @@ export declare function downloadCertificateRequest(certificateID: string, teamID
|
|
|
128
152
|
type: string;
|
|
129
153
|
};
|
|
130
154
|
};
|
|
155
|
+
export declare function downloadDistributionCertificateRequest(certificateID: string, teamID?: string): {
|
|
156
|
+
method: "GET";
|
|
157
|
+
path: string;
|
|
158
|
+
payload: {
|
|
159
|
+
teamId: string;
|
|
160
|
+
certificateId: string;
|
|
161
|
+
type: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
131
164
|
export declare function createDevelopmentProfileRequest({ bundleID, teamID, appIDID, certificateID, deviceIDs, name, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'> & {
|
|
132
165
|
appIDID: string;
|
|
133
166
|
certificateID: string;
|
|
@@ -146,6 +179,24 @@ export declare function createDevelopmentProfileRequest({ bundleID, teamID, appI
|
|
|
146
179
|
subPlatform: string;
|
|
147
180
|
};
|
|
148
181
|
};
|
|
182
|
+
export declare function createAdHocProfileRequest({ bundleID, teamID, appIDID, certificateID, deviceIDs, name, }: Pick<AppleProvisioningContext, 'bundleID' | 'teamID'> & {
|
|
183
|
+
appIDID: string;
|
|
184
|
+
certificateID: string;
|
|
185
|
+
deviceIDs: string[];
|
|
186
|
+
name?: string;
|
|
187
|
+
}): {
|
|
188
|
+
method: "POST";
|
|
189
|
+
path: string;
|
|
190
|
+
payload: {
|
|
191
|
+
teamId: string;
|
|
192
|
+
provisioningProfileName: string;
|
|
193
|
+
certificateIds: string[];
|
|
194
|
+
appIdId: string;
|
|
195
|
+
deviceIds: string[];
|
|
196
|
+
distributionType: string;
|
|
197
|
+
subPlatform: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
149
200
|
export declare function downloadProfileRequest(profileID: string, teamID?: string): {
|
|
150
201
|
method: "GET";
|
|
151
202
|
path: string;
|
|
@@ -154,8 +205,8 @@ export declare function downloadProfileRequest(profileID: string, teamID?: strin
|
|
|
154
205
|
provisioningProfileId: string;
|
|
155
206
|
};
|
|
156
207
|
};
|
|
157
|
-
export declare function getReusableAppleSigningAssets({ bundleID, deviceUDID, teamID, }: AppleSigningAssetCacheInput): Promise<StoredSigningAssets | undefined>;
|
|
208
|
+
export declare function getReusableAppleSigningAssets({ bundleID, deviceUDID, teamID, signingMode, }: AppleSigningAssetCacheInput): Promise<StoredSigningAssets | undefined>;
|
|
158
209
|
export declare function putAppleGeneratedSigningAssets(input: PutAppleGeneratedSigningAssetsInput): Promise<StoredSigningAssets>;
|
|
159
|
-
export declare function storedSigningAssetsReusable(stored: StoredSigningAssets, { bundleID, deviceUDID, teamID }: AppleSigningAssetCacheInput): boolean;
|
|
210
|
+
export declare function storedSigningAssetsReusable(stored: StoredSigningAssets, { bundleID, deviceUDID, teamID, signingMode }: AppleSigningAssetCacheInput): boolean;
|
|
160
211
|
export declare function selectDeveloperPortalTeam(body: unknown): AppleDeveloperPortalTeam | undefined;
|
|
161
212
|
export declare function teamIDCandidates(body: unknown): string[];
|
|
@@ -10,7 +10,7 @@ export type StartSignedDeviceBuildOptions = {
|
|
|
10
10
|
limbuildApiUrl: string;
|
|
11
11
|
token?: string;
|
|
12
12
|
certificateP12Base64: string;
|
|
13
|
-
certificatePassword
|
|
13
|
+
certificatePassword?: string;
|
|
14
14
|
provisioningProfileBase64: string;
|
|
15
15
|
};
|
|
16
16
|
export type BuildLogEventsOptions = {
|
|
@@ -21,8 +21,22 @@ export type BuildLogEventsOptions = {
|
|
|
21
21
|
onStatus: (status: DeviceInstallBuildStatus) => void;
|
|
22
22
|
onError?: (error: Error) => void;
|
|
23
23
|
};
|
|
24
|
+
export type IOSOTAInstall = {
|
|
25
|
+
installUrl: string;
|
|
26
|
+
landingUrl: string;
|
|
27
|
+
manifestUrl: string;
|
|
28
|
+
ipaUrl: string;
|
|
29
|
+
bundleId: string;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
export type GetIOSOTAInstallOptions = {
|
|
33
|
+
limbuildApiUrl: string;
|
|
34
|
+
execId: string;
|
|
35
|
+
token?: string;
|
|
36
|
+
};
|
|
24
37
|
export declare function fetchLimbuildInfo(limbuildApiUrl: string, token?: string): Promise<LimbuildInfo>;
|
|
25
38
|
export declare function startSignedDeviceBuild({ limbuildApiUrl, token, certificateP12Base64, certificatePassword, provisioningProfileBase64, }: StartSignedDeviceBuildOptions): Promise<{
|
|
26
39
|
execId?: string;
|
|
27
40
|
}>;
|
|
41
|
+
export declare function getIOSOTAInstall({ limbuildApiUrl, execId, token }: GetIOSOTAInstallOptions): Promise<IOSOTAInstall>;
|
|
28
42
|
export declare function watchBuildLogEvents({ limbuildApiUrl, execId, token, onLine, onStatus, onError, }: BuildLogEventsOptions): () => void;
|