shipthis 0.1.11 → 0.1.13
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/assets/markdown/ship-failure.md +13 -0
- package/assets/markdown/ship-success.md +12 -0
- package/dist/{AppleBundleIdDetails-DymjrhOZ.js → AppleBundleIdDetails-DxWVnxa5.js} +4 -4
- package/dist/{Command-1YAl_0zS.js → Command-zfJ7qIJI.js} +8 -8
- package/dist/{CommandGame--SAa3wEL.js → CommandGame-DVsNreSF.js} +1 -1
- package/dist/{Create-DIaSKUpl.js → Create-DdF29mIS.js} +3 -3
- package/dist/{Import-BIOsf8AA.js → Import-D8ik724M.js} +4 -4
- package/dist/{JobProgress-biiLhigg.js → JobProgress-D1Pe4YJc.js} +10 -7
- package/dist/JobStatusTable-D-daiV-I.js +203 -0
- package/dist/{ProjectCredentialsTable-Ch8022rs.js → ProjectCredentialsTable-Ch2s5qF1.js} +2 -2
- package/dist/{UserCredentialsTable-CeJS3_hd.js → UserCredentialsTable-DzyAHhLB.js} +3 -3
- package/dist/{baseAppleCommand-1isaFxCQ.js → baseAppleCommand-BGXyWK-R.js} +1 -1
- package/dist/{baseGameAndroidCommand-6vsMpE7a.js → baseGameAndroidCommand-mdFhxanf.js} +2 -2
- package/dist/commands/apple/apiKey/create.js +7 -7
- package/dist/commands/apple/apiKey/export.js +6 -6
- package/dist/commands/apple/apiKey/import.js +6 -6
- package/dist/commands/apple/apiKey/status.js +5 -5
- package/dist/commands/apple/certificate/create.js +7 -7
- package/dist/commands/apple/certificate/export.js +6 -6
- package/dist/commands/apple/certificate/import.js +6 -6
- package/dist/commands/apple/certificate/status.js +5 -5
- package/dist/commands/apple/login.js +2 -2
- package/dist/commands/apple/status.js +4 -4
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/game/android/apiKey/connect.js +9 -9
- package/dist/commands/game/android/apiKey/create.js +10 -10
- package/dist/commands/game/android/apiKey/export.js +7 -7
- package/dist/commands/game/android/apiKey/import.js +9 -9
- package/dist/commands/game/android/apiKey/invite.js +4 -4
- package/dist/commands/game/android/apiKey/status.js +7 -7
- package/dist/commands/game/android/keyStore/create.js +8 -8
- package/dist/commands/game/android/keyStore/export.js +6 -6
- package/dist/commands/game/android/keyStore/import.js +9 -9
- package/dist/commands/game/android/keyStore/status.js +6 -6
- package/dist/commands/game/android/status.js +4 -4
- package/dist/commands/game/build/download.js +4 -4
- package/dist/commands/game/build/list.js +5 -5
- package/dist/commands/game/create.js +2 -2
- package/dist/commands/game/details.js +4 -4
- package/dist/commands/game/export.js +1 -1
- package/dist/commands/game/ios/app/addTester.js +5 -5
- package/dist/commands/game/ios/app/create.js +4 -4
- package/dist/commands/game/ios/app/status.js +7 -7
- package/dist/commands/game/ios/app/sync.js +5 -5
- package/dist/commands/game/ios/profile/create.js +7 -7
- package/dist/commands/game/ios/profile/export.js +6 -6
- package/dist/commands/game/ios/profile/import.js +6 -6
- package/dist/commands/game/ios/profile/status.js +6 -6
- package/dist/commands/game/ios/status.js +7 -7
- package/dist/commands/game/ios/wizard.js +2 -2
- package/dist/commands/game/job/list.js +4 -4
- package/dist/commands/game/job/status.js +17 -131
- package/dist/commands/game/list.js +4 -4
- package/dist/commands/game/ship.js +74 -19
- package/dist/commands/game/status.js +4 -4
- package/dist/commands/game/wizard.js +14 -14
- package/dist/commands/internal/fastlane.js +1 -1
- package/dist/commands/internal/readme.js +1 -1
- package/dist/commands/login.js +2 -2
- package/dist/commands/status.js +4 -4
- package/dist/{export-BDxGDZdh.js → export-Cin4rLWR.js} +1 -1
- package/dist/{import-v54PM_Qg.js → import-CXTv9E84.js} +1 -1
- package/dist/{index-BDFKyTPb.js → index-B4v66AKo.js} +1 -1
- package/dist/{index-ByOvCs4O.js → index-BVvcTBnj.js} +4 -4
- package/dist/{index-m4HTrJ5J.js → index-Cx_2qTdS.js} +7 -7
- package/dist/{index-BB7X1Pqp.js → index-Dhx6FAHt.js} +1 -1
- package/dist/{index-wyPoxiTc.js → index-Dj-chiHz.js} +2 -2
- package/dist/{upload-2naN75Zu.js → upload-DZCIfnwf.js} +1 -1
- package/dist/{useAndroidServiceAccountTestResult-BDc7XpKE.js → useAndroidServiceAccountTestResult-L4oozjag.js} +1 -1
- package/dist/{useAppleApp-DgE0wEaq.js → useAppleApp-DcSr-q-w.js} +1 -1
- package/dist/{useAppleBundleId-BNI8swhC.js → useAppleBundleId-BnJVPVIz.js} +1 -1
- package/dist/{useJobWatching-BIG6fnTN.js → useJobWatching-DS0qHqPA.js} +3 -3
- package/dist/{useProjectCredentials-B5ZmpIxL.js → useProjectCredentials-CI_AoXmH.js} +3 -3
- package/dist/{useWebSocket-Bep1zAVG.js → useWebSocket-ZEZvtpT_.js} +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +141 -223
- package/package.json +1 -1
- package/dist/AppleBundleIdDetails-C0XqjxKJ.js +0 -72
- package/dist/AppleBundleIdDetails-CjP5y0cj.js +0 -74
- package/dist/AppleBundleIdDetails-CztWY_mT.js +0 -73
- package/dist/AppleBundleIdDetails-DKeSAte9.js +0 -73
- package/dist/AppleBundleIdDetails-Df30MPFC.js +0 -73
- package/dist/AppleBundleIdDetails-Dxo99Sgu.js +0 -72
- package/dist/Command-BiB9MqbJ.js +0 -204
- package/dist/Command-Cl-JfhTy.js +0 -203
- package/dist/Command-D6rWEZRM.js +0 -204
- package/dist/Command-Dn0P_KOV.js +0 -205
- package/dist/Command-DxmQn3XT.js +0 -204
- package/dist/Command-YJJp90ru.js +0 -204
- package/dist/CommandGame-C1oTlfdb.js +0 -8
- package/dist/CommandGame-CZUx_VQu.js +0 -8
- package/dist/CommandGame-DspVLTPZ.js +0 -8
- package/dist/CommandGame-cPaTk1wh.js +0 -8
- package/dist/CommandGame-k04mHiDl.js +0 -8
- package/dist/CommandGame-pI9VXKxi.js +0 -8
- package/dist/CreateKeystore-BnNdeDUa.js +0 -57
- package/dist/CreateKeystore-BqJdpvsI.js +0 -56
- package/dist/CreateKeystore-Cf-nsK_M.js +0 -56
- package/dist/CreateKeystore-D8uTRamD.js +0 -56
- package/dist/CreateKeystore-Dm0KVh85.js +0 -56
- package/dist/CreateKeystore-g1z6DsU5.js +0 -56
- package/dist/JobProgress-CPkWVSlH.js +0 -108
- package/dist/JobProgress-Dk0UoNah.js +0 -108
- package/dist/JobProgress-W0QQR49T.js +0 -108
- package/dist/JobProgress-jmGAzvxS.js +0 -108
- package/dist/JobStatusTable-BA_q-kgE.js +0 -75
- package/dist/JobStatusTable-ByW0bN6c.js +0 -75
- package/dist/JobStatusTable-CgaTS7jS.js +0 -75
- package/dist/JobStatusTable-DqoppRro.js +0 -75
- package/dist/JobStatusTable-q4atKzhu.js +0 -75
- package/dist/ProjectCredentialsTable-8kXt7sTS.js +0 -37
- package/dist/ProjectCredentialsTable-BIWBAXCh.js +0 -37
- package/dist/ProjectCredentialsTable-DRMK_SNw.js +0 -37
- package/dist/ProjectCredentialsTable-DfkpvTf8.js +0 -37
- package/dist/UserCredentialsTable-DMh8Wpy7.js +0 -82
- package/dist/UserCredentialsTable-DgHZJSHG.js +0 -82
- package/dist/UserCredentialsTable-TflQvTEP.js +0 -82
- package/dist/UserCredentialsTable-ysmM5dlV.js +0 -82
- package/dist/baseAppleCommand-B3WQtlx-.js +0 -10
- package/dist/baseAppleCommand-B9wyIqdL.js +0 -10
- package/dist/baseAppleCommand-D-G4h8zQ.js +0 -10
- package/dist/baseAppleCommand-DpasCbje.js +0 -10
- package/dist/baseGameAndroidCommand-B-CFhPnE.js +0 -43
- package/dist/baseGameAndroidCommand-B3LRG701.js +0 -43
- package/dist/baseGameAndroidCommand-C9BuS2Sr.js +0 -43
- package/dist/baseGameAndroidCommand-DD0H8iy-.js +0 -43
- package/dist/commands/game/android/wizard.js +0 -509
- package/dist/export-B_F6vXIK.js +0 -36
- package/dist/export-BiLHgSJ9.js +0 -36
- package/dist/export-C_lu1FD9.js +0 -36
- package/dist/export-rS9o87LD.js +0 -36
- package/dist/import-7T3J63j2.js +0 -38
- package/dist/import-Brg3zYmT.js +0 -38
- package/dist/import-BrlJuE2Z.js +0 -38
- package/dist/import-CxNikF1c.js +0 -38
- package/dist/import-DPbg8WvS.js +0 -38
- package/dist/index-B5XHQfs2.js +0 -122
- package/dist/index-B6V7vGOj.js +0 -136
- package/dist/index-BL-1G60K.js +0 -135
- package/dist/index-BQRxiyqn.js +0 -693
- package/dist/index-BQnkBr1Q.js +0 -136
- package/dist/index-BX9h2vPV.js +0 -123
- package/dist/index-BjGSEqP5.js +0 -135
- package/dist/index-BuZmCvZh.js +0 -24
- package/dist/index-Bv3x8c78.js +0 -693
- package/dist/index-BzffuqPa.js +0 -24
- package/dist/index-C9734Cj2.js +0 -693
- package/dist/index-CKYExssR.js +0 -136
- package/dist/index-CgBgZUkL.js +0 -144
- package/dist/index-Cz_KLwWf.js +0 -136
- package/dist/index-D6BH5UAM.js +0 -135
- package/dist/index-DBrQda8r.js +0 -122
- package/dist/index-DE2Hvx2o.js +0 -122
- package/dist/index-DOgF4dFK.js +0 -24
- package/dist/index-DdABTtYO.js +0 -693
- package/dist/index-DgbQBx6x.js +0 -122
- package/dist/index-DxHPjZav.js +0 -136
- package/dist/index-X__XH_Fd.js +0 -144
- package/dist/index-o9Y-84Rj.js +0 -122
- package/dist/upload-CMo3hUhl.js +0 -60
- package/dist/upload-Cx71802W.js +0 -60
- package/dist/upload-DvAE1vDq.js +0 -60
- package/dist/upload-LXRr4pMa.js +0 -60
- package/dist/useAndroidServiceAccountTestResult-B_ekRewZ.js +0 -52
- package/dist/useAndroidServiceAccountTestResult-Ce1x0Eh8.js +0 -52
- package/dist/useAndroidServiceAccountTestResult-D_30xIJA.js +0 -52
- package/dist/useAndroidServiceAccountTestResult-InDf5WSl.js +0 -52
- package/dist/useAppleApp-BEtLQa7n.js +0 -32
- package/dist/useAppleApp-CApC0-4Q.js +0 -32
- package/dist/useAppleApp-CETIcsJS.js +0 -32
- package/dist/useAppleApp-DnSjUfSs.js +0 -32
- package/dist/useAppleBundleId-DXbMDRLd.js +0 -64
- package/dist/useAppleBundleId-DtLODy3p.js +0 -64
- package/dist/useAppleBundleId-SmzY6rkm.js +0 -64
- package/dist/useAppleBundleId-gPBzJwQg.js +0 -64
- package/dist/useJobWatching-BcBJ5dy1.js +0 -43
- package/dist/useJobWatching-Bz1e6xOv.js +0 -43
- package/dist/useJobWatching-Cp-CYd90.js +0 -45
- package/dist/useJobWatching-D-YzSlK8.js +0 -45
- package/dist/useJobWatching-I_A3b36f.js +0 -45
- package/dist/useJobWatching-P5oC7mNB.js +0 -45
- package/dist/useProjectCredentials-BRffcsO3.js +0 -54
- package/dist/useProjectCredentials-CKngz2rd.js +0 -54
- package/dist/useProjectCredentials-EapDge1I.js +0 -54
- package/dist/useProjectCredentials-vjedBbKl.js +0 -54
- package/dist/useWebSocket-CBqsjHbt.js +0 -36
- package/dist/useWebSocket-D8PojLtx.js +0 -36
- package/dist/useWebSocket-DoImIdTy.js +0 -36
- package/dist/useWebSocket-rBLiZsKb.js +0 -36
- package/dist/wizard-ChPegnMW.js +0 -133
package/dist/upload-DvAE1vDq.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-Bv3x8c78.js';
|
|
3
|
-
|
|
4
|
-
async function getNewUploadTicket(projectId = null) {
|
|
5
|
-
const url = projectId ? `${API_URL}/projects/${projectId}/credentials/url` : `${API_URL}/credentials/url`;
|
|
6
|
-
const headers = getAuthedHeaders();
|
|
7
|
-
const { data: uploadInfo } = await axios({
|
|
8
|
-
method: "post",
|
|
9
|
-
url,
|
|
10
|
-
headers
|
|
11
|
-
});
|
|
12
|
-
return uploadInfo;
|
|
13
|
-
}
|
|
14
|
-
async function uploadUserCredentials({ contents, platform, type, serialNumber }) {
|
|
15
|
-
const uploadInfo = await getNewUploadTicket();
|
|
16
|
-
const jsonBuffer = Buffer.from(JSON.stringify(contents));
|
|
17
|
-
await axios.put(uploadInfo.url, jsonBuffer, {
|
|
18
|
-
headers: {
|
|
19
|
-
"Content-length": jsonBuffer.length,
|
|
20
|
-
"Content-Type": "application/json"
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const headers = getAuthedHeaders();
|
|
24
|
-
return await axios({
|
|
25
|
-
method: "post",
|
|
26
|
-
url: `${API_URL}/credentials`,
|
|
27
|
-
headers,
|
|
28
|
-
data: {
|
|
29
|
-
platform,
|
|
30
|
-
type,
|
|
31
|
-
uuid: uploadInfo.uuid,
|
|
32
|
-
serialNumber
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
async function uploadProjectCredentials(projectId, { contents, platform, type, serialNumber, identifier }) {
|
|
37
|
-
const uploadInfo = await getNewUploadTicket(projectId);
|
|
38
|
-
const jsonBuffer = Buffer.from(JSON.stringify(contents));
|
|
39
|
-
await axios.put(uploadInfo.url, jsonBuffer, {
|
|
40
|
-
headers: {
|
|
41
|
-
"Content-length": jsonBuffer.length,
|
|
42
|
-
"Content-Type": "application/json"
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const headers = getAuthedHeaders();
|
|
46
|
-
return await axios({
|
|
47
|
-
method: "post",
|
|
48
|
-
url: `${API_URL}/projects/${projectId}/credentials`,
|
|
49
|
-
headers,
|
|
50
|
-
data: {
|
|
51
|
-
platform,
|
|
52
|
-
type,
|
|
53
|
-
uuid: uploadInfo.uuid,
|
|
54
|
-
identifier,
|
|
55
|
-
serialNumber
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { uploadProjectCredentials as a, uploadUserCredentials as u };
|
package/dist/upload-LXRr4pMa.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-DdABTtYO.js';
|
|
3
|
-
|
|
4
|
-
async function getNewUploadTicket(projectId = null) {
|
|
5
|
-
const url = projectId ? `${API_URL}/projects/${projectId}/credentials/url` : `${API_URL}/credentials/url`;
|
|
6
|
-
const headers = getAuthedHeaders();
|
|
7
|
-
const { data: uploadInfo } = await axios({
|
|
8
|
-
method: "post",
|
|
9
|
-
url,
|
|
10
|
-
headers
|
|
11
|
-
});
|
|
12
|
-
return uploadInfo;
|
|
13
|
-
}
|
|
14
|
-
async function uploadUserCredentials({ contents, platform, type, serialNumber }) {
|
|
15
|
-
const uploadInfo = await getNewUploadTicket();
|
|
16
|
-
const jsonBuffer = Buffer.from(JSON.stringify(contents));
|
|
17
|
-
await axios.put(uploadInfo.url, jsonBuffer, {
|
|
18
|
-
headers: {
|
|
19
|
-
"Content-length": jsonBuffer.length,
|
|
20
|
-
"Content-Type": "application/json"
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const headers = getAuthedHeaders();
|
|
24
|
-
return await axios({
|
|
25
|
-
method: "post",
|
|
26
|
-
url: `${API_URL}/credentials`,
|
|
27
|
-
headers,
|
|
28
|
-
data: {
|
|
29
|
-
platform,
|
|
30
|
-
type,
|
|
31
|
-
uuid: uploadInfo.uuid,
|
|
32
|
-
serialNumber
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
async function uploadProjectCredentials(projectId, { contents, platform, type, serialNumber, identifier }) {
|
|
37
|
-
const uploadInfo = await getNewUploadTicket(projectId);
|
|
38
|
-
const jsonBuffer = Buffer.from(JSON.stringify(contents));
|
|
39
|
-
await axios.put(uploadInfo.url, jsonBuffer, {
|
|
40
|
-
headers: {
|
|
41
|
-
"Content-length": jsonBuffer.length,
|
|
42
|
-
"Content-Type": "application/json"
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const headers = getAuthedHeaders();
|
|
46
|
-
return await axios({
|
|
47
|
-
method: "post",
|
|
48
|
-
url: `${API_URL}/projects/${projectId}/credentials`,
|
|
49
|
-
headers,
|
|
50
|
-
data: {
|
|
51
|
-
platform,
|
|
52
|
-
type,
|
|
53
|
-
uuid: uploadInfo.uuid,
|
|
54
|
-
identifier,
|
|
55
|
-
serialNumber
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { uploadProjectCredentials as a, uploadUserCredentials as u };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { o as getAuthedHeaders, p as API_URL } from './index-C9734Cj2.js';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
4
|
-
|
|
5
|
-
const cacheKeys = {
|
|
6
|
-
androidKeyTestResult: (props) => ["androidKeyTestResult", ...Object.values(props)],
|
|
7
|
-
androidSetupStatus: (props) => ["androidSetupStatus", ...Object.values(props)],
|
|
8
|
-
builds: (props) => ["builds", ...Object.values(props)],
|
|
9
|
-
googleStatus: () => ["googleStatus"],
|
|
10
|
-
job: (props) => ["job", ...Object.values(props)],
|
|
11
|
-
jobLogs: (props) => ["jobLogs", ...Object.values(props)],
|
|
12
|
-
jobs: (props) => ["jobs", ...Object.values(props)],
|
|
13
|
-
projectCredentials: (props) => ["projectCredentials", ...Object.values(props)],
|
|
14
|
-
userCredentials: (props) => ["userCredentials", ...Object.values(props)]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var KeyTestStatus = /* @__PURE__ */ ((KeyTestStatus2) => {
|
|
18
|
-
KeyTestStatus2["SUCCESS"] = "success";
|
|
19
|
-
KeyTestStatus2["ERROR"] = "error";
|
|
20
|
-
return KeyTestStatus2;
|
|
21
|
-
})(KeyTestStatus || {});
|
|
22
|
-
var KeyTestError = /* @__PURE__ */ ((KeyTestError2) => {
|
|
23
|
-
KeyTestError2["NO_SERVICE_ACCOUNT_KEY"] = "no_service_account_key";
|
|
24
|
-
KeyTestError2["NO_PACKAGE_NAME"] = "no_package_name";
|
|
25
|
-
KeyTestError2["APP_NOT_FOUND"] = "app_not_found";
|
|
26
|
-
KeyTestError2["NOT_INVITED"] = "not_invited";
|
|
27
|
-
return KeyTestError2;
|
|
28
|
-
})(KeyTestError || {});
|
|
29
|
-
const KeyTestErrorMessage = {
|
|
30
|
-
["no_service_account_key" /* NO_SERVICE_ACCOUNT_KEY */]: "Service Account API Key not found in your account",
|
|
31
|
-
["no_package_name" /* NO_PACKAGE_NAME */]: "Android Package Name has not been set",
|
|
32
|
-
["app_not_found" /* APP_NOT_FOUND */]: "Application not found in Google Play Console",
|
|
33
|
-
["not_invited" /* NOT_INVITED */]: "Service Account has not been invited to Google Play"
|
|
34
|
-
};
|
|
35
|
-
function niceError(keyError) {
|
|
36
|
-
return keyError ? KeyTestErrorMessage[keyError] : undefined;
|
|
37
|
-
}
|
|
38
|
-
const fetchKeyTestResult = async ({ projectId }, config) => {
|
|
39
|
-
if (!projectId) throw new Error("projectId is required");
|
|
40
|
-
const url = `${API_URL}/projects/${projectId}/credentials/android/key/test`;
|
|
41
|
-
const headers = getAuthedHeaders();
|
|
42
|
-
const { data } = await axios.post(url, {}, { headers, ...config });
|
|
43
|
-
return data;
|
|
44
|
-
};
|
|
45
|
-
const useAndroidServiceAccountTestResult = (props) => {
|
|
46
|
-
return useQuery({
|
|
47
|
-
queryKey: cacheKeys.androidKeyTestResult(props),
|
|
48
|
-
queryFn: () => fetchKeyTestResult(props)
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { KeyTestStatus as K, KeyTestError as a, cacheKeys as c, fetchKeyTestResult as f, niceError as n, useAndroidServiceAccountTestResult as u };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-BB7X1Pqp.js';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
4
|
-
|
|
5
|
-
const cacheKeys = {
|
|
6
|
-
androidKeyTestResult: (props) => ["androidKeyTestResult", ...Object.values(props)],
|
|
7
|
-
androidSetupStatus: (props) => ["androidSetupStatus", ...Object.values(props)],
|
|
8
|
-
builds: (props) => ["builds", ...Object.values(props)],
|
|
9
|
-
googleStatus: () => ["googleStatus"],
|
|
10
|
-
job: (props) => ["job", ...Object.values(props)],
|
|
11
|
-
jobLogs: (props) => ["jobLogs", ...Object.values(props)],
|
|
12
|
-
jobs: (props) => ["jobs", ...Object.values(props)],
|
|
13
|
-
projectCredentials: (props) => ["projectCredentials", ...Object.values(props)],
|
|
14
|
-
userCredentials: (props) => ["userCredentials", ...Object.values(props)]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var KeyTestStatus = /* @__PURE__ */ ((KeyTestStatus2) => {
|
|
18
|
-
KeyTestStatus2["SUCCESS"] = "success";
|
|
19
|
-
KeyTestStatus2["ERROR"] = "error";
|
|
20
|
-
return KeyTestStatus2;
|
|
21
|
-
})(KeyTestStatus || {});
|
|
22
|
-
var KeyTestError = /* @__PURE__ */ ((KeyTestError2) => {
|
|
23
|
-
KeyTestError2["NO_SERVICE_ACCOUNT_KEY"] = "no_service_account_key";
|
|
24
|
-
KeyTestError2["NO_PACKAGE_NAME"] = "no_package_name";
|
|
25
|
-
KeyTestError2["APP_NOT_FOUND"] = "app_not_found";
|
|
26
|
-
KeyTestError2["NOT_INVITED"] = "not_invited";
|
|
27
|
-
return KeyTestError2;
|
|
28
|
-
})(KeyTestError || {});
|
|
29
|
-
const KeyTestErrorMessage = {
|
|
30
|
-
["no_service_account_key" /* NO_SERVICE_ACCOUNT_KEY */]: "Service Account API Key not found in your account",
|
|
31
|
-
["no_package_name" /* NO_PACKAGE_NAME */]: "Android Package Name has not been set",
|
|
32
|
-
["app_not_found" /* APP_NOT_FOUND */]: "Application not found in Google Play Console",
|
|
33
|
-
["not_invited" /* NOT_INVITED */]: "Service Account has not been invited to Google Play"
|
|
34
|
-
};
|
|
35
|
-
function niceError(keyError) {
|
|
36
|
-
return keyError ? KeyTestErrorMessage[keyError] : void 0;
|
|
37
|
-
}
|
|
38
|
-
const fetchKeyTestResult = async ({ projectId }, config) => {
|
|
39
|
-
if (!projectId) throw new Error("projectId is required");
|
|
40
|
-
const url = `${API_URL}/projects/${projectId}/credentials/android/key/test`;
|
|
41
|
-
const headers = getAuthedHeaders();
|
|
42
|
-
const { data } = await axios.post(url, {}, { headers, ...config });
|
|
43
|
-
return data;
|
|
44
|
-
};
|
|
45
|
-
const useAndroidServiceAccountTestResult = (props) => {
|
|
46
|
-
return useQuery({
|
|
47
|
-
queryKey: cacheKeys.androidKeyTestResult(props),
|
|
48
|
-
queryFn: () => fetchKeyTestResult(props)
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { KeyTestStatus as K, KeyTestError as a, cacheKeys as c, fetchKeyTestResult as f, niceError as n, useAndroidServiceAccountTestResult as u };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-BQRxiyqn.js';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
4
|
-
|
|
5
|
-
const cacheKeys = {
|
|
6
|
-
androidKeyTestResult: (props) => ["androidKeyTestResult", ...Object.values(props)],
|
|
7
|
-
androidSetupStatus: (props) => ["androidSetupStatus", ...Object.values(props)],
|
|
8
|
-
builds: (props) => ["builds", ...Object.values(props)],
|
|
9
|
-
googleStatus: () => ["googleStatus"],
|
|
10
|
-
job: (props) => ["job", ...Object.values(props)],
|
|
11
|
-
jobLogs: (props) => ["jobLogs", ...Object.values(props)],
|
|
12
|
-
jobs: (props) => ["jobs", ...Object.values(props)],
|
|
13
|
-
projectCredentials: (props) => ["projectCredentials", ...Object.values(props)],
|
|
14
|
-
userCredentials: (props) => ["userCredentials", ...Object.values(props)]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var KeyTestStatus = /* @__PURE__ */ ((KeyTestStatus2) => {
|
|
18
|
-
KeyTestStatus2["SUCCESS"] = "success";
|
|
19
|
-
KeyTestStatus2["ERROR"] = "error";
|
|
20
|
-
return KeyTestStatus2;
|
|
21
|
-
})(KeyTestStatus || {});
|
|
22
|
-
var KeyTestError = /* @__PURE__ */ ((KeyTestError2) => {
|
|
23
|
-
KeyTestError2["NO_SERVICE_ACCOUNT_KEY"] = "no_service_account_key";
|
|
24
|
-
KeyTestError2["NO_PACKAGE_NAME"] = "no_package_name";
|
|
25
|
-
KeyTestError2["APP_NOT_FOUND"] = "app_not_found";
|
|
26
|
-
KeyTestError2["NOT_INVITED"] = "not_invited";
|
|
27
|
-
return KeyTestError2;
|
|
28
|
-
})(KeyTestError || {});
|
|
29
|
-
const KeyTestErrorMessage = {
|
|
30
|
-
["no_service_account_key" /* NO_SERVICE_ACCOUNT_KEY */]: "Service Account API Key not found in your account",
|
|
31
|
-
["no_package_name" /* NO_PACKAGE_NAME */]: "Android Package Name has not been set",
|
|
32
|
-
["app_not_found" /* APP_NOT_FOUND */]: "Application not found in Google Play Console",
|
|
33
|
-
["not_invited" /* NOT_INVITED */]: "Service Account has not been invited to Google Play"
|
|
34
|
-
};
|
|
35
|
-
function niceError(keyError) {
|
|
36
|
-
return keyError ? KeyTestErrorMessage[keyError] : undefined;
|
|
37
|
-
}
|
|
38
|
-
const fetchKeyTestResult = async ({ projectId }, config) => {
|
|
39
|
-
if (!projectId) throw new Error("projectId is required");
|
|
40
|
-
const url = `${API_URL}/projects/${projectId}/credentials/android/key/test`;
|
|
41
|
-
const headers = getAuthedHeaders();
|
|
42
|
-
const { data } = await axios.post(url, {}, { headers, ...config });
|
|
43
|
-
return data;
|
|
44
|
-
};
|
|
45
|
-
const useAndroidServiceAccountTestResult = (props) => {
|
|
46
|
-
return useQuery({
|
|
47
|
-
queryKey: cacheKeys.androidKeyTestResult(props),
|
|
48
|
-
queryFn: () => fetchKeyTestResult(props)
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { KeyTestStatus as K, KeyTestError as a, cacheKeys as c, fetchKeyTestResult as f, niceError as n, useAndroidServiceAccountTestResult as u };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-DdABTtYO.js';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
4
|
-
|
|
5
|
-
const cacheKeys = {
|
|
6
|
-
androidKeyTestResult: (props) => ["androidKeyTestResult", ...Object.values(props)],
|
|
7
|
-
androidSetupStatus: (props) => ["androidSetupStatus", ...Object.values(props)],
|
|
8
|
-
builds: (props) => ["builds", ...Object.values(props)],
|
|
9
|
-
googleStatus: () => ["googleStatus"],
|
|
10
|
-
job: (props) => ["job", ...Object.values(props)],
|
|
11
|
-
jobLogs: (props) => ["jobLogs", ...Object.values(props)],
|
|
12
|
-
jobs: (props) => ["jobs", ...Object.values(props)],
|
|
13
|
-
projectCredentials: (props) => ["projectCredentials", ...Object.values(props)],
|
|
14
|
-
userCredentials: (props) => ["userCredentials", ...Object.values(props)]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var KeyTestStatus = /* @__PURE__ */ ((KeyTestStatus2) => {
|
|
18
|
-
KeyTestStatus2["SUCCESS"] = "success";
|
|
19
|
-
KeyTestStatus2["ERROR"] = "error";
|
|
20
|
-
return KeyTestStatus2;
|
|
21
|
-
})(KeyTestStatus || {});
|
|
22
|
-
var KeyTestError = /* @__PURE__ */ ((KeyTestError2) => {
|
|
23
|
-
KeyTestError2["NO_SERVICE_ACCOUNT_KEY"] = "no_service_account_key";
|
|
24
|
-
KeyTestError2["NO_PACKAGE_NAME"] = "no_package_name";
|
|
25
|
-
KeyTestError2["APP_NOT_FOUND"] = "app_not_found";
|
|
26
|
-
KeyTestError2["NOT_INVITED"] = "not_invited";
|
|
27
|
-
return KeyTestError2;
|
|
28
|
-
})(KeyTestError || {});
|
|
29
|
-
const KeyTestErrorMessage = {
|
|
30
|
-
["no_service_account_key" /* NO_SERVICE_ACCOUNT_KEY */]: "Service Account API Key not found in your account",
|
|
31
|
-
["no_package_name" /* NO_PACKAGE_NAME */]: "Android Package Name has not been set",
|
|
32
|
-
["app_not_found" /* APP_NOT_FOUND */]: "Application not found in Google Play Console",
|
|
33
|
-
["not_invited" /* NOT_INVITED */]: "Service Account has not been invited to Google Play"
|
|
34
|
-
};
|
|
35
|
-
function niceError(keyError) {
|
|
36
|
-
return keyError ? KeyTestErrorMessage[keyError] : undefined;
|
|
37
|
-
}
|
|
38
|
-
const fetchKeyTestResult = async ({ projectId }, config) => {
|
|
39
|
-
if (!projectId) throw new Error("projectId is required");
|
|
40
|
-
const url = `${API_URL}/projects/${projectId}/credentials/android/key/test`;
|
|
41
|
-
const headers = getAuthedHeaders();
|
|
42
|
-
const { data } = await axios.post(url, {}, { headers, ...config });
|
|
43
|
-
return data;
|
|
44
|
-
};
|
|
45
|
-
const useAndroidServiceAccountTestResult = (props) => {
|
|
46
|
-
return useQuery({
|
|
47
|
-
queryKey: cacheKeys.androidKeyTestResult(props),
|
|
48
|
-
queryFn: () => fetchKeyTestResult(props)
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { KeyTestStatus as K, KeyTestError as a, cacheKeys as c, fetchKeyTestResult as f, niceError as n, useAndroidServiceAccountTestResult as u };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { f as App } from './index-BB7X1Pqp.js';
|
|
3
|
-
|
|
4
|
-
const queryAppleApp = async ({ ctx, iosBundleId }) => {
|
|
5
|
-
if (!iosBundleId) {
|
|
6
|
-
return { app: null, summary: null };
|
|
7
|
-
}
|
|
8
|
-
const app = await App.findAsync(ctx, {
|
|
9
|
-
bundleId: iosBundleId
|
|
10
|
-
});
|
|
11
|
-
if (!app) {
|
|
12
|
-
return { app: null, summary: null };
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
app,
|
|
16
|
-
summary: {
|
|
17
|
-
id: app.id,
|
|
18
|
-
name: app.attributes.name,
|
|
19
|
-
bundleId: app.attributes.bundleId,
|
|
20
|
-
primaryLocale: app.attributes.primaryLocale
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const useAppleApp = (props) => {
|
|
25
|
-
const queryResult = useQuery({
|
|
26
|
-
queryKey: ["appleApp", props.iosBundleId],
|
|
27
|
-
queryFn: () => queryAppleApp(props)
|
|
28
|
-
});
|
|
29
|
-
return queryResult;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { queryAppleApp as q, useAppleApp as u };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { f as App } from './index-C9734Cj2.js';
|
|
3
|
-
|
|
4
|
-
const queryAppleApp = async ({ ctx, iosBundleId }) => {
|
|
5
|
-
if (!iosBundleId) {
|
|
6
|
-
return { app: null, summary: null };
|
|
7
|
-
}
|
|
8
|
-
const app = await App.findAsync(ctx, {
|
|
9
|
-
bundleId: iosBundleId
|
|
10
|
-
});
|
|
11
|
-
if (!app) {
|
|
12
|
-
return { app: null, summary: null };
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
app,
|
|
16
|
-
summary: {
|
|
17
|
-
id: app.id,
|
|
18
|
-
name: app.attributes.name,
|
|
19
|
-
bundleId: app.attributes.bundleId,
|
|
20
|
-
primaryLocale: app.attributes.primaryLocale
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const useAppleApp = (props) => {
|
|
25
|
-
const queryResult = useQuery({
|
|
26
|
-
queryKey: ["appleApp", props.iosBundleId],
|
|
27
|
-
queryFn: () => queryAppleApp(props)
|
|
28
|
-
});
|
|
29
|
-
return queryResult;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { queryAppleApp as q, useAppleApp as u };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { f as App } from './index-Bv3x8c78.js';
|
|
3
|
-
|
|
4
|
-
const queryAppleApp = async ({ ctx, iosBundleId }) => {
|
|
5
|
-
if (!iosBundleId) {
|
|
6
|
-
return { app: null, summary: null };
|
|
7
|
-
}
|
|
8
|
-
const app = await App.findAsync(ctx, {
|
|
9
|
-
bundleId: iosBundleId
|
|
10
|
-
});
|
|
11
|
-
if (!app) {
|
|
12
|
-
return { app: null, summary: null };
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
app,
|
|
16
|
-
summary: {
|
|
17
|
-
id: app.id,
|
|
18
|
-
name: app.attributes.name,
|
|
19
|
-
bundleId: app.attributes.bundleId,
|
|
20
|
-
primaryLocale: app.attributes.primaryLocale
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const useAppleApp = (props) => {
|
|
25
|
-
const queryResult = useQuery({
|
|
26
|
-
queryKey: ["appleApp", props.iosBundleId],
|
|
27
|
-
queryFn: () => queryAppleApp(props)
|
|
28
|
-
});
|
|
29
|
-
return queryResult;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { queryAppleApp as q, useAppleApp as u };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { f as App } from './index-BQRxiyqn.js';
|
|
3
|
-
|
|
4
|
-
const queryAppleApp = async ({ ctx, iosBundleId }) => {
|
|
5
|
-
if (!iosBundleId) {
|
|
6
|
-
return { app: null, summary: null };
|
|
7
|
-
}
|
|
8
|
-
const app = await App.findAsync(ctx, {
|
|
9
|
-
bundleId: iosBundleId
|
|
10
|
-
});
|
|
11
|
-
if (!app) {
|
|
12
|
-
return { app: null, summary: null };
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
app,
|
|
16
|
-
summary: {
|
|
17
|
-
id: app.id,
|
|
18
|
-
name: app.attributes.name,
|
|
19
|
-
bundleId: app.attributes.bundleId,
|
|
20
|
-
primaryLocale: app.attributes.primaryLocale
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const useAppleApp = (props) => {
|
|
25
|
-
const queryResult = useQuery({
|
|
26
|
-
queryKey: ["appleApp", props.iosBundleId],
|
|
27
|
-
queryFn: () => queryAppleApp(props)
|
|
28
|
-
});
|
|
29
|
-
return queryResult;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { queryAppleApp as q, useAppleApp as u };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { e as BundleId, r as getGodotProjectCapabilities, P as Platform, G as GODOT_CAPABILITIES, s as CapabilityType } from './index-BB7X1Pqp.js';
|
|
3
|
-
|
|
4
|
-
async function getBundleIdCapabilities(bundleId) {
|
|
5
|
-
const current = await bundleId.getBundleIdCapabilitiesAsync();
|
|
6
|
-
let existing = [];
|
|
7
|
-
for (const capability of current) {
|
|
8
|
-
const capabilityType = Object.values(CapabilityType).find((c) => capability.isType(c));
|
|
9
|
-
if (capabilityType) {
|
|
10
|
-
existing.push(capabilityType);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return existing;
|
|
14
|
-
}
|
|
15
|
-
const fetchBundleId = async ({ ctx, iosBundleId }) => {
|
|
16
|
-
const empty = {
|
|
17
|
-
bundleId: null,
|
|
18
|
-
bundleIdSummary: null,
|
|
19
|
-
capabilities: null,
|
|
20
|
-
capabilitiesTable: null,
|
|
21
|
-
projectCapabilities: null,
|
|
22
|
-
shouldSyncCapabilities: null
|
|
23
|
-
};
|
|
24
|
-
if (!iosBundleId) return empty;
|
|
25
|
-
const bundleId = await BundleId.findAsync(ctx, {
|
|
26
|
-
identifier: iosBundleId
|
|
27
|
-
});
|
|
28
|
-
if (!bundleId) return empty;
|
|
29
|
-
const bundleIdCapabilities = await getBundleIdCapabilities(bundleId);
|
|
30
|
-
const projectCapabilities = getGodotProjectCapabilities(Platform.IOS);
|
|
31
|
-
const capabilitiesTable = GODOT_CAPABILITIES.map((gc) => {
|
|
32
|
-
const isEnabledInBundle = bundleIdCapabilities.includes(gc.type);
|
|
33
|
-
const isEnabledInProject = projectCapabilities.includes(gc.type);
|
|
34
|
-
const isCorrectlyConfigured = isEnabledInBundle === isEnabledInProject;
|
|
35
|
-
return {
|
|
36
|
-
name: gc.name,
|
|
37
|
-
isEnabledInBundle,
|
|
38
|
-
isEnabledInProject,
|
|
39
|
-
isCorrectlyConfigured
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
bundleId,
|
|
44
|
-
bundleIdSummary: {
|
|
45
|
-
id: bundleId.id,
|
|
46
|
-
identifier: bundleId.attributes.identifier,
|
|
47
|
-
name: bundleId.attributes.name,
|
|
48
|
-
platform: bundleId.attributes.platform
|
|
49
|
-
},
|
|
50
|
-
capabilities: bundleIdCapabilities,
|
|
51
|
-
capabilitiesTable,
|
|
52
|
-
projectCapabilities,
|
|
53
|
-
shouldSyncCapabilities: !capabilitiesTable.every((c) => c.isCorrectlyConfigured)
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
const useAppleBundleId = (props) => {
|
|
57
|
-
const queryResult = useQuery({
|
|
58
|
-
queryKey: ["appleBundleId", props.iosBundleId],
|
|
59
|
-
queryFn: () => fetchBundleId(props)
|
|
60
|
-
});
|
|
61
|
-
return queryResult;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { fetchBundleId as f, useAppleBundleId as u };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { e as BundleId, r as getGodotProjectCapabilities, P as Platform, G as GODOT_CAPABILITIES, s as CapabilityType } from './index-DdABTtYO.js';
|
|
3
|
-
|
|
4
|
-
async function getBundleIdCapabilities(bundleId) {
|
|
5
|
-
const current = await bundleId.getBundleIdCapabilitiesAsync();
|
|
6
|
-
let existing = [];
|
|
7
|
-
for (const capability of current) {
|
|
8
|
-
const capabilityType = Object.values(CapabilityType).find((c) => capability.isType(c));
|
|
9
|
-
if (capabilityType) {
|
|
10
|
-
existing.push(capabilityType);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return existing;
|
|
14
|
-
}
|
|
15
|
-
const fetchBundleId = async ({ ctx, iosBundleId }) => {
|
|
16
|
-
const empty = {
|
|
17
|
-
bundleId: null,
|
|
18
|
-
bundleIdSummary: null,
|
|
19
|
-
capabilities: null,
|
|
20
|
-
capabilitiesTable: null,
|
|
21
|
-
projectCapabilities: null,
|
|
22
|
-
shouldSyncCapabilities: null
|
|
23
|
-
};
|
|
24
|
-
if (!iosBundleId) return empty;
|
|
25
|
-
const bundleId = await BundleId.findAsync(ctx, {
|
|
26
|
-
identifier: iosBundleId
|
|
27
|
-
});
|
|
28
|
-
if (!bundleId) return empty;
|
|
29
|
-
const bundleIdCapabilities = await getBundleIdCapabilities(bundleId);
|
|
30
|
-
const projectCapabilities = getGodotProjectCapabilities(Platform.IOS);
|
|
31
|
-
const capabilitiesTable = GODOT_CAPABILITIES.map((gc) => {
|
|
32
|
-
const isEnabledInBundle = bundleIdCapabilities.includes(gc.type);
|
|
33
|
-
const isEnabledInProject = projectCapabilities.includes(gc.type);
|
|
34
|
-
const isCorrectlyConfigured = isEnabledInBundle === isEnabledInProject;
|
|
35
|
-
return {
|
|
36
|
-
name: gc.name,
|
|
37
|
-
isEnabledInBundle,
|
|
38
|
-
isEnabledInProject,
|
|
39
|
-
isCorrectlyConfigured
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
bundleId,
|
|
44
|
-
bundleIdSummary: {
|
|
45
|
-
id: bundleId.id,
|
|
46
|
-
identifier: bundleId.attributes.identifier,
|
|
47
|
-
name: bundleId.attributes.name,
|
|
48
|
-
platform: bundleId.attributes.platform
|
|
49
|
-
},
|
|
50
|
-
capabilities: bundleIdCapabilities,
|
|
51
|
-
capabilitiesTable,
|
|
52
|
-
projectCapabilities,
|
|
53
|
-
shouldSyncCapabilities: !capabilitiesTable.every((c) => c.isCorrectlyConfigured)
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
const useAppleBundleId = (props) => {
|
|
57
|
-
const queryResult = useQuery({
|
|
58
|
-
queryKey: ["appleBundleId", props.iosBundleId],
|
|
59
|
-
queryFn: () => fetchBundleId(props)
|
|
60
|
-
});
|
|
61
|
-
return queryResult;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { fetchBundleId as f, useAppleBundleId as u };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { e as BundleId, r as getGodotProjectCapabilities, P as Platform, G as GODOT_CAPABILITIES, s as CapabilityType } from './index-Bv3x8c78.js';
|
|
3
|
-
|
|
4
|
-
async function getBundleIdCapabilities(bundleId) {
|
|
5
|
-
const current = await bundleId.getBundleIdCapabilitiesAsync();
|
|
6
|
-
let existing = [];
|
|
7
|
-
for (const capability of current) {
|
|
8
|
-
const capabilityType = Object.values(CapabilityType).find((c) => capability.isType(c));
|
|
9
|
-
if (capabilityType) {
|
|
10
|
-
existing.push(capabilityType);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return existing;
|
|
14
|
-
}
|
|
15
|
-
const fetchBundleId = async ({ ctx, iosBundleId }) => {
|
|
16
|
-
const empty = {
|
|
17
|
-
bundleId: null,
|
|
18
|
-
bundleIdSummary: null,
|
|
19
|
-
capabilities: null,
|
|
20
|
-
capabilitiesTable: null,
|
|
21
|
-
projectCapabilities: null,
|
|
22
|
-
shouldSyncCapabilities: null
|
|
23
|
-
};
|
|
24
|
-
if (!iosBundleId) return empty;
|
|
25
|
-
const bundleId = await BundleId.findAsync(ctx, {
|
|
26
|
-
identifier: iosBundleId
|
|
27
|
-
});
|
|
28
|
-
if (!bundleId) return empty;
|
|
29
|
-
const bundleIdCapabilities = await getBundleIdCapabilities(bundleId);
|
|
30
|
-
const projectCapabilities = getGodotProjectCapabilities(Platform.IOS);
|
|
31
|
-
const capabilitiesTable = GODOT_CAPABILITIES.map((gc) => {
|
|
32
|
-
const isEnabledInBundle = bundleIdCapabilities.includes(gc.type);
|
|
33
|
-
const isEnabledInProject = projectCapabilities.includes(gc.type);
|
|
34
|
-
const isCorrectlyConfigured = isEnabledInBundle === isEnabledInProject;
|
|
35
|
-
return {
|
|
36
|
-
name: gc.name,
|
|
37
|
-
isEnabledInBundle,
|
|
38
|
-
isEnabledInProject,
|
|
39
|
-
isCorrectlyConfigured
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
bundleId,
|
|
44
|
-
bundleIdSummary: {
|
|
45
|
-
id: bundleId.id,
|
|
46
|
-
identifier: bundleId.attributes.identifier,
|
|
47
|
-
name: bundleId.attributes.name,
|
|
48
|
-
platform: bundleId.attributes.platform
|
|
49
|
-
},
|
|
50
|
-
capabilities: bundleIdCapabilities,
|
|
51
|
-
capabilitiesTable,
|
|
52
|
-
projectCapabilities,
|
|
53
|
-
shouldSyncCapabilities: !capabilitiesTable.every((c) => c.isCorrectlyConfigured)
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
const useAppleBundleId = (props) => {
|
|
57
|
-
const queryResult = useQuery({
|
|
58
|
-
queryKey: ["appleBundleId", props.iosBundleId],
|
|
59
|
-
queryFn: () => fetchBundleId(props)
|
|
60
|
-
});
|
|
61
|
-
return queryResult;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { fetchBundleId as f, useAppleBundleId as u };
|