shipthis 0.1.12 → 0.1.14

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 (78) hide show
  1. package/assets/markdown/ship-failure.md +12 -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-BiB9MqbJ.js → Command-zfJ7qIJI.js} +5 -5
  5. package/dist/{CommandGame-C1oTlfdb.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-W0QQR49T.js → JobProgress-D1Pe4YJc.js} +10 -6
  9. package/dist/JobStatusTable-D-daiV-I.js +203 -0
  10. package/dist/{ProjectCredentialsTable-8kXt7sTS.js → ProjectCredentialsTable-Ch2s5qF1.js} +2 -2
  11. package/dist/{UserCredentialsTable-TflQvTEP.js → UserCredentialsTable-DzyAHhLB.js} +3 -3
  12. package/dist/{baseAppleCommand-B9wyIqdL.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 +5 -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-rS9o87LD.js → export-Cin4rLWR.js} +1 -1
  62. package/dist/{import-v54PM_Qg.js → import-CXTv9E84.js} +1 -1
  63. package/dist/{index-DOgF4dFK.js → index-B4v66AKo.js} +1 -1
  64. package/dist/{index-o9Y-84Rj.js → index-BVvcTBnj.js} +4 -4
  65. package/dist/{index-D6BH5UAM.js → index-Cx_2qTdS.js} +5 -5
  66. package/dist/{index-BB7X1Pqp.js → index-Dhx6FAHt.js} +1 -1
  67. package/dist/{index-Cz_KLwWf.js → index-Dj-chiHz.js} +2 -2
  68. package/dist/{upload-2naN75Zu.js → upload-DZCIfnwf.js} +1 -1
  69. package/dist/{useAndroidServiceAccountTestResult-Ce1x0Eh8.js → useAndroidServiceAccountTestResult-L4oozjag.js} +1 -1
  70. package/dist/{useAppleApp-BEtLQa7n.js → useAppleApp-DcSr-q-w.js} +1 -1
  71. package/dist/{useAppleBundleId-DXbMDRLd.js → useAppleBundleId-BnJVPVIz.js} +1 -1
  72. package/dist/{useJobWatching-I_A3b36f.js → useJobWatching-DS0qHqPA.js} +3 -3
  73. package/dist/{useProjectCredentials-vjedBbKl.js → useProjectCredentials-CI_AoXmH.js} +3 -3
  74. package/dist/{useWebSocket-CBqsjHbt.js → useWebSocket-ZEZvtpT_.js} +1 -1
  75. package/npm-shrinkwrap.json +2 -2
  76. package/oclif.manifest.json +144 -144
  77. package/package.json +2 -2
  78. package/dist/JobStatusTable-DqoppRro.js +0 -75
@@ -0,0 +1,12 @@
1
+ # There was an error shipping your game
2
+
3
+ **One or more of the jobs to build your game failed.**
4
+
5
+ ## What now?
6
+
7
+ - **The last 10 lines of the failed jobs are shown below**
8
+ - Check out the full output in the **ShipThis Dashboard** [${jobDashboardUrl}](${jobDashboardUrl})
9
+
10
+ ### Need help?
11
+
12
+ - Join the Discord [https://discord.gg/HuSvK4GT](https://discord.gg/HuSvK4GT)
@@ -0,0 +1,12 @@
1
+ # 🚀 Shipped
2
+
3
+ **Your game has been successfully built and published.**
4
+
5
+ ## Next Steps
6
+
7
+ - See all builds in the **Dashboard** [${gameBuildsUrl}](${gameBuildsUrl})
8
+
9
+ ### Need help?
10
+
11
+ - Join the Discord [https://discord.gg/HuSvK4GT](https://discord.gg/HuSvK4GT)
12
+
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Box, Text } from 'ink';
3
3
  import Spinner from 'ink-spinner';
4
- import './index-BB7X1Pqp.js';
4
+ import './index-Dhx6FAHt.js';
5
5
  import 'axios';
6
6
  import '@tanstack/react-query';
7
7
  import 'crypto';
@@ -17,18 +17,18 @@ import 'luxon';
17
17
  import 'socket.io-client';
18
18
  import 'isomorphic-git';
19
19
  import '@oclif/core';
20
- import { u as useAppleApp } from './useAppleApp-BEtLQa7n.js';
20
+ import { u as useAppleApp } from './useAppleApp-DcSr-q-w.js';
21
21
  import 'fast-glob';
22
22
  import 'yazl';
23
23
  import '@inkjs/ui';
24
- import './Command-BiB9MqbJ.js';
24
+ import './Command-zfJ7qIJI.js';
25
25
  import 'open';
26
26
  import { T as Table } from './Table-CvM6pccN.js';
27
27
  import { T as Title } from './Title-BCQtayg6.js';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
30
  import 'qrcode';
31
- import { u as useAppleBundleId } from './useAppleBundleId-DXbMDRLd.js';
31
+ import { u as useAppleBundleId } from './useAppleBundleId-BnJVPVIz.js';
32
32
 
33
33
  const AppleAppDetails = (props) => {
34
34
  const { data, isLoading } = useAppleApp(props);
@@ -3,9 +3,9 @@ import { Text, useInput, Box } from 'ink';
3
3
  import React, { useState, useEffect, useContext, useRef } from 'react';
4
4
  import Spinner from 'ink-spinner';
5
5
  import open from 'open';
6
- import { g as getShortUUID, h as getPlatformName, s as scriptDir } from './index-Cz_KLwWf.js';
7
- import { c as cacheKeys, u as useAndroidServiceAccountTestResult, K as KeyTestStatus, a as KeyTestError } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
8
- import { p as getAuthedHeaders, q as API_URL, K as castArrayObjectDates, P as Platform, a6 as getShortDateTime, a5 as getJob, J as JobStatus, a7 as getShortTimeDelta, H as getProject, a2 as getShortAuthRequiredUrl, $ as queryClient, X as WEB_URL } from './index-BB7X1Pqp.js';
6
+ import { g as getShortUUID, f as getPlatformName, s as scriptDir } from './index-Dj-chiHz.js';
7
+ import { c as cacheKeys, u as useAndroidServiceAccountTestResult, K as KeyTestStatus, a as KeyTestError } from './useAndroidServiceAccountTestResult-L4oozjag.js';
8
+ import { p as getAuthedHeaders, q as API_URL, L as castArrayObjectDates, P as Platform, a6 as getShortDateTime, E as getJob, J as JobStatus, a7 as getShortTimeDelta, I as getProject, a0 as getShortAuthRequiredUrl, a1 as queryClient, Y as WEB_URL } from './index-Dhx6FAHt.js';
9
9
  import '@inkjs/ui';
10
10
  import axios from 'axios';
11
11
  import { useQuery, QueryClientProvider } from '@tanstack/react-query';
@@ -197,8 +197,8 @@ const Create = ({ onComplete, onError, gameId, ...boxProps }) => {
197
197
  };
198
198
 
199
199
  const Command = ({ children, command }) => {
200
- const width = Math.min(160, process.stdout.columns || 80);
200
+ const width = process.stdout.columns || 80;
201
201
  return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(CommandProvider, { command, children: /* @__PURE__ */ jsx(Box, { width, flexDirection: "column", children }) }) });
202
202
  };
203
203
 
204
- export { Command as C, GameProvider as G, Markdown as M, getBuildSummary as a, GameContext as b, CommandContext as c, useBuilds as d, CreateGooglePlayGame as e, getJobSummary as g, queryBuilds as q, useJob as u };
204
+ export { Command as C, GameProvider as G, Markdown as M, GameContext as a, CommandContext as b, useBuilds as c, getBuildSummary as d, CreateGooglePlayGame as e, getJobSummary as g, queryBuilds as q, useJob as u };
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { C as Command, G as GameProvider } from './Command-BiB9MqbJ.js';
2
+ import { C as Command, G as GameProvider } from './Command-zfJ7qIJI.js';
3
3
 
4
4
  const CommandGame = ({ children, command }) => {
5
5
  return /* @__PURE__ */ jsx(Command, { command, children: /* @__PURE__ */ jsx(GameProvider, { children }) });
@@ -3,9 +3,9 @@ import { Box } from 'ink';
3
3
  import axios from 'axios';
4
4
  import { useContext } from 'react';
5
5
  import { useQueryClient } from '@tanstack/react-query';
6
- import { p as getAuthedHeaders, q as API_URL } from './index-BB7X1Pqp.js';
7
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
8
- import { b as GameContext } from './Command-BiB9MqbJ.js';
6
+ import { p as getAuthedHeaders, q as API_URL } from './index-Dhx6FAHt.js';
7
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-L4oozjag.js';
8
+ import { a as GameContext } from './Command-zfJ7qIJI.js';
9
9
  import 'ink-spinner';
10
10
  import '@inkjs/ui';
11
11
  import 'fs';
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useContext, useState, useEffect } from 'react';
3
3
  import { Box, Text } from 'ink';
4
4
  import Spinner from 'ink-spinner';
5
- import { b as GameContext } from './Command-BiB9MqbJ.js';
6
- import { $ as queryClient, P as Platform, C as CredentialsType } from './index-BB7X1Pqp.js';
5
+ import { a as GameContext } from './Command-zfJ7qIJI.js';
6
+ import { a1 as queryClient, P as Platform, C as CredentialsType } from './index-Dhx6FAHt.js';
7
7
  import 'axios';
8
8
  import 'crypto-js';
9
9
  import { v4 } from 'uuid';
@@ -12,8 +12,8 @@ import fs__default from 'fs';
12
12
  import '@inkjs/ui';
13
13
  import { useMutation } from '@tanstack/react-query';
14
14
  import yazl from 'yazl';
15
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
16
- import { i as importCredential } from './import-v54PM_Qg.js';
15
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-L4oozjag.js';
16
+ import { i as importCredential } from './import-CXTv9E84.js';
17
17
  import 'crypto';
18
18
  import 'readline-sync';
19
19
  import 'node:readline';
@@ -4,14 +4,14 @@ import fg from 'fast-glob';
4
4
  import fs__default from 'fs';
5
5
  import yazl from 'yazl';
6
6
  import { useMutation } from '@tanstack/react-query';
7
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
8
- import { $ as queryClient, x as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a0 as getNewUploadTicket, a1 as startJobsFromUpload, J as JobStatus } from './index-BB7X1Pqp.js';
9
- import { f as getFileHash, h as getPlatformName } from './index-Cz_KLwWf.js';
7
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-L4oozjag.js';
8
+ import { a1 as queryClient, x as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a2 as getNewUploadTicket, a3 as startJobsFromUpload, J as JobStatus } from './index-Dhx6FAHt.js';
9
+ import { e as getFileHash, f as getPlatformName } from './index-Dj-chiHz.js';
10
10
  import { g as getCWDGitInfo } from './git-DREGq-jc.js';
11
11
  import { jsx, Fragment } from 'react/jsx-runtime';
12
12
  import { useRef } from 'react';
13
13
  import 'ink';
14
- import './Command-BiB9MqbJ.js';
14
+ import './Command-zfJ7qIJI.js';
15
15
  import 'ink-spinner';
16
16
  import 'crypto-js';
17
17
  import 'luxon';
@@ -22,7 +22,7 @@ import 'qrcode';
22
22
  import 'string-length';
23
23
  import 'strip-ansi';
24
24
  import 'socket.io-client';
25
- import { u as useJobWatching } from './useJobWatching-I_A3b36f.js';
25
+ import { u as useJobWatching } from './useJobWatching-DS0qHqPA.js';
26
26
 
27
27
  async function ship({ command, log = () => {
28
28
  } }) {
@@ -91,7 +91,11 @@ const JobProgress = (props) => {
91
91
  const completed = [JobStatus.COMPLETED, JobStatus.FAILED];
92
92
  const wasRunning = !completed.includes(prevJobStatus.current);
93
93
  if (completed.includes(job.status) && wasRunning) {
94
- props.onComplete();
94
+ if (job.status === JobStatus.FAILED) {
95
+ props.onFailure(job);
96
+ } else {
97
+ props.onComplete(job);
98
+ }
95
99
  }
96
100
  prevJobStatus.current = job.status;
97
101
  };
@@ -0,0 +1,203 @@
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { measureElement, Box, Text } from 'ink';
3
+ import Spinner from 'ink-spinner';
4
+ import { h as getStageColor, j as getMessageColor, c as getJobStatusColor } from './index-Dj-chiHz.js';
5
+ import { useState, useEffect, useRef } from 'react';
6
+ import axios from 'axios';
7
+ import { useInfiniteQuery } from '@tanstack/react-query';
8
+ import { p as getAuthedHeaders, q as API_URL, L as castArrayObjectDates, H as castObjectDates, a5 as getShortTime, J as JobStatus } from './index-Dhx6FAHt.js';
9
+ import 'crypto-js';
10
+ import 'uuid';
11
+ import 'fs';
12
+ import { DateTime } from 'luxon';
13
+ import 'fast-glob';
14
+ import 'yazl';
15
+ import 'socket.io-client';
16
+ import 'crypto';
17
+ import 'readline-sync';
18
+ import 'node:readline';
19
+ import 'node:path';
20
+ import 'node:url';
21
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-L4oozjag.js';
22
+ import 'isomorphic-git';
23
+ import '@oclif/core';
24
+ import { u as useWebSocket } from './useWebSocket-ZEZvtpT_.js';
25
+ import { T as Title } from './Title-BCQtayg6.js';
26
+ import stringLength from 'string-length';
27
+ import stripAnsi from 'strip-ansi';
28
+ import { g as getJobSummary, d as getBuildSummary } from './Command-zfJ7qIJI.js';
29
+ import { u as useJobWatching } from './useJobWatching-DS0qHqPA.js';
30
+ import { a as StatusRow, b as StatusRowLabel } from './StatusTable-Dm5St4g-.js';
31
+
32
+ async function queryJobLogs({
33
+ projectId,
34
+ jobId,
35
+ cursor,
36
+ pageSize = 10
37
+ }) {
38
+ try {
39
+ const headers = getAuthedHeaders();
40
+ const base = `${API_URL}/projects/${projectId}/jobs/${jobId}/logs/?pageSize=${pageSize}`;
41
+ const url = base + (cursor ? `&cursor=${cursor}` : "");
42
+ const response = await axios.get(url, { headers });
43
+ return {
44
+ ...response.data,
45
+ data: castArrayObjectDates(response.data.data, ["sentAt", "createdAt"])
46
+ };
47
+ } catch (error) {
48
+ console.warn("queryJobLogs Error", error);
49
+ throw error;
50
+ }
51
+ }
52
+ const useJobLogs = (props) => {
53
+ const queryResult = useInfiniteQuery({
54
+ queryKey: cacheKeys.jobLogs(props),
55
+ queryFn: async ({ pageParam }) => {
56
+ return queryJobLogs({
57
+ ...props,
58
+ cursor: pageParam
59
+ });
60
+ },
61
+ getNextPageParam: (lastPage) => lastPage.nextCursor,
62
+ initialPageParam: props.cursor
63
+ });
64
+ return queryResult;
65
+ };
66
+
67
+ function arrayToDictionary(array, key = "id") {
68
+ return array.reduce((a, i) => {
69
+ a[i[key]] = i;
70
+ return a;
71
+ }, {});
72
+ }
73
+ function dictionaryToArray(dictionary) {
74
+ return Object.keys(dictionary).map((key) => dictionary[key]);
75
+ }
76
+
77
+ function getSortedJobLogs(logs) {
78
+ return logs.sort((a, b) => a.sentAt.toMillis() - b.sentAt.toMillis());
79
+ }
80
+ function useJobLogTail(props) {
81
+ const [websocketLogs, setWebsocketLogs] = useState([]);
82
+ const listener = {
83
+ getPattern: () => `project.${props.projectId}:job.${props.jobId}:log`,
84
+ eventHandler: async (pattern, rawLogEntry) => {
85
+ setWebsocketLogs((prevLogs) => {
86
+ const logEntry = castObjectDates(rawLogEntry, ["sentAt", "createdAt"]);
87
+ return [...prevLogs, logEntry];
88
+ });
89
+ }
90
+ };
91
+ useWebSocket(props.isWatching ? [listener] : []);
92
+ const { isLoading, data: fetchedJobLogs } = useJobLogs({
93
+ projectId: props.projectId,
94
+ jobId: props.jobId,
95
+ pageSize: props.length
96
+ });
97
+ useEffect(() => {
98
+ setWebsocketLogs([]);
99
+ }, [props.jobId, props.projectId, props.length, props.isWatching, fetchedJobLogs]);
100
+ const firstPage = fetchedJobLogs ? fetchedJobLogs?.pages[0].data : [];
101
+ const allLogs = [...firstPage, ...websocketLogs];
102
+ const allLogsById = arrayToDictionary(allLogs);
103
+ const uniqueLogs = dictionaryToArray(allLogsById);
104
+ const data = getSortedJobLogs(uniqueLogs).slice(-props.length);
105
+ return {
106
+ isLoading,
107
+ data
108
+ };
109
+ }
110
+
111
+ const TruncatedText = ({ children, wrap, ...textPropsWithoutWrap }) => {
112
+ const ref = useRef();
113
+ const [width, setWidth] = useState(null);
114
+ useEffect(() => {
115
+ if (!ref.current) return;
116
+ const { width: measuredWidth } = measureElement(ref.current);
117
+ setWidth(measuredWidth);
118
+ }, []);
119
+ const getTruncated = (input) => {
120
+ const withoutCrlf = input.replaceAll(/[\r\n]/g, "");
121
+ if (width === null) return withoutCrlf;
122
+ const withoutAnsi = stripAnsi(withoutCrlf);
123
+ const textLength = stringLength(withoutAnsi);
124
+ return textLength > width ? withoutCrlf.substring(0, width) : withoutCrlf;
125
+ };
126
+ return /* @__PURE__ */ jsx(Box, { ref, children: /* @__PURE__ */ jsx(Text, { ...textPropsWithoutWrap, children: getTruncated(children) + "\x1B[0m" }) });
127
+ };
128
+
129
+ const JobLogTail = (props) => {
130
+ const { isLoading, data } = useJobLogTail(props);
131
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
132
+ /* @__PURE__ */ jsx(Title, { children: "Job Logs" }),
133
+ isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
134
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: data.map((log) => {
135
+ const stageColor = getStageColor(log.stage);
136
+ const messageColor = getMessageColor(log.level);
137
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", overflow: "hidden", height: 1, children: [
138
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { children: getShortTime(log.sentAt) }) }),
139
+ /* @__PURE__ */ jsx(Box, { marginLeft: 1, width: 9, justifyContent: "flex-start", children: /* @__PURE__ */ jsx(Text, { color: stageColor, children: log.stage }) }),
140
+ /* @__PURE__ */ jsx(Box, { marginLeft: 1, overflow: "hidden", height: 1, marginRight: 2, children: /* @__PURE__ */ jsx(TruncatedText, { color: messageColor, children: log.message }) })
141
+ ] }, log.id);
142
+ }) })
143
+ ] });
144
+ };
145
+
146
+ const JobStatusSpinner = ({ status, showSpinner }) => /* @__PURE__ */ jsxs(Fragment, { children: [
147
+ /* @__PURE__ */ jsx(Box, { width: JobStatus.PROCESSING.length, children: /* @__PURE__ */ jsx(Text, { color: getJobStatusColor(status), children: `${status}` }) }),
148
+ showSpinner && /* @__PURE__ */ jsxs(Fragment, { children: [
149
+ /* @__PURE__ */ jsx(Text, { children: " " }),
150
+ /* @__PURE__ */ jsx(Spinner, { type: "dots" })
151
+ ] })
152
+ ] });
153
+ const JobStatusTable = ({ jobId, projectId, isWatching, onJobUpdate }) => {
154
+ const { data: job, stage, isLoading } = useJobWatching({ projectId, jobId, isWatching, onJobUpdate });
155
+ const [time, setTime] = useState(DateTime.now());
156
+ useEffect(() => {
157
+ if (!isWatching) return;
158
+ const interval = setInterval(() => setTime(DateTime.now()), 1e3);
159
+ return () => {
160
+ clearInterval(interval);
161
+ };
162
+ }, []);
163
+ const isJobInProgress = job && ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
164
+ const summary = job ? getJobSummary(job, time) : null;
165
+ const buildSummary = job && job.build ? getBuildSummary(job.build) : null;
166
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
167
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
168
+ /* @__PURE__ */ jsx(Title, { children: "Job Details" }),
169
+ isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
170
+ summary && job && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
171
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
172
+ /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: summary.id }),
173
+ /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: summary.platform }),
174
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
175
+ /* @__PURE__ */ jsx(StatusRowLabel, { label: "Status" }),
176
+ /* @__PURE__ */ jsx(JobStatusSpinner, { status: job.status, showSpinner: isWatching && !!isJobInProgress })
177
+ ] }),
178
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
179
+ /* @__PURE__ */ jsx(StatusRowLabel, { label: "Stage" }),
180
+ stage && /* @__PURE__ */ jsx(Text, { color: getStageColor(stage), children: `${stage}` })
181
+ ] })
182
+ ] }),
183
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
184
+ /* @__PURE__ */ jsx(StatusRow, { label: "Version", value: summary.version }),
185
+ /* @__PURE__ */ jsx(StatusRow, { label: "Git Info", value: summary.gitInfo }),
186
+ /* @__PURE__ */ jsx(StatusRow, { label: "Started At", value: summary.createdAt }),
187
+ /* @__PURE__ */ jsx(StatusRow, { label: "Runtime", value: summary.runtime })
188
+ ] })
189
+ ] })
190
+ ] }),
191
+ buildSummary && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 3, borderStyle: "single", padding: 1, children: [
192
+ /* @__PURE__ */ jsx(Title, { children: "Build Details" }),
193
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
194
+ /* @__PURE__ */ jsx(StatusRow, { label: "ID", value: buildSummary.id }),
195
+ /* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: buildSummary.platform }),
196
+ /* @__PURE__ */ jsx(StatusRow, { label: "Type", value: buildSummary.type }),
197
+ /* @__PURE__ */ jsx(StatusRow, { label: "CMD", value: buildSummary.cmd })
198
+ ] })
199
+ ] })
200
+ ] });
201
+ };
202
+
203
+ export { JobStatusTable as J, JobLogTail as a };
@@ -10,11 +10,11 @@ import 'node:url';
10
10
  import 'react';
11
11
  import 'axios';
12
12
  import '@tanstack/react-query';
13
- import './index-BB7X1Pqp.js';
13
+ import './index-Dhx6FAHt.js';
14
14
  import 'crypto-js';
15
15
  import 'uuid';
16
16
  import 'luxon';
17
- import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-vjedBbKl.js';
17
+ import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-CI_AoXmH.js';
18
18
  import 'fast-glob';
19
19
  import 'yazl';
20
20
  import 'socket.io-client';
@@ -10,14 +10,14 @@ import 'node:url';
10
10
  import 'react';
11
11
  import axios from 'axios';
12
12
  import { useQuery } from '@tanstack/react-query';
13
- import { b as getShortDate, p as getAuthedHeaders, q as API_URL, K as castArrayObjectDates } from './index-BB7X1Pqp.js';
13
+ import { b as getShortDate, p as getAuthedHeaders, q as API_URL, L as castArrayObjectDates } from './index-Dhx6FAHt.js';
14
14
  import 'crypto-js';
15
15
  import 'uuid';
16
16
  import 'luxon';
17
17
  import 'fast-glob';
18
18
  import 'yazl';
19
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
20
- import { g as getShortUUID } from './index-Cz_KLwWf.js';
19
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-L4oozjag.js';
20
+ import { g as getShortUUID } from './index-Dj-chiHz.js';
21
21
  import 'socket.io-client';
22
22
  import 'isomorphic-git';
23
23
  import '@oclif/core';
@@ -1,4 +1,4 @@
1
- import { B as BaseAuthenticatedCommand } from './index-BB7X1Pqp.js';
1
+ import { B as BaseAuthenticatedCommand } from './index-Dhx6FAHt.js';
2
2
 
3
3
  class BaseAppleCommand extends BaseAuthenticatedCommand {
4
4
  async init() {
@@ -1,5 +1,5 @@
1
- import { c as BaseGameCommand, O as getGodotAndroidPackageName, Q as getGoogleStatus } from './index-BB7X1Pqp.js';
2
- import { b as generatePackageName, a as getInput } from './index-Cz_KLwWf.js';
1
+ import { c as BaseGameCommand, Q as getGodotAndroidPackageName, R as getGoogleStatus } from './index-Dhx6FAHt.js';
2
+ import { b as generatePackageName, a as getInput } from './index-Dj-chiHz.js';
3
3
 
4
4
  class BaseGameAndroidCommand extends BaseGameCommand {
5
5
  async init() {
@@ -1,10 +1,10 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
- import { P as Platform, C as CredentialsType, A as ApiKey, a as ApiKeyType, U as UserRole } from '../../../index-BB7X1Pqp.js';
5
- import { g as getUserCredentials } from '../../../index-DOgF4dFK.js';
4
+ import { P as Platform, C as CredentialsType, A as ApiKey, a as ApiKeyType, U as UserRole } from '../../../index-Dhx6FAHt.js';
5
+ import { g as getUserCredentials } from '../../../index-B4v66AKo.js';
6
6
  import 'react';
7
- import { C as Command } from '../../../Command-BiB9MqbJ.js';
7
+ import { C as Command } from '../../../Command-zfJ7qIJI.js';
8
8
  import 'ink-spinner';
9
9
  import 'axios';
10
10
  import 'crypto-js';
@@ -27,14 +27,14 @@ import 'qrcode';
27
27
  import { R as RunWithSpinner } from '../../../RunWithSpinner-BVXNWGD3.js';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
- import { B as BaseAppleCommand } from '../../../baseAppleCommand-B9wyIqdL.js';
31
- import { u as uploadUserCredentials } from '../../../upload-2naN75Zu.js';
30
+ import { B as BaseAppleCommand } from '../../../baseAppleCommand-BGXyWK-R.js';
31
+ import { u as uploadUserCredentials } from '../../../upload-DZCIfnwf.js';
32
32
  import 'path';
33
33
  import '@expo/apple-utils/build/index.js';
34
34
  import 'ini';
35
35
  import 'deepmerge';
36
- import '../../../index-Cz_KLwWf.js';
37
- import '../../../useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
36
+ import '../../../index-Dj-chiHz.js';
37
+ import '../../../useAndroidServiceAccountTestResult-L4oozjag.js';
38
38
  import 'marked';
39
39
  import 'marked-terminal';
40
40
 
@@ -2,10 +2,10 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
4
  import * as fs from 'fs';
5
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BB7X1Pqp.js';
6
- import { g as getUserCredentials } from '../../../index-DOgF4dFK.js';
5
+ import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-Dhx6FAHt.js';
6
+ import { g as getUserCredentials } from '../../../index-B4v66AKo.js';
7
7
  import 'react';
8
- import { C as Command } from '../../../Command-BiB9MqbJ.js';
8
+ import { C as Command } from '../../../Command-zfJ7qIJI.js';
9
9
  import 'ink-spinner';
10
10
  import 'axios';
11
11
  import 'crypto-js';
@@ -27,13 +27,13 @@ import 'qrcode';
27
27
  import { R as RunWithSpinner } from '../../../RunWithSpinner-BVXNWGD3.js';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
- import { e as exportCredential } from '../../../export-rS9o87LD.js';
30
+ import { e as exportCredential } from '../../../export-Cin4rLWR.js';
31
31
  import 'path';
32
32
  import '@expo/apple-utils/build/index.js';
33
33
  import 'ini';
34
34
  import 'deepmerge';
35
- import '../../../index-Cz_KLwWf.js';
36
- import '../../../useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
35
+ import '../../../index-Dj-chiHz.js';
36
+ import '../../../useAndroidServiceAccountTestResult-L4oozjag.js';
37
37
  import 'marked';
38
38
  import 'marked-terminal';
39
39
 
@@ -2,10 +2,10 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
4
  import * as fs from 'fs';
5
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BB7X1Pqp.js';
6
- import { g as getUserCredentials } from '../../../index-DOgF4dFK.js';
5
+ import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-Dhx6FAHt.js';
6
+ import { g as getUserCredentials } from '../../../index-B4v66AKo.js';
7
7
  import 'react';
8
- import { C as Command } from '../../../Command-BiB9MqbJ.js';
8
+ import { C as Command } from '../../../Command-zfJ7qIJI.js';
9
9
  import 'ink-spinner';
10
10
  import 'axios';
11
11
  import 'crypto-js';
@@ -27,13 +27,13 @@ import 'qrcode';
27
27
  import { R as RunWithSpinner } from '../../../RunWithSpinner-BVXNWGD3.js';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
- import { i as importCredential } from '../../../import-v54PM_Qg.js';
30
+ import { i as importCredential } from '../../../import-CXTv9E84.js';
31
31
  import 'path';
32
32
  import '@expo/apple-utils/build/index.js';
33
33
  import 'ini';
34
34
  import 'deepmerge';
35
- import '../../../index-Cz_KLwWf.js';
36
- import '../../../useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
35
+ import '../../../index-Dj-chiHz.js';
36
+ import '../../../useAndroidServiceAccountTestResult-L4oozjag.js';
37
37
  import 'marked';
38
38
  import 'marked-terminal';
39
39
 
@@ -1,9 +1,9 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { Box, Text, render } from 'ink';
4
- import { b as getShortDate, A as ApiKey, C as CredentialsType, P as Platform, B as BaseAuthenticatedCommand } from '../../../index-BB7X1Pqp.js';
4
+ import { b as getShortDate, A as ApiKey, C as CredentialsType, P as Platform, B as BaseAuthenticatedCommand } from '../../../index-Dhx6FAHt.js';
5
5
  import 'react';
6
- import { C as Command } from '../../../Command-BiB9MqbJ.js';
6
+ import { C as Command } from '../../../Command-zfJ7qIJI.js';
7
7
  import Spinner from 'ink-spinner';
8
8
  import 'axios';
9
9
  import 'crypto-js';
@@ -25,7 +25,7 @@ import 'open';
25
25
  import 'qrcode';
26
26
  import 'string-length';
27
27
  import 'strip-ansi';
28
- import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-TflQvTEP.js';
28
+ import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-DzyAHhLB.js';
29
29
  import { T as Table } from '../../../Table-CvM6pccN.js';
30
30
  import { T as Title } from '../../../Title-BCQtayg6.js';
31
31
  import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
@@ -33,8 +33,8 @@ import 'path';
33
33
  import '@expo/apple-utils/build/index.js';
34
34
  import 'ini';
35
35
  import 'deepmerge';
36
- import '../../../index-Cz_KLwWf.js';
37
- import '../../../useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
36
+ import '../../../index-Dj-chiHz.js';
37
+ import '../../../useAndroidServiceAccountTestResult-L4oozjag.js';
38
38
  import 'marked';
39
39
  import 'marked-terminal';
40
40
 
@@ -1,10 +1,10 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
- import { m as CertificateType, l as Certificate, P as Platform, C as CredentialsType } from '../../../index-BB7X1Pqp.js';
5
- import { g as getUserCredentials } from '../../../index-DOgF4dFK.js';
4
+ import { m as CertificateType, l as Certificate, P as Platform, C as CredentialsType } from '../../../index-Dhx6FAHt.js';
5
+ import { g as getUserCredentials } from '../../../index-B4v66AKo.js';
6
6
  import 'react';
7
- import { C as Command } from '../../../Command-BiB9MqbJ.js';
7
+ import { C as Command } from '../../../Command-zfJ7qIJI.js';
8
8
  import 'ink-spinner';
9
9
  import 'axios';
10
10
  import 'crypto-js';
@@ -28,14 +28,14 @@ import { R as RunWithSpinner } from '../../../RunWithSpinner-BVXNWGD3.js';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
30
  import forge from 'node-forge';
31
- import { B as BaseAppleCommand } from '../../../baseAppleCommand-B9wyIqdL.js';
32
- import { u as uploadUserCredentials } from '../../../upload-2naN75Zu.js';
31
+ import { B as BaseAppleCommand } from '../../../baseAppleCommand-BGXyWK-R.js';
32
+ import { u as uploadUserCredentials } from '../../../upload-DZCIfnwf.js';
33
33
  import 'path';
34
34
  import '@expo/apple-utils/build/index.js';
35
35
  import 'ini';
36
36
  import 'deepmerge';
37
- import '../../../index-Cz_KLwWf.js';
38
- import '../../../useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
37
+ import '../../../index-Dj-chiHz.js';
38
+ import '../../../useAndroidServiceAccountTestResult-L4oozjag.js';
39
39
  import 'marked';
40
40
  import 'marked-terminal';
41
41
 
@@ -2,10 +2,10 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
4
  import * as fs from 'fs';
5
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BB7X1Pqp.js';
6
- import { g as getUserCredentials } from '../../../index-DOgF4dFK.js';
5
+ import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-Dhx6FAHt.js';
6
+ import { g as getUserCredentials } from '../../../index-B4v66AKo.js';
7
7
  import 'react';
8
- import { C as Command } from '../../../Command-BiB9MqbJ.js';
8
+ import { C as Command } from '../../../Command-zfJ7qIJI.js';
9
9
  import 'ink-spinner';
10
10
  import 'axios';
11
11
  import 'crypto-js';
@@ -27,13 +27,13 @@ import 'qrcode';
27
27
  import { R as RunWithSpinner } from '../../../RunWithSpinner-BVXNWGD3.js';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
- import { e as exportCredential } from '../../../export-rS9o87LD.js';
30
+ import { e as exportCredential } from '../../../export-Cin4rLWR.js';
31
31
  import 'path';
32
32
  import '@expo/apple-utils/build/index.js';
33
33
  import 'ini';
34
34
  import 'deepmerge';
35
- import '../../../index-Cz_KLwWf.js';
36
- import '../../../useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
35
+ import '../../../index-Dj-chiHz.js';
36
+ import '../../../useAndroidServiceAccountTestResult-L4oozjag.js';
37
37
  import 'marked';
38
38
  import 'marked-terminal';
39
39