shipthis 0.1.30 → 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 (86) hide show
  1. package/README.md +122 -41
  2. package/assets/markdown/create-google-play-game.md +2 -4
  3. package/assets/markdown/ship-success.md +1 -1
  4. package/dist/{AppleBundleIdDetails-Fp5COwTa.js → AppleBundleIdDetails-6H3cNWxw.js} +17 -19
  5. package/dist/{Command-1p5alCz3.js → Command-WPpmLPkL.js} +13 -12
  6. package/dist/CommandGame-cxzWG4nT.js +7 -0
  7. package/dist/{Create-1xAdntNl.js → Create-3Ob8sjik.js} +20 -20
  8. package/dist/GameStatus-BQEtVKvv.js +137 -0
  9. package/dist/{Import-CzC-M4ln.js → Import-CFuPDI0K.js} +33 -35
  10. package/dist/{JobLogTail-CZxoMSd5.js → JobLogTail-0CBLoG8N.js} +53 -52
  11. package/dist/{JobProgress-BjNgtIjm.js → JobProgress-lKqVT88m.js} +46 -37
  12. package/dist/{JobStatusTable-BB-PWlwj.js → JobStatusTable-C_ZsZJCm.js} +14 -13
  13. package/dist/{NextSteps-CK9zHOCt.js → NextSteps-DbJHmscQ.js} +1 -3
  14. package/dist/{ProgressSpinner-6pw1T8Iw.js → ProgressSpinner-DGcakQSK.js} +1 -1
  15. package/dist/{ProjectCredentialsTable-DyZep993.js → ProjectCredentialsTable-B5pHOnGu.js} +11 -10
  16. package/dist/{StatusTable-Dm5St4g-.js → StatusTable-DzRWcMr4.js} +7 -9
  17. package/dist/{Table-CvM6pccN.js → Table-FaNgpyeq.js} +15 -15
  18. package/dist/{UserCredentialsTable-BraKyDWT.js → UserCredentialsTable-3W3qesh7.js} +18 -19
  19. package/dist/{baseAppleCommand-BHRIBtTj.js → baseAppleCommand-BGV088--.js} +1 -1
  20. package/dist/{baseGameAndroidCommand-SrDRbhAG.js → baseGameAndroidCommand-CsemgVjp.js} +23 -23
  21. package/dist/commands/apple/apiKey/create.js +35 -35
  22. package/dist/commands/apple/apiKey/export.js +26 -26
  23. package/dist/commands/apple/apiKey/import.js +27 -27
  24. package/dist/commands/apple/apiKey/status.js +31 -31
  25. package/dist/commands/apple/certificate/create.js +39 -39
  26. package/dist/commands/apple/certificate/export.js +26 -26
  27. package/dist/commands/apple/certificate/import.js +27 -27
  28. package/dist/commands/apple/certificate/status.js +31 -31
  29. package/dist/commands/apple/login.js +15 -15
  30. package/dist/commands/apple/status.js +28 -28
  31. package/dist/commands/dashboard.js +10 -10
  32. package/dist/commands/game/android/apiKey/connect.js +28 -28
  33. package/dist/commands/game/android/apiKey/create.js +28 -28
  34. package/dist/commands/game/android/apiKey/export.js +29 -29
  35. package/dist/commands/game/android/apiKey/import.js +31 -31
  36. package/dist/commands/game/android/apiKey/invite.js +14 -14
  37. package/dist/commands/game/android/apiKey/status.js +29 -29
  38. package/dist/commands/game/android/keyStore/create.js +24 -24
  39. package/dist/commands/game/android/keyStore/export.js +28 -28
  40. package/dist/commands/game/android/keyStore/import.js +35 -35
  41. package/dist/commands/game/android/keyStore/status.js +26 -26
  42. package/dist/commands/game/android/status.js +14 -58
  43. package/dist/commands/game/build/download.js +24 -24
  44. package/dist/commands/game/build/list.js +37 -37
  45. package/dist/commands/game/create.js +15 -15
  46. package/dist/commands/game/details.js +35 -36
  47. package/dist/commands/game/export.js +12 -12
  48. package/dist/commands/game/ios/app/addTester.js +24 -24
  49. package/dist/commands/game/ios/app/create.js +24 -24
  50. package/dist/commands/game/ios/app/status.js +29 -29
  51. package/dist/commands/game/ios/app/sync.js +31 -31
  52. package/dist/commands/game/ios/profile/create.js +30 -30
  53. package/dist/commands/game/ios/profile/export.js +28 -28
  54. package/dist/commands/game/ios/profile/import.js +32 -32
  55. package/dist/commands/game/ios/profile/status.js +36 -36
  56. package/dist/commands/game/ios/status.js +46 -58
  57. package/dist/commands/game/ios/wizard.js +31 -31
  58. package/dist/commands/game/job/list.js +34 -34
  59. package/dist/commands/game/job/status.js +31 -31
  60. package/dist/commands/game/list.js +45 -41
  61. package/dist/commands/game/ship.js +73 -70
  62. package/dist/commands/game/status.js +38 -82
  63. package/dist/commands/game/wizard.js +271 -307
  64. package/dist/commands/internal/fastlane.js +15 -17
  65. package/dist/commands/internal/readme.js +38 -36
  66. package/dist/commands/login.js +14 -14
  67. package/dist/commands/status.js +35 -33
  68. package/dist/{export-BKn02-NH.js → export-CXsVPXA1.js} +5 -5
  69. package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
  70. package/dist/{import-CRMaNBVF.js → import-DGvG5REx.js} +14 -14
  71. package/dist/{index-DxzXU9Hd.js → index-BhhiXbey.js} +244 -221
  72. package/dist/{index-OZi8bvu8.js → index-C03TV1_J.js} +54 -38
  73. package/dist/{index-BTAL7EB_.js → index-C66Dd8Xc.js} +80 -79
  74. package/dist/{index-35Eswf6F.js → index-CGBdOm1q.js} +43 -27
  75. package/dist/{index--EbYyBAZ.js → index-CS9Gwcb0.js} +41 -43
  76. package/dist/{index-u1aj1OQW.js → index-CtTI85m-.js} +6 -6
  77. package/dist/{upload-Bw0zrS4M.js → upload-8y5MQEm9.js} +22 -22
  78. package/dist/{useAndroidServiceAccountTestResult-CJLIEYmA.js → useAndroidServiceAccountTestResult-DZk5SMxI.js} +11 -13
  79. package/dist/{useAppleApp-cnb8gX0x.js → useAppleApp-DWYGURwU.js} +4 -4
  80. package/dist/{useAppleBundleId-B0Etav8g.js → useAppleBundleId-PsTJ2g1B.js} +6 -6
  81. package/dist/{useProjectCredentials-DX3e_PPc.js → useProjectCredentials-BEphqa18.js} +10 -12
  82. package/dist/{useWebSocket-BOCa8v6o.js → useWebSocket-5PYa2QER.js} +1 -1
  83. package/dist/utils/help.js +4 -4
  84. package/package.json +4 -2
  85. package/dist/CommandGame-Z4eUQBjn.js +0 -9
  86. package/dist/{RunWithSpinner-BVXNWGD3.js → RunWithSpinner-gMVA07bZ.js} +2 -2
@@ -1,41 +1,41 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { render, Box, Text } from 'ink';
3
2
  import { Flags } from '@oclif/core';
4
- import { c as BaseGameCommand, z as getProjectJobs } from '../../../index-DxzXU9Hd.js';
5
- import 'react';
6
- import { a as getJobSummary } from '../../../index-BTAL7EB_.js';
3
+ import { render, Box, Text } from 'ink';
4
+ import { DateTime } from 'luxon';
5
+ import { c as BaseGameCommand, y as getProjectJobs } from '../../../index-BhhiXbey.js';
7
6
  import 'ink-spinner';
8
- import '@inkjs/ui';
9
- import 'axios';
7
+ import { c as getJobStatusColor } from '../../../index-CGBdOm1q.js';
8
+ import { T as Table } from '../../../Table-FaNgpyeq.js';
9
+ import { T as Title } from '../../../Title-BCQtayg6.js';
10
+ import 'react';
10
11
  import '@tanstack/react-query';
11
- import 'fs';
12
+ import 'axios';
13
+ import { a as getJobSummary } from '../../../index-C66Dd8Xc.js';
14
+ import 'node:fs';
15
+ import 'fast-glob';
12
16
  import 'uuid';
13
17
  import 'yazl';
14
- import { c as getJobStatusColor } from '../../../index-35Eswf6F.js';
18
+ import 'socket.io-client';
19
+ import 'fullscreen-ink';
20
+ import 'string-length';
21
+ import 'strip-ansi';
15
22
  import 'open';
16
- import { T as Title } from '../../../Title-BCQtayg6.js';
23
+ import '@inkjs/ui';
24
+ import 'node:path';
17
25
  import 'marked';
18
26
  import 'marked-terminal';
19
- import 'path';
20
27
  import 'qrcode';
21
- import { T as Table } from '../../../Table-CvM6pccN.js';
22
- import 'string-length';
23
- import 'strip-ansi';
24
- import { DateTime } from 'luxon';
25
- import 'fast-glob';
26
- import { C as Command } from '../../../Command-1p5alCz3.js';
27
- import 'socket.io-client';
28
- import '@expo/apple-utils/build/index.js';
28
+ import { C as Command } from '../../../Command-WPpmLPkL.js';
29
29
  import 'crypto-js';
30
- import 'crypto';
31
- import 'readline-sync';
30
+ import '@expo/apple-utils/build/index.js';
31
+ import 'node:crypto';
32
32
  import 'node:readline';
33
- import 'node:path';
34
33
  import 'node:url';
34
+ import 'readline-sync';
35
35
  import 'isomorphic-git';
36
- import 'ini';
37
36
  import 'deepmerge';
38
- import '../../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
37
+ import 'ini';
38
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
39
39
 
40
40
  class GameJobList extends BaseGameCommand {
41
41
  static args = {};
@@ -46,20 +46,20 @@ class GameJobList extends BaseGameCommand {
46
46
  ];
47
47
  static flags = {
48
48
  ...super.flags,
49
- pageNumber: Flags.integer({ char: "p", description: "The page number to show (starts at 0)", default: 0 }),
50
- pageSize: Flags.integer({ char: "s", description: "The number of items to show per page", default: 10 }),
49
+ order: Flags.string({
50
+ char: "r",
51
+ default: "desc",
52
+ description: "The order to sort by",
53
+ options: ["asc", "desc"]
54
+ }),
51
55
  orderBy: Flags.string({
52
56
  char: "o",
53
- description: "The field to order by",
54
57
  default: "createdAt",
58
+ description: "The field to order by",
55
59
  options: ["createdAt", "updatedAt"]
56
60
  }),
57
- order: Flags.string({
58
- char: "r",
59
- description: "The order to sort by",
60
- default: "desc",
61
- options: ["asc", "desc"]
62
- })
61
+ pageNumber: Flags.integer({ char: "p", default: 0, description: "The page number to show (starts at 0)" }),
62
+ pageSize: Flags.integer({ char: "s", default: 10, description: "The number of items to show per page" })
63
63
  };
64
64
  async run() {
65
65
  const game = await this.getGame();
@@ -72,7 +72,7 @@ class GameJobList extends BaseGameCommand {
72
72
  render(
73
73
  /* @__PURE__ */ jsxs(Command, { command: this, children: [
74
74
  /* @__PURE__ */ jsx(Title, { children: "Jobs for this game" }),
75
- !hasJobs && /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: "You DO NOT have any jobs for this game." }) }),
75
+ !hasJobs && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: /* @__PURE__ */ jsx(Text, { children: "You DO NOT have any jobs for this game." }) }),
76
76
  hasJobs && /* @__PURE__ */ jsx(
77
77
  Table,
78
78
  {
@@ -83,7 +83,7 @@ class GameJobList extends BaseGameCommand {
83
83
  }
84
84
  }
85
85
  ),
86
- jobListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
86
+ jobListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
87
87
  /* @__PURE__ */ jsx(Text, { children: `Showing page ${flags.pageNumber + 1} of ${jobListResponse.pageCount}.` }),
88
88
  /* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
89
89
  ] })
@@ -1,45 +1,45 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
- import { c as BaseGameCommand, E as getJob, J as JobStatus } from '../../../index-DxzXU9Hd.js';
5
- import 'react';
6
- import '../../../index-BTAL7EB_.js';
4
+ import { c as BaseGameCommand, z as getJob, J as JobStatus } from '../../../index-BhhiXbey.js';
7
5
  import 'ink-spinner';
8
- import '@inkjs/ui';
9
- import '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';
20
14
  import 'isomorphic-git';
15
+ import '@tanstack/react-query';
16
+ import 'react';
21
17
  import 'fast-glob';
18
+ import 'uuid';
19
+ import 'yazl';
22
20
  import 'socket.io-client';
21
+ import 'fullscreen-ink';
22
+ import { J as JobLogTail } from '../../../JobLogTail-0CBLoG8N.js';
23
+ import { J as JobStatusTable } from '../../../JobStatusTable-C_ZsZJCm.js';
23
24
  import 'open';
25
+ import '@inkjs/ui';
24
26
  import 'marked';
25
27
  import 'marked-terminal';
26
- import 'path';
27
- import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
28
+ import { N as NextSteps } from '../../../NextSteps-DbJHmscQ.js';
28
29
  import 'qrcode';
29
30
  import 'string-length';
30
31
  import 'strip-ansi';
31
- import { C as Command } from '../../../Command-1p5alCz3.js';
32
- import { J as JobLogTail } from '../../../JobLogTail-CZxoMSd5.js';
33
- import { J as JobStatusTable } from '../../../JobStatusTable-BB-PWlwj.js';
34
- import '@expo/apple-utils/build/index.js';
32
+ import '../../../index-C66Dd8Xc.js';
33
+ import { C as Command } from '../../../Command-WPpmLPkL.js';
35
34
  import 'crypto-js';
36
- import 'ini';
35
+ import '@expo/apple-utils/build/index.js';
37
36
  import 'deepmerge';
38
- import '../../../index-35Eswf6F.js';
39
- import '../../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
37
+ import 'ini';
38
+ import '../../../index-CGBdOm1q.js';
39
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
+ import '../../../useWebSocket-5PYa2QER.js';
40
41
  import '../../../Title-BCQtayg6.js';
41
- import '../../../useWebSocket-BOCa8v6o.js';
42
- import '../../../StatusTable-Dm5St4g-.js';
42
+ import '../../../StatusTable-DzRWcMr4.js';
43
43
 
44
44
  class GameJobStatus extends BaseGameCommand {
45
45
  static args = {
@@ -53,24 +53,24 @@ class GameJobStatus extends BaseGameCommand {
53
53
  ];
54
54
  static flags = {
55
55
  ...super.flags,
56
- lines: Flags.integer({ char: "n", description: "The number of lines to show", default: 10 }),
57
- follow: Flags.boolean({ char: "f", description: "Follow the log in real-time", default: false })
56
+ follow: Flags.boolean({ char: "f", default: false, description: "Follow the log in real-time" }),
57
+ lines: Flags.integer({ char: "n", default: 10, description: "The number of lines to show" })
58
58
  };
59
59
  async getJob() {
60
60
  try {
61
61
  const game = await this.getGame();
62
62
  const job = await getJob(this.args.job_id, game.id);
63
63
  return job;
64
- } catch (e) {
65
- if (e?.response?.status === 404) {
64
+ } catch (error) {
65
+ if (error?.response?.status === 404) {
66
66
  this.error("Job not found - please check you have access", { exit: 1 });
67
67
  }
68
- throw e;
68
+ throw error;
69
69
  }
70
70
  }
71
71
  async run() {
72
72
  const job = await this.getJob();
73
- const { lines, follow } = this.flags;
73
+ const { follow, lines } = this.flags;
74
74
  const handleJobUpdate = (job2) => {
75
75
  if (!follow) return;
76
76
  if ([JobStatus.COMPLETED, JobStatus.FAILED].includes(job2.status)) {
@@ -80,8 +80,8 @@ class GameJobStatus extends BaseGameCommand {
80
80
  };
81
81
  render(
82
82
  /* @__PURE__ */ jsxs(Command, { command: this, children: [
83
- /* @__PURE__ */ jsx(JobStatusTable, { jobId: job.id, projectId: job.project.id, isWatching: follow, onJobUpdate: handleJobUpdate }),
84
- /* @__PURE__ */ jsx(JobLogTail, { jobId: job.id, projectId: job.project.id, isWatching: follow, length: lines }),
83
+ /* @__PURE__ */ jsx(JobStatusTable, { isWatching: follow, jobId: job.id, onJobUpdate: handleJobUpdate, projectId: job.project.id }),
84
+ /* @__PURE__ */ jsx(JobLogTail, { isWatching: follow, jobId: job.id, length: lines, projectId: job.project.id }),
85
85
  /* @__PURE__ */ jsx(NextSteps, { steps: [] })
86
86
  ] })
87
87
  );
@@ -1,77 +1,81 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { render, Text, Box } from 'ink';
3
2
  import { Flags } from '@oclif/core';
4
- import { B as BaseAuthenticatedCommand, g as getProjects, b as getShortDate } from '../../index-DxzXU9Hd.js';
5
- import 'react';
6
- import '../../index-BTAL7EB_.js';
3
+ import { render, Box, Text } from 'ink';
4
+ import { B as BaseAuthenticatedCommand, g as getProjects, b as getShortDate } from '../../index-BhhiXbey.js';
7
5
  import 'ink-spinner';
8
- import '@inkjs/ui';
9
- import 'axios';
6
+ import { g as getShortUUID } from '../../index-CGBdOm1q.js';
7
+ import { T as Table } from '../../Table-FaNgpyeq.js';
8
+ import 'react';
10
9
  import '@tanstack/react-query';
11
- import 'fs';
10
+ import 'axios';
11
+ import 'luxon';
12
+ import 'node:fs';
13
+ import 'fast-glob';
12
14
  import 'uuid';
13
15
  import 'yazl';
14
- import { g as getShortUUID } from '../../index-35Eswf6F.js';
16
+ import 'socket.io-client';
17
+ import 'fullscreen-ink';
18
+ import 'string-length';
19
+ import 'strip-ansi';
15
20
  import 'open';
21
+ import '@inkjs/ui';
22
+ import 'node:path';
16
23
  import 'marked';
17
24
  import 'marked-terminal';
18
- import 'path';
19
25
  import 'qrcode';
20
- import { T as Table } from '../../Table-CvM6pccN.js';
21
- import 'string-length';
22
- import 'strip-ansi';
23
- import 'luxon';
24
- import 'fast-glob';
25
- import { C as Command } from '../../Command-1p5alCz3.js';
26
- import 'socket.io-client';
27
- import '@expo/apple-utils/build/index.js';
26
+ import '../../index-C66Dd8Xc.js';
27
+ import { C as Command } from '../../Command-WPpmLPkL.js';
28
28
  import 'crypto-js';
29
- import 'crypto';
30
- import 'readline-sync';
29
+ import '@expo/apple-utils/build/index.js';
30
+ import 'node:crypto';
31
31
  import 'node:readline';
32
- import 'node:path';
33
32
  import 'node:url';
33
+ import 'readline-sync';
34
34
  import 'isomorphic-git';
35
- import 'ini';
36
35
  import 'deepmerge';
37
- import '../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
36
+ import 'ini';
37
+ import '../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
38
38
 
39
39
  class GameList extends BaseAuthenticatedCommand {
40
40
  static args = {};
41
41
  static description = "Shows a list of all your games.";
42
42
  static examples = ["<%= config.bin %> <%= command.id %>"];
43
43
  static flags = {
44
- pageNumber: Flags.integer({ char: "p", description: "The page number to show (starts at 0)", default: 0 }),
45
- pageSize: Flags.integer({ char: "s", description: "The number of items to show per page", default: 10 }),
44
+ order: Flags.string({
45
+ char: "r",
46
+ default: "desc",
47
+ description: "The order to sort by",
48
+ options: ["asc", "desc"]
49
+ }),
46
50
  orderBy: Flags.string({
47
51
  char: "o",
48
- description: "The field to order by",
49
52
  default: "createdAt",
53
+ description: "The field to order by",
50
54
  options: ["createdAt", "updatedAt", "name"]
51
55
  }),
52
- order: Flags.string({
53
- char: "r",
54
- description: "The order to sort by",
55
- default: "desc",
56
- options: ["asc", "desc"]
57
- })
56
+ pageNumber: Flags.integer({ char: "p", default: 0, description: "The page number to show (starts at 0)" }),
57
+ pageSize: Flags.integer({ char: "s", default: 10, description: "The number of items to show per page" })
58
58
  };
59
59
  async run() {
60
60
  const { flags } = this;
61
61
  const params = flags;
62
62
  const gameListResponse = await getProjects(params);
63
- const data = gameListResponse.data.map((game) => {
64
- return {
65
- id: getShortUUID(game.id),
66
- name: game.name,
67
- createdAt: getShortDate(game.createdAt)
68
- };
69
- });
63
+ const data = gameListResponse.data.map((game) => ({
64
+ createdAt: getShortDate(game.createdAt),
65
+ id: getShortUUID(game.id),
66
+ name: game.name
67
+ }));
70
68
  render(
71
69
  /* @__PURE__ */ jsxs(Command, { command: this, children: [
72
- gameListResponse.data.length === 0 && params.pageNumber == 0 && /* @__PURE__ */ jsx(Text, { children: "No games found. Create one now with $ shipthis game wizard" }),
73
- gameListResponse.data.length > 0 && /* @__PURE__ */ jsx(Table, { data }),
74
- gameListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
70
+ data.length === 0 && params.pageNumber == 0 && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
71
+ /* @__PURE__ */ jsx(Text, { children: "No games found. Create one now with:" }),
72
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: [
73
+ /* @__PURE__ */ jsx(Text, { children: "shipthis game wizard android" }),
74
+ /* @__PURE__ */ jsx(Text, { children: "shipthis game wizard ios" })
75
+ ] })
76
+ ] }),
77
+ data.length > 0 && /* @__PURE__ */ jsx(Table, { data }),
78
+ gameListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
75
79
  /* @__PURE__ */ jsx(Text, { children: `Showing page ${flags.pageNumber + 1} of ${gameListResponse.pageCount}.` }),
76
80
  /* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
77
81
  ] })
@@ -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 { M as LogLevel, a2 as getShortAuthRequiredUrl, W as WEB_URL, c as BaseGameCommand, E as getJob, H as downloadBuildById } from '../../index-DxzXU9Hd.js';
5
- import { useContext, useState, useEffect } from 'react';
6
- import { d as CommandContext, b as GameContext, M as Markdown } from '../../index-BTAL7EB_.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-Z4eUQBjn.js';
31
- import { g as getShortUUID } from '../../index-35Eswf6F.js';
32
- import { u as useShip, J as JobProgress } from '../../JobProgress-BjNgtIjm.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-CZxoMSd5.js';
35
- import { J as JobStatusTable } from '../../JobStatusTable-BB-PWlwj.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-CJLIEYmA.js';
40
- import '../../Command-1p5alCz3.js';
41
- import '../../git-DREGq-jc.js';
42
- import '../../ProgressSpinner-6pw1T8Iw.js';
43
- import '../../useWebSocket-BOCa8v6o.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,12 +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
- gameBuildsUrl: `${WEB_URL}games/${getShortUUID(gameId)}/builds`
161
+ gameBuildsUrl: `${WEB_URL}games/${getShortUUID(gameId)}/builds`,
162
+ wasPublished: !flags?.skipPublish
160
163
  }
161
164
  }
162
165
  ),
@@ -170,7 +173,7 @@ const Ship = ({ onComplete, onError }) => {
170
173
  }
171
174
  }
172
175
  ),
173
- /* @__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)) })
174
177
  ] })
175
178
  ] })
176
179
  ] });
@@ -178,45 +181,45 @@ const Ship = ({ onComplete, onError }) => {
178
181
 
179
182
  class GameShip extends BaseGameCommand {
180
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
+ ];
181
192
  static flags = {
182
193
  ...BaseGameCommand.flags,
183
- platform: Flags.string({
184
- description: 'The platform to ship the game to. This can be "android" or "ios"',
185
- required: false,
186
- options: ["android", "ios"]
187
- }),
188
- skipPublish: Flags.boolean({
189
- description: "Skip the publish step",
190
- required: false,
191
- default: false
192
- }),
193
194
  download: Flags.string({
195
+ dependsOn: ["platform"],
194
196
  description: "Download the build artifact to the specified file",
195
- required: false,
196
- dependsOn: ["platform"]
197
+ required: false
197
198
  }),
198
199
  downloadAPK: Flags.string({
200
+ dependsOn: ["platform"],
199
201
  description: "Download the APK artifact (if available) to the specified file",
200
- required: false,
201
- dependsOn: ["platform"]
202
+ required: false
202
203
  }),
203
204
  follow: Flags.boolean({
205
+ dependsOn: ["platform"],
204
206
  description: "Follow the job logs in real-time. Requires --platform to be specified.",
205
- required: false,
206
- 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
207
218
  })
208
219
  };
209
- static description = "Builds the app (for all platforms with valid credentials) and ships it to the stores.";
210
- static examples = [
211
- "<%= config.bin %> <%= command.id %>",
212
- "<%= config.bin %> <%= command.id %> --platform ios",
213
- "<%= config.bin %> <%= command.id %> --platform android --skipPublish",
214
- "<%= config.bin %> <%= command.id %> --platform android --download game.aab",
215
- "<%= config.bin %> <%= command.id %> --platform android --follow --downloadAPK game.apk"
216
- ];
217
220
  async run() {
218
221
  await this.ensureWeAreInAProjectDir();
219
- const gameId = await this.getGameId();
222
+ const gameId = this.getGameId();
220
223
  if (!gameId) {
221
224
  this.error("No game ID found");
222
225
  }
@@ -231,7 +234,7 @@ class GameShip extends BaseGameCommand {
231
234
  if (attempt < MAX_RETRIES) await new Promise((res) => setTimeout(res, RETRY_DELAY_MS));
232
235
  }
233
236
  if (!job?.builds || job.builds.length === 0) this.error("No builds found for this job after multiple attempts");
234
- const platform = this.flags.platform;
237
+ const { platform } = this.flags;
235
238
  const type = platform === "android" ? this.flags.downloadAPK ? "APK" : "AAB" : "IPA";
236
239
  const build = job.builds.find((b) => b.buildType === type);
237
240
  if (!build) this.error(`No build found for type ${type}`);