shipthis 0.1.31 → 0.1.32

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 (84) hide show
  1. package/dist/{AppleBundleIdDetails-eoK5F8Qn.js → AppleBundleIdDetails-6H3cNWxw.js} +17 -19
  2. package/dist/Command-WPpmLPkL.js +29 -0
  3. package/dist/CommandGame-cxzWG4nT.js +7 -0
  4. package/dist/{Create-ISdroJ3G.js → Create-3Ob8sjik.js} +20 -20
  5. package/dist/GameStatus-BQEtVKvv.js +137 -0
  6. package/dist/{Import-CfThJF6k.js → Import-CFuPDI0K.js} +33 -35
  7. package/dist/{JobLogTail-BWzbQBZz.js → JobLogTail-0CBLoG8N.js} +53 -52
  8. package/dist/{JobProgress-DjIkuk5U.js → JobProgress-lKqVT88m.js} +35 -36
  9. package/dist/{JobStatusTable-CEqWU73q.js → JobStatusTable-C_ZsZJCm.js} +14 -13
  10. package/dist/{NextSteps-CK9zHOCt.js → NextSteps-DbJHmscQ.js} +1 -3
  11. package/dist/{ProgressSpinner-6pw1T8Iw.js → ProgressSpinner-DGcakQSK.js} +1 -1
  12. package/dist/{ProjectCredentialsTable-u9ruZ9mN.js → ProjectCredentialsTable-B5pHOnGu.js} +11 -10
  13. package/dist/{StatusTable-Dm5St4g-.js → StatusTable-DzRWcMr4.js} +7 -9
  14. package/dist/{Table-CvM6pccN.js → Table-FaNgpyeq.js} +15 -15
  15. package/dist/{UserCredentialsTable-Q7u9M-ap.js → UserCredentialsTable-3W3qesh7.js} +18 -19
  16. package/dist/{baseAppleCommand-zhkGlKq0.js → baseAppleCommand-BGV088--.js} +1 -1
  17. package/dist/{baseGameAndroidCommand-DJ-cMLa_.js → baseGameAndroidCommand-CsemgVjp.js} +23 -23
  18. package/dist/commands/apple/apiKey/create.js +35 -35
  19. package/dist/commands/apple/apiKey/export.js +26 -26
  20. package/dist/commands/apple/apiKey/import.js +27 -27
  21. package/dist/commands/apple/apiKey/status.js +31 -31
  22. package/dist/commands/apple/certificate/create.js +39 -39
  23. package/dist/commands/apple/certificate/export.js +26 -26
  24. package/dist/commands/apple/certificate/import.js +27 -27
  25. package/dist/commands/apple/certificate/status.js +31 -31
  26. package/dist/commands/apple/login.js +15 -16
  27. package/dist/commands/apple/status.js +27 -27
  28. package/dist/commands/dashboard.js +10 -11
  29. package/dist/commands/game/android/apiKey/connect.js +28 -28
  30. package/dist/commands/game/android/apiKey/create.js +28 -28
  31. package/dist/commands/game/android/apiKey/export.js +29 -29
  32. package/dist/commands/game/android/apiKey/import.js +31 -31
  33. package/dist/commands/game/android/apiKey/invite.js +14 -15
  34. package/dist/commands/game/android/apiKey/status.js +29 -29
  35. package/dist/commands/game/android/keyStore/create.js +24 -24
  36. package/dist/commands/game/android/keyStore/export.js +28 -28
  37. package/dist/commands/game/android/keyStore/import.js +35 -35
  38. package/dist/commands/game/android/keyStore/status.js +26 -26
  39. package/dist/commands/game/android/status.js +14 -58
  40. package/dist/commands/game/build/download.js +24 -24
  41. package/dist/commands/game/build/list.js +37 -37
  42. package/dist/commands/game/create.js +15 -16
  43. package/dist/commands/game/details.js +35 -36
  44. package/dist/commands/game/export.js +12 -13
  45. package/dist/commands/game/ios/app/addTester.js +24 -24
  46. package/dist/commands/game/ios/app/create.js +24 -24
  47. package/dist/commands/game/ios/app/status.js +29 -29
  48. package/dist/commands/game/ios/app/sync.js +31 -31
  49. package/dist/commands/game/ios/profile/create.js +30 -30
  50. package/dist/commands/game/ios/profile/export.js +28 -28
  51. package/dist/commands/game/ios/profile/import.js +32 -32
  52. package/dist/commands/game/ios/profile/status.js +36 -36
  53. package/dist/commands/game/ios/status.js +46 -58
  54. package/dist/commands/game/ios/wizard.js +31 -31
  55. package/dist/commands/game/job/list.js +34 -34
  56. package/dist/commands/game/job/status.js +31 -31
  57. package/dist/commands/game/list.js +37 -39
  58. package/dist/commands/game/ship.js +73 -71
  59. package/dist/commands/game/status.js +38 -85
  60. package/dist/commands/game/wizard.js +250 -239
  61. package/dist/commands/internal/fastlane.js +15 -18
  62. package/dist/commands/internal/readme.js +38 -37
  63. package/dist/commands/login.js +14 -15
  64. package/dist/commands/status.js +32 -30
  65. package/dist/{export-DZxo2_e_.js → export-CXsVPXA1.js} +5 -5
  66. package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
  67. package/dist/{import-8pL1AF47.js → import-DGvG5REx.js} +14 -14
  68. package/dist/{index-w3lHxk5O.js → index-BhhiXbey.js} +240 -224
  69. package/dist/{index-BHh0BZvD.js → index-C03TV1_J.js} +37 -55
  70. package/dist/{index-CyvGh-kt.js → index-C66Dd8Xc.js} +77 -87
  71. package/dist/{index-DJ078v-U.js → index-CGBdOm1q.js} +43 -28
  72. package/dist/{index-DKQjnJrC.js → index-CS9Gwcb0.js} +41 -43
  73. package/dist/{index-C6aAyrXW.js → index-CtTI85m-.js} +6 -6
  74. package/dist/{upload-BTpxj3QP.js → upload-8y5MQEm9.js} +22 -22
  75. package/dist/{useAndroidServiceAccountTestResult-Dy3Ag7_r.js → useAndroidServiceAccountTestResult-DZk5SMxI.js} +11 -13
  76. package/dist/{useAppleApp-h1Ogi_qc.js → useAppleApp-DWYGURwU.js} +4 -4
  77. package/dist/{useAppleBundleId-B3TTNap0.js → useAppleBundleId-PsTJ2g1B.js} +6 -6
  78. package/dist/{useProjectCredentials-DpeXZcHP.js → useProjectCredentials-BEphqa18.js} +10 -12
  79. package/dist/{useWebSocket-gyuCsore.js → useWebSocket-5PYa2QER.js} +1 -1
  80. package/dist/utils/help.js +4 -4
  81. package/package.json +4 -3
  82. package/dist/Command-DFdHXDiU.js +0 -44
  83. package/dist/CommandGame-Dif-oSky.js +0 -9
  84. package/dist/{RunWithSpinner-BVXNWGD3.js → RunWithSpinner-gMVA07bZ.js} +2 -2
@@ -1,48 +1,48 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { useInput, Box, Text, render } from 'ink';
4
- import { L as LogLevel, a2 as getShortAuthRequiredUrl, W as WEB_URL, c as BaseGameCommand, E as getJob, H as downloadBuildById } from '../../index-w3lHxk5O.js';
5
- import { useContext, useState, useEffect } from 'react';
6
- import { d as CommandContext, b as GameContext, M as Markdown } from '../../index-CyvGh-kt.js';
4
+ import { M as LogLevel, a2 as getShortAuthRequiredUrl, W as WEB_URL, c as BaseGameCommand, z as getJob, H as downloadBuildById } from '../../index-BhhiXbey.js';
7
5
  import 'ink-spinner';
8
- import '@inkjs/ui';
9
- import axios from 'axios';
10
- import '@tanstack/react-query';
11
- import 'fs';
12
- import 'uuid';
13
- import 'yazl';
14
- import 'crypto';
15
- import 'readline-sync';
16
- import 'node:readline';
6
+ import 'node:crypto';
7
+ import 'node:fs';
17
8
  import 'node:path';
9
+ import 'node:readline';
18
10
  import 'node:url';
11
+ import 'readline-sync';
19
12
  import 'luxon';
13
+ import axios from 'axios';
20
14
  import 'isomorphic-git';
15
+ import '@tanstack/react-query';
16
+ import { useContext, useState, useEffect } from 'react';
21
17
  import 'fast-glob';
18
+ import 'uuid';
19
+ import 'yazl';
22
20
  import 'socket.io-client';
23
- import open from 'open';
24
- import 'marked';
25
- import 'marked-terminal';
26
- import 'path';
27
- import 'qrcode';
21
+ import 'fullscreen-ink';
28
22
  import 'string-length';
29
23
  import 'strip-ansi';
30
- import { C as CommandGame } from '../../CommandGame-Dif-oSky.js';
31
- import { g as getShortUUID } from '../../index-DJ078v-U.js';
32
- import { u as useShip, J as JobProgress } from '../../JobProgress-DjIkuk5U.js';
24
+ import open from 'open';
25
+ import { g as getShortUUID } from '../../index-CGBdOm1q.js';
33
26
  import 'crypto-js';
34
- import { u as useJobWatching, J as JobLogTail } from '../../JobLogTail-BWzbQBZz.js';
35
- import { J as JobStatusTable } from '../../JobStatusTable-CEqWU73q.js';
27
+ import { u as useJobWatching, J as JobLogTail } from '../../JobLogTail-0CBLoG8N.js';
28
+ import { J as JobStatusTable } from '../../JobStatusTable-C_ZsZJCm.js';
29
+ import '@inkjs/ui';
30
+ import { u as useShip, J as JobProgress } from '../../JobProgress-lKqVT88m.js';
31
+ import { C as CommandContext, G as GameContext, M as Markdown } from '../../index-C66Dd8Xc.js';
32
+ import 'qrcode';
33
+ import 'marked';
34
+ import 'marked-terminal';
35
+ import { C as CommandGame } from '../../CommandGame-cxzWG4nT.js';
36
36
  import '@expo/apple-utils/build/index.js';
37
- import 'ini';
38
37
  import 'deepmerge';
39
- import '../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
40
- import '../../Command-DFdHXDiU.js';
41
- import '../../git-DREGq-jc.js';
42
- import '../../ProgressSpinner-6pw1T8Iw.js';
43
- import '../../useWebSocket-gyuCsore.js';
38
+ import 'ini';
39
+ import '../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
+ import '../../useWebSocket-5PYa2QER.js';
44
41
  import '../../Title-BCQtayg6.js';
45
- import '../../StatusTable-Dm5St4g-.js';
42
+ import '../../StatusTable-DzRWcMr4.js';
43
+ import '../../git-BpsfNFZ_.js';
44
+ import '../../ProgressSpinner-DGcakQSK.js';
45
+ import '../../Command-WPpmLPkL.js';
46
46
 
47
47
  function isNetworkError(exception) {
48
48
  if (!axios.isAxiosError(exception)) return false;
@@ -66,17 +66,17 @@ function getErrorMessage(error) {
66
66
  }
67
67
  }
68
68
 
69
- const JobFollow = ({ projectId, jobId, onComplete, onFailure }) => {
69
+ const JobFollow = ({ jobId, onComplete, onFailure, projectId }) => {
70
70
  useJobWatching({
71
- projectId,
72
- jobId,
73
71
  isWatching: true,
74
- onNewLogEntry: (logEntry) => {
72
+ jobId,
73
+ onComplete,
74
+ onFailure,
75
+ onNewLogEntry(logEntry) {
75
76
  if (logEntry.level == LogLevel.ERROR) console.error(logEntry.message);
76
77
  else console.log(logEntry.message);
77
78
  },
78
- onComplete,
79
- onFailure
79
+ projectId
80
80
  });
81
81
  return null;
82
82
  };
@@ -103,14 +103,16 @@ const Ship = ({ onComplete, onError }) => {
103
103
  useInput(async (input) => {
104
104
  if (!gameId) return;
105
105
  switch (input) {
106
- case "l":
106
+ case "l": {
107
107
  setShowLog((prev) => !prev);
108
108
  break;
109
- case "b":
110
- const dashUrl = jobs?.length !== 1 ? `/games/${gameId}` : `/games/${gameId}/job/${jobs[0].id}`;
109
+ }
110
+ case "b": {
111
+ const dashUrl = jobs?.length === 1 ? `/games/${gameId}/job/${jobs[0].id}` : `/games/${gameId}`;
111
112
  const url = await getShortAuthRequiredUrl(dashUrl);
112
113
  await open(url);
113
114
  break;
115
+ }
114
116
  }
115
117
  });
116
118
  const handleJobComplete = (job) => {
@@ -134,16 +136,16 @@ const Ship = ({ onComplete, onError }) => {
134
136
  if (!gameId) return /* @__PURE__ */ jsx(Fragment, {});
135
137
  if (flags?.follow) {
136
138
  if (jobs && jobs.length > 0) {
137
- return /* @__PURE__ */ jsx(JobFollow, { projectId: gameId, jobId: jobs[0].id, onComplete: handleJobComplete, onFailure: handleJobFailure });
139
+ return /* @__PURE__ */ jsx(JobFollow, { jobId: jobs[0].id, onComplete: handleJobComplete, onFailure: handleJobFailure, projectId: gameId });
138
140
  }
139
141
  return /* @__PURE__ */ jsx(Fragment, {});
140
142
  }
141
143
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
142
144
  jobs == null && /* @__PURE__ */ jsx(Text, { children: shipLog }),
143
145
  jobs && jobs.map((job) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
144
- /* @__PURE__ */ jsx(JobStatusTable, { jobId: job.id, projectId: job.project.id, isWatching: true }),
146
+ /* @__PURE__ */ jsx(JobStatusTable, { isWatching: true, jobId: job.id, projectId: job.project.id }),
145
147
  /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: /* @__PURE__ */ jsx(JobProgress, { job, onComplete: handleJobComplete, onFailure: handleJobFailure }) }),
146
- showLog && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(JobLogTail, { jobId: job.id, projectId: job.project.id, isWatching: true, length: 10 }) })
148
+ showLog && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(JobLogTail, { isWatching: true, jobId: job.id, length: 10, projectId: job.project.id }) })
147
149
  ] }, job.id)),
148
150
  jobs && !isComplete && /* @__PURE__ */ jsxs(Fragment, { children: [
149
151
  /* @__PURE__ */ jsx(Text, { children: "Press L to show and hide the job logs." }),
@@ -151,13 +153,13 @@ const Ship = ({ onComplete, onError }) => {
151
153
  /* @__PURE__ */ jsx(Text, { bold: true, children: "Please wait while ShipThis builds your game..." })
152
154
  ] }),
153
155
  isComplete && /* @__PURE__ */ jsxs(Fragment, { children: [
154
- failedJobs.length == 0 && /* @__PURE__ */ jsx(
156
+ failedJobs.length === 0 && /* @__PURE__ */ jsx(
155
157
  Markdown,
156
158
  {
157
159
  filename: "ship-success.md",
158
160
  templateVars: {
159
- wasPublished: flags?.skipPublish ? false : true,
160
- gameBuildsUrl: `${WEB_URL}games/${getShortUUID(gameId)}/builds`
161
+ gameBuildsUrl: `${WEB_URL}games/${getShortUUID(gameId)}/builds`,
162
+ wasPublished: !flags?.skipPublish
161
163
  }
162
164
  }
163
165
  ),
@@ -171,7 +173,7 @@ const Ship = ({ onComplete, onError }) => {
171
173
  }
172
174
  }
173
175
  ),
174
- /* @__PURE__ */ jsx(Box, { marginTop: 1, children: failedJobs.map((fj) => /* @__PURE__ */ jsx(JobLogTail, { jobId: fj.id, projectId: fj.project.id, isWatching: false, length: 10 }, fj.id)) })
176
+ /* @__PURE__ */ jsx(Box, { marginTop: 1, children: failedJobs.map((fj) => /* @__PURE__ */ jsx(JobLogTail, { isWatching: false, jobId: fj.id, length: 10, projectId: fj.project.id }, fj.id)) })
175
177
  ] })
176
178
  ] })
177
179
  ] });
@@ -179,45 +181,45 @@ const Ship = ({ onComplete, onError }) => {
179
181
 
180
182
  class GameShip extends BaseGameCommand {
181
183
  static args = {};
184
+ static description = "Builds the app (for all platforms with valid credentials) and ships it to the stores.";
185
+ static examples = [
186
+ "<%= config.bin %> <%= command.id %>",
187
+ "<%= config.bin %> <%= command.id %> --platform ios",
188
+ "<%= config.bin %> <%= command.id %> --platform android --skipPublish",
189
+ "<%= config.bin %> <%= command.id %> --platform android --download game.aab",
190
+ "<%= config.bin %> <%= command.id %> --platform android --follow --downloadAPK game.apk"
191
+ ];
182
192
  static flags = {
183
193
  ...BaseGameCommand.flags,
184
- platform: Flags.string({
185
- description: 'The platform to ship the game to. This can be "android" or "ios"',
186
- required: false,
187
- options: ["android", "ios"]
188
- }),
189
- skipPublish: Flags.boolean({
190
- description: "Skip the publish step",
191
- required: false,
192
- default: false
193
- }),
194
194
  download: Flags.string({
195
+ dependsOn: ["platform"],
195
196
  description: "Download the build artifact to the specified file",
196
- required: false,
197
- dependsOn: ["platform"]
197
+ required: false
198
198
  }),
199
199
  downloadAPK: Flags.string({
200
+ dependsOn: ["platform"],
200
201
  description: "Download the APK artifact (if available) to the specified file",
201
- required: false,
202
- dependsOn: ["platform"]
202
+ required: false
203
203
  }),
204
204
  follow: Flags.boolean({
205
+ dependsOn: ["platform"],
205
206
  description: "Follow the job logs in real-time. Requires --platform to be specified.",
206
- required: false,
207
- dependsOn: ["platform"]
207
+ required: false
208
+ }),
209
+ platform: Flags.string({
210
+ description: 'The platform to ship the game to. This can be "android" or "ios"',
211
+ options: ["android", "ios"],
212
+ required: false
213
+ }),
214
+ skipPublish: Flags.boolean({
215
+ default: false,
216
+ description: "Skip the publish step",
217
+ required: false
208
218
  })
209
219
  };
210
- static description = "Builds the app (for all platforms with valid credentials) and ships it to the stores.";
211
- static examples = [
212
- "<%= config.bin %> <%= command.id %>",
213
- "<%= config.bin %> <%= command.id %> --platform ios",
214
- "<%= config.bin %> <%= command.id %> --platform android --skipPublish",
215
- "<%= config.bin %> <%= command.id %> --platform android --download game.aab",
216
- "<%= config.bin %> <%= command.id %> --platform android --follow --downloadAPK game.apk"
217
- ];
218
220
  async run() {
219
221
  await this.ensureWeAreInAProjectDir();
220
- const gameId = await this.getGameId();
222
+ const gameId = this.getGameId();
221
223
  if (!gameId) {
222
224
  this.error("No game ID found");
223
225
  }
@@ -232,7 +234,7 @@ class GameShip extends BaseGameCommand {
232
234
  if (attempt < MAX_RETRIES) await new Promise((res) => setTimeout(res, RETRY_DELAY_MS));
233
235
  }
234
236
  if (!job?.builds || job.builds.length === 0) this.error("No builds found for this job after multiple attempts");
235
- const platform = this.flags.platform;
237
+ const { platform } = this.flags;
236
238
  const type = platform === "android" ? this.flags.downloadAPK ? "APK" : "AAB" : "IPA";
237
239
  const build = job.builds.find((b) => b.buildType === type);
238
240
  if (!build) this.error(`No build found for type ${type}`);
@@ -1,115 +1,68 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { render } from 'ink';
1
+ import { jsx } from 'react/jsx-runtime';
3
2
  import { Flags } from '@oclif/core';
4
- import 'react';
5
- import '../../index-CyvGh-kt.js';
6
- import { B as BaseAuthenticatedCommand, F as getProject, P as Platform, k as getProjectPlatformProgress, b as getShortDate } from '../../index-w3lHxk5O.js';
3
+ import { render } from 'ink';
4
+ import { B as BaseAuthenticatedCommand } from '../../index-BhhiXbey.js';
7
5
  import 'ink-spinner';
8
- import '@inkjs/ui';
6
+ import 'node:crypto';
7
+ import 'node:fs';
8
+ import 'node:path';
9
+ import 'node:readline';
10
+ import 'node:url';
11
+ import 'readline-sync';
12
+ import 'luxon';
9
13
  import 'axios';
14
+ import 'isomorphic-git';
10
15
  import '@tanstack/react-query';
11
- import 'fs';
16
+ import 'react';
17
+ import 'crypto-js';
12
18
  import 'uuid';
19
+ import 'fast-glob';
13
20
  import 'yazl';
14
- import { g as getShortUUID, m as makeHumanReadable } from '../../index-DJ078v-U.js';
21
+ import 'socket.io-client';
22
+ import 'fullscreen-ink';
23
+ import { a as GameStatus$1 } from '../../GameStatus-BQEtVKvv.js';
24
+ import 'string-length';
25
+ import 'strip-ansi';
15
26
  import 'open';
27
+ import '@inkjs/ui';
16
28
  import 'marked';
17
29
  import 'marked-terminal';
18
- import 'path';
19
- import { N as NextSteps } from '../../NextSteps-CK9zHOCt.js';
20
30
  import 'qrcode';
21
- import { S as StatusTable } from '../../StatusTable-Dm5St4g-.js';
22
- import 'string-length';
23
- import 'strip-ansi';
24
- import 'luxon';
25
- import 'fast-glob';
26
- import { C as Command } from '../../Command-DFdHXDiU.js';
27
- import 'socket.io-client';
28
- import '../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
31
+ import '../../index-C66Dd8Xc.js';
32
+ import { C as CommandGame } from '../../CommandGame-cxzWG4nT.js';
29
33
  import '@expo/apple-utils/build/index.js';
30
- import 'crypto-js';
31
- import 'crypto';
32
- import 'readline-sync';
33
- import 'node:readline';
34
- import 'node:path';
35
- import 'node:url';
36
- import 'isomorphic-git';
37
- import 'ini';
38
34
  import 'deepmerge';
35
+ import 'ini';
36
+ import '../../index-CGBdOm1q.js';
37
+ import '../../StatusTable-DzRWcMr4.js';
39
38
  import '../../Title-BCQtayg6.js';
39
+ import '../../NextSteps-DbJHmscQ.js';
40
+ import '../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
41
+ import '../../Command-WPpmLPkL.js';
40
42
 
41
- function getSteps(platform, progress) {
42
- if (!progress) return [];
43
- switch (platform) {
44
- case Platform.ANDROID:
45
- return [
46
- !progress.hasCredentialsForPlatform && "shipthis game android keyStore create",
47
- !progress.hasApiKeyForPlatform && "shipthis game android apiKey create",
48
- progress.hasCredentialsForPlatform && progress.hasApiKeyForPlatform && "shipthis game ship"
49
- ].filter(Boolean);
50
- case Platform.IOS:
51
- return [
52
- !progress.hasApiKeyForPlatform && "shipthis apple apiKey create",
53
- !progress.hasCredentialsForPlatform && "shipthis game ios profile create",
54
- progress.hasApiKeyForPlatform && progress.hasCredentialsForPlatform && "shipthis game ship"
55
- ].filter(Boolean);
56
- default:
57
- throw new Error("Invalid platform");
58
- }
59
- }
60
43
  class GameStatus extends BaseAuthenticatedCommand {
61
44
  static args = {};
62
45
  static description = "Shows the status of the current game.";
63
46
  static examples = [
64
47
  "<%= config.bin %> <%= command.id %>",
65
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
48
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4",
49
+ "<%= config.bin %> <%= command.id %> --platform ios"
66
50
  ];
67
51
  static flags = {
68
- gameId: Flags.string({ char: "g", description: "The ID of the game" })
52
+ gameId: Flags.string({ char: "g", description: "The ID of the game" }),
53
+ platform: Flags.string({
54
+ char: "p",
55
+ description: "The platform to check status for (ios, android)",
56
+ options: ["android", "ios"]
57
+ })
69
58
  };
70
59
  async run() {
71
- const gameId = await this.getGameId();
60
+ const gameId = this.getGameId();
72
61
  if (!gameId) {
73
62
  this.error("No game found - please run `shipthis game wizard` or specify a game ID with --gameId", { exit: 1 });
74
63
  }
75
- const game = await getProject(gameId);
76
- const hasConfiguredIos = !!game.details?.iosBundleId;
77
- const hasConfiguredAndroid = !!game.details?.androidPackageName;
78
- let statuses = {
79
- [Platform.IOS]: hasConfiguredIos ? await getProjectPlatformProgress(game.id, Platform.IOS) : null,
80
- [Platform.ANDROID]: hasConfiguredAndroid ? await getProjectPlatformProgress(game.id, Platform.ANDROID) : null
81
- };
82
- let steps = [];
83
- if (hasConfiguredIos) steps = steps.concat(getSteps(Platform.IOS, statuses[Platform.IOS]));
84
- if (hasConfiguredAndroid) steps = steps.concat(getSteps(Platform.ANDROID, statuses[Platform.ANDROID]));
85
- if (!hasConfiguredIos && !hasConfiguredAndroid) {
86
- steps = steps.concat(["shipthis game wizard android", "shipthis game wizard ios"]);
87
- }
88
- const progressToStatuses = (progress) => {
89
- const { platform, ...rest } = progress;
90
- return makeHumanReadable(rest);
91
- };
92
64
  render(
93
- /* @__PURE__ */ jsxs(Command, { command: this, children: [
94
- /* @__PURE__ */ jsx(
95
- StatusTable,
96
- {
97
- marginBottom: 1,
98
- title: "Game Details",
99
- statuses: {
100
- "Game ID": getShortUUID(game.id),
101
- Name: game.name,
102
- Version: `${game.details?.semanticVersion || "0.0.1"}`,
103
- "Build Number": `${game.details?.buildNumber || 1}`,
104
- "Created At": getShortDate(game.createdAt),
105
- "Game Engine": `${game.details?.gameEngine || "godot"} ${game.details?.gameEngineVersion || "4.3"}`
106
- }
107
- }
108
- ),
109
- statuses[Platform.IOS] && /* @__PURE__ */ jsx(StatusTable, { title: "iOS Status", statuses: progressToStatuses(statuses[Platform.IOS]) }),
110
- statuses[Platform.ANDROID] && /* @__PURE__ */ jsx(StatusTable, { title: "Android Status", statuses: progressToStatuses(statuses[Platform.ANDROID]) }),
111
- /* @__PURE__ */ jsx(NextSteps, { steps })
112
- ] })
65
+ /* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(GameStatus$1, { onComplete: (exitCode) => process.exit(exitCode) }) })
113
66
  );
114
67
  }
115
68
  }