@limrun/ui 0.14.0-rc.4 → 0.14.0-rc.5
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/app-store-relay/index.cjs +3 -3
- package/dist/app-store-relay/index.d.ts +108 -4
- package/dist/app-store-relay/index.js +353 -160
- package/dist/app-store-relay/react.cjs +1 -1
- package/dist/app-store-relay/react.js +1 -1
- package/dist/apple-credentials/index.cjs +1 -1
- package/dist/apple-credentials/index.d.ts +59 -8
- package/dist/apple-credentials/index.js +197 -133
- package/dist/client-C9z_sgOf.js +1 -0
- package/dist/{client-DSuNtWDv.mjs → client-CFDB4mX5.mjs} +37 -30
- package/dist/core/device-install/apple/provisioning.d.ts +25 -0
- package/dist/core/device-install/apple/relay.d.ts +13 -0
- package/dist/core/device-install/storage/secret-store.d.ts +24 -1
- package/dist/device-build/index.cjs +1 -1
- package/dist/device-build/index.js +1 -1
- package/dist/device-install/index.cjs +1 -1
- package/dist/device-install/index.js +175 -172
- package/dist/{provisioning-B_DefBEp.mjs → provisioning-CDPvxd1h.mjs} +63 -32
- package/dist/provisioning-CbC4h--7.js +1 -0
- package/package.json +1 -1
- package/src/app-store-relay/index.ts +358 -23
- package/src/apple-credentials/index.test.ts +22 -0
- package/src/apple-credentials/index.ts +161 -14
- package/src/core/device-install/apple/client.ts +13 -6
- package/src/core/device-install/apple/provisioning.test.ts +30 -0
- package/src/core/device-install/apple/provisioning.ts +39 -0
- package/src/core/device-install/apple/relay.ts +20 -0
- package/src/core/device-install/operations/operations.ts +6 -1
- package/src/core/device-install/storage/secret-store.ts +36 -2
- package/dist/client-D1drDXxE.js +0 -1
- package/dist/provisioning-BlQMccX_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),y=require("../client-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),y=require("../client-C9z_sgOf.js");require("../index-ChhtuQ7e.js");require("../gsa-srp-CCIfUz7Y.js");const w=require("../errors-BSkqS7U-.js");function m({registryApiUrl:i,token:u,organizationId:l}){const[g,o]=t.useState("idle"),[h,a]=t.useState(),[v,d]=t.useState(),[f,p]=t.useState(),[S,n]=t.useState(),r=t.useRef(void 0),b=t.useCallback(async()=>{await r.current?.close().catch(()=>{}),r.current=void 0,a(void 0),d(void 0),p(void 0),n(void 0),o("idle")},[]);t.useEffect(()=>()=>{r.current?.close(),r.current=void 0},[]);const C=t.useCallback(async({accountName:s,password:c})=>{o("authenticating"),n(void 0),await r.current?.close().catch(()=>{});try{const e=await y.startBrowserOwnedAppleIDLogin({registryApiUrl:i,token:u,organizationId:l,accountName:s,password:c});return r.current=e,a(e),d(e.completeResponse),p(e.twoFactorChallengeResponse),o(e.requiresTwoFactor?"two-factor-required":"authenticated"),e}catch(e){a(void 0),r.current=void 0,n(w.errorMessage(e)),o("error");return}},[i,l,u]),R=t.useCallback(async s=>{const c=r.current;if(!c)throw new Error("Start Apple ID login before submitting a two-factor code.");o("authenticating"),n(void 0);try{const e=await c.finishTwoFactor(s);return o("authenticated"),e}catch(e){n(w.errorMessage(e)),o("error");return}},[]),q=t.useCallback(async()=>{const s=r.current;if(!s)throw new Error("Start Apple ID login before finalizing the Apple session.");return s.finalize()},[]);return{status:g,session:h,completeResponse:v,twoFactorChallengeResponse:f,error:S,startLogin:C,submitTwoFactorCode:R,finalize:q,close:b}}exports.useAppleIDLogin=m;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as n, useRef as S, useCallback as i, useEffect as A } from "react";
|
|
2
|
-
import { s as D } from "../client-
|
|
2
|
+
import { s as D } from "../client-CFDB4mX5.mjs";
|
|
3
3
|
import "../index-YDu8K9a4.mjs";
|
|
4
4
|
import "../gsa-srp-Bme3JLEi.mjs";
|
|
5
5
|
import { e as w } from "../errors-gy8yQJos.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../app-store-relay/index.cjs"),T=require("../browser-storage-DLxIqZk5.js"),v="appleCertificate",b="appleProvisioningProfile",I="appStoreConnectApiKey";function h(e){const t={};for(const[o,r]of Object.entries(e))r&&(t[o]=r);return t}async function _(e,t,o){return e.put(v,t,h(o))}async function R(e,t,o){return e.put(b,t,h(o))}async function D(e,t,o){return e.put(I,t,h(o))}function B(e){const t=e.fetch??fetch.bind(globalThis),o=e.apiUrl.replace(/\/+$/,""),r=(n,s)=>`${o}/v1/organizations/${encodeURIComponent(e.organizationId)}/secrets/${encodeURIComponent(n)}/${encodeURIComponent(s)}`,c={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"};async function a(n,s){let i=`${n.status}`;try{const p=await n.json();p.message&&(i=p.message)}catch{}throw new Error(`Failed to ${s} secret: ${i}`)}return{async put(n,s,i){const p=await t(r(n,s),{method:"PUT",headers:c,body:JSON.stringify({data:i,replace:!0})});p.ok||await a(p,"store");const d=await p.json();return{type:d.type,name:d.name,createdAt:d.createdAt,data:d.data}},async get(n,s){const i=await t(r(n,s),{method:"GET",headers:c});if(i.status===404)return;i.ok||await a(i,"fetch");const p=await i.json();return{type:p.type,name:p.name,createdAt:p.createdAt,data:p.data}},async list(){const n=await t(`${o}/v1/organizations/${encodeURIComponent(e.organizationId)}/secrets`,{method:"GET",headers:c});return n.ok||await a(n,"list"),(await n.json()).filter(i=>i.type===v||i.type===b||i.type===I).map(i=>({type:i.type,name:i.name,createdAt:i.createdAt}))},async delete(n,s){const i=await t(r(n,s),{method:"DELETE",headers:c});i.status!==404&&(i.ok||await a(i,"delete"))}}}const O="limrun-signing-secrets",K=1,l="secrets";function j(){const e=(r,c)=>`${r}:${c}`;function t(){return new Promise((r,c)=>{const a=indexedDB.open(O,K);a.onupgradeneeded=()=>{const n=a.result;n.objectStoreNames.contains(l)||n.createObjectStore(l,{keyPath:"id"})},a.onsuccess=()=>r(a.result),a.onerror=()=>c(a.error??new Error("Open IndexedDB failed"))})}function o(r){return new Promise((c,a)=>{r.onsuccess=()=>c(r.result),r.onerror=()=>a(r.error??new Error("IndexedDB request failed"))})}return{async put(r,c,a){const n=await t(),s=await o(n.transaction(l,"readonly").objectStore(l).get(e(r,c))),i={id:e(r,c),type:r,name:c,data:a,createdAt:s?.createdAt??new Date().toISOString()};return await o(n.transaction(l,"readwrite").objectStore(l).put(i)),{type:r,name:c,createdAt:i.createdAt,data:a}},async get(r,c){const a=await t(),n=await o(a.transaction(l,"readonly").objectStore(l).get(e(r,c)));if(n)return{type:n.type,name:n.name,createdAt:n.createdAt,data:n.data}},async list(){const r=await t();return(await o(r.transaction(l,"readonly").objectStore(l).getAll())).map(a=>({type:a.type,name:a.name,createdAt:a.createdAt}))},async delete(r,c){const a=await t();await o(a.transaction(l,"readwrite").objectStore(l).delete(e(r,c)))}}}function N(e,t){return`${e}/${t}`}async function x({relay:e,teamId:t,secretStore:o,certificateKind:r="development",commonName:c,log:a=()=>{}}){const n=r==="distribution"?"DISTRIBUTION":"DEVELOPMENT",s=N(t,n),i=await u.listAppleCertificates({relay:e,teamId:t,certificateKind:r}),p=S=>S===void 0?void 0:i.find(C=>f(C,"certificateId")===S||f(C,"certRequestId")===S),d=await o.get(v,s),m=f(d?.data,"certificateID");if(d&&m&&d.data.certificateP12Base64){const S=p(m);if(S){const C=f(S,"certificateId")??m;return a("Reusing stored Apple certificate",C),{secret:d,certificateId:C,created:!1}}a("Stored certificate is no longer on the team","Minting a new one.")}const y=await u.generateAppleSigningKeyAndCSR({commonName:c??`Limrun ${t}`}),w=await u.createAppleCertificate({relay:e,teamId:t,certificateKind:r,csrPEM:y.csrPEM}),A=f(w,"certificateId")??f(w,"certRequestId");if(!A)throw new Error("Apple certificate creation did not return a certificate ID.");const E=await u.downloadAppleCertificate({relay:e,teamId:t,certificateKind:r,certificateId:A});if(!E.rawBodyBase64)throw new Error("Apple certificate download returned no bytes.");const g={certificateP12Base64:u.exportAppleCertificateP12({privateKeyPKCS8Base64:y.privateKeyPKCS8Base64,certificateBase64:E.rawBodyBase64,password:"",friendlyName:`Apple ${r==="distribution"?"Distribution":"Development"} ${t}`}),certificateType:n,teamID:t,certificateID:A,serialNumber:T.normalizeCertificateSerial(f(w,"serialNum")),expirationDate:f(w,"expirationDateString")};let P;try{P=await _(o,s,g)}catch(S){throw new Error(`Certificate ${A} was created on the Apple Developer portal but saving its private key to the secret store failed: ${k(S)}. The key cannot be recovered; revoke certificate ${A} at developer.apple.com before retrying, or the retry will mint another certificate against Apple's limit.`)}return a("Apple certificate stored",A),{secret:P,certificateId:A,created:!0}}function k(e){return e instanceof Error?e.message:String(e)}async function L({relay:e,teamId:t,profileId:o,secretStore:r,log:c=()=>{}}){const n=(await u.downloadAppleProfile({relay:e,teamId:t,profileId:o})).rawBodyBase64;if(!n)throw new Error("Apple provisioning profile download returned no bytes.");const s=T.parseProvisioningProfileBase64(n),i=`${t}/${s.uuid??o}`,p=await R(r,i,{provisioningProfileBase64:n,certificateSerialNumbers:s.certificateSerialNumbers.join(","),bundleIDs:s.bundleID,deviceIDs:s.provisionedDevices.join(","),teamID:s.teamID??t,profileName:s.name,uuid:s.uuid,expirationDate:s.expirationDate});return c("Apple provisioning profile stored",i),p}function $(e){return`${e}/APP_STORE_CONNECT_API_KEY`}async function F({relay:e,teamId:t,providerId:o,secretStore:r,nickname:c,roles:a,log:n=()=>{}}){if(!c)throw new Error("A nickname is required to ensure an App Store Connect API key.");o!==void 0&&await u.switchAppStoreConnectProvider({relay:e,providerId:o});const s=$(t),i=await u.listAppStoreConnectApiKeys({relay:e}),p=await r.get(I,s),d=f(p?.data,"keyId");if(p&&d&&p.data.privateKeyP8Base64){if(i.find(P=>P.id===d&&!Y(P.attributes)))return n("Reusing stored App Store Connect API key",d),{secret:p,keyId:d,created:!1};n("Stored App Store Connect API key is no longer active","Minting a new one.")}const y=(await u.createAppStoreConnectApiKey({relay:e,nickname:c,roles:a})).id,w=await u.downloadAppStoreConnectApiKeyPrivateKey({relay:e,keyId:y}),A={privateKeyP8Base64:z(w.privateKeyPem),keyId:y,issuerId:w.issuerId,nickname:c,teamID:t};let E;try{E=await D(r,s,A)}catch(g){throw new Error(`App Store Connect API key ${y} was created but saving its private key to the secret store failed: ${k(g)}. The key cannot be downloaded again; revoke key ${y} in App Store Connect before retrying, or the retry will mint another key.`)}return n("App Store Connect API key stored",y),{secret:E,keyId:y,created:!0}}function Y(e){if(!e)return!1;if(e.isActive===!1)return!0;const t=e.revokingDate??e.revocationDate;return typeof t=="string"&&t!==""}function z(e){const t=new TextEncoder().encode(e);let o="";for(const r of t)o+=String.fromCharCode(r);return btoa(o)}async function M({relay:e,teamId:t,profileKind:o="development"}){return u.listAppleProfiles({relay:e,teamId:t,profileKind:o})}function f(e,t){const o=e?.[t];if(typeof o=="string")return o;if(typeof o=="number"||typeof o=="boolean")return String(o)}exports.normalizeCertificateSerial=T.normalizeCertificateSerial;exports.APPLE_CERTIFICATE_SECRET_TYPE=v;exports.APPLE_PROVISIONING_PROFILE_SECRET_TYPE=b;exports.APP_STORE_CONNECT_API_KEY_SECRET_TYPE=I;exports.appStoreConnectApiKeySecretName=$;exports.appleCertificateSecretName=N;exports.createBrowserSecretStore=j;exports.createLimrunSecretStore=B;exports.ensureAppStoreConnectApiKeySecret=F;exports.ensureAppleCertificateSecret=x;exports.listTeamAppleProfiles=M;exports.putAppStoreConnectApiKeySecret=D;exports.putAppleCertificateSecret=_;exports.putAppleProvisioningProfileSecret=R;exports.saveAppleProfileSecret=L;exports.stringField=f;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { AppleCertificateKind, AppleProfileKind, AppStoreConnectApiKeyRole } from '../app-store-relay';
|
|
1
2
|
import { AppleRelayWebSocketClient } from '../core/device-install/apple';
|
|
2
3
|
import { AppleCertificateType, SigningSecret, SigningSecretStore } from '../core/device-install/storage/secret-store';
|
|
3
|
-
export { APPLE_CERTIFICATE_SECRET_TYPE, APPLE_PROVISIONING_PROFILE_SECRET_TYPE, createBrowserSecretStore, createLimrunSecretStore, putAppleCertificateSecret, putAppleProvisioningProfileSecret, type AppleCertificateSecretData, type AppleCertificateType, type AppleProvisioningProfileSecretData, type LimrunSecretStoreOptions, type SigningSecret, type SigningSecretData, type SigningSecretMetadata, type SigningSecretStore, type SigningSecretType, } from '../core/device-install/storage/secret-store';
|
|
4
|
+
export { APP_STORE_CONNECT_API_KEY_SECRET_TYPE, APPLE_CERTIFICATE_SECRET_TYPE, APPLE_PROVISIONING_PROFILE_SECRET_TYPE, createBrowserSecretStore, createLimrunSecretStore, putAppleCertificateSecret, putAppleProvisioningProfileSecret, putAppStoreConnectApiKeySecret, type AppleCertificateSecretData, type AppleCertificateType, type AppleProvisioningProfileSecretData, type AppStoreConnectApiKeySecretData, type LimrunSecretStoreOptions, type SigningSecret, type SigningSecretData, type SigningSecretMetadata, type SigningSecretStore, type SigningSecretType, } from '../core/device-install/storage/secret-store';
|
|
4
5
|
export { normalizeCertificateSerial } from '../core/device-install/storage/browser-storage';
|
|
5
6
|
/**
|
|
6
7
|
* Conventional secret name of a team's certificate bundle. One bundle per
|
|
@@ -12,6 +13,11 @@ export type EnsureAppleCertificateInput = {
|
|
|
12
13
|
relay: AppleRelayWebSocketClient;
|
|
13
14
|
teamId: string;
|
|
14
15
|
secretStore: SigningSecretStore;
|
|
16
|
+
/**
|
|
17
|
+
* Which portal certificate kind to ensure. Ad-hoc and App Store signing
|
|
18
|
+
* both use the distribution certificate. Defaults to development.
|
|
19
|
+
*/
|
|
20
|
+
certificateKind?: AppleCertificateKind;
|
|
15
21
|
/** Common name used when minting a new certificate. */
|
|
16
22
|
commonName?: string;
|
|
17
23
|
log?: (message: string, detail?: string) => void;
|
|
@@ -23,16 +29,17 @@ export type EnsureAppleCertificateResult = {
|
|
|
23
29
|
created: boolean;
|
|
24
30
|
};
|
|
25
31
|
/**
|
|
26
|
-
* Returns a usable
|
|
27
|
-
* stored one when its certificate is still on the team and
|
|
28
|
-
* one otherwise. Apple caps
|
|
29
|
-
*
|
|
32
|
+
* Returns a usable certificate secret of the requested kind for the team,
|
|
33
|
+
* reusing the stored one when its certificate is still on the team and
|
|
34
|
+
* minting a new one otherwise. Apple caps certificates per kind (2 for
|
|
35
|
+
* development, 3 for distribution) and never returns private keys, so
|
|
36
|
+
* reuse of the stored p12 is strongly preferred.
|
|
30
37
|
*
|
|
31
38
|
* Durability of the stored material is the secret store's concern:
|
|
32
39
|
* implementors who want retries or fallbacks build them into their
|
|
33
40
|
* SigningSecretStore.
|
|
34
41
|
*/
|
|
35
|
-
export declare function ensureAppleCertificateSecret({ relay, teamId, secretStore, commonName, log, }: EnsureAppleCertificateInput): Promise<EnsureAppleCertificateResult>;
|
|
42
|
+
export declare function ensureAppleCertificateSecret({ relay, teamId, secretStore, certificateKind, commonName, log, }: EnsureAppleCertificateInput): Promise<EnsureAppleCertificateResult>;
|
|
36
43
|
export type SaveAppleProfileInput = {
|
|
37
44
|
relay: AppleRelayWebSocketClient;
|
|
38
45
|
teamId: string;
|
|
@@ -49,11 +56,55 @@ export type SaveAppleProfileInput = {
|
|
|
49
56
|
* consumers filter on.
|
|
50
57
|
*/
|
|
51
58
|
export declare function saveAppleProfileSecret({ relay, teamId, profileId, secretStore, log, }: SaveAppleProfileInput): Promise<SigningSecret>;
|
|
59
|
+
/**
|
|
60
|
+
* Conventional secret name of a team's App Store Connect API key: one
|
|
61
|
+
* shared key per team.
|
|
62
|
+
*/
|
|
63
|
+
export declare function appStoreConnectApiKeySecretName(teamId: string): string;
|
|
64
|
+
export type EnsureAppStoreConnectApiKeyInput = {
|
|
65
|
+
relay: AppleRelayWebSocketClient;
|
|
66
|
+
teamId: string;
|
|
67
|
+
/**
|
|
68
|
+
* Numeric provider ID of the team from the Apple team list. When given,
|
|
69
|
+
* the App Store Connect session is switched to this provider first;
|
|
70
|
+
* required for accounts that belong to multiple teams.
|
|
71
|
+
*/
|
|
72
|
+
providerId?: string | number;
|
|
73
|
+
secretStore: SigningSecretStore;
|
|
74
|
+
/** Display name for a newly minted key. Required; there is no default. */
|
|
75
|
+
nickname: string;
|
|
76
|
+
/** Roles of a newly minted key. Defaults to APP_MANAGER. */
|
|
77
|
+
roles?: AppStoreConnectApiKeyRole[];
|
|
78
|
+
log?: (message: string, detail?: string) => void;
|
|
79
|
+
};
|
|
80
|
+
export type EnsureAppStoreConnectApiKeyResult = {
|
|
81
|
+
secret: SigningSecret;
|
|
82
|
+
keyId: string;
|
|
83
|
+
/** True when a new key was minted instead of reusing the stored one. */
|
|
84
|
+
created: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Returns a usable App Store Connect API key secret for the team, reusing
|
|
88
|
+
* the stored one when its key is still active and minting a new one
|
|
89
|
+
* otherwise. Apple serves a key's private half exactly once (at creation
|
|
90
|
+
* time through the sparse fieldset download), so reuse of the stored .p8
|
|
91
|
+
* is strongly preferred.
|
|
92
|
+
*
|
|
93
|
+
* The session user must be a team Admin to list or create keys.
|
|
94
|
+
*/
|
|
95
|
+
export declare function ensureAppStoreConnectApiKeySecret({ relay, teamId, providerId, secretStore, nickname, roles, log, }: EnsureAppStoreConnectApiKeyInput): Promise<EnsureAppStoreConnectApiKeyResult>;
|
|
52
96
|
export type ListTeamProfilesInput = {
|
|
53
97
|
relay: AppleRelayWebSocketClient;
|
|
54
98
|
teamId: string;
|
|
99
|
+
/**
|
|
100
|
+
* Which portal profile listing to use. The development listing is
|
|
101
|
+
* unfiltered on the portal side and returns profiles of every
|
|
102
|
+
* distribution method; adhoc narrows to ad-hoc profiles. Defaults to
|
|
103
|
+
* development.
|
|
104
|
+
*/
|
|
105
|
+
profileKind?: AppleProfileKind;
|
|
55
106
|
};
|
|
56
|
-
/** Lists the team's
|
|
57
|
-
export declare function listTeamAppleProfiles({ relay, teamId }: ListTeamProfilesInput): Promise<Record<string, unknown>[]>;
|
|
107
|
+
/** Lists the team's provisioning profiles from the portal. */
|
|
108
|
+
export declare function listTeamAppleProfiles({ relay, teamId, profileKind, }: ListTeamProfilesInput): Promise<Record<string, unknown>[]>;
|
|
58
109
|
/** Read a string-ish value from a loosely typed portal record. */
|
|
59
110
|
export declare function stringField(record: Record<string, unknown> | undefined, key: string): string | undefined;
|
|
@@ -1,227 +1,291 @@
|
|
|
1
|
-
import { listAppleCertificates as
|
|
2
|
-
import { l as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
for (const [o,
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
}
|
|
10
|
-
async function
|
|
11
|
-
return
|
|
12
|
-
}
|
|
13
|
-
async function
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
function z(
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { listAppleCertificates as T, generateAppleSigningKeyAndCSR as D, createAppleCertificate as k, downloadAppleCertificate as $, exportAppleCertificateP12 as B, downloadAppleProfile as N, switchAppStoreConnectProvider as R, listAppStoreConnectApiKeys as _, createAppStoreConnectApiKey as O, downloadAppStoreConnectApiKeyPrivateKey as j, listAppleProfiles as K } from "../app-store-relay/index.js";
|
|
2
|
+
import { l as x, f as U } from "../browser-storage-BnO-Ma-e.mjs";
|
|
3
|
+
const C = "appleCertificate", I = "appleProvisioningProfile", v = "appStoreConnectApiKey";
|
|
4
|
+
function b(e) {
|
|
5
|
+
const t = {};
|
|
6
|
+
for (const [o, r] of Object.entries(e))
|
|
7
|
+
r && (t[o] = r);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
async function L(e, t, o) {
|
|
11
|
+
return e.put(C, t, b(o));
|
|
12
|
+
}
|
|
13
|
+
async function M(e, t, o) {
|
|
14
|
+
return e.put(I, t, b(o));
|
|
15
|
+
}
|
|
16
|
+
async function z(e, t, o) {
|
|
17
|
+
return e.put(v, t, b(o));
|
|
18
|
+
}
|
|
19
|
+
function W(e) {
|
|
20
|
+
const t = e.fetch ?? fetch.bind(globalThis), o = e.apiUrl.replace(/\/+$/, ""), r = (n, s) => `${o}/v1/organizations/${encodeURIComponent(e.organizationId)}/secrets/${encodeURIComponent(
|
|
21
|
+
n
|
|
19
22
|
)}/${encodeURIComponent(s)}`, c = {
|
|
20
|
-
Authorization: `Bearer ${
|
|
23
|
+
Authorization: `Bearer ${e.token}`,
|
|
21
24
|
"Content-Type": "application/json"
|
|
22
25
|
};
|
|
23
|
-
async function a(
|
|
24
|
-
let i = `${
|
|
26
|
+
async function a(n, s) {
|
|
27
|
+
let i = `${n.status}`;
|
|
25
28
|
try {
|
|
26
|
-
const d = await
|
|
29
|
+
const d = await n.json();
|
|
27
30
|
d.message && (i = d.message);
|
|
28
31
|
} catch {
|
|
29
32
|
}
|
|
30
33
|
throw new Error(`Failed to ${s} secret: ${i}`);
|
|
31
34
|
}
|
|
32
35
|
return {
|
|
33
|
-
async put(
|
|
34
|
-
const d = await
|
|
36
|
+
async put(n, s, i) {
|
|
37
|
+
const d = await t(r(n, s), {
|
|
35
38
|
method: "PUT",
|
|
36
39
|
headers: c,
|
|
37
40
|
body: JSON.stringify({ data: i, replace: !0 })
|
|
38
41
|
});
|
|
39
42
|
d.ok || await a(d, "store");
|
|
40
|
-
const
|
|
41
|
-
return { type:
|
|
43
|
+
const p = await d.json();
|
|
44
|
+
return { type: p.type, name: p.name, createdAt: p.createdAt, data: p.data };
|
|
42
45
|
},
|
|
43
|
-
async get(
|
|
44
|
-
const i = await
|
|
46
|
+
async get(n, s) {
|
|
47
|
+
const i = await t(r(n, s), { method: "GET", headers: c });
|
|
45
48
|
if (i.status === 404) return;
|
|
46
49
|
i.ok || await a(i, "fetch");
|
|
47
50
|
const d = await i.json();
|
|
48
51
|
return { type: d.type, name: d.name, createdAt: d.createdAt, data: d.data };
|
|
49
52
|
},
|
|
50
53
|
async list() {
|
|
51
|
-
const
|
|
52
|
-
`${o}/v1/organizations/${encodeURIComponent(
|
|
54
|
+
const n = await t(
|
|
55
|
+
`${o}/v1/organizations/${encodeURIComponent(e.organizationId)}/secrets`,
|
|
53
56
|
{ method: "GET", headers: c }
|
|
54
57
|
);
|
|
55
|
-
return
|
|
56
|
-
(i) => i.type ===
|
|
58
|
+
return n.ok || await a(n, "list"), (await n.json()).filter(
|
|
59
|
+
(i) => i.type === C || i.type === I || i.type === v
|
|
57
60
|
).map((i) => ({ type: i.type, name: i.name, createdAt: i.createdAt }));
|
|
58
61
|
},
|
|
59
|
-
async delete(
|
|
60
|
-
const i = await
|
|
62
|
+
async delete(n, s) {
|
|
63
|
+
const i = await t(r(n, s), { method: "DELETE", headers: c });
|
|
61
64
|
i.status !== 404 && (i.ok || await a(i, "delete"));
|
|
62
65
|
}
|
|
63
66
|
};
|
|
64
67
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
function
|
|
69
|
-
return new Promise((
|
|
70
|
-
const a = indexedDB.open(
|
|
68
|
+
const F = "limrun-signing-secrets", Y = 1, f = "secrets";
|
|
69
|
+
function X() {
|
|
70
|
+
const e = (r, c) => `${r}:${c}`;
|
|
71
|
+
function t() {
|
|
72
|
+
return new Promise((r, c) => {
|
|
73
|
+
const a = indexedDB.open(F, Y);
|
|
71
74
|
a.onupgradeneeded = () => {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
}, a.onsuccess = () =>
|
|
75
|
+
const n = a.result;
|
|
76
|
+
n.objectStoreNames.contains(f) || n.createObjectStore(f, { keyPath: "id" });
|
|
77
|
+
}, a.onsuccess = () => r(a.result), a.onerror = () => c(a.error ?? new Error("Open IndexedDB failed"));
|
|
75
78
|
});
|
|
76
79
|
}
|
|
77
|
-
function o(
|
|
80
|
+
function o(r) {
|
|
78
81
|
return new Promise((c, a) => {
|
|
79
|
-
|
|
82
|
+
r.onsuccess = () => c(r.result), r.onerror = () => a(r.error ?? new Error("IndexedDB request failed"));
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
return {
|
|
83
|
-
async put(
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
+
async put(r, c, a) {
|
|
87
|
+
const n = await t(), s = await o(
|
|
88
|
+
n.transaction(f, "readonly").objectStore(f).get(e(r, c))
|
|
86
89
|
), i = {
|
|
87
|
-
id: r
|
|
88
|
-
type:
|
|
90
|
+
id: e(r, c),
|
|
91
|
+
type: r,
|
|
89
92
|
name: c,
|
|
90
93
|
data: a,
|
|
91
94
|
createdAt: s?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
92
95
|
};
|
|
93
96
|
return await o(
|
|
94
|
-
|
|
95
|
-
), { type:
|
|
97
|
+
n.transaction(f, "readwrite").objectStore(f).put(i)
|
|
98
|
+
), { type: r, name: c, createdAt: i.createdAt, data: a };
|
|
96
99
|
},
|
|
97
|
-
async get(
|
|
98
|
-
const a = await
|
|
99
|
-
a.transaction(
|
|
100
|
+
async get(r, c) {
|
|
101
|
+
const a = await t(), n = await o(
|
|
102
|
+
a.transaction(f, "readonly").objectStore(f).get(e(r, c))
|
|
100
103
|
);
|
|
101
|
-
if (
|
|
102
|
-
return { type:
|
|
104
|
+
if (n)
|
|
105
|
+
return { type: n.type, name: n.name, createdAt: n.createdAt, data: n.data };
|
|
103
106
|
},
|
|
104
107
|
async list() {
|
|
105
|
-
const
|
|
108
|
+
const r = await t();
|
|
106
109
|
return (await o(
|
|
107
|
-
|
|
110
|
+
r.transaction(f, "readonly").objectStore(f).getAll()
|
|
108
111
|
)).map((a) => ({ type: a.type, name: a.name, createdAt: a.createdAt }));
|
|
109
112
|
},
|
|
110
|
-
async delete(
|
|
111
|
-
const a = await
|
|
113
|
+
async delete(r, c) {
|
|
114
|
+
const a = await t();
|
|
112
115
|
await o(
|
|
113
|
-
a.transaction(
|
|
116
|
+
a.transaction(f, "readwrite").objectStore(f).delete(e(r, c))
|
|
114
117
|
);
|
|
115
118
|
}
|
|
116
119
|
};
|
|
117
120
|
}
|
|
118
|
-
function
|
|
119
|
-
return `${
|
|
121
|
+
function G(e, t) {
|
|
122
|
+
return `${e}/${t}`;
|
|
120
123
|
}
|
|
121
|
-
async function
|
|
122
|
-
relay:
|
|
123
|
-
teamId:
|
|
124
|
+
async function Z({
|
|
125
|
+
relay: e,
|
|
126
|
+
teamId: t,
|
|
124
127
|
secretStore: o,
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
certificateKind: r = "development",
|
|
129
|
+
commonName: c,
|
|
130
|
+
log: a = () => {
|
|
127
131
|
}
|
|
128
132
|
}) {
|
|
129
|
-
const
|
|
130
|
-
(
|
|
131
|
-
),
|
|
132
|
-
if (
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
const
|
|
136
|
-
return
|
|
133
|
+
const n = r === "distribution" ? "DISTRIBUTION" : "DEVELOPMENT", s = G(t, n), i = await T({ relay: e, teamId: t, certificateKind: r }), d = (w) => w === void 0 ? void 0 : i.find(
|
|
134
|
+
(E) => y(E, "certificateId") === w || y(E, "certRequestId") === w
|
|
135
|
+
), p = await o.get(C, s), P = y(p?.data, "certificateID");
|
|
136
|
+
if (p && P && p.data.certificateP12Base64) {
|
|
137
|
+
const w = d(P);
|
|
138
|
+
if (w) {
|
|
139
|
+
const E = y(w, "certificateId") ?? P;
|
|
140
|
+
return a("Reusing stored Apple certificate", E), { secret: p, certificateId: E, created: !1 };
|
|
137
141
|
}
|
|
138
|
-
|
|
142
|
+
a("Stored certificate is no longer on the team", "Minting a new one.");
|
|
139
143
|
}
|
|
140
|
-
const
|
|
141
|
-
relay:
|
|
142
|
-
teamId:
|
|
143
|
-
certificateKind:
|
|
144
|
-
csrPEM:
|
|
145
|
-
}),
|
|
146
|
-
if (!
|
|
144
|
+
const l = await D({ commonName: c ?? `Limrun ${t}` }), A = await k({
|
|
145
|
+
relay: e,
|
|
146
|
+
teamId: t,
|
|
147
|
+
certificateKind: r,
|
|
148
|
+
csrPEM: l.csrPEM
|
|
149
|
+
}), u = y(A, "certificateId") ?? y(A, "certRequestId");
|
|
150
|
+
if (!u)
|
|
147
151
|
throw new Error("Apple certificate creation did not return a certificate ID.");
|
|
148
|
-
const
|
|
149
|
-
relay:
|
|
150
|
-
teamId:
|
|
151
|
-
certificateKind:
|
|
152
|
-
certificateId:
|
|
152
|
+
const S = await $({
|
|
153
|
+
relay: e,
|
|
154
|
+
teamId: t,
|
|
155
|
+
certificateKind: r,
|
|
156
|
+
certificateId: u
|
|
153
157
|
});
|
|
154
|
-
if (!
|
|
158
|
+
if (!S.rawBodyBase64)
|
|
155
159
|
throw new Error("Apple certificate download returned no bytes.");
|
|
156
|
-
const
|
|
157
|
-
certificateP12Base64:
|
|
158
|
-
privateKeyPKCS8Base64:
|
|
159
|
-
certificateBase64:
|
|
160
|
+
const g = {
|
|
161
|
+
certificateP12Base64: B({
|
|
162
|
+
privateKeyPKCS8Base64: l.privateKeyPKCS8Base64,
|
|
163
|
+
certificateBase64: S.rawBodyBase64,
|
|
160
164
|
password: "",
|
|
161
|
-
friendlyName: `Apple Development ${
|
|
165
|
+
friendlyName: `Apple ${r === "distribution" ? "Distribution" : "Development"} ${t}`
|
|
162
166
|
}),
|
|
163
|
-
certificateType:
|
|
164
|
-
teamID:
|
|
165
|
-
certificateID:
|
|
167
|
+
certificateType: n,
|
|
168
|
+
teamID: t,
|
|
169
|
+
certificateID: u,
|
|
166
170
|
// Normalized so it equals the serials profiles reference.
|
|
167
|
-
serialNumber:
|
|
168
|
-
expirationDate:
|
|
171
|
+
serialNumber: x(y(A, "serialNum")),
|
|
172
|
+
expirationDate: y(A, "expirationDateString")
|
|
169
173
|
};
|
|
170
|
-
let
|
|
174
|
+
let m;
|
|
171
175
|
try {
|
|
172
|
-
|
|
173
|
-
} catch (
|
|
176
|
+
m = await L(o, s, g);
|
|
177
|
+
} catch (w) {
|
|
174
178
|
throw new Error(
|
|
175
|
-
`Certificate ${
|
|
179
|
+
`Certificate ${u} was created on the Apple Developer portal but saving its private key to the secret store failed: ${h(w)}. The key cannot be recovered; revoke certificate ${u} at developer.apple.com before retrying, or the retry will mint another certificate against Apple's limit.`
|
|
176
180
|
);
|
|
177
181
|
}
|
|
178
|
-
return
|
|
182
|
+
return a("Apple certificate stored", u), { secret: m, certificateId: u, created: !0 };
|
|
179
183
|
}
|
|
180
|
-
function
|
|
181
|
-
return
|
|
184
|
+
function h(e) {
|
|
185
|
+
return e instanceof Error ? e.message : String(e);
|
|
182
186
|
}
|
|
183
|
-
async function
|
|
184
|
-
relay:
|
|
185
|
-
teamId:
|
|
187
|
+
async function ee({
|
|
188
|
+
relay: e,
|
|
189
|
+
teamId: t,
|
|
186
190
|
profileId: o,
|
|
187
|
-
secretStore:
|
|
191
|
+
secretStore: r,
|
|
188
192
|
log: c = () => {
|
|
189
193
|
}
|
|
190
194
|
}) {
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
195
|
+
const n = (await N({ relay: e, teamId: t, profileId: o })).rawBodyBase64;
|
|
196
|
+
if (!n)
|
|
193
197
|
throw new Error("Apple provisioning profile download returned no bytes.");
|
|
194
|
-
const s =
|
|
195
|
-
provisioningProfileBase64:
|
|
198
|
+
const s = U(n), i = `${t}/${s.uuid ?? o}`, d = await M(r, i, {
|
|
199
|
+
provisioningProfileBase64: n,
|
|
196
200
|
certificateSerialNumbers: s.certificateSerialNumbers.join(","),
|
|
197
201
|
bundleIDs: s.bundleID,
|
|
198
202
|
deviceIDs: s.provisionedDevices.join(","),
|
|
199
|
-
teamID: s.teamID ??
|
|
203
|
+
teamID: s.teamID ?? t,
|
|
200
204
|
profileName: s.name,
|
|
201
205
|
uuid: s.uuid,
|
|
202
206
|
expirationDate: s.expirationDate
|
|
203
207
|
});
|
|
204
208
|
return c("Apple provisioning profile stored", i), d;
|
|
205
209
|
}
|
|
206
|
-
|
|
207
|
-
return
|
|
210
|
+
function V(e) {
|
|
211
|
+
return `${e}/APP_STORE_CONNECT_API_KEY`;
|
|
212
|
+
}
|
|
213
|
+
async function te({
|
|
214
|
+
relay: e,
|
|
215
|
+
teamId: t,
|
|
216
|
+
providerId: o,
|
|
217
|
+
secretStore: r,
|
|
218
|
+
nickname: c,
|
|
219
|
+
roles: a,
|
|
220
|
+
log: n = () => {
|
|
221
|
+
}
|
|
222
|
+
}) {
|
|
223
|
+
if (!c)
|
|
224
|
+
throw new Error("A nickname is required to ensure an App Store Connect API key.");
|
|
225
|
+
o !== void 0 && await R({ relay: e, providerId: o });
|
|
226
|
+
const s = V(t), i = await _({ relay: e }), d = await r.get(v, s), p = y(d?.data, "keyId");
|
|
227
|
+
if (d && p && d.data.privateKeyP8Base64) {
|
|
228
|
+
if (i.find((m) => m.id === p && !q(m.attributes)))
|
|
229
|
+
return n("Reusing stored App Store Connect API key", p), { secret: d, keyId: p, created: !1 };
|
|
230
|
+
n("Stored App Store Connect API key is no longer active", "Minting a new one.");
|
|
231
|
+
}
|
|
232
|
+
const l = (await O({ relay: e, nickname: c, roles: a })).id, A = await j({ relay: e, keyId: l }), u = {
|
|
233
|
+
privateKeyP8Base64: J(A.privateKeyPem),
|
|
234
|
+
keyId: l,
|
|
235
|
+
issuerId: A.issuerId,
|
|
236
|
+
nickname: c,
|
|
237
|
+
teamID: t
|
|
238
|
+
};
|
|
239
|
+
let S;
|
|
240
|
+
try {
|
|
241
|
+
S = await z(r, s, u);
|
|
242
|
+
} catch (g) {
|
|
243
|
+
throw new Error(
|
|
244
|
+
`App Store Connect API key ${l} was created but saving its private key to the secret store failed: ${h(g)}. The key cannot be downloaded again; revoke key ${l} in App Store Connect before retrying, or the retry will mint another key.`
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
return n("App Store Connect API key stored", l), { secret: S, keyId: l, created: !0 };
|
|
248
|
+
}
|
|
249
|
+
function q(e) {
|
|
250
|
+
if (!e) return !1;
|
|
251
|
+
if (e.isActive === !1) return !0;
|
|
252
|
+
const t = e.revokingDate ?? e.revocationDate;
|
|
253
|
+
return typeof t == "string" && t !== "";
|
|
254
|
+
}
|
|
255
|
+
function J(e) {
|
|
256
|
+
const t = new TextEncoder().encode(e);
|
|
257
|
+
let o = "";
|
|
258
|
+
for (const r of t)
|
|
259
|
+
o += String.fromCharCode(r);
|
|
260
|
+
return btoa(o);
|
|
261
|
+
}
|
|
262
|
+
async function re({
|
|
263
|
+
relay: e,
|
|
264
|
+
teamId: t,
|
|
265
|
+
profileKind: o = "development"
|
|
266
|
+
}) {
|
|
267
|
+
return K({ relay: e, teamId: t, profileKind: o });
|
|
208
268
|
}
|
|
209
|
-
function
|
|
210
|
-
const o =
|
|
269
|
+
function y(e, t) {
|
|
270
|
+
const o = e?.[t];
|
|
211
271
|
if (typeof o == "string") return o;
|
|
212
272
|
if (typeof o == "number" || typeof o == "boolean") return String(o);
|
|
213
273
|
}
|
|
214
274
|
export {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
275
|
+
C as APPLE_CERTIFICATE_SECRET_TYPE,
|
|
276
|
+
I as APPLE_PROVISIONING_PROFILE_SECRET_TYPE,
|
|
277
|
+
v as APP_STORE_CONNECT_API_KEY_SECRET_TYPE,
|
|
278
|
+
V as appStoreConnectApiKeySecretName,
|
|
279
|
+
G as appleCertificateSecretName,
|
|
280
|
+
X as createBrowserSecretStore,
|
|
281
|
+
W as createLimrunSecretStore,
|
|
282
|
+
te as ensureAppStoreConnectApiKeySecret,
|
|
283
|
+
Z as ensureAppleCertificateSecret,
|
|
284
|
+
re as listTeamAppleProfiles,
|
|
285
|
+
x as normalizeCertificateSerial,
|
|
286
|
+
z as putAppStoreConnectApiKeySecret,
|
|
287
|
+
L as putAppleCertificateSecret,
|
|
288
|
+
M as putAppleProvisioningProfileSecret,
|
|
289
|
+
ee as saveAppleProfileSecret,
|
|
290
|
+
y as stringField
|
|
227
291
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const R=require("./gsa-srp-CCIfUz7Y.js");class g{constructor(t,r,o){this.apiUrl=t,this.token=r,this.organizationId=o}socket;nextId=1;pending=new Map;async connect(){if(this.socket&&this.socket.readyState===WebSocket.OPEN)return;const t=new WebSocket(E(this.apiUrl,this.token,this.organizationId));this.socket=t,t.onmessage=r=>this.handleMessage(r),t.onclose=()=>this.rejectPending(new Error("Apple relay WebSocket closed")),t.onerror=()=>this.rejectPending(new Error("Apple relay WebSocket failed")),await new Promise((r,o)=>{t.onopen=()=>r(),t.onerror=()=>o(new Error("Apple relay WebSocket connection failed"))})}request(t,r){const o=this.socket;if(!o||o.readyState!==WebSocket.OPEN)throw new Error("Apple relay WebSocket is not connected.");const a=String(this.nextId++),n=new Promise((p,i)=>{this.pending.set(a,{resolve:w=>p(x(w)),reject:i})});return o.send(JSON.stringify({id:a,type:t,...r===void 0?{}:{payload:r}})),n}close(){this.rejectPending(new Error("Apple relay WebSocket closed")),this.socket?.close(),this.socket=void 0}handleMessage(t){const r=JSON.parse(String(t.data)),o=this.pending.get(r.id);if(o){if(this.pending.delete(r.id),!r.ok){o.reject(new Error(r.error||"Apple relay request failed"));return}if(!r.response){o.reject(new Error("Apple relay response was empty."));return}o.resolve(r.response)}}rejectPending(t){for(const r of this.pending.values())r.reject(t);this.pending.clear()}}async function m(e,t,r){const o=new g(e,t,r);return await o.connect(),o}async function S(e,t){return e.request("srpInit",t)}async function A(e,t){return e.request("srpComplete",t)}async function P(e){return e.request("triggerTrustedDevice2FA")}async function b(e,t,r="sms"){return e.request("triggerPhone2FA",{phoneNumberId:t,mode:r})}async function k(e,t){return e.request("submitTrustedDevice2FA",{code:t})}async function T(e,t,r,o="sms"){return e.request("submitPhone2FA",{phoneNumberId:t,mode:o,code:r})}async function v(e){return e.request("finalize")}async function q(e,t){return e.request("provisioning",t)}async function F(e,t){return e.request("appstoreconnect",t)}function x(e){if(e.body!==void 0||!e.rawBody)return e;try{return{...e,body:JSON.parse(e.rawBody)}}catch{return e}}function E(e,t,r){const o=new URL(e);return o.protocol=o.protocol==="https:"?"wss:":"ws:",o.pathname=`${o.pathname.replace(/\/$/,"")}/ios/appstoreconnect/ws`,t&&o.searchParams.set("token",t),r&&o.searchParams.set("organization",r),o.toString()}async function N({registryApiUrl:e,accountName:t,password:r,token:o,organizationId:a}){const n=await m(e,o,a);try{const p=new R.AppleGsaSrpClient(t),i=await S(n,await p.init());if(i.status<200||i.status>=300)throw new Error(`Apple SRP init failed: HTTP ${i.status} ${i.rawBody??""}`.trim());if(!i.body)throw new Error("Apple SRP init response did not include a body.");const w=await p.complete(r,i.body),u=await A(n,{...w,rememberMe:!1,trustTokens:[]}),y=u.status===409;let s,d={type:"trustedDevice"};if(y){s=await P(n);const c=W(s.body);if(s.status===412||C(s.body)){if(!c)throw new Error("Apple requested phone verification but did not include a trusted phone number.");d={type:"phone",phoneNumberId:c.id,mode:c.pushMode??"sms"},s=await b(n,c.id,c.pushMode??"sms")}if(s.status<200||s.status>=300)throw new Error(`Apple two-factor challenge failed: HTTP ${s.status} ${s.rawBody??""}`.trim())}else if(u.status<200||u.status>=300)throw new Error(`Apple SRP complete failed: HTTP ${u.status} ${u.rawBody??""}`.trim());return{relay:n,completeResponse:u,twoFactorChallengeResponse:s,requiresTwoFactor:y,finishTwoFactor:async c=>{const l=d.type==="phone"?await T(n,d.phoneNumberId,c,d.mode):await k(n,c);if(l.status<200||l.status>=300)throw new Error(`Apple two-factor code failed: HTTP ${l.status} ${l.rawBody??""}`.trim());return l},finalize:async()=>v(n),close:async()=>n.close()}}catch(p){throw n.close(),p}}function C(e){return h(e)&&e.noTrustedDevices===!0}function W(e){if(!h(e))return;const t=h(e.phoneNumberVerification)?e.phoneNumberVerification:void 0,r=f(t?.trustedPhoneNumber)??f(e.trustedPhoneNumber)??f(e.phoneNumber);if(!r)return;const o=r.id;if(typeof o!="number")return;const a=typeof r.pushMode=="string"?r.pushMode:typeof e.mode=="string"?e.mode:void 0;return{id:o,pushMode:a}}function f(e){return h(e)?e:void 0}function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}exports.AppleRelayWebSocketClient=g;exports.fetchAppleAccountSession=v;exports.openAppleRelayWebSocket=m;exports.proxyAppStoreConnectRequest=F;exports.proxyPhoneTwoFactorCode=T;exports.proxyProvisioningRequest=q;exports.proxySrpComplete=A;exports.proxySrpInit=S;exports.proxyTwoFactorCode=k;exports.startBrowserOwnedAppleIDLogin=N;exports.triggerPhoneTwoFactor=b;exports.triggerTrustedDeviceTwoFactor=P;
|