shipthis 0.1.1 → 0.1.3
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/android-success.md +17 -0
- package/assets/markdown/create-google-play-game.md +20 -0
- package/assets/markdown/invite-service-account.md +11 -0
- package/assets/markdown/privacy-notification.md +10 -0
- package/bin/alias-built.sh +10 -0
- package/dist/{AppleBundleIdDetails-BF-Pm1Ia.js → AppleBundleIdDetails-C0XqjxKJ.js} +5 -6
- package/dist/Command-Cl-JfhTy.js +203 -0
- package/dist/{CommandGame-D9wl8hfX.js → CommandGame--SAa3wEL.js} +1 -1
- package/dist/CreateKeystore-Dm0KVh85.js +56 -0
- package/dist/{NextSteps-DKcjSHZ3.js → NextSteps-CK9zHOCt.js} +1 -1
- package/dist/{ProjectCredentialsTable-BVvkIPjN.js → ProjectCredentialsTable-Ch8022rs.js} +3 -2
- package/dist/RunWithSpinner-BVXNWGD3.js +27 -0
- package/dist/{StatusTable-BzsNF75L.js → StatusTable-Dm5St4g-.js} +1 -1
- package/dist/Title-BCQtayg6.js +6 -0
- package/dist/{UserCredentialsTable-DUFQqHVt.js → UserCredentialsTable-ysmM5dlV.js} +4 -4
- package/dist/{baseAppleCommand-BSJhK8GA.js → baseAppleCommand-B3WQtlx-.js} +1 -1
- package/dist/{baseGameAndroidCommand-CPAtReqy.js → baseGameAndroidCommand-B-CFhPnE.js} +2 -2
- package/dist/commands/apple/apiKey/create.js +12 -12
- package/dist/commands/apple/apiKey/export.js +11 -11
- package/dist/commands/apple/apiKey/import.js +11 -11
- package/dist/commands/apple/apiKey/status.js +12 -13
- package/dist/commands/apple/certificate/create.js +12 -12
- package/dist/commands/apple/certificate/export.js +11 -11
- package/dist/commands/apple/certificate/import.js +11 -11
- package/dist/commands/apple/certificate/status.js +11 -12
- package/dist/commands/apple/login.js +2 -2
- package/dist/commands/apple/status.js +12 -13
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/game/android/apiKey/connect.js +12 -12
- package/dist/commands/game/android/apiKey/create.js +14 -12
- package/dist/commands/game/android/apiKey/export.js +12 -12
- package/dist/commands/game/android/apiKey/import.js +12 -12
- package/dist/commands/game/android/apiKey/invite.js +4 -4
- package/dist/commands/game/android/apiKey/status.js +12 -12
- package/dist/commands/game/android/keyStore/create.js +12 -11
- package/dist/commands/game/android/keyStore/export.js +11 -11
- package/dist/commands/game/android/keyStore/import.js +11 -11
- package/dist/commands/game/android/keyStore/status.js +11 -11
- package/dist/commands/game/android/status.js +13 -14
- package/dist/commands/game/android/wizard.js +533 -20
- package/dist/commands/game/build/download.js +10 -11
- package/dist/commands/game/build/list.js +10 -11
- package/dist/commands/game/create.js +2 -2
- package/dist/commands/game/details.js +10 -11
- package/dist/commands/game/export.js +1 -1
- package/dist/commands/game/ios/app/addTester.js +10 -11
- package/dist/commands/game/ios/app/create.js +9 -10
- package/dist/commands/game/ios/app/status.js +13 -14
- package/dist/commands/game/ios/app/sync.js +10 -11
- package/dist/commands/game/ios/profile/create.js +12 -12
- package/dist/commands/game/ios/profile/export.js +11 -11
- package/dist/commands/game/ios/profile/import.js +11 -11
- package/dist/commands/game/ios/profile/status.js +12 -12
- package/dist/commands/game/ios/status.js +16 -17
- package/dist/commands/game/ios/wizard.js +2 -2
- package/dist/commands/game/job/list.js +8 -10
- package/dist/commands/game/job/status.js +14 -13
- package/dist/commands/game/list.js +8 -10
- package/dist/commands/game/ship.js +2 -2
- package/dist/commands/game/status.js +13 -14
- package/dist/commands/game/wizard.js +1 -1
- 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 +11 -11
- package/dist/{export-B0FJT0EU.js → export-BiLHgSJ9.js} +1 -1
- package/dist/{import-CLDJ2iPu.js → import-CxNikF1c.js} +1 -1
- package/dist/index-B5XHQfs2.js +122 -0
- package/dist/{index-Df8uXQ4s.js → index-B6V7vGOj.js} +1 -1
- package/dist/{index-CF0fIsx2.js → index-BQRxiyqn.js} +1 -1
- package/dist/{index-CFHmtzfq.js → index-BuZmCvZh.js} +1 -1
- package/dist/index-CgBgZUkL.js +144 -0
- package/dist/{upload-C5L82Yq0.js → upload-CMo3hUhl.js} +1 -1
- package/dist/{useAndroidServiceAccountTestResult-BnxNuoG3.js → useAndroidServiceAccountTestResult-D_30xIJA.js} +1 -1
- package/dist/{useAppleApp-IXRdsK5w.js → useAppleApp-DnSjUfSs.js} +1 -1
- package/dist/{useAppleBundleId-DYC5ISKT.js → useAppleBundleId-BNI8swhC.js} +1 -1
- package/dist/useJobWatching-Bz1e6xOv.js +43 -0
- package/dist/useProjectCredentials-B5ZmpIxL.js +54 -0
- package/dist/useWebSocket-DoImIdTy.js +36 -0
- package/npm-shrinkwrap.json +14484 -0
- package/oclif.manifest.json +219 -219
- package/package.json +7 -5
- package/dist/Command-BrfJSeOC.js +0 -1077
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-D_30xIJA.js';
|
|
4
|
+
import { b as getShortDate, p as getAuthedHeaders, q as API_URL, J as castArrayObjectDates } from './index-BQRxiyqn.js';
|
|
5
|
+
import { g as getShortUUID } from './index-B6V7vGOj.js';
|
|
6
|
+
|
|
7
|
+
async function queryProjectCredentials({
|
|
8
|
+
projectId,
|
|
9
|
+
...pageAndSortParams
|
|
10
|
+
}) {
|
|
11
|
+
try {
|
|
12
|
+
const headers = getAuthedHeaders();
|
|
13
|
+
const url = `${API_URL}/projects/${projectId}/credentials`;
|
|
14
|
+
const response = await axios.get(url, { headers, params: pageAndSortParams });
|
|
15
|
+
return {
|
|
16
|
+
...response.data,
|
|
17
|
+
data: castArrayObjectDates(response.data.data)
|
|
18
|
+
};
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.warn("queryProjectCredentials Error", error);
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function getProjectCredentialSummary(credential) {
|
|
25
|
+
return {
|
|
26
|
+
id: getShortUUID(credential.id),
|
|
27
|
+
type: credential.type,
|
|
28
|
+
serial: credential.serialNumber.substring(0, 30) + (credential.serialNumber.length > 30 ? "\u2026" : ""),
|
|
29
|
+
isActive: credential.isActive,
|
|
30
|
+
createdAt: getShortDate(credential.createdAt)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const useProjectCredentials = ({
|
|
34
|
+
platform,
|
|
35
|
+
type,
|
|
36
|
+
...fetchProps
|
|
37
|
+
}) => {
|
|
38
|
+
const queryResult = useQuery({
|
|
39
|
+
queryKey: cacheKeys.projectCredentials(fetchProps),
|
|
40
|
+
queryFn: async () => queryProjectCredentials(fetchProps),
|
|
41
|
+
select: (data) => {
|
|
42
|
+
if (!(platform || type)) return data;
|
|
43
|
+
return {
|
|
44
|
+
...data,
|
|
45
|
+
data: data.data.filter((credential) => {
|
|
46
|
+
return (!platform || credential.platform === platform) && (!type || credential.type === type);
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return queryResult;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { getProjectCredentialSummary as g, useProjectCredentials as u };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { io } from 'socket.io-client';
|
|
3
|
+
import { Q as getAuthToken, W as WS_URL } from './index-BQRxiyqn.js';
|
|
4
|
+
|
|
5
|
+
function useWebSocket(listeners = []) {
|
|
6
|
+
const log = () => {
|
|
7
|
+
};
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (listeners.length === 0) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const token = getAuthToken();
|
|
13
|
+
const socket = io(WS_URL, {
|
|
14
|
+
auth: { token },
|
|
15
|
+
forceNew: true
|
|
16
|
+
});
|
|
17
|
+
socket.on("connect", () => log());
|
|
18
|
+
for (const listener of listeners) {
|
|
19
|
+
const pattern = listener.getPattern();
|
|
20
|
+
const bindSocket = (pattern2) => {
|
|
21
|
+
const boundListener = listener.eventHandler.bind(listener, pattern2);
|
|
22
|
+
socket.on(pattern2, boundListener);
|
|
23
|
+
};
|
|
24
|
+
if (Array.isArray(pattern)) {
|
|
25
|
+
pattern.forEach(bindSocket);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
bindSocket(pattern);
|
|
29
|
+
}
|
|
30
|
+
return () => {
|
|
31
|
+
socket.disconnect();
|
|
32
|
+
};
|
|
33
|
+
}, []);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { useWebSocket as u };
|