@limrun/ui 0.14.0-rc.3 → 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 +32 -33
- package/dist/apple-credentials/index.cjs +1 -0
- package/dist/apple-credentials/index.d.ts +110 -0
- package/dist/apple-credentials/index.js +291 -0
- package/dist/browser-storage-BnO-Ma-e.mjs +219 -0
- package/dist/browser-storage-DLxIqZk5.js +1 -0
- package/dist/client-C9z_sgOf.js +1 -0
- package/dist/{client-C8ZDEjtD.mjs → client-CFDB4mX5.mjs} +38 -31
- package/dist/components/remote-control.d.ts +156 -0
- 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/browser-storage.d.ts +8 -0
- package/dist/core/device-install/storage/index.d.ts +1 -0
- package/dist/core/device-install/storage/secret-store.d.ts +124 -0
- package/dist/core/device-install/types.d.ts +6 -0
- package/dist/core/errors.d.ts +1 -0
- package/dist/core/play-publish/google.d.ts +1 -1
- package/dist/device-build/index.cjs +1 -1
- package/dist/device-build/index.js +21 -20
- package/dist/device-build/react.cjs +1 -1
- package/dist/device-build/react.js +42 -43
- package/dist/device-install/index.cjs +1 -1
- package/dist/device-install/index.js +64 -63
- package/dist/device-install/react.cjs +1 -1
- package/dist/device-install/react.js +47 -49
- package/dist/errors-BSkqS7U-.js +1 -0
- package/dist/errors-gy8yQJos.mjs +6 -0
- package/dist/gsa-srp-Bme3JLEi.mjs +266 -0
- package/dist/gsa-srp-CCIfUz7Y.js +1 -0
- package/dist/index-ChhtuQ7e.js +22 -0
- package/dist/index-YDu8K9a4.mjs +11279 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1405 -1125
- package/dist/play-publish/index.cjs +1 -1
- package/dist/play-publish/index.js +27 -24
- package/dist/play-publish/react.cjs +1 -1
- package/dist/play-publish/react.d.ts +12 -2
- package/dist/play-publish/react.js +70 -60
- package/dist/{provisioning-BmsEnF6X.mjs → provisioning-CDPvxd1h.mjs} +64 -33
- package/dist/provisioning-CbC4h--7.js +1 -0
- package/package.json +6 -1
- package/src/app-store-relay/index.ts +358 -23
- package/src/app-store-relay/react.ts +1 -4
- package/src/apple-credentials/index.test.ts +180 -0
- package/src/apple-credentials/index.ts +388 -0
- package/src/components/remote-control.css +32 -0
- package/src/components/remote-control.tsx +865 -5
- 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 +7 -5
- package/src/core/device-install/storage/browser-storage.test.ts +65 -0
- package/src/core/device-install/storage/browser-storage.ts +33 -0
- package/src/core/device-install/storage/index.ts +1 -0
- package/src/core/device-install/storage/secret-store.ts +332 -0
- package/src/core/device-install/types.ts +6 -0
- package/src/core/errors.ts +3 -0
- package/src/core/play-publish/google.ts +11 -2
- package/src/device-build/react.ts +1 -4
- package/src/device-install/demo/demo.tsx +1 -4
- package/src/device-install/react.ts +1 -4
- package/src/play-publish/README.md +5 -4
- package/src/play-publish/react.ts +72 -32
- package/vite.config.ts +1 -0
- package/dist/browser-storage-Cx9eW-bm.mjs +0 -205
- package/dist/browser-storage-jJaIht4K.js +0 -1
- package/dist/client-BtC4n_qf.js +0 -1
- package/dist/index-CMeQfhYy.js +0 -22
- package/dist/index-DFdCvi2_.mjs +0 -11543
- package/dist/provisioning-Va0PH4Kk.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f="https://accounts.google.com/gsi/client",w="https://www.googleapis.com/auth/androidpublisher";function u(){return globalThis.google?.accounts?.oauth2}let c;function y(){return u()?Promise.resolve():typeof document>"u"?Promise.reject(new Error("Google sign-in requires a browser environment.")):(c||(c=new Promise((o,r)=>{const t=document.createElement("script");t.src=f,t.async=!0,t.addEventListener("load",()=>{u()?o():r(new Error("Google sign-in script loaded without the OAuth client."))},{once:!0}),t.addEventListener("error",()=>{t.remove(),r(new Error("Failed to load the Google sign-in script."))},{once:!0}),document.head.appendChild(t)}),c.catch(()=>{c=void 0})),c)}function m(o){return u()?p(o):y().then(()=>p(o))}function p({clientId:o,scope:r=w}){return new Promise((t,n)=>{u().initTokenClient({client_id:o,scope:r,callback:e=>{if(e.error){n(new Error(e.error_description||e.error));return}if(!e.access_token){n(new Error("Google returned no access token."));return}t(e.access_token)},error_callback:e=>{const a=e?.type==="popup_failed_to_open"?"Google sign-in popup was blocked by the browser.":"Google sign-in was cancelled.";n(new Error(e?.message||a))}}).requestAccessToken()})}class l extends Error{code;status;constructor(r,t={}){super(r),this.name="PlaystorePublishError",this.code=t.code,this.status=t.status}}async function b(o){const{registryApiUrl:r,token:t,organizationId:n,...h}=o;let e;try{e=new URL(r)}catch{throw new l(`Invalid registry URL: ${r}`)}e.pathname=`${e.pathname.replace(/\/$/,"")}/android/playstore/publish`,e.search="",e.hash="";const a={"Content-Type":"application/json"};t&&(a.Authorization=`Bearer ${t}`),n&&(a["X-Limrun-Organization"]=n);let s;try{s=await fetch(e.toString(),{method:"POST",headers:a,body:JSON.stringify(h)})}catch(d){throw new l(`Cannot reach the registry: ${d instanceof Error?d.message:String(d)}`)}const g=await s.text();let i;try{i=g?JSON.parse(g):void 0}catch{i=void 0}if(!s.ok)throw new l(i?.message||`Play publish failed with HTTP ${s.status}`,{code:i?.code,status:s.status});if(typeof i?.versionCode!="number")throw new l("Play publish response is missing versionCode.",{status:s.status});return{versionCode:i.versionCode}}exports.ANDROID_PUBLISHER_SCOPE=w;exports.PlaystorePublishError=l;exports.loadGoogleIdentityServices=y;exports.publishToPlaystore=b;exports.requestGoogleAccessToken=m;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const w = "https://accounts.google.com/gsi/client", f = "https://www.googleapis.com/auth/androidpublisher";
|
|
2
|
+
function u() {
|
|
3
3
|
return globalThis.google?.accounts?.oauth2;
|
|
4
4
|
}
|
|
5
5
|
let c;
|
|
6
6
|
function y() {
|
|
7
|
-
return
|
|
7
|
+
return u() ? Promise.resolve() : typeof document > "u" ? Promise.reject(new Error("Google sign-in requires a browser environment.")) : (c || (c = new Promise((o, r) => {
|
|
8
8
|
const t = document.createElement("script");
|
|
9
|
-
t.src =
|
|
9
|
+
t.src = w, t.async = !0, t.addEventListener(
|
|
10
10
|
"load",
|
|
11
11
|
() => {
|
|
12
|
-
|
|
12
|
+
u() ? o() : r(new Error("Google sign-in script loaded without the OAuth client."));
|
|
13
13
|
},
|
|
14
14
|
{ once: !0 }
|
|
15
15
|
), t.addEventListener(
|
|
16
16
|
"error",
|
|
17
17
|
() => {
|
|
18
|
-
t.remove(),
|
|
18
|
+
t.remove(), r(new Error("Failed to load the Google sign-in script."));
|
|
19
19
|
},
|
|
20
20
|
{ once: !0 }
|
|
21
21
|
), document.head.appendChild(t);
|
|
@@ -23,14 +23,17 @@ function y() {
|
|
|
23
23
|
c = void 0;
|
|
24
24
|
})), c);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
function m(o) {
|
|
27
|
+
return u() ? p(o) : y().then(() => p(o));
|
|
28
|
+
}
|
|
29
|
+
function p({
|
|
30
|
+
clientId: o,
|
|
31
|
+
scope: r = f
|
|
29
32
|
}) {
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
client_id:
|
|
33
|
-
scope:
|
|
33
|
+
return new Promise((t, n) => {
|
|
34
|
+
u().initTokenClient({
|
|
35
|
+
client_id: o,
|
|
36
|
+
scope: r,
|
|
34
37
|
callback: (e) => {
|
|
35
38
|
if (e.error) {
|
|
36
39
|
n(new Error(e.error_description || e.error));
|
|
@@ -52,17 +55,17 @@ async function f({
|
|
|
52
55
|
class l extends Error {
|
|
53
56
|
code;
|
|
54
57
|
status;
|
|
55
|
-
constructor(
|
|
56
|
-
super(
|
|
58
|
+
constructor(r, t = {}) {
|
|
59
|
+
super(r), this.name = "PlaystorePublishError", this.code = t.code, this.status = t.status;
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
async function
|
|
60
|
-
const { registryApiUrl:
|
|
62
|
+
async function b(o) {
|
|
63
|
+
const { registryApiUrl: r, token: t, organizationId: n, ...h } = o;
|
|
61
64
|
let e;
|
|
62
65
|
try {
|
|
63
|
-
e = new URL(
|
|
66
|
+
e = new URL(r);
|
|
64
67
|
} catch {
|
|
65
|
-
throw new l(`Invalid registry URL: ${
|
|
68
|
+
throw new l(`Invalid registry URL: ${r}`);
|
|
66
69
|
}
|
|
67
70
|
e.pathname = `${e.pathname.replace(/\/$/, "")}/android/playstore/publish`, e.search = "", e.hash = "";
|
|
68
71
|
const a = { "Content-Type": "application/json" };
|
|
@@ -74,9 +77,9 @@ async function m(r) {
|
|
|
74
77
|
headers: a,
|
|
75
78
|
body: JSON.stringify(h)
|
|
76
79
|
});
|
|
77
|
-
} catch (
|
|
80
|
+
} catch (d) {
|
|
78
81
|
throw new l(
|
|
79
|
-
`Cannot reach the registry: ${
|
|
82
|
+
`Cannot reach the registry: ${d instanceof Error ? d.message : String(d)}`
|
|
80
83
|
);
|
|
81
84
|
}
|
|
82
85
|
const g = await s.text();
|
|
@@ -98,9 +101,9 @@ async function m(r) {
|
|
|
98
101
|
return { versionCode: i.versionCode };
|
|
99
102
|
}
|
|
100
103
|
export {
|
|
101
|
-
|
|
104
|
+
f as ANDROID_PUBLISHER_SCOPE,
|
|
102
105
|
l as PlaystorePublishError,
|
|
103
106
|
y as loadGoogleIdentityServices,
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
b as publishToPlaystore,
|
|
108
|
+
m as requestGoogleAccessToken
|
|
106
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),I=require("../errors-BSkqS7U-.js"),d=require("./index.cjs");function N({registryApiUrl:f,token:h,organizationId:y,googleClientId:g}){const[k,t]=e.useState("idle"),[S,M]=e.useState(),[P,l]=e.useState(),[T,n]=e.useState(),[p,i]=e.useState(),v=e.useRef(void 0),s=e.useRef(0),a=e.useRef(!1),C=e.useCallback(()=>d.loadGoogleIdentityServices().then(()=>!0,()=>!1),[]),b=e.useCallback(r=>{n(r),i(void 0),l(void 0),t("error")},[]),R=e.useCallback(async()=>{if(a.current)return!1;if(!g)return b("Google OAuth client ID is not configured."),!1;a.current=!0;const r=s.current;t("signing-in"),n(void 0),i(void 0);try{const o=await d.requestGoogleAccessToken({clientId:g});return v.current=o,M(o),r===s.current?t("ready"):t(u=>u==="idle"?"ready":u),!0}catch(o){return r===s.current&&(n(I.errorMessage(o)),t("error")),!1}finally{a.current=!1}},[g]),G=e.useCallback(async r=>{if(a.current)return;if(!f){b("Registry URL is not configured.");return}const o=v.current;if(!o){b("Sign in with Google before publishing.");return}a.current=!0;const u=s.current;t("publishing"),n(void 0),i(void 0),l(void 0);try{const c=await d.publishToPlaystore({registryApiUrl:f,token:h,organizationId:y,accessToken:o,packageName:r.packageName,assetId:r.assetId,assetName:r.assetName,track:r.track,releaseStatus:r.releaseStatus});return u===s.current&&(l(c.versionCode),t("published")),c}catch(c){u===s.current&&(n(I.errorMessage(c)),c instanceof d.PlaystorePublishError&&i(c.code),t("error"));return}finally{a.current=!1}},[f,h,y]),m=e.useCallback(()=>{s.current+=1,l(void 0),n(void 0),i(void 0),t(v.current?"ready":"idle")},[]);return e.useMemo(()=>({status:k,isSignedIn:S!==void 0,versionCode:P,error:T,errorCode:p,preloadGoogle:C,signInWithGoogle:R,publish:G,reset:m}),[k,S,P,T,p,C,R,G,m])}exports.usePlaystorePublish=N;
|
|
@@ -12,10 +12,20 @@ export type UsePlaystorePublishResult = {
|
|
|
12
12
|
error?: string;
|
|
13
13
|
/** Registry error code driving per-cause UX, e.g. versionCodeExists. */
|
|
14
14
|
errorCode?: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Warm up the Google sign-in script (e.g. on dialog open) so
|
|
17
|
+
* signInWithGoogle stays synchronous with the click. Resolves true once
|
|
18
|
+
* the script is ready; await it to gate the sign-in button, or ignore
|
|
19
|
+
* the result and rely on the blocked-popup error plus retry.
|
|
20
|
+
*/
|
|
21
|
+
preloadGoogle: () => Promise<boolean>;
|
|
17
22
|
signInWithGoogle: () => Promise<boolean>;
|
|
18
23
|
publish: (request: PlaystorePublishRequest) => Promise<PlaystorePublishResult | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Clears the outcome state (keeps the Google session). Does not cancel an
|
|
26
|
+
* in-flight sign-in or publish: their completion is ignored status-wise
|
|
27
|
+
* and new calls stay refused until the in-flight one settles.
|
|
28
|
+
*/
|
|
19
29
|
reset: () => void;
|
|
20
30
|
};
|
|
21
31
|
export declare function usePlaystorePublish({ registryApiUrl, token, organizationId, googleClientId, }: UsePlaystorePublishOptions): UsePlaystorePublishResult;
|
|
@@ -1,81 +1,91 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { useState as u, useRef as y, useCallback as d, useMemo as E } from "react";
|
|
2
|
+
import { e as N } from "../errors-gy8yQJos.mjs";
|
|
3
|
+
import { loadGoogleIdentityServices as x, requestGoogleAccessToken as M, publishToPlaystore as A, PlaystorePublishError as D } from "./index.js";
|
|
4
|
+
function W({
|
|
5
|
+
registryApiUrl: f,
|
|
6
|
+
token: k,
|
|
7
|
+
organizationId: m,
|
|
8
|
+
googleClientId: g
|
|
8
9
|
}) {
|
|
9
|
-
const [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const [b, r] = u("idle"), [p, w] = u(), [T, l] = u(), [G, s] = u(), [S, c] = u(), v = y(void 0), t = y(0), n = y(!1), R = d(
|
|
11
|
+
() => x().then(
|
|
12
|
+
() => !0,
|
|
13
|
+
() => !1
|
|
14
|
+
),
|
|
15
|
+
[]
|
|
16
|
+
), h = d((e) => {
|
|
17
|
+
s(e), c(void 0), l(void 0), r("error");
|
|
18
|
+
}, []), P = d(async () => {
|
|
19
|
+
if (n.current)
|
|
14
20
|
return !1;
|
|
15
|
-
if (!
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
21
|
+
if (!g)
|
|
22
|
+
return h("Google OAuth client ID is not configured."), !1;
|
|
23
|
+
n.current = !0;
|
|
24
|
+
const e = t.current;
|
|
25
|
+
r("signing-in"), s(void 0), c(void 0);
|
|
20
26
|
try {
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
} catch (
|
|
24
|
-
return
|
|
27
|
+
const o = await M({ clientId: g });
|
|
28
|
+
return v.current = o, w(o), e === t.current ? r("ready") : r((a) => a === "idle" ? "ready" : a), !0;
|
|
29
|
+
} catch (o) {
|
|
30
|
+
return e === t.current && (s(N(o)), r("error")), !1;
|
|
25
31
|
} finally {
|
|
26
|
-
|
|
32
|
+
n.current = !1;
|
|
27
33
|
}
|
|
28
|
-
}, [
|
|
29
|
-
async (
|
|
30
|
-
if (
|
|
34
|
+
}, [g]), C = d(
|
|
35
|
+
async (e) => {
|
|
36
|
+
if (n.current)
|
|
31
37
|
return;
|
|
32
|
-
if (!
|
|
33
|
-
|
|
38
|
+
if (!f) {
|
|
39
|
+
h("Registry URL is not configured.");
|
|
34
40
|
return;
|
|
35
41
|
}
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
|
|
42
|
+
const o = v.current;
|
|
43
|
+
if (!o) {
|
|
44
|
+
h("Sign in with Google before publishing.");
|
|
39
45
|
return;
|
|
40
46
|
}
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
47
|
+
n.current = !0;
|
|
48
|
+
const a = t.current;
|
|
49
|
+
r("publishing"), s(void 0), c(void 0), l(void 0);
|
|
44
50
|
try {
|
|
45
|
-
const i = await
|
|
46
|
-
registryApiUrl:
|
|
47
|
-
token:
|
|
48
|
-
organizationId:
|
|
49
|
-
accessToken:
|
|
50
|
-
|
|
51
|
+
const i = await A({
|
|
52
|
+
registryApiUrl: f,
|
|
53
|
+
token: k,
|
|
54
|
+
organizationId: m,
|
|
55
|
+
accessToken: o,
|
|
56
|
+
packageName: e.packageName,
|
|
57
|
+
assetId: e.assetId,
|
|
58
|
+
assetName: e.assetName,
|
|
59
|
+
track: e.track,
|
|
60
|
+
releaseStatus: e.releaseStatus
|
|
51
61
|
});
|
|
52
|
-
return
|
|
62
|
+
return a === t.current && (l(i.versionCode), r("published")), i;
|
|
53
63
|
} catch (i) {
|
|
54
|
-
|
|
64
|
+
a === t.current && (s(N(i)), i instanceof D && c(i.code), r("error"));
|
|
55
65
|
return;
|
|
56
66
|
} finally {
|
|
57
|
-
|
|
67
|
+
n.current = !1;
|
|
58
68
|
}
|
|
59
69
|
},
|
|
60
|
-
[
|
|
61
|
-
), I =
|
|
62
|
-
|
|
70
|
+
[f, k, m]
|
|
71
|
+
), I = d(() => {
|
|
72
|
+
t.current += 1, l(void 0), s(void 0), c(void 0), r(v.current ? "ready" : "idle");
|
|
63
73
|
}, []);
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
return E(
|
|
75
|
+
() => ({
|
|
76
|
+
status: b,
|
|
77
|
+
isSignedIn: p !== void 0,
|
|
78
|
+
versionCode: T,
|
|
79
|
+
error: G,
|
|
80
|
+
errorCode: S,
|
|
81
|
+
preloadGoogle: R,
|
|
82
|
+
signInWithGoogle: P,
|
|
83
|
+
publish: C,
|
|
84
|
+
reset: I
|
|
85
|
+
}),
|
|
86
|
+
[b, p, T, G, S, R, P, C, I]
|
|
87
|
+
);
|
|
78
88
|
}
|
|
79
89
|
export {
|
|
80
|
-
|
|
90
|
+
W as usePlaystorePublish
|
|
81
91
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { e as c, a as u, n as d, b as f, c as l, i as r } from "./browser-storage-
|
|
2
|
-
function
|
|
1
|
+
import { e as c, a as u, n as d, b as f, c as l, i as r } from "./browser-storage-BnO-Ma-e.mjs";
|
|
2
|
+
function P() {
|
|
3
3
|
return {
|
|
4
4
|
method: "POST",
|
|
5
5
|
path: "/account/listTeams.action",
|
|
6
6
|
payload: {}
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function g({
|
|
10
10
|
bundleID: e,
|
|
11
11
|
teamID: i = ""
|
|
12
12
|
}) {
|
|
13
13
|
return n("/account/ios/identifiers/listAppIds.action", i, { sort: "name=asc" });
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function v({
|
|
16
16
|
deviceUDID: e,
|
|
17
17
|
teamID: i = ""
|
|
18
18
|
}) {
|
|
@@ -21,13 +21,13 @@ function P({
|
|
|
21
21
|
includeRemovedDevices: !1
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function I(e = "") {
|
|
25
25
|
return n("/account/ios/certificate/listCertRequests.action", e, {
|
|
26
26
|
sort: "name=asc",
|
|
27
27
|
types: "83Q87W3TGH,5QPB9NHCEI"
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function h(e = "") {
|
|
31
31
|
return n("/account/ios/certificate/listCertRequests.action", e, {
|
|
32
32
|
sort: "name=asc",
|
|
33
33
|
types: "WXV89964HE,R58UK2EWSO"
|
|
@@ -52,7 +52,17 @@ function y({
|
|
|
52
52
|
distributionType: "adhoc"
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function q({
|
|
56
|
+
bundleID: e,
|
|
57
|
+
teamID: i = ""
|
|
58
|
+
}) {
|
|
59
|
+
return n("/account/ios/profile/listProvisioningProfiles.action", i, {
|
|
60
|
+
search: e,
|
|
61
|
+
sort: "name=asc",
|
|
62
|
+
distributionType: "store"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function b({
|
|
56
66
|
deviceUDID: e,
|
|
57
67
|
teamID: i = "",
|
|
58
68
|
name: t = "Limrun iPhone"
|
|
@@ -69,7 +79,7 @@ function D({
|
|
|
69
79
|
}
|
|
70
80
|
};
|
|
71
81
|
}
|
|
72
|
-
function
|
|
82
|
+
function T({
|
|
73
83
|
bundleID: e,
|
|
74
84
|
teamID: i = "",
|
|
75
85
|
name: t
|
|
@@ -85,7 +95,7 @@ function q({
|
|
|
85
95
|
}
|
|
86
96
|
};
|
|
87
97
|
}
|
|
88
|
-
function
|
|
98
|
+
function D({ csrPEM: e, teamID: i = "" }) {
|
|
89
99
|
return {
|
|
90
100
|
method: "POST",
|
|
91
101
|
path: "/account/ios/certificate/submitCertificateRequest.action",
|
|
@@ -107,7 +117,7 @@ function C({ csrPEM: e, teamID: i = "" }) {
|
|
|
107
117
|
}
|
|
108
118
|
};
|
|
109
119
|
}
|
|
110
|
-
function
|
|
120
|
+
function S(e, i = "") {
|
|
111
121
|
return {
|
|
112
122
|
method: "GET",
|
|
113
123
|
path: "/account/ios/certificate/downloadCertificateContent.action",
|
|
@@ -118,7 +128,7 @@ function T(e, i = "") {
|
|
|
118
128
|
}
|
|
119
129
|
};
|
|
120
130
|
}
|
|
121
|
-
function
|
|
131
|
+
function A(e, i = "") {
|
|
122
132
|
return {
|
|
123
133
|
method: "GET",
|
|
124
134
|
path: "/account/ios/certificate/downloadCertificateContent.action",
|
|
@@ -129,7 +139,7 @@ function S(e, i = "") {
|
|
|
129
139
|
}
|
|
130
140
|
};
|
|
131
141
|
}
|
|
132
|
-
function
|
|
142
|
+
function w({
|
|
133
143
|
bundleID: e,
|
|
134
144
|
teamID: i = "",
|
|
135
145
|
appIDID: t,
|
|
@@ -151,7 +161,7 @@ function A({
|
|
|
151
161
|
}
|
|
152
162
|
};
|
|
153
163
|
}
|
|
154
|
-
function
|
|
164
|
+
function H({
|
|
155
165
|
bundleID: e,
|
|
156
166
|
teamID: i = "",
|
|
157
167
|
appIDID: t,
|
|
@@ -173,7 +183,26 @@ function w({
|
|
|
173
183
|
}
|
|
174
184
|
};
|
|
175
185
|
}
|
|
176
|
-
function
|
|
186
|
+
function O({
|
|
187
|
+
teamID: e = "",
|
|
188
|
+
appIDID: i,
|
|
189
|
+
certificateID: t,
|
|
190
|
+
name: o
|
|
191
|
+
}) {
|
|
192
|
+
return {
|
|
193
|
+
method: "POST",
|
|
194
|
+
path: "/account/ios/profile/createProvisioningProfile.action",
|
|
195
|
+
payload: {
|
|
196
|
+
teamId: e,
|
|
197
|
+
provisioningProfileName: o,
|
|
198
|
+
certificateIds: [t],
|
|
199
|
+
appIdId: i,
|
|
200
|
+
distributionType: "store",
|
|
201
|
+
subPlatform: "ios"
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function N(e, i = "") {
|
|
177
206
|
return {
|
|
178
207
|
method: "GET",
|
|
179
208
|
path: "/account/ios/profile/downloadProfileContent",
|
|
@@ -183,7 +212,7 @@ function H(e, i = "") {
|
|
|
183
212
|
}
|
|
184
213
|
};
|
|
185
214
|
}
|
|
186
|
-
async function
|
|
215
|
+
async function E({
|
|
187
216
|
bundleID: e,
|
|
188
217
|
deviceUDID: i,
|
|
189
218
|
teamID: t,
|
|
@@ -193,7 +222,7 @@ async function O({
|
|
|
193
222
|
if (!(!a || !p(a, { bundleID: e, deviceUDID: i, teamID: t, signingMode: o })))
|
|
194
223
|
return a;
|
|
195
224
|
}
|
|
196
|
-
async function
|
|
225
|
+
async function G(e) {
|
|
197
226
|
return u({
|
|
198
227
|
...e,
|
|
199
228
|
certificateFileName: e.certificateID ? `${e.certificateID}.p12` : `apple-${e.signingMode ?? "development"}.p12`,
|
|
@@ -218,22 +247,24 @@ function n(e, i, t = {}) {
|
|
|
218
247
|
};
|
|
219
248
|
}
|
|
220
249
|
export {
|
|
221
|
-
|
|
222
|
-
b,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
250
|
+
I as a,
|
|
251
|
+
D as b,
|
|
252
|
+
S as c,
|
|
253
|
+
A as d,
|
|
254
|
+
g as e,
|
|
255
|
+
h as f,
|
|
256
|
+
E as g,
|
|
257
|
+
T as h,
|
|
258
|
+
v as i,
|
|
230
259
|
y as j,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
260
|
+
q as k,
|
|
261
|
+
P as l,
|
|
262
|
+
R as m,
|
|
263
|
+
N as n,
|
|
264
|
+
O as o,
|
|
265
|
+
G as p,
|
|
266
|
+
H as q,
|
|
267
|
+
b as r,
|
|
268
|
+
C as s,
|
|
269
|
+
w as t
|
|
239
270
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./browser-storage-DLxIqZk5.js");function c(){return{method:"POST",path:"/account/listTeams.action",payload:{}}}function u({bundleID:e,teamID:t=""}){return r("/account/ios/identifiers/listAppIds.action",t,{sort:"name=asc"})}function d({deviceUDID:e,teamID:t=""}){return r("/account/ios/device/listDevices.action",t,{sort:"name=asc",includeRemovedDevices:!1})}function f(e=""){return r("/account/ios/certificate/listCertRequests.action",e,{sort:"name=asc",types:"83Q87W3TGH,5QPB9NHCEI"})}function l(e=""){return r("/account/ios/certificate/listCertRequests.action",e,{sort:"name=asc",types:"WXV89964HE,R58UK2EWSO"})}function p({bundleID:e,teamID:t=""}){return r("/account/ios/profile/listProvisioningProfiles.action",t,{search:e,sort:"name=asc"})}function m({bundleID:e,teamID:t=""}){return r("/account/ios/profile/listProvisioningProfiles.action",t,{search:e,sort:"name=asc",distributionType:"adhoc"})}function R({bundleID:e,teamID:t=""}){return r("/account/ios/profile/listProvisioningProfiles.action",t,{search:e,sort:"name=asc",distributionType:"store"})}function P({deviceUDID:e,teamID:t="",name:i="Limrun iPhone"}){return{method:"POST",path:"/account/ios/device/addDevices.action",payload:{teamId:t,deviceNames:i,deviceNumbers:s.normalizeUDID(e),deviceClasses:"iphone",register:"single"}}}function g({bundleID:e,teamID:t="",name:i}){return{method:"POST",path:"/account/ios/identifiers/addAppId.action",payload:{teamId:t,name:i??e,identifier:e,type:"explicit"}}}function q({csrPEM:e,teamID:t=""}){return{method:"POST",path:"/account/ios/certificate/submitCertificateRequest.action",payload:{teamId:t,type:"83Q87W3TGH",csrContent:e}}}function v({csrPEM:e,teamID:t=""}){return{method:"POST",path:"/account/ios/certificate/submitCertificateRequest.action",payload:{teamId:t,type:"WXV89964HE",csrContent:e}}}function I(e,t=""){return{method:"GET",path:"/account/ios/certificate/downloadCertificateContent.action",payload:{teamId:t,certificateId:e,type:"83Q87W3TGH"}}}function D(e,t=""){return{method:"GET",path:"/account/ios/certificate/downloadCertificateContent.action",payload:{teamId:t,certificateId:e,type:"WXV89964HE"}}}function h({bundleID:e,teamID:t="",appIDID:i,certificateID:o,deviceIDs:n,name:a}){return{method:"POST",path:"/account/ios/profile/createProvisioningProfile.action",payload:{teamId:t,provisioningProfileName:a??`Limrun ${e}`,certificateIds:[o],appIdId:i,deviceIds:n,distributionType:"limited",subPlatform:"ios"}}}function b({bundleID:e,teamID:t="",appIDID:i,certificateID:o,deviceIDs:n,name:a}){return{method:"POST",path:"/account/ios/profile/createProvisioningProfile.action",payload:{teamId:t,provisioningProfileName:a??`Limrun Ad Hoc ${e}`,certificateIds:[o],appIdId:i,deviceIds:n,distributionType:"adhoc",subPlatform:"ios"}}}function y({teamID:e="",appIDID:t,certificateID:i,name:o}){return{method:"POST",path:"/account/ios/profile/createProvisioningProfile.action",payload:{teamId:e,provisioningProfileName:o,certificateIds:[i],appIdId:t,distributionType:"store",subPlatform:"ios"}}}function S(e,t=""){return{method:"GET",path:"/account/ios/profile/downloadProfileContent",payload:{teamId:t,provisioningProfileId:e}}}async function C({bundleID:e,deviceUDID:t,teamID:i,signingMode:o}){const n=await s.getSigningAssets({bundleID:e,deviceUDID:t,signingMode:o});if(!(!n||!A(n,{bundleID:e,deviceUDID:t,teamID:i,signingMode:o})))return n}async function T(e){return s.putSigningAssets({...e,certificateFileName:e.certificateID?`${e.certificateID}.p12`:`apple-${e.signingMode??"development"}.p12`,certificatePassword:e.certificatePassword||void 0,signingMode:e.signingMode,profileFileName:e.profile.uuid?`${e.profile.uuid}.mobileprovision`:`${e.signingMode??"development"}.mobileprovision`})}function A(e,{bundleID:t,deviceUDID:i,teamID:o,signingMode:n="development"}){return(e.signingMode??"development")!==n||!s.profileMatchesBundleID(e.profile,t)||o&&e.teamID&&e.teamID!==o||i&&!s.profileContainsDevice(e.profile,i)||e.profile.expirationDate&&new Date(e.profile.expirationDate).getTime()<=Date.now()?!1:s.normalizeBundleID(e.bundleID)===s.normalizeBundleID(t)}function r(e,t,i={}){const o={pageNumber:1,pageSize:200,...i};return t&&(o.teamId=t),{method:"POST",path:e,payload:o}}exports.createAdHocProfileRequest=b;exports.createAppStoreProfileRequest=y;exports.createBundleIDRequest=g;exports.createDevelopmentProfileRequest=h;exports.downloadCertificateRequest=I;exports.downloadDistributionCertificateRequest=D;exports.downloadProfileRequest=S;exports.findAdHocProfilesRequest=m;exports.findAppStoreProfilesRequest=R;exports.findBundleIDRequest=u;exports.findDevelopmentCertificatesRequest=f;exports.findDevelopmentProfilesRequest=p;exports.findDeviceRequest=d;exports.findDistributionCertificatesRequest=l;exports.getReusableAppleSigningAssets=C;exports.listTeamsRequest=c;exports.putAppleGeneratedSigningAssets=T;exports.registerDeviceRequest=P;exports.submitDevelopmentCSRRequest=q;exports.submitDistributionCSRRequest=v;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limrun/ui",
|
|
3
|
-
"version": "0.14.0-rc.
|
|
3
|
+
"version": "0.14.0-rc.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"tag": "next"
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
"import": "./dist/app-store-relay/react.js",
|
|
25
25
|
"require": "./dist/app-store-relay/react.cjs"
|
|
26
26
|
},
|
|
27
|
+
"./apple-credentials": {
|
|
28
|
+
"types": "./dist/apple-credentials/index.d.ts",
|
|
29
|
+
"import": "./dist/apple-credentials/index.js",
|
|
30
|
+
"require": "./dist/apple-credentials/index.cjs"
|
|
31
|
+
},
|
|
27
32
|
"./device-build": {
|
|
28
33
|
"types": "./dist/device-build/index.d.ts",
|
|
29
34
|
"import": "./dist/device-build/index.js",
|