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.
Files changed (190) hide show
  1. package/assets/markdown/ship-failure.md +13 -0
  2. package/assets/markdown/ship-success.md +12 -0
  3. package/dist/{AppleBundleIdDetails-DymjrhOZ.js → AppleBundleIdDetails-DxWVnxa5.js} +4 -4
  4. package/dist/{Command-1YAl_0zS.js → Command-zfJ7qIJI.js} +8 -8
  5. package/dist/{CommandGame--SAa3wEL.js → CommandGame-DVsNreSF.js} +1 -1
  6. package/dist/{Create-DIaSKUpl.js → Create-DdF29mIS.js} +3 -3
  7. package/dist/{Import-BIOsf8AA.js → Import-D8ik724M.js} +4 -4
  8. package/dist/{JobProgress-biiLhigg.js → JobProgress-D1Pe4YJc.js} +10 -7
  9. package/dist/JobStatusTable-D-daiV-I.js +203 -0
  10. package/dist/{ProjectCredentialsTable-Ch8022rs.js → ProjectCredentialsTable-Ch2s5qF1.js} +2 -2
  11. package/dist/{UserCredentialsTable-CeJS3_hd.js → UserCredentialsTable-DzyAHhLB.js} +3 -3
  12. package/dist/{baseAppleCommand-1isaFxCQ.js → baseAppleCommand-BGXyWK-R.js} +1 -1
  13. package/dist/{baseGameAndroidCommand-6vsMpE7a.js → baseGameAndroidCommand-mdFhxanf.js} +2 -2
  14. package/dist/commands/apple/apiKey/create.js +7 -7
  15. package/dist/commands/apple/apiKey/export.js +6 -6
  16. package/dist/commands/apple/apiKey/import.js +6 -6
  17. package/dist/commands/apple/apiKey/status.js +5 -5
  18. package/dist/commands/apple/certificate/create.js +7 -7
  19. package/dist/commands/apple/certificate/export.js +6 -6
  20. package/dist/commands/apple/certificate/import.js +6 -6
  21. package/dist/commands/apple/certificate/status.js +5 -5
  22. package/dist/commands/apple/login.js +2 -2
  23. package/dist/commands/apple/status.js +4 -4
  24. package/dist/commands/dashboard.js +1 -1
  25. package/dist/commands/game/android/apiKey/connect.js +9 -9
  26. package/dist/commands/game/android/apiKey/create.js +10 -10
  27. package/dist/commands/game/android/apiKey/export.js +7 -7
  28. package/dist/commands/game/android/apiKey/import.js +9 -9
  29. package/dist/commands/game/android/apiKey/invite.js +4 -4
  30. package/dist/commands/game/android/apiKey/status.js +7 -7
  31. package/dist/commands/game/android/keyStore/create.js +8 -8
  32. package/dist/commands/game/android/keyStore/export.js +6 -6
  33. package/dist/commands/game/android/keyStore/import.js +9 -9
  34. package/dist/commands/game/android/keyStore/status.js +6 -6
  35. package/dist/commands/game/android/status.js +4 -4
  36. package/dist/commands/game/build/download.js +4 -4
  37. package/dist/commands/game/build/list.js +5 -5
  38. package/dist/commands/game/create.js +2 -2
  39. package/dist/commands/game/details.js +4 -4
  40. package/dist/commands/game/export.js +1 -1
  41. package/dist/commands/game/ios/app/addTester.js +5 -5
  42. package/dist/commands/game/ios/app/create.js +4 -4
  43. package/dist/commands/game/ios/app/status.js +7 -7
  44. package/dist/commands/game/ios/app/sync.js +5 -5
  45. package/dist/commands/game/ios/profile/create.js +7 -7
  46. package/dist/commands/game/ios/profile/export.js +6 -6
  47. package/dist/commands/game/ios/profile/import.js +6 -6
  48. package/dist/commands/game/ios/profile/status.js +6 -6
  49. package/dist/commands/game/ios/status.js +7 -7
  50. package/dist/commands/game/ios/wizard.js +2 -2
  51. package/dist/commands/game/job/list.js +4 -4
  52. package/dist/commands/game/job/status.js +17 -131
  53. package/dist/commands/game/list.js +4 -4
  54. package/dist/commands/game/ship.js +74 -19
  55. package/dist/commands/game/status.js +4 -4
  56. package/dist/commands/game/wizard.js +14 -14
  57. package/dist/commands/internal/fastlane.js +1 -1
  58. package/dist/commands/internal/readme.js +1 -1
  59. package/dist/commands/login.js +2 -2
  60. package/dist/commands/status.js +4 -4
  61. package/dist/{export-BDxGDZdh.js → export-Cin4rLWR.js} +1 -1
  62. package/dist/{import-v54PM_Qg.js → import-CXTv9E84.js} +1 -1
  63. package/dist/{index-BDFKyTPb.js → index-B4v66AKo.js} +1 -1
  64. package/dist/{index-ByOvCs4O.js → index-BVvcTBnj.js} +4 -4
  65. package/dist/{index-m4HTrJ5J.js → index-Cx_2qTdS.js} +7 -7
  66. package/dist/{index-BB7X1Pqp.js → index-Dhx6FAHt.js} +1 -1
  67. package/dist/{index-wyPoxiTc.js → index-Dj-chiHz.js} +2 -2
  68. package/dist/{upload-2naN75Zu.js → upload-DZCIfnwf.js} +1 -1
  69. package/dist/{useAndroidServiceAccountTestResult-BDc7XpKE.js → useAndroidServiceAccountTestResult-L4oozjag.js} +1 -1
  70. package/dist/{useAppleApp-DgE0wEaq.js → useAppleApp-DcSr-q-w.js} +1 -1
  71. package/dist/{useAppleBundleId-BNI8swhC.js → useAppleBundleId-BnJVPVIz.js} +1 -1
  72. package/dist/{useJobWatching-BIG6fnTN.js → useJobWatching-DS0qHqPA.js} +3 -3
  73. package/dist/{useProjectCredentials-B5ZmpIxL.js → useProjectCredentials-CI_AoXmH.js} +3 -3
  74. package/dist/{useWebSocket-Bep1zAVG.js → useWebSocket-ZEZvtpT_.js} +1 -1
  75. package/npm-shrinkwrap.json +2 -2
  76. package/oclif.manifest.json +141 -223
  77. package/package.json +1 -1
  78. package/dist/AppleBundleIdDetails-C0XqjxKJ.js +0 -72
  79. package/dist/AppleBundleIdDetails-CjP5y0cj.js +0 -74
  80. package/dist/AppleBundleIdDetails-CztWY_mT.js +0 -73
  81. package/dist/AppleBundleIdDetails-DKeSAte9.js +0 -73
  82. package/dist/AppleBundleIdDetails-Df30MPFC.js +0 -73
  83. package/dist/AppleBundleIdDetails-Dxo99Sgu.js +0 -72
  84. package/dist/Command-BiB9MqbJ.js +0 -204
  85. package/dist/Command-Cl-JfhTy.js +0 -203
  86. package/dist/Command-D6rWEZRM.js +0 -204
  87. package/dist/Command-Dn0P_KOV.js +0 -205
  88. package/dist/Command-DxmQn3XT.js +0 -204
  89. package/dist/Command-YJJp90ru.js +0 -204
  90. package/dist/CommandGame-C1oTlfdb.js +0 -8
  91. package/dist/CommandGame-CZUx_VQu.js +0 -8
  92. package/dist/CommandGame-DspVLTPZ.js +0 -8
  93. package/dist/CommandGame-cPaTk1wh.js +0 -8
  94. package/dist/CommandGame-k04mHiDl.js +0 -8
  95. package/dist/CommandGame-pI9VXKxi.js +0 -8
  96. package/dist/CreateKeystore-BnNdeDUa.js +0 -57
  97. package/dist/CreateKeystore-BqJdpvsI.js +0 -56
  98. package/dist/CreateKeystore-Cf-nsK_M.js +0 -56
  99. package/dist/CreateKeystore-D8uTRamD.js +0 -56
  100. package/dist/CreateKeystore-Dm0KVh85.js +0 -56
  101. package/dist/CreateKeystore-g1z6DsU5.js +0 -56
  102. package/dist/JobProgress-CPkWVSlH.js +0 -108
  103. package/dist/JobProgress-Dk0UoNah.js +0 -108
  104. package/dist/JobProgress-W0QQR49T.js +0 -108
  105. package/dist/JobProgress-jmGAzvxS.js +0 -108
  106. package/dist/JobStatusTable-BA_q-kgE.js +0 -75
  107. package/dist/JobStatusTable-ByW0bN6c.js +0 -75
  108. package/dist/JobStatusTable-CgaTS7jS.js +0 -75
  109. package/dist/JobStatusTable-DqoppRro.js +0 -75
  110. package/dist/JobStatusTable-q4atKzhu.js +0 -75
  111. package/dist/ProjectCredentialsTable-8kXt7sTS.js +0 -37
  112. package/dist/ProjectCredentialsTable-BIWBAXCh.js +0 -37
  113. package/dist/ProjectCredentialsTable-DRMK_SNw.js +0 -37
  114. package/dist/ProjectCredentialsTable-DfkpvTf8.js +0 -37
  115. package/dist/UserCredentialsTable-DMh8Wpy7.js +0 -82
  116. package/dist/UserCredentialsTable-DgHZJSHG.js +0 -82
  117. package/dist/UserCredentialsTable-TflQvTEP.js +0 -82
  118. package/dist/UserCredentialsTable-ysmM5dlV.js +0 -82
  119. package/dist/baseAppleCommand-B3WQtlx-.js +0 -10
  120. package/dist/baseAppleCommand-B9wyIqdL.js +0 -10
  121. package/dist/baseAppleCommand-D-G4h8zQ.js +0 -10
  122. package/dist/baseAppleCommand-DpasCbje.js +0 -10
  123. package/dist/baseGameAndroidCommand-B-CFhPnE.js +0 -43
  124. package/dist/baseGameAndroidCommand-B3LRG701.js +0 -43
  125. package/dist/baseGameAndroidCommand-C9BuS2Sr.js +0 -43
  126. package/dist/baseGameAndroidCommand-DD0H8iy-.js +0 -43
  127. package/dist/commands/game/android/wizard.js +0 -509
  128. package/dist/export-B_F6vXIK.js +0 -36
  129. package/dist/export-BiLHgSJ9.js +0 -36
  130. package/dist/export-C_lu1FD9.js +0 -36
  131. package/dist/export-rS9o87LD.js +0 -36
  132. package/dist/import-7T3J63j2.js +0 -38
  133. package/dist/import-Brg3zYmT.js +0 -38
  134. package/dist/import-BrlJuE2Z.js +0 -38
  135. package/dist/import-CxNikF1c.js +0 -38
  136. package/dist/import-DPbg8WvS.js +0 -38
  137. package/dist/index-B5XHQfs2.js +0 -122
  138. package/dist/index-B6V7vGOj.js +0 -136
  139. package/dist/index-BL-1G60K.js +0 -135
  140. package/dist/index-BQRxiyqn.js +0 -693
  141. package/dist/index-BQnkBr1Q.js +0 -136
  142. package/dist/index-BX9h2vPV.js +0 -123
  143. package/dist/index-BjGSEqP5.js +0 -135
  144. package/dist/index-BuZmCvZh.js +0 -24
  145. package/dist/index-Bv3x8c78.js +0 -693
  146. package/dist/index-BzffuqPa.js +0 -24
  147. package/dist/index-C9734Cj2.js +0 -693
  148. package/dist/index-CKYExssR.js +0 -136
  149. package/dist/index-CgBgZUkL.js +0 -144
  150. package/dist/index-Cz_KLwWf.js +0 -136
  151. package/dist/index-D6BH5UAM.js +0 -135
  152. package/dist/index-DBrQda8r.js +0 -122
  153. package/dist/index-DE2Hvx2o.js +0 -122
  154. package/dist/index-DOgF4dFK.js +0 -24
  155. package/dist/index-DdABTtYO.js +0 -693
  156. package/dist/index-DgbQBx6x.js +0 -122
  157. package/dist/index-DxHPjZav.js +0 -136
  158. package/dist/index-X__XH_Fd.js +0 -144
  159. package/dist/index-o9Y-84Rj.js +0 -122
  160. package/dist/upload-CMo3hUhl.js +0 -60
  161. package/dist/upload-Cx71802W.js +0 -60
  162. package/dist/upload-DvAE1vDq.js +0 -60
  163. package/dist/upload-LXRr4pMa.js +0 -60
  164. package/dist/useAndroidServiceAccountTestResult-B_ekRewZ.js +0 -52
  165. package/dist/useAndroidServiceAccountTestResult-Ce1x0Eh8.js +0 -52
  166. package/dist/useAndroidServiceAccountTestResult-D_30xIJA.js +0 -52
  167. package/dist/useAndroidServiceAccountTestResult-InDf5WSl.js +0 -52
  168. package/dist/useAppleApp-BEtLQa7n.js +0 -32
  169. package/dist/useAppleApp-CApC0-4Q.js +0 -32
  170. package/dist/useAppleApp-CETIcsJS.js +0 -32
  171. package/dist/useAppleApp-DnSjUfSs.js +0 -32
  172. package/dist/useAppleBundleId-DXbMDRLd.js +0 -64
  173. package/dist/useAppleBundleId-DtLODy3p.js +0 -64
  174. package/dist/useAppleBundleId-SmzY6rkm.js +0 -64
  175. package/dist/useAppleBundleId-gPBzJwQg.js +0 -64
  176. package/dist/useJobWatching-BcBJ5dy1.js +0 -43
  177. package/dist/useJobWatching-Bz1e6xOv.js +0 -43
  178. package/dist/useJobWatching-Cp-CYd90.js +0 -45
  179. package/dist/useJobWatching-D-YzSlK8.js +0 -45
  180. package/dist/useJobWatching-I_A3b36f.js +0 -45
  181. package/dist/useJobWatching-P5oC7mNB.js +0 -45
  182. package/dist/useProjectCredentials-BRffcsO3.js +0 -54
  183. package/dist/useProjectCredentials-CKngz2rd.js +0 -54
  184. package/dist/useProjectCredentials-EapDge1I.js +0 -54
  185. package/dist/useProjectCredentials-vjedBbKl.js +0 -54
  186. package/dist/useWebSocket-CBqsjHbt.js +0 -36
  187. package/dist/useWebSocket-D8PojLtx.js +0 -36
  188. package/dist/useWebSocket-DoImIdTy.js +0 -36
  189. package/dist/useWebSocket-rBLiZsKb.js +0 -36
  190. package/dist/wizard-ChPegnMW.js +0 -133
@@ -1,75 +0,0 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState, useEffect } from 'react';
3
- import { Box, Text } from 'ink';
4
- import { DateTime } from 'luxon';
5
- import Spinner from 'ink-spinner';
6
- import { d as getStageColor, c as getJobStatusColor } from './index-Cz_KLwWf.js';
7
- import { J as JobStatus } from './index-BB7X1Pqp.js';
8
- import 'axios';
9
- import '@tanstack/react-query';
10
- import 'crypto-js';
11
- import 'uuid';
12
- import 'fs';
13
- import { g as getJobSummary, a as getBuildSummary } from './Command-D6rWEZRM.js';
14
- import 'fast-glob';
15
- import 'yazl';
16
- import 'socket.io-client';
17
- import { u as useJobWatching } from './useJobWatching-D-YzSlK8.js';
18
- import { T as Title } from './Title-BCQtayg6.js';
19
- import { a as StatusRow, b as StatusRowLabel } from './StatusTable-Dm5St4g-.js';
20
-
21
- const JobStatusSpinner = ({ status, showSpinner }) => /* @__PURE__ */ jsxs(Fragment, { children: [
22
- /* @__PURE__ */ jsx(Text, { color: getJobStatusColor(status), children: `${status}` }),
23
- showSpinner && /* @__PURE__ */ jsxs(Fragment, { children: [
24
- /* @__PURE__ */ jsx(Text, { children: " " }),
25
- /* @__PURE__ */ jsx(Spinner, { type: "dots" })
26
- ] })
27
- ] });
28
- const JobStatusTable = ({ jobId, projectId, isWatching, onJobUpdate }) => {
29
- const { data: job, stage, isLoading } = useJobWatching({ projectId, jobId, isWatching, onJobUpdate });
30
- const [time, setTime] = useState(DateTime.now());
31
- useEffect(() => {
32
- if (!isWatching) return;
33
- const interval = setInterval(() => setTime(DateTime.now()), 1e3);
34
- return () => {
35
- clearInterval(interval);
36
- };
37
- }, []);
38
- const isJobInProgress = job && ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
39
- const summary = job ? getJobSummary(job, time) : null;
40
- const buildSummary = job && job.build ? getBuildSummary(job.build) : null;
41
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
42
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
43
- /* @__PURE__ */ jsx(Title, { children: "Job Details" }),
44
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
45
- summary && job && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
46
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: summary.id }),
47
- /* @__PURE__ */ jsx(StatusRow, { label: "Name", value: job.project.name }),
48
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
49
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Status" }),
50
- /* @__PURE__ */ jsx(JobStatusSpinner, { status: job.status, showSpinner: isWatching && !!isJobInProgress })
51
- ] }),
52
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
53
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Stage" }),
54
- stage && /* @__PURE__ */ jsx(Text, { color: getStageColor(stage), children: `${stage}` })
55
- ] }),
56
- /* @__PURE__ */ jsx(StatusRow, { label: "Version", value: summary.version }),
57
- /* @__PURE__ */ jsx(StatusRow, { label: "Git Info", value: summary.gitInfo }),
58
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: summary.platform }),
59
- /* @__PURE__ */ jsx(StatusRow, { label: "Started At", value: summary.createdAt }),
60
- /* @__PURE__ */ jsx(StatusRow, { label: "Runtime", value: summary.runtime })
61
- ] })
62
- ] }),
63
- buildSummary && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 3, borderStyle: "single", padding: 1, children: [
64
- /* @__PURE__ */ jsx(Title, { children: "Build Details" }),
65
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
66
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: buildSummary.id }),
67
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: buildSummary.platform }),
68
- /* @__PURE__ */ jsx(StatusRow, { label: "Type", value: buildSummary.type }),
69
- /* @__PURE__ */ jsx(StatusRow, { label: "CMD", value: buildSummary.cmd })
70
- ] })
71
- ] })
72
- ] });
73
- };
74
-
75
- export { JobStatusTable as J };
@@ -1,75 +0,0 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState, useEffect } from 'react';
3
- import { Box, Text } from 'ink';
4
- import { DateTime } from 'luxon';
5
- import Spinner from 'ink-spinner';
6
- import { d as getStageColor, c as getJobStatusColor } from './index-DxHPjZav.js';
7
- import { J as JobStatus } from './index-C9734Cj2.js';
8
- import 'axios';
9
- import '@tanstack/react-query';
10
- import 'crypto-js';
11
- import 'uuid';
12
- import 'fs';
13
- import { g as getJobSummary, a as getBuildSummary } from './Command-Dn0P_KOV.js';
14
- import 'fast-glob';
15
- import 'yazl';
16
- import 'socket.io-client';
17
- import { u as useJobWatching } from './useJobWatching-BIG6fnTN.js';
18
- import { T as Title } from './Title-BCQtayg6.js';
19
- import { a as StatusRow, b as StatusRowLabel } from './StatusTable-Dm5St4g-.js';
20
-
21
- const JobStatusSpinner = ({ status, showSpinner }) => /* @__PURE__ */ jsxs(Fragment, { children: [
22
- /* @__PURE__ */ jsx(Text, { color: getJobStatusColor(status), children: `${status}` }),
23
- showSpinner && /* @__PURE__ */ jsxs(Fragment, { children: [
24
- /* @__PURE__ */ jsx(Text, { children: " " }),
25
- /* @__PURE__ */ jsx(Spinner, { type: "dots" })
26
- ] })
27
- ] });
28
- const JobStatusTable = ({ jobId, projectId, isWatching, onJobUpdate }) => {
29
- const { data: job, stage, isLoading } = useJobWatching({ projectId, jobId, isWatching, onJobUpdate });
30
- const [time, setTime] = useState(DateTime.now());
31
- useEffect(() => {
32
- if (!isWatching) return;
33
- const interval = setInterval(() => setTime(DateTime.now()), 1e3);
34
- return () => {
35
- clearInterval(interval);
36
- };
37
- }, []);
38
- const isJobInProgress = job && ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
39
- const summary = job ? getJobSummary(job, time) : null;
40
- const buildSummary = job && job.build ? getBuildSummary(job.build) : null;
41
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
42
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
43
- /* @__PURE__ */ jsx(Title, { children: "Job Details" }),
44
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
45
- summary && job && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
46
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: summary.id }),
47
- /* @__PURE__ */ jsx(StatusRow, { label: "Name", value: job.project.name }),
48
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
49
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Status" }),
50
- /* @__PURE__ */ jsx(JobStatusSpinner, { status: job.status, showSpinner: isWatching && !!isJobInProgress })
51
- ] }),
52
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
53
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Stage" }),
54
- stage && /* @__PURE__ */ jsx(Text, { color: getStageColor(stage), children: `${stage}` })
55
- ] }),
56
- /* @__PURE__ */ jsx(StatusRow, { label: "Version", value: summary.version }),
57
- /* @__PURE__ */ jsx(StatusRow, { label: "Git Info", value: summary.gitInfo }),
58
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: summary.platform }),
59
- /* @__PURE__ */ jsx(StatusRow, { label: "Started At", value: summary.createdAt }),
60
- /* @__PURE__ */ jsx(StatusRow, { label: "Runtime", value: summary.runtime })
61
- ] })
62
- ] }),
63
- buildSummary && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 3, borderStyle: "single", padding: 1, children: [
64
- /* @__PURE__ */ jsx(Title, { children: "Build Details" }),
65
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
66
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: buildSummary.id }),
67
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: buildSummary.platform }),
68
- /* @__PURE__ */ jsx(StatusRow, { label: "Type", value: buildSummary.type }),
69
- /* @__PURE__ */ jsx(StatusRow, { label: "CMD", value: buildSummary.cmd })
70
- ] })
71
- ] })
72
- ] });
73
- };
74
-
75
- export { JobStatusTable as J };
@@ -1,75 +0,0 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState, useEffect } from 'react';
3
- import { Box, Text } from 'ink';
4
- import { DateTime } from 'luxon';
5
- import Spinner from 'ink-spinner';
6
- import { d as getStageColor, c as getJobStatusColor } from './index-Cz_KLwWf.js';
7
- import { J as JobStatus } from './index-BB7X1Pqp.js';
8
- import 'axios';
9
- import '@tanstack/react-query';
10
- import 'crypto-js';
11
- import 'uuid';
12
- import 'fs';
13
- import { g as getJobSummary, a as getBuildSummary } from './Command-BiB9MqbJ.js';
14
- import 'fast-glob';
15
- import 'yazl';
16
- import 'socket.io-client';
17
- import { u as useJobWatching } from './useJobWatching-I_A3b36f.js';
18
- import { T as Title } from './Title-BCQtayg6.js';
19
- import { a as StatusRow, b as StatusRowLabel } from './StatusTable-Dm5St4g-.js';
20
-
21
- const JobStatusSpinner = ({ status, showSpinner }) => /* @__PURE__ */ jsxs(Fragment, { children: [
22
- /* @__PURE__ */ jsx(Text, { color: getJobStatusColor(status), children: `${status}` }),
23
- showSpinner && /* @__PURE__ */ jsxs(Fragment, { children: [
24
- /* @__PURE__ */ jsx(Text, { children: " " }),
25
- /* @__PURE__ */ jsx(Spinner, { type: "dots" })
26
- ] })
27
- ] });
28
- const JobStatusTable = ({ jobId, projectId, isWatching, onJobUpdate }) => {
29
- const { data: job, stage, isLoading } = useJobWatching({ projectId, jobId, isWatching, onJobUpdate });
30
- const [time, setTime] = useState(DateTime.now());
31
- useEffect(() => {
32
- if (!isWatching) return;
33
- const interval = setInterval(() => setTime(DateTime.now()), 1e3);
34
- return () => {
35
- clearInterval(interval);
36
- };
37
- }, []);
38
- const isJobInProgress = job && ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
39
- const summary = job ? getJobSummary(job, time) : null;
40
- const buildSummary = job && job.build ? getBuildSummary(job.build) : null;
41
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
42
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
43
- /* @__PURE__ */ jsx(Title, { children: "Job Details" }),
44
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
45
- summary && job && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
46
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: summary.id }),
47
- /* @__PURE__ */ jsx(StatusRow, { label: "Name", value: job.project.name }),
48
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
49
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Status" }),
50
- /* @__PURE__ */ jsx(JobStatusSpinner, { status: job.status, showSpinner: isWatching && !!isJobInProgress })
51
- ] }),
52
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
53
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Stage" }),
54
- stage && /* @__PURE__ */ jsx(Text, { color: getStageColor(stage), children: `${stage}` })
55
- ] }),
56
- /* @__PURE__ */ jsx(StatusRow, { label: "Version", value: summary.version }),
57
- /* @__PURE__ */ jsx(StatusRow, { label: "Git Info", value: summary.gitInfo }),
58
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: summary.platform }),
59
- /* @__PURE__ */ jsx(StatusRow, { label: "Started At", value: summary.createdAt }),
60
- /* @__PURE__ */ jsx(StatusRow, { label: "Runtime", value: summary.runtime })
61
- ] })
62
- ] }),
63
- buildSummary && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 3, borderStyle: "single", padding: 1, children: [
64
- /* @__PURE__ */ jsx(Title, { children: "Build Details" }),
65
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
66
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: buildSummary.id }),
67
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: buildSummary.platform }),
68
- /* @__PURE__ */ jsx(StatusRow, { label: "Type", value: buildSummary.type }),
69
- /* @__PURE__ */ jsx(StatusRow, { label: "CMD", value: buildSummary.cmd })
70
- ] })
71
- ] })
72
- ] });
73
- };
74
-
75
- export { JobStatusTable as J };
@@ -1,75 +0,0 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState, useEffect } from 'react';
3
- import { Box, Text } from 'ink';
4
- import { DateTime } from 'luxon';
5
- import Spinner from 'ink-spinner';
6
- import { d as getStageColor, c as getJobStatusColor } from './index-wyPoxiTc.js';
7
- import { J as JobStatus } from './index-DdABTtYO.js';
8
- import 'axios';
9
- import '@tanstack/react-query';
10
- import 'crypto-js';
11
- import 'uuid';
12
- import 'fs';
13
- import { g as getJobSummary, a as getBuildSummary } from './Command-DxmQn3XT.js';
14
- import 'fast-glob';
15
- import 'yazl';
16
- import 'socket.io-client';
17
- import { u as useJobWatching } from './useJobWatching-P5oC7mNB.js';
18
- import { T as Title } from './Title-BCQtayg6.js';
19
- import { a as StatusRow, b as StatusRowLabel } from './StatusTable-Dm5St4g-.js';
20
-
21
- const JobStatusSpinner = ({ status, showSpinner }) => /* @__PURE__ */ jsxs(Fragment, { children: [
22
- /* @__PURE__ */ jsx(Text, { color: getJobStatusColor(status), children: `${status}` }),
23
- showSpinner && /* @__PURE__ */ jsxs(Fragment, { children: [
24
- /* @__PURE__ */ jsx(Text, { children: " " }),
25
- /* @__PURE__ */ jsx(Spinner, { type: "dots" })
26
- ] })
27
- ] });
28
- const JobStatusTable = ({ jobId, projectId, isWatching, onJobUpdate }) => {
29
- const { data: job, stage, isLoading } = useJobWatching({ projectId, jobId, isWatching, onJobUpdate });
30
- const [time, setTime] = useState(DateTime.now());
31
- useEffect(() => {
32
- if (!isWatching) return;
33
- const interval = setInterval(() => setTime(DateTime.now()), 1e3);
34
- return () => {
35
- clearInterval(interval);
36
- };
37
- }, []);
38
- const isJobInProgress = job && ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
39
- const summary = job ? getJobSummary(job, time) : null;
40
- const buildSummary = job && job.build ? getBuildSummary(job.build) : null;
41
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
42
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
43
- /* @__PURE__ */ jsx(Title, { children: "Job Details" }),
44
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
45
- summary && job && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
46
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: summary.id }),
47
- /* @__PURE__ */ jsx(StatusRow, { label: "Name", value: job.project.name }),
48
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
49
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Status" }),
50
- /* @__PURE__ */ jsx(JobStatusSpinner, { status: job.status, showSpinner: isWatching && !!isJobInProgress })
51
- ] }),
52
- /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
53
- /* @__PURE__ */ jsx(StatusRowLabel, { label: "Stage" }),
54
- stage && /* @__PURE__ */ jsx(Text, { color: getStageColor(stage), children: `${stage}` })
55
- ] }),
56
- /* @__PURE__ */ jsx(StatusRow, { label: "Version", value: summary.version }),
57
- /* @__PURE__ */ jsx(StatusRow, { label: "Git Info", value: summary.gitInfo }),
58
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: summary.platform }),
59
- /* @__PURE__ */ jsx(StatusRow, { label: "Started At", value: summary.createdAt }),
60
- /* @__PURE__ */ jsx(StatusRow, { label: "Runtime", value: summary.runtime })
61
- ] })
62
- ] }),
63
- buildSummary && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 3, borderStyle: "single", padding: 1, children: [
64
- /* @__PURE__ */ jsx(Title, { children: "Build Details" }),
65
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
66
- /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: buildSummary.id }),
67
- /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: buildSummary.platform }),
68
- /* @__PURE__ */ jsx(StatusRow, { label: "Type", value: buildSummary.type }),
69
- /* @__PURE__ */ jsx(StatusRow, { label: "CMD", value: buildSummary.cmd })
70
- ] })
71
- ] })
72
- ] });
73
- };
74
-
75
- export { JobStatusTable as J };
@@ -1,37 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import 'crypto';
5
- import 'fs';
6
- import 'readline-sync';
7
- import 'node:readline';
8
- import 'node:path';
9
- import 'node:url';
10
- import 'react';
11
- import 'axios';
12
- import '@tanstack/react-query';
13
- import './index-BB7X1Pqp.js';
14
- import 'crypto-js';
15
- import 'uuid';
16
- import 'luxon';
17
- import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-vjedBbKl.js';
18
- import 'fast-glob';
19
- import 'yazl';
20
- import 'socket.io-client';
21
- import 'isomorphic-git';
22
- import '@oclif/core';
23
- import { T as Table } from './Table-CvM6pccN.js';
24
- import { T as Title } from './Title-BCQtayg6.js';
25
-
26
- const ProjectCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
27
- const { isLoading, data } = useProjectCredentials(queryProps);
28
- const hasActive = data?.data.some((credential) => credential.isActive);
29
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
30
- /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
31
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
32
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
33
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getProjectCredentialSummary) })
34
- ] });
35
- };
36
-
37
- export { ProjectCredentialsTable as P };
@@ -1,37 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import 'crypto';
5
- import 'fs';
6
- import 'readline-sync';
7
- import 'node:readline';
8
- import 'node:path';
9
- import 'node:url';
10
- import 'react';
11
- import 'axios';
12
- import '@tanstack/react-query';
13
- import './index-DdABTtYO.js';
14
- import 'crypto-js';
15
- import 'uuid';
16
- import 'luxon';
17
- import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-BRffcsO3.js';
18
- import 'fast-glob';
19
- import 'yazl';
20
- import 'socket.io-client';
21
- import 'isomorphic-git';
22
- import '@oclif/core';
23
- import { T as Table } from './Table-CvM6pccN.js';
24
- import { T as Title } from './Title-BCQtayg6.js';
25
-
26
- const ProjectCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
27
- const { isLoading, data } = useProjectCredentials(queryProps);
28
- const hasActive = data?.data.some((credential) => credential.isActive);
29
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
30
- /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
31
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
32
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
33
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getProjectCredentialSummary) })
34
- ] });
35
- };
36
-
37
- export { ProjectCredentialsTable as P };
@@ -1,37 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import 'crypto';
5
- import 'fs';
6
- import 'readline-sync';
7
- import 'node:readline';
8
- import 'node:path';
9
- import 'node:url';
10
- import 'react';
11
- import 'axios';
12
- import '@tanstack/react-query';
13
- import './index-C9734Cj2.js';
14
- import 'crypto-js';
15
- import 'uuid';
16
- import 'luxon';
17
- import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-EapDge1I.js';
18
- import 'fast-glob';
19
- import 'yazl';
20
- import 'socket.io-client';
21
- import 'isomorphic-git';
22
- import '@oclif/core';
23
- import { T as Table } from './Table-CvM6pccN.js';
24
- import { T as Title } from './Title-BCQtayg6.js';
25
-
26
- const ProjectCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
27
- const { isLoading, data } = useProjectCredentials(queryProps);
28
- const hasActive = data?.data.some((credential) => credential.isActive);
29
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
30
- /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
31
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
32
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
33
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getProjectCredentialSummary) })
34
- ] });
35
- };
36
-
37
- export { ProjectCredentialsTable as P };
@@ -1,37 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import 'crypto';
5
- import 'fs';
6
- import 'readline-sync';
7
- import 'node:readline';
8
- import 'node:path';
9
- import 'node:url';
10
- import 'react';
11
- import 'axios';
12
- import '@tanstack/react-query';
13
- import './index-Bv3x8c78.js';
14
- import 'crypto-js';
15
- import 'uuid';
16
- import 'luxon';
17
- import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-CKngz2rd.js';
18
- import 'fast-glob';
19
- import 'yazl';
20
- import 'socket.io-client';
21
- import 'isomorphic-git';
22
- import '@oclif/core';
23
- import { T as Table } from './Table-CvM6pccN.js';
24
- import { T as Title } from './Title-BCQtayg6.js';
25
-
26
- const ProjectCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
27
- const { isLoading, data } = useProjectCredentials(queryProps);
28
- const hasActive = data?.data.some((credential) => credential.isActive);
29
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
30
- /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
31
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
32
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
33
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getProjectCredentialSummary) })
34
- ] });
35
- };
36
-
37
- export { ProjectCredentialsTable as P };
@@ -1,82 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import 'crypto';
5
- import 'fs';
6
- import 'readline-sync';
7
- import 'node:readline';
8
- import 'node:path';
9
- import 'node:url';
10
- import 'react';
11
- import axios from 'axios';
12
- import { useQuery } from '@tanstack/react-query';
13
- import { b as getShortDate, o as getAuthedHeaders, p as API_URL, M as castArrayObjectDates } from './index-C9734Cj2.js';
14
- import 'crypto-js';
15
- import 'uuid';
16
- import 'luxon';
17
- import 'fast-glob';
18
- import 'yazl';
19
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-B_ekRewZ.js';
20
- import { g as getShortUUID } from './index-DxHPjZav.js';
21
- import 'socket.io-client';
22
- import 'isomorphic-git';
23
- import '@oclif/core';
24
- import { T as Table } from './Table-CvM6pccN.js';
25
- import { T as Title } from './Title-BCQtayg6.js';
26
-
27
- async function queryUserCredentials(params) {
28
- try {
29
- const headers = getAuthedHeaders();
30
- const url = `${API_URL}/credentials`;
31
- const response = await axios.get(url, { headers, params });
32
- return {
33
- ...response.data,
34
- data: castArrayObjectDates(response.data.data)
35
- };
36
- } catch (error) {
37
- console.warn("queryUserCredentials Error", error);
38
- throw error;
39
- }
40
- }
41
- function getUserCredentialSummary(credential) {
42
- return {
43
- id: getShortUUID(credential.id),
44
- type: credential.type,
45
- serial: credential.serialNumber,
46
- isActive: credential.isActive,
47
- createdAt: getShortDate(credential.createdAt)
48
- };
49
- }
50
- const useUserCredentials = ({
51
- platform,
52
- type,
53
- ...pageAndSortParams
54
- }) => {
55
- const queryResult = useQuery({
56
- queryKey: cacheKeys.userCredentials(pageAndSortParams),
57
- queryFn: async () => queryUserCredentials(pageAndSortParams),
58
- select: (data) => {
59
- if (!(platform || type)) return data;
60
- return {
61
- ...data,
62
- data: data.data.filter((credential) => {
63
- return (!platform || credential.platform === platform) && (!type || credential.type === type);
64
- })
65
- };
66
- }
67
- });
68
- return queryResult;
69
- };
70
-
71
- const UserCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
72
- const { isLoading, data } = useUserCredentials(queryProps);
73
- const hasActive = data?.data.some((credential) => credential.isActive);
74
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
75
- /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
76
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
77
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
78
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getUserCredentialSummary) })
79
- ] });
80
- };
81
-
82
- export { UserCredentialsTable as U, useUserCredentials as u };
@@ -1,82 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import 'crypto';
5
- import 'fs';
6
- import 'readline-sync';
7
- import 'node:readline';
8
- import 'node:path';
9
- import 'node:url';
10
- import 'react';
11
- import axios from 'axios';
12
- import { useQuery } from '@tanstack/react-query';
13
- import { b as getShortDate, p as getAuthedHeaders, q as API_URL, K as castArrayObjectDates } from './index-Bv3x8c78.js';
14
- import 'crypto-js';
15
- import 'uuid';
16
- import 'luxon';
17
- import 'fast-glob';
18
- import 'yazl';
19
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-BDc7XpKE.js';
20
- import { g as getShortUUID } from './index-BQnkBr1Q.js';
21
- import 'socket.io-client';
22
- import 'isomorphic-git';
23
- import '@oclif/core';
24
- import { T as Table } from './Table-CvM6pccN.js';
25
- import { T as Title } from './Title-BCQtayg6.js';
26
-
27
- async function queryUserCredentials(params) {
28
- try {
29
- const headers = getAuthedHeaders();
30
- const url = `${API_URL}/credentials`;
31
- const response = await axios.get(url, { headers, params });
32
- return {
33
- ...response.data,
34
- data: castArrayObjectDates(response.data.data)
35
- };
36
- } catch (error) {
37
- console.warn("queryUserCredentials Error", error);
38
- throw error;
39
- }
40
- }
41
- function getUserCredentialSummary(credential) {
42
- return {
43
- id: getShortUUID(credential.id),
44
- type: credential.type,
45
- serial: credential.serialNumber,
46
- isActive: credential.isActive,
47
- createdAt: getShortDate(credential.createdAt)
48
- };
49
- }
50
- const useUserCredentials = ({
51
- platform,
52
- type,
53
- ...pageAndSortParams
54
- }) => {
55
- const queryResult = useQuery({
56
- queryKey: cacheKeys.userCredentials(pageAndSortParams),
57
- queryFn: async () => queryUserCredentials(pageAndSortParams),
58
- select: (data) => {
59
- if (!(platform || type)) return data;
60
- return {
61
- ...data,
62
- data: data.data.filter((credential) => {
63
- return (!platform || credential.platform === platform) && (!type || credential.type === type);
64
- })
65
- };
66
- }
67
- });
68
- return queryResult;
69
- };
70
-
71
- const UserCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
72
- const { isLoading, data } = useUserCredentials(queryProps);
73
- const hasActive = data?.data.some((credential) => credential.isActive);
74
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
75
- /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
76
- /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
77
- isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
78
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getUserCredentialSummary) })
79
- ] });
80
- };
81
-
82
- export { UserCredentialsTable as U, useUserCredentials as u };