shipthis 0.1.10 → 0.1.12

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.
Files changed (155) hide show
  1. package/assets/markdown/create-or-import-keystore.md +7 -0
  2. package/dist/{AppleBundleIdDetails-DKeSAte9.js → AppleBundleIdDetails-DymjrhOZ.js} +1 -1
  3. package/dist/{CommandGame--SAa3wEL.js → CommandGame-C1oTlfdb.js} +1 -1
  4. package/dist/{CreateKeystore-g1z6DsU5.js → Create-DIaSKUpl.js} +5 -5
  5. package/dist/Import-BIOsf8AA.js +107 -0
  6. package/dist/{JobProgress-jmGAzvxS.js → JobProgress-W0QQR49T.js} +2 -2
  7. package/dist/{JobStatusTable-ByW0bN6c.js → JobStatusTable-DqoppRro.js} +2 -2
  8. package/dist/commands/apple/apiKey/create.js +4 -4
  9. package/dist/commands/apple/apiKey/export.js +3 -3
  10. package/dist/commands/apple/apiKey/import.js +4 -4
  11. package/dist/commands/apple/apiKey/status.js +3 -3
  12. package/dist/commands/apple/certificate/create.js +4 -4
  13. package/dist/commands/apple/certificate/export.js +3 -3
  14. package/dist/commands/apple/certificate/import.js +4 -4
  15. package/dist/commands/apple/certificate/status.js +3 -3
  16. package/dist/commands/apple/status.js +3 -3
  17. package/dist/commands/game/android/apiKey/connect.js +6 -6
  18. package/dist/commands/game/android/apiKey/create.js +6 -6
  19. package/dist/commands/game/android/apiKey/export.js +3 -3
  20. package/dist/commands/game/android/apiKey/import.js +4 -4
  21. package/dist/commands/game/android/apiKey/status.js +3 -3
  22. package/dist/commands/game/android/keyStore/create.js +7 -7
  23. package/dist/commands/game/android/keyStore/export.js +3 -3
  24. package/dist/commands/game/android/keyStore/import.js +45 -25
  25. package/dist/commands/game/android/keyStore/status.js +3 -3
  26. package/dist/commands/game/android/status.js +5 -5
  27. package/dist/commands/game/build/download.js +4 -4
  28. package/dist/commands/game/build/list.js +4 -4
  29. package/dist/commands/game/details.js +3 -3
  30. package/dist/commands/game/ios/app/addTester.js +3 -3
  31. package/dist/commands/game/ios/app/create.js +3 -3
  32. package/dist/commands/game/ios/app/status.js +4 -4
  33. package/dist/commands/game/ios/app/sync.js +3 -3
  34. package/dist/commands/game/ios/profile/create.js +4 -4
  35. package/dist/commands/game/ios/profile/export.js +3 -3
  36. package/dist/commands/game/ios/profile/import.js +4 -4
  37. package/dist/commands/game/ios/profile/status.js +3 -3
  38. package/dist/commands/game/ios/status.js +6 -6
  39. package/dist/commands/game/job/list.js +5 -5
  40. package/dist/commands/game/job/status.js +7 -7
  41. package/dist/commands/game/list.js +5 -5
  42. package/dist/commands/game/ship.js +7 -7
  43. package/dist/commands/game/status.js +5 -5
  44. package/dist/commands/game/wizard.js +116 -17
  45. package/dist/commands/status.js +3 -3
  46. package/dist/{import-7T3J63j2.js → import-v54PM_Qg.js} +11 -2
  47. package/dist/{index-m4HTrJ5J.js → index-D6BH5UAM.js} +3 -3
  48. package/dist/{index-DgbQBx6x.js → index-o9Y-84Rj.js} +1 -1
  49. package/dist/{useJobWatching-D-YzSlK8.js → useJobWatching-I_A3b36f.js} +1 -1
  50. package/npm-shrinkwrap.json +2 -2
  51. package/oclif.manifest.json +27 -86
  52. package/package.json +1 -1
  53. package/dist/AppleBundleIdDetails-C0XqjxKJ.js +0 -72
  54. package/dist/AppleBundleIdDetails-CjP5y0cj.js +0 -74
  55. package/dist/AppleBundleIdDetails-CztWY_mT.js +0 -73
  56. package/dist/AppleBundleIdDetails-Df30MPFC.js +0 -73
  57. package/dist/AppleBundleIdDetails-Dxo99Sgu.js +0 -72
  58. package/dist/Command-1YAl_0zS.js +0 -204
  59. package/dist/Command-Cl-JfhTy.js +0 -203
  60. package/dist/Command-Dn0P_KOV.js +0 -205
  61. package/dist/Command-DxmQn3XT.js +0 -204
  62. package/dist/Command-YJJp90ru.js +0 -204
  63. package/dist/CommandGame-CZUx_VQu.js +0 -8
  64. package/dist/CommandGame-DspVLTPZ.js +0 -8
  65. package/dist/CommandGame-cPaTk1wh.js +0 -8
  66. package/dist/CommandGame-k04mHiDl.js +0 -8
  67. package/dist/CommandGame-pI9VXKxi.js +0 -8
  68. package/dist/CreateKeystore-BnNdeDUa.js +0 -57
  69. package/dist/CreateKeystore-BqJdpvsI.js +0 -56
  70. package/dist/CreateKeystore-Cf-nsK_M.js +0 -56
  71. package/dist/CreateKeystore-D8uTRamD.js +0 -56
  72. package/dist/CreateKeystore-Dm0KVh85.js +0 -56
  73. package/dist/JobProgress-CPkWVSlH.js +0 -108
  74. package/dist/JobProgress-Dk0UoNah.js +0 -108
  75. package/dist/JobProgress-biiLhigg.js +0 -109
  76. package/dist/JobStatusTable-BA_q-kgE.js +0 -75
  77. package/dist/JobStatusTable-CgaTS7jS.js +0 -75
  78. package/dist/JobStatusTable-q4atKzhu.js +0 -75
  79. package/dist/ProjectCredentialsTable-BIWBAXCh.js +0 -37
  80. package/dist/ProjectCredentialsTable-Ch8022rs.js +0 -37
  81. package/dist/ProjectCredentialsTable-DRMK_SNw.js +0 -37
  82. package/dist/ProjectCredentialsTable-DfkpvTf8.js +0 -37
  83. package/dist/UserCredentialsTable-CeJS3_hd.js +0 -82
  84. package/dist/UserCredentialsTable-DMh8Wpy7.js +0 -82
  85. package/dist/UserCredentialsTable-DgHZJSHG.js +0 -82
  86. package/dist/UserCredentialsTable-ysmM5dlV.js +0 -82
  87. package/dist/baseAppleCommand-1isaFxCQ.js +0 -10
  88. package/dist/baseAppleCommand-B3WQtlx-.js +0 -10
  89. package/dist/baseAppleCommand-D-G4h8zQ.js +0 -10
  90. package/dist/baseAppleCommand-DpasCbje.js +0 -10
  91. package/dist/baseGameAndroidCommand-B-CFhPnE.js +0 -43
  92. package/dist/baseGameAndroidCommand-B3LRG701.js +0 -43
  93. package/dist/baseGameAndroidCommand-C9BuS2Sr.js +0 -43
  94. package/dist/baseGameAndroidCommand-DD0H8iy-.js +0 -43
  95. package/dist/commands/game/android/wizard.js +0 -509
  96. package/dist/export-BDxGDZdh.js +0 -36
  97. package/dist/export-B_F6vXIK.js +0 -36
  98. package/dist/export-BiLHgSJ9.js +0 -36
  99. package/dist/export-C_lu1FD9.js +0 -36
  100. package/dist/import-Brg3zYmT.js +0 -38
  101. package/dist/import-BrlJuE2Z.js +0 -38
  102. package/dist/import-CxNikF1c.js +0 -38
  103. package/dist/import-DPbg8WvS.js +0 -38
  104. package/dist/index-B5XHQfs2.js +0 -122
  105. package/dist/index-B6V7vGOj.js +0 -136
  106. package/dist/index-BDFKyTPb.js +0 -24
  107. package/dist/index-BL-1G60K.js +0 -135
  108. package/dist/index-BQRxiyqn.js +0 -693
  109. package/dist/index-BQnkBr1Q.js +0 -136
  110. package/dist/index-BX9h2vPV.js +0 -123
  111. package/dist/index-BjGSEqP5.js +0 -135
  112. package/dist/index-BuZmCvZh.js +0 -24
  113. package/dist/index-Bv3x8c78.js +0 -693
  114. package/dist/index-ByOvCs4O.js +0 -122
  115. package/dist/index-BzffuqPa.js +0 -24
  116. package/dist/index-C9734Cj2.js +0 -693
  117. package/dist/index-CKYExssR.js +0 -136
  118. package/dist/index-CgBgZUkL.js +0 -144
  119. package/dist/index-DBrQda8r.js +0 -122
  120. package/dist/index-DE2Hvx2o.js +0 -122
  121. package/dist/index-DdABTtYO.js +0 -693
  122. package/dist/index-DxHPjZav.js +0 -136
  123. package/dist/index-X__XH_Fd.js +0 -144
  124. package/dist/index-wyPoxiTc.js +0 -136
  125. package/dist/upload-CMo3hUhl.js +0 -60
  126. package/dist/upload-Cx71802W.js +0 -60
  127. package/dist/upload-DvAE1vDq.js +0 -60
  128. package/dist/upload-LXRr4pMa.js +0 -60
  129. package/dist/useAndroidServiceAccountTestResult-BDc7XpKE.js +0 -52
  130. package/dist/useAndroidServiceAccountTestResult-B_ekRewZ.js +0 -52
  131. package/dist/useAndroidServiceAccountTestResult-D_30xIJA.js +0 -52
  132. package/dist/useAndroidServiceAccountTestResult-InDf5WSl.js +0 -52
  133. package/dist/useAppleApp-CApC0-4Q.js +0 -32
  134. package/dist/useAppleApp-CETIcsJS.js +0 -32
  135. package/dist/useAppleApp-DgE0wEaq.js +0 -32
  136. package/dist/useAppleApp-DnSjUfSs.js +0 -32
  137. package/dist/useAppleBundleId-BNI8swhC.js +0 -64
  138. package/dist/useAppleBundleId-DtLODy3p.js +0 -64
  139. package/dist/useAppleBundleId-SmzY6rkm.js +0 -64
  140. package/dist/useAppleBundleId-gPBzJwQg.js +0 -64
  141. package/dist/useJobWatching-BIG6fnTN.js +0 -45
  142. package/dist/useJobWatching-BcBJ5dy1.js +0 -43
  143. package/dist/useJobWatching-Bz1e6xOv.js +0 -43
  144. package/dist/useJobWatching-Cp-CYd90.js +0 -45
  145. package/dist/useJobWatching-P5oC7mNB.js +0 -45
  146. package/dist/useProjectCredentials-B5ZmpIxL.js +0 -54
  147. package/dist/useProjectCredentials-BRffcsO3.js +0 -54
  148. package/dist/useProjectCredentials-CKngz2rd.js +0 -54
  149. package/dist/useProjectCredentials-EapDge1I.js +0 -54
  150. package/dist/useWebSocket-Bep1zAVG.js +0 -36
  151. package/dist/useWebSocket-D8PojLtx.js +0 -36
  152. package/dist/useWebSocket-DoImIdTy.js +0 -36
  153. package/dist/useWebSocket-rBLiZsKb.js +0 -36
  154. package/dist/wizard-ChPegnMW.js +0 -133
  155. package/dist/{Command-D6rWEZRM.js → Command-BiB9MqbJ.js} +3 -3
@@ -1,43 +0,0 @@
1
- import { u as useJob } from './Command-1YAl_0zS.js';
2
- import { useState, useEffect } from 'react';
3
- import { u as useWebSocket } from './useWebSocket-DoImIdTy.js';
4
- import { N as castJobDates, O as castObjectDates } from './index-BQRxiyqn.js';
5
-
6
- function useJobWatching({ projectId, jobId, isWatching, onJobUpdate }) {
7
- const [websocketJob, setWebsocketJob] = useState(null);
8
- const [mostRecentLog, setMostRecentLog] = useState(null);
9
- const jobStatusListener = {
10
- getPattern: () => [`project.${projectId}:job:created`, `project.${projectId}:job:updated`],
11
- eventHandler: async (pattern, rawJob) => {
12
- if (rawJob.id !== jobId) return;
13
- const job2 = castJobDates(rawJob);
14
- setWebsocketJob(job2);
15
- if (onJobUpdate) onJobUpdate(job2);
16
- }
17
- };
18
- const jobProgressListener = {
19
- getPattern: () => `project.${projectId}:job.${jobId}:log`,
20
- eventHandler: async (pattern, rawLogEntry) => {
21
- const logEntry = castObjectDates(rawLogEntry, ["sentAt", "createdAt"]);
22
- setMostRecentLog(logEntry);
23
- }
24
- };
25
- useWebSocket(isWatching ? [jobStatusListener, jobProgressListener] : []);
26
- const { isLoading, data: job } = useJob({
27
- projectId,
28
- jobId
29
- });
30
- useEffect(() => {
31
- setWebsocketJob(null);
32
- }, [jobId, projectId, isWatching, job]);
33
- const fetchedJob = job ? job : null;
34
- const data = websocketJob ? websocketJob : fetchedJob;
35
- const progress = mostRecentLog?.progress || null;
36
- return {
37
- isLoading,
38
- data,
39
- progress
40
- };
41
- }
42
-
43
- export { useJobWatching as u };
@@ -1,43 +0,0 @@
1
- import { u as useJob } from './Command-Cl-JfhTy.js';
2
- import { useState, useEffect } from 'react';
3
- import { u as useWebSocket } from './useWebSocket-DoImIdTy.js';
4
- import { N as castJobDates, O as castObjectDates } from './index-BQRxiyqn.js';
5
-
6
- function useJobWatching({ projectId, jobId, isWatching, onJobUpdate }) {
7
- const [websocketJob, setWebsocketJob] = useState(null);
8
- const [mostRecentLog, setMostRecentLog] = useState(null);
9
- const jobStatusListener = {
10
- getPattern: () => [`project.${projectId}:job:created`, `project.${projectId}:job:updated`],
11
- eventHandler: async (pattern, rawJob) => {
12
- if (rawJob.id !== jobId) return;
13
- const job2 = castJobDates(rawJob);
14
- setWebsocketJob(job2);
15
- if (onJobUpdate) onJobUpdate(job2);
16
- }
17
- };
18
- const jobProgressListener = {
19
- getPattern: () => `project.${projectId}:job.${jobId}:log`,
20
- eventHandler: async (pattern, rawLogEntry) => {
21
- const logEntry = castObjectDates(rawLogEntry, ["sentAt", "createdAt"]);
22
- setMostRecentLog(logEntry);
23
- }
24
- };
25
- useWebSocket(isWatching ? [jobStatusListener, jobProgressListener] : []);
26
- const { isLoading, data: job } = useJob({
27
- projectId,
28
- jobId
29
- });
30
- useEffect(() => {
31
- setWebsocketJob(null);
32
- }, [jobId, projectId, isWatching, job]);
33
- const fetchedJob = job ? job : null;
34
- const data = websocketJob ? websocketJob : fetchedJob;
35
- const progress = mostRecentLog?.progress || null;
36
- return {
37
- isLoading,
38
- data,
39
- progress
40
- };
41
- }
42
-
43
- export { useJobWatching as u };
@@ -1,45 +0,0 @@
1
- import { u as useJob } from './Command-YJJp90ru.js';
2
- import { useState, useEffect } from 'react';
3
- import { u as useWebSocket } from './useWebSocket-rBLiZsKb.js';
4
- import { E as castJobDates, F as castObjectDates } from './index-Bv3x8c78.js';
5
-
6
- function useJobWatching({ projectId, jobId, isWatching, onJobUpdate }) {
7
- const [websocketJob, setWebsocketJob] = useState(null);
8
- const [mostRecentLog, setMostRecentLog] = useState(null);
9
- const jobStatusListener = {
10
- getPattern: () => [`project.${projectId}:job:created`, `project.${projectId}:job:updated`],
11
- eventHandler: async (pattern, rawJob) => {
12
- if (rawJob.id !== jobId) return;
13
- const job2 = castJobDates(rawJob);
14
- setWebsocketJob(job2);
15
- if (onJobUpdate) onJobUpdate(job2);
16
- }
17
- };
18
- const jobProgressListener = {
19
- getPattern: () => `project.${projectId}:job.${jobId}:log`,
20
- eventHandler: async (pattern, rawLogEntry) => {
21
- const logEntry = castObjectDates(rawLogEntry, ["sentAt", "createdAt"]);
22
- setMostRecentLog(logEntry);
23
- }
24
- };
25
- useWebSocket(isWatching ? [jobStatusListener, jobProgressListener] : []);
26
- const { isLoading, data: job } = useJob({
27
- projectId,
28
- jobId
29
- });
30
- useEffect(() => {
31
- setWebsocketJob(null);
32
- }, [jobId, projectId, isWatching, job]);
33
- const fetchedJob = job ? job : null;
34
- const data = websocketJob ? websocketJob : fetchedJob;
35
- const progress = mostRecentLog?.progress || null;
36
- const stage = mostRecentLog?.stage || null;
37
- return {
38
- isLoading,
39
- data,
40
- progress,
41
- stage
42
- };
43
- }
44
-
45
- export { useJobWatching as u };
@@ -1,45 +0,0 @@
1
- import { u as useJob } from './Command-DxmQn3XT.js';
2
- import { useState, useEffect } from 'react';
3
- import { u as useWebSocket } from './useWebSocket-D8PojLtx.js';
4
- import { K as castJobDates, M as castObjectDates } from './index-DdABTtYO.js';
5
-
6
- function useJobWatching({ projectId, jobId, isWatching, onJobUpdate }) {
7
- const [websocketJob, setWebsocketJob] = useState(null);
8
- const [mostRecentLog, setMostRecentLog] = useState(null);
9
- const jobStatusListener = {
10
- getPattern: () => [`project.${projectId}:job:created`, `project.${projectId}:job:updated`],
11
- eventHandler: async (pattern, rawJob) => {
12
- if (rawJob.id !== jobId) return;
13
- const job2 = castJobDates(rawJob);
14
- setWebsocketJob(job2);
15
- if (onJobUpdate) onJobUpdate(job2);
16
- }
17
- };
18
- const jobProgressListener = {
19
- getPattern: () => `project.${projectId}:job.${jobId}:log`,
20
- eventHandler: async (pattern, rawLogEntry) => {
21
- const logEntry = castObjectDates(rawLogEntry, ["sentAt", "createdAt"]);
22
- setMostRecentLog(logEntry);
23
- }
24
- };
25
- useWebSocket(isWatching ? [jobStatusListener, jobProgressListener] : []);
26
- const { isLoading, data: job } = useJob({
27
- projectId,
28
- jobId
29
- });
30
- useEffect(() => {
31
- setWebsocketJob(null);
32
- }, [jobId, projectId, isWatching, job]);
33
- const fetchedJob = job ? job : null;
34
- const data = websocketJob ? websocketJob : fetchedJob;
35
- const progress = mostRecentLog?.progress || null;
36
- const stage = mostRecentLog?.stage || null;
37
- return {
38
- isLoading,
39
- data,
40
- progress,
41
- stage
42
- };
43
- }
44
-
45
- export { useJobWatching as u };
@@ -1,54 +0,0 @@
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 };
@@ -1,54 +0,0 @@
1
- import axios from 'axios';
2
- import { useQuery } from '@tanstack/react-query';
3
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-InDf5WSl.js';
4
- import { b as getShortDate, p as getAuthedHeaders, q as API_URL, H as castArrayObjectDates } from './index-DdABTtYO.js';
5
- import { g as getShortUUID } from './index-wyPoxiTc.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 };
@@ -1,54 +0,0 @@
1
- import axios from 'axios';
2
- import { useQuery } from '@tanstack/react-query';
3
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-BDc7XpKE.js';
4
- import { b as getShortDate, p as getAuthedHeaders, q as API_URL, K as castArrayObjectDates } from './index-Bv3x8c78.js';
5
- import { g as getShortUUID } from './index-BQnkBr1Q.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 };
@@ -1,54 +0,0 @@
1
- import axios from 'axios';
2
- import { useQuery } from '@tanstack/react-query';
3
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-B_ekRewZ.js';
4
- import { b as getShortDate, o as getAuthedHeaders, p as API_URL, M as castArrayObjectDates } from './index-C9734Cj2.js';
5
- import { g as getShortUUID } from './index-DxHPjZav.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 };
@@ -1,36 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { io } from 'socket.io-client';
3
- import { N as getAuthToken, W as WS_URL } from './index-C9734Cj2.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 };
@@ -1,36 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { io } from 'socket.io-client';
3
- import { N as getAuthToken, W as WS_URL } from './index-DdABTtYO.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 };
@@ -1,36 +0,0 @@
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 };
@@ -1,36 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { io } from 'socket.io-client';
3
- import { N as getAuthToken, W as WS_URL } from './index-Bv3x8c78.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 };
@@ -1,133 +0,0 @@
1
- import { Flags } from '@oclif/core';
2
- import { o as getAuthedHeaders, p as API_URL, M as castArrayObjectDates, B as BaseAuthenticatedCommand, s as isCWDGodotGame, P as Platform, C as CredentialsType } from './index-C9734Cj2.js';
3
- import axios from 'axios';
4
- import 'crypto-js';
5
- import 'uuid';
6
- import 'luxon';
7
- import 'fs';
8
- import AppleLogin from './commands/apple/login.js';
9
-
10
- async function getUserCredentials(pageSize = 100) {
11
- const headers = getAuthedHeaders();
12
- const { data } = await axios({
13
- method: "get",
14
- url: `${API_URL}/credentials?pageSize=${pageSize}`,
15
- headers
16
- });
17
- return castArrayObjectDates(data.data);
18
- }
19
- async function getProjectCredentials(projectId, pageSize = 100) {
20
- const headers = getAuthedHeaders();
21
- const { data } = await axios({
22
- method: "get",
23
- url: `${API_URL}/projects/${projectId}/credentials?pageSize=${pageSize}`,
24
- headers
25
- });
26
- return castArrayObjectDates(data.data);
27
- }
28
-
29
- class GameIosWizard extends BaseAuthenticatedCommand {
30
- static args = {};
31
- static description = "Runs all the steps for iOS";
32
- static examples = ["<%= config.bin %> <%= command.id %>"];
33
- static flags = {
34
- forceStep: Flags.string({
35
- char: "f",
36
- description: "Force a specific step to run."
37
- })
38
- };
39
- async run() {
40
- const { flags } = this;
41
- if (!isCWDGodotGame()) {
42
- this.error(
43
- "No Godot project detected. Please run this from a Godot project directory with a project.godot file.",
44
- { exit: 1 }
45
- );
46
- }
47
- const projectConfig = await this.getProjectConfigSafe();
48
- const game = projectConfig.project;
49
- const isStepForced = (commandName) => flags.forceStep?.includes(commandName);
50
- const iosSteps = [
51
- {
52
- command: "game:create",
53
- args: ["--quiet"],
54
- shouldRun: async () => !game
55
- },
56
- {
57
- command: "apple:login",
58
- args: ["--quiet"],
59
- shouldRun: async () => {
60
- const isLoggedIn = await this.hasValidAppleAuthState();
61
- return !isLoggedIn;
62
- }
63
- },
64
- {
65
- command: "apple:apiKey:create",
66
- args: ["--quiet"],
67
- shouldRun: async () => {
68
- const userCredentials = await getUserCredentials();
69
- const userAppleApiKeyCredentials = userCredentials.filter(
70
- (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.KEY
71
- );
72
- return userAppleApiKeyCredentials.length === 0;
73
- }
74
- },
75
- {
76
- command: "apple:certificate:create",
77
- args: ["--quiet"],
78
- shouldRun: async () => {
79
- const userCredentials = await getUserCredentials();
80
- const userAppleDistCredentials = userCredentials.filter(
81
- (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
82
- );
83
- return userAppleDistCredentials.length === 0;
84
- }
85
- },
86
- {
87
- command: "game:ios:app:create",
88
- args: ["--quiet"],
89
- shouldRun: async () => {
90
- if (!game) return true;
91
- const hasBundleIdSet = !!game.details?.iosBundleId;
92
- return !hasBundleIdSet;
93
- }
94
- },
95
- {
96
- command: "game:ios:app:sync",
97
- args: ["--quiet"],
98
- // Can always run this
99
- shouldRun: async () => true
100
- },
101
- {
102
- command: "game:ios:profile:create",
103
- args: ["--quiet"],
104
- shouldRun: async () => {
105
- if (!game) return true;
106
- const projectCredentials = await getProjectCredentials(game.id);
107
- const projectAppleProfileCredentials = projectCredentials.filter(
108
- (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
109
- );
110
- return projectAppleProfileCredentials.length === 0;
111
- }
112
- }
113
- ];
114
- for (const step of iosSteps) {
115
- const command = step.command;
116
- const willRun = isStepForced(command) || await step.shouldRun();
117
- if (!willRun) {
118
- this.debug(`Skipping step: ${command}`);
119
- continue;
120
- }
121
- const args = [...step.args, ...isStepForced(command) ? ["--force"] : []];
122
- this.debug(`Running step: ${command} with args: ${args.join(" ")}`);
123
- if (command === "apple:login") {
124
- await AppleLogin.run(args);
125
- } else {
126
- await this.config.runCommand(command, args);
127
- }
128
- }
129
- await this.config.runCommand("game:status");
130
- }
131
- }
132
-
133
- export { GameIosWizard as G, getProjectCredentials as a, getUserCredentials as g };