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,42 +1,42 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import * as fs from 'node:fs';
2
3
  import { Args, Flags } from '@oclif/core';
3
4
  import { render } from 'ink';
4
- import * as fs from 'fs';
5
- import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-DxzXU9Hd.js';
6
- import { a as getProjectCredentials } from '../../../../index-u1aj1OQW.js';
7
- import 'react';
8
- import '../../../../index-BTAL7EB_.js';
5
+ import { a as getProjectCredentials } from '../../../../index-CtTI85m-.js';
6
+ import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-BhhiXbey.js';
9
7
  import 'ink-spinner';
10
- import 'axios';
11
- import 'crypto-js';
12
- import 'uuid';
13
- import 'luxon';
14
- import '@inkjs/ui';
15
- import '@tanstack/react-query';
16
- import 'yazl';
17
- import 'crypto';
18
- import 'readline-sync';
19
- import 'node:readline';
8
+ import 'node:crypto';
20
9
  import 'node:path';
10
+ import 'node:readline';
21
11
  import 'node:url';
12
+ import 'readline-sync';
13
+ import 'luxon';
14
+ import 'axios';
22
15
  import 'isomorphic-git';
16
+ import '@tanstack/react-query';
17
+ import 'react';
18
+ import 'crypto-js';
19
+ import 'uuid';
23
20
  import 'fast-glob';
21
+ import 'yazl';
24
22
  import 'socket.io-client';
23
+ import 'fullscreen-ink';
24
+ import 'string-length';
25
+ import 'strip-ansi';
25
26
  import 'open';
27
+ import '@inkjs/ui';
26
28
  import 'marked';
27
29
  import 'marked-terminal';
28
- import 'path';
29
30
  import 'qrcode';
30
- import { R as RunWithSpinner } from '../../../../RunWithSpinner-BVXNWGD3.js';
31
- import 'string-length';
32
- import 'strip-ansi';
33
- import { C as Command } from '../../../../Command-1p5alCz3.js';
34
- import { e as exportCredential } from '../../../../export-BKn02-NH.js';
31
+ import { R as RunWithSpinner } from '../../../../RunWithSpinner-gMVA07bZ.js';
32
+ import '../../../../index-C66Dd8Xc.js';
33
+ import { C as Command } from '../../../../Command-WPpmLPkL.js';
34
+ import { e as exportCredential } from '../../../../export-CXsVPXA1.js';
35
35
  import '@expo/apple-utils/build/index.js';
36
- import 'ini';
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
40
 
41
41
  class GameIosProfileExport extends BaseGameCommand {
42
42
  static args = {
@@ -45,8 +45,8 @@ class GameIosProfileExport extends BaseGameCommand {
45
45
  static description = "Saves the current Mobile Provisioning Profile to a ZIP file";
46
46
  static examples = ["<%= config.bin %> <%= command.id %> userProfile.zip"];
47
47
  static flags = {
48
- gameId: Flags.string({ char: "g", description: "The ID of the game" }),
49
- force: Flags.boolean({ char: "f", description: "Overwrite the file if it already exists" })
48
+ force: Flags.boolean({ char: "f", description: "Overwrite the file if it already exists" }),
49
+ gameId: Flags.string({ char: "g", description: "The ID of the game" })
50
50
  };
51
51
  async run() {
52
52
  const { args, flags } = this;
@@ -70,9 +70,9 @@ class GameIosProfileExport extends BaseGameCommand {
70
70
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
71
71
  RunWithSpinner,
72
72
  {
73
- msgInProgress: `Exporting Mobile Provisioning Profile to ${file}...`,
73
+ executeMethod: () => exportCredential({ credentialId: profile.id, projectId: game.id, zipPath: file }),
74
74
  msgComplete: `Mobile Provisioning Profile exported to ${file}`,
75
- executeMethod: () => exportCredential({ zipPath: file, credentialId: profile.id, projectId: game.id }),
75
+ msgInProgress: `Exporting Mobile Provisioning Profile to ${file}...`,
76
76
  onComplete: handleComplete
77
77
  }
78
78
  ) })
@@ -1,42 +1,42 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import * as fs from 'node:fs';
2
3
  import { Args, Flags } from '@oclif/core';
3
4
  import { render } from 'ink';
4
- import * as fs from 'fs';
5
- import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-DxzXU9Hd.js';
6
- import { a as getProjectCredentials } from '../../../../index-u1aj1OQW.js';
7
- import 'react';
8
- import '../../../../index-BTAL7EB_.js';
5
+ import { a as getProjectCredentials } from '../../../../index-CtTI85m-.js';
6
+ import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-BhhiXbey.js';
9
7
  import 'ink-spinner';
10
- import 'axios';
11
- import 'crypto-js';
12
- import 'uuid';
13
- import 'luxon';
14
- import '@inkjs/ui';
15
- import '@tanstack/react-query';
16
- import 'yazl';
17
- import 'crypto';
18
- import 'readline-sync';
19
- import 'node:readline';
8
+ import 'node:crypto';
20
9
  import 'node:path';
10
+ import 'node:readline';
21
11
  import 'node:url';
12
+ import 'readline-sync';
13
+ import 'luxon';
14
+ import 'axios';
22
15
  import 'isomorphic-git';
16
+ import '@tanstack/react-query';
17
+ import 'react';
18
+ import 'crypto-js';
19
+ import 'uuid';
23
20
  import 'fast-glob';
21
+ import 'yazl';
24
22
  import 'socket.io-client';
23
+ import 'fullscreen-ink';
24
+ import 'string-length';
25
+ import 'strip-ansi';
25
26
  import 'open';
27
+ import '@inkjs/ui';
26
28
  import 'marked';
27
29
  import 'marked-terminal';
28
- import 'path';
29
30
  import 'qrcode';
30
- import { R as RunWithSpinner } from '../../../../RunWithSpinner-BVXNWGD3.js';
31
- import 'string-length';
32
- import 'strip-ansi';
33
- import { C as Command } from '../../../../Command-1p5alCz3.js';
34
- import { i as importCredential } from '../../../../import-CRMaNBVF.js';
31
+ import { R as RunWithSpinner } from '../../../../RunWithSpinner-gMVA07bZ.js';
32
+ import '../../../../index-C66Dd8Xc.js';
33
+ import { C as Command } from '../../../../Command-WPpmLPkL.js';
34
+ import { i as importCredential } from '../../../../import-DGvG5REx.js';
35
35
  import '@expo/apple-utils/build/index.js';
36
- import 'ini';
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
40
 
41
41
  class GameIosProfileImport extends BaseGameCommand {
42
42
  static args = {
@@ -48,8 +48,8 @@ class GameIosProfileImport extends BaseGameCommand {
48
48
  static description = "Imports an Mobile Provisioning Profile to your ShipThis account";
49
49
  static examples = ["<%= config.bin %> <%= command.id %> profile.zip"];
50
50
  static flags = {
51
- gameId: Flags.string({ char: "g", description: "The ID of the game" }),
52
- force: Flags.boolean({ char: "f" })
51
+ force: Flags.boolean({ char: "f" }),
52
+ gameId: Flags.string({ char: "g", description: "The ID of the game" })
53
53
  };
54
54
  async run() {
55
55
  const { args, flags } = this;
@@ -64,7 +64,7 @@ class GameIosProfileImport extends BaseGameCommand {
64
64
  const projectAppleProfileCredentials = projectCredentials.filter(
65
65
  (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
66
66
  );
67
- if (projectAppleProfileCredentials.length !== 0 && !force) {
67
+ if (projectAppleProfileCredentials.length > 0 && !force) {
68
68
  this.error("A Mobile Provisioning Profile already exists. Use --force to overwrite it.");
69
69
  }
70
70
  const handleComplete = async () => {
@@ -74,14 +74,14 @@ class GameIosProfileImport extends BaseGameCommand {
74
74
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
75
75
  RunWithSpinner,
76
76
  {
77
- msgInProgress: `Importing Mobile Provisioning Profile from ${file}...`,
78
- msgComplete: `Mobile Provisioning Profile imported from ${file}`,
79
77
  executeMethod: () => importCredential({
80
- zipPath: file,
81
- type: CredentialsType.CERTIFICATE,
82
78
  platform: Platform.IOS,
83
- projectId: game.id
79
+ projectId: game.id,
80
+ type: CredentialsType.CERTIFICATE,
81
+ zipPath: file
84
82
  }),
83
+ msgComplete: `Mobile Provisioning Profile imported from ${file}`,
84
+ msgInProgress: `Importing Mobile Provisioning Profile from ${file}...`,
85
85
  onComplete: handleComplete
86
86
  }
87
87
  ) })
@@ -1,44 +1,44 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { Box, Text, render } from 'ink';
3
2
  import { Flags } from '@oclif/core';
4
- import 'react';
5
- import '../../../../index-BTAL7EB_.js';
6
- import { b as getShortDate, n as Profile, o as ProfileType, C as CredentialsType, P as Platform, c as BaseGameCommand } from '../../../../index-DxzXU9Hd.js';
3
+ import { Box, Text, render } from 'ink';
4
+ import { b as getShortDate, m as Profile, n as ProfileType, C as CredentialsType, P as Platform, c as BaseGameCommand } from '../../../../index-BhhiXbey.js';
7
5
  import Spinner from 'ink-spinner';
8
- import 'axios';
9
- import 'crypto-js';
10
- import 'uuid';
11
- import 'fs';
12
- import { DateTime } from 'luxon';
13
- import '@inkjs/ui';
14
- import { useQuery } from '@tanstack/react-query';
15
- import 'yazl';
16
- import 'crypto';
17
- import 'readline-sync';
18
- import 'node:readline';
6
+ import 'node:crypto';
7
+ import 'node:fs';
19
8
  import 'node:path';
9
+ import 'node:readline';
20
10
  import 'node:url';
11
+ import 'readline-sync';
12
+ import { DateTime } from 'luxon';
13
+ import 'axios';
21
14
  import 'isomorphic-git';
15
+ import { useQuery } from '@tanstack/react-query';
16
+ import 'react';
17
+ import 'crypto-js';
18
+ import 'uuid';
22
19
  import 'fast-glob';
20
+ import 'yazl';
23
21
  import 'socket.io-client';
22
+ import 'fullscreen-ink';
23
+ import 'string-length';
24
+ import 'strip-ansi';
25
+ import { P as ProjectCredentialsTable } from '../../../../ProjectCredentialsTable-B5pHOnGu.js';
24
26
  import 'open';
27
+ import '@inkjs/ui';
25
28
  import 'marked';
26
29
  import 'marked-terminal';
27
- import 'path';
28
30
  import 'qrcode';
29
- import 'string-length';
30
- import 'strip-ansi';
31
- import { u as useProjectCredentials } from '../../../../useProjectCredentials-DX3e_PPc.js';
32
- import { T as Table } from '../../../../Table-CvM6pccN.js';
31
+ import '../../../../index-C66Dd8Xc.js';
32
+ import { u as useProjectCredentials } from '../../../../useProjectCredentials-BEphqa18.js';
33
+ import { T as Table } from '../../../../Table-FaNgpyeq.js';
33
34
  import { T as Title } from '../../../../Title-BCQtayg6.js';
34
- import { N as NextSteps } from '../../../../NextSteps-CK9zHOCt.js';
35
- import { C as Command } from '../../../../Command-1p5alCz3.js';
36
- import { P as ProjectCredentialsTable } from '../../../../ProjectCredentialsTable-DyZep993.js';
37
- import '../../../../index-35Eswf6F.js';
38
- import '../../../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
35
+ import { N as NextSteps } from '../../../../NextSteps-DbJHmscQ.js';
36
+ import { C as Command } from '../../../../Command-WPpmLPkL.js';
39
37
  import '@expo/apple-utils/build/index.js';
40
- import 'ini';
41
38
  import 'deepmerge';
39
+ import 'ini';
40
+ import '../../../../index-CGBdOm1q.js';
41
+ import '../../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
42
42
 
43
43
  async function queryAppleProfiles({ ctx }) {
44
44
  const appleProfiles = await Profile.getAsync(ctx, {
@@ -59,32 +59,32 @@ const canAppleProfileBeUsed = (appleProfile, project, projectCredentials) => {
59
59
  return projectCredentials.some(
60
60
  (credential) => credential.isActive && credential.serialNumber === profileCertificateSerialNumber
61
61
  );
62
- } catch (e) {
63
- console.log(e);
62
+ } catch (error) {
63
+ console.log(error);
64
64
  return false;
65
65
  }
66
66
  };
67
67
  function getAppleProfileSummary(appleProfile, project, projectCredentials) {
68
68
  return {
69
+ canBeUsed: canAppleProfileBeUsed(appleProfile, project, projectCredentials),
70
+ expires: getShortDate(DateTime.fromISO(appleProfile.attributes.expirationDate)),
69
71
  id: appleProfile.id,
70
72
  name: appleProfile.attributes.name,
71
- platform: appleProfile.attributes.platform,
72
- expires: getShortDate(DateTime.fromISO(appleProfile.attributes.expirationDate)),
73
- canBeUsed: canAppleProfileBeUsed(appleProfile, project, projectCredentials)
73
+ platform: appleProfile.attributes.platform
74
74
  };
75
75
  }
76
76
  const useAppleProfiles = (props) => {
77
77
  const queryResult = useQuery({
78
- queryKey: ["appleProfiles"],
79
- queryFn: () => queryAppleProfiles(props)
78
+ queryFn: () => queryAppleProfiles(props),
79
+ queryKey: ["appleProfiles"]
80
80
  });
81
81
  return queryResult;
82
82
  };
83
83
 
84
84
  const AppleProfilesTable = ({ ctx, project, ...boxProps }) => {
85
85
  const { data: credentialsResponse } = useProjectCredentials({
86
- projectId: project.id,
87
86
  platform: Platform.IOS,
87
+ projectId: project.id,
88
88
  type: CredentialsType.CERTIFICATE
89
89
  });
90
90
  const { data: profiles, isLoading } = useAppleProfiles({ ctx });
@@ -93,7 +93,7 @@ const AppleProfilesTable = ({ ctx, project, ...boxProps }) => {
93
93
  /* @__PURE__ */ jsx(Title, { children: "Mobile Provisioning Profiles in your Apple account" }),
94
94
  isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
95
95
  profiles && credentialsResponse && /* @__PURE__ */ jsxs(Fragment, { children: [
96
- /* @__PURE__ */ jsxs(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: [
96
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 2, children: [
97
97
  /* @__PURE__ */ jsx(Text, { children: `You have ${profiles.length} Mobile Provisioning Profiles in your Apple account` }),
98
98
  /* @__PURE__ */ jsx(Text, { children: `${hasUsable ? "One" : "None"} of these can be used by ShipThis` })
99
99
  ] }),
@@ -127,7 +127,7 @@ class GameIosProfileStatus extends BaseGameCommand {
127
127
  ProjectCredentialsTable,
128
128
  {
129
129
  credentialTypeName: "Mobile Provisioning Profile",
130
- queryProps: { platform: Platform.IOS, type: CredentialsType.CERTIFICATE, projectId: game.id }
130
+ queryProps: { platform: Platform.IOS, projectId: game.id, type: CredentialsType.CERTIFICATE }
131
131
  }
132
132
  ),
133
133
  showApple && /* @__PURE__ */ jsx(AppleProfilesTable, { ctx, project: game })
@@ -1,46 +1,48 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { render } from 'ink';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
2
  import { Flags } from '@oclif/core';
4
- import 'react';
5
- import '../../../index-BTAL7EB_.js';
6
- import { c as BaseGameCommand, k as getProjectPlatformProgress, P as Platform, b as getShortDate } from '../../../index-DxzXU9Hd.js';
3
+ import { render, Box } from 'ink';
4
+ import { c as BaseGameCommand, P as Platform } 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-35Eswf6F.js';
21
+ import 'socket.io-client';
22
+ import 'fullscreen-ink';
23
+ import { G as GameStatusDetails } 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 { A as AppleAppDetails, a as AppleBundleIdDetails } from '../../../AppleBundleIdDetails-Fp5COwTa.js';
25
- import { C as Command } from '../../../Command-1p5alCz3.js';
26
- import 'luxon';
27
- import 'fast-glob';
28
- import 'socket.io-client';
29
- import '../../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
31
+ import '../../../index-C66Dd8Xc.js';
32
+ import { A as AppleAppDetails, a as AppleBundleIdDetails } from '../../../AppleBundleIdDetails-6H3cNWxw.js';
33
+ import { C as CommandGame } from '../../../CommandGame-cxzWG4nT.js';
30
34
  import '@expo/apple-utils/build/index.js';
31
- import 'crypto-js';
32
- import 'crypto';
33
- import 'readline-sync';
34
- import 'node:readline';
35
- import 'node:path';
36
- import 'node:url';
37
- import 'isomorphic-git';
38
- import 'ini';
39
35
  import 'deepmerge';
36
+ import 'ini';
37
+ import '../../../index-CGBdOm1q.js';
38
+ import '../../../StatusTable-DzRWcMr4.js';
40
39
  import '../../../Title-BCQtayg6.js';
41
- import '../../../useAppleApp-cnb8gX0x.js';
42
- import '../../../Table-CvM6pccN.js';
43
- import '../../../useAppleBundleId-B0Etav8g.js';
40
+ import '../../../NextSteps-DbJHmscQ.js';
41
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
42
+ import '../../../useAppleApp-DWYGURwU.js';
43
+ import '../../../Table-FaNgpyeq.js';
44
+ import '../../../useAppleBundleId-PsTJ2g1B.js';
45
+ import '../../../Command-WPpmLPkL.js';
44
46
 
45
47
  class GameIosStatus extends BaseGameCommand {
46
48
  static args = {};
@@ -54,37 +56,23 @@ class GameIosStatus extends BaseGameCommand {
54
56
  };
55
57
  async run() {
56
58
  const game = await this.getGame();
57
- const iosPlatformStatus = await getProjectPlatformProgress(game.id, Platform.IOS);
58
- const gameStatuses = {
59
- name: game.name,
60
- id: getShortUUID(game.id),
61
- createdAt: getShortDate(game.createdAt),
62
- engine: "Godot"
63
- };
64
- const steps = [iosPlatformStatus.hasBundleSet == false && "$ shipthis game ios app create"].filter(
65
- Boolean
66
- );
67
- const progressToStatuses = (progress) => {
68
- const { platform, ...rest } = progress;
69
- return makeHumanReadable(rest);
70
- };
71
59
  const authState = await this.refreshAppleAuthState();
72
60
  const ctx = authState.context;
73
61
  render(
74
- /* @__PURE__ */ jsxs(Command, { command: this, children: [
75
- /* @__PURE__ */ jsx(StatusTable, { marginBottom: 1, title: "ShipThis game status", statuses: gameStatuses }),
76
- /* @__PURE__ */ jsx(
77
- StatusTable,
78
- {
79
- marginBottom: 1,
80
- title: "Overall iOS status for game",
81
- statuses: progressToStatuses(iosPlatformStatus)
82
- }
83
- ),
84
- /* @__PURE__ */ jsx(AppleAppDetails, { iosBundleId: game.details?.iosBundleId, ctx }),
85
- /* @__PURE__ */ jsx(AppleBundleIdDetails, { iosBundleId: game.details?.iosBundleId, ctx }),
86
- /* @__PURE__ */ jsx(NextSteps, { steps })
87
- ] })
62
+ /* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(
63
+ GameStatusDetails,
64
+ {
65
+ gameId: game.id,
66
+ onComplete: (exitCode) => {
67
+ setTimeout(() => process.exit(exitCode), 2e3);
68
+ },
69
+ platforms: [Platform.IOS],
70
+ children: /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 0, marginTop: 1, children: [
71
+ /* @__PURE__ */ jsx(AppleAppDetails, { ctx, iosBundleId: game.details?.iosBundleId }),
72
+ /* @__PURE__ */ jsx(AppleBundleIdDetails, { ctx, iosBundleId: game.details?.iosBundleId })
73
+ ] })
74
+ }
75
+ ) })
88
76
  );
89
77
  }
90
78
  }
@@ -1,38 +1,38 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import chalk from 'chalk';
3
- import { B as BaseAuthenticatedCommand, j as isCWDGodotGame, W as WEB_URL, P as Platform, C as CredentialsType } from '../../../index-DxzXU9Hd.js';
3
+ import 'node:fs';
4
4
  import 'axios';
5
5
  import 'crypto-js';
6
6
  import 'uuid';
7
- import 'fs';
7
+ import { B as BaseAuthenticatedCommand, j as isCWDGodotGame, W as WEB_URL, P as Platform, C as CredentialsType } from '../../../index-BhhiXbey.js';
8
8
  import 'luxon';
9
- import { g as getUserCredentials, a as getProjectCredentials } from '../../../index-u1aj1OQW.js';
9
+ import { g as getUserCredentials, a as getProjectCredentials } from '../../../index-CtTI85m-.js';
10
10
  import 'react/jsx-runtime';
11
- import 'react';
12
11
  import 'ink';
13
- import { g as getRenderedMarkdown } from '../../../index-BTAL7EB_.js';
14
12
  import 'ink-spinner';
15
- import '@inkjs/ui';
16
- import '@tanstack/react-query';
17
- import 'yazl';
18
- import 'crypto';
19
- import 'readline-sync';
20
- import 'node:readline';
13
+ import 'node:crypto';
21
14
  import 'node:path';
15
+ import 'node:readline';
22
16
  import 'node:url';
17
+ import 'readline-sync';
23
18
  import 'isomorphic-git';
19
+ import '@tanstack/react-query';
20
+ import 'react';
24
21
  import 'fast-glob';
22
+ import 'yazl';
25
23
  import 'socket.io-client';
26
- import 'open';
27
- import 'qrcode';
24
+ import 'fullscreen-ink';
28
25
  import 'string-length';
29
26
  import 'strip-ansi';
30
- import 'path';
27
+ import 'open';
28
+ import '@inkjs/ui';
29
+ import { g as getRenderedMarkdown } from '../../../index-C66Dd8Xc.js';
30
+ import 'qrcode';
31
31
  import '@expo/apple-utils/build/index.js';
32
- import 'ini';
33
32
  import 'deepmerge';
34
- import '../../../index-35Eswf6F.js';
35
- import '../../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
33
+ import 'ini';
34
+ import '../../../index-CGBdOm1q.js';
35
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
36
36
  import 'marked';
37
37
  import 'marked-terminal';
38
38
 
@@ -54,29 +54,29 @@ class GameIosWizard extends BaseAuthenticatedCommand {
54
54
  { exit: 1 }
55
55
  );
56
56
  }
57
- const projectConfig = await this.getProjectConfigSafe();
57
+ const projectConfig = this.getProjectConfigSafe();
58
58
  const game = projectConfig.project;
59
59
  const isStepForced = (cmdName) => flags.forceStep?.includes(cmdName);
60
60
  const logSkip = (cmdName) => this.log(chalk.blue(`[skip] shipthis ${cmdName.replaceAll(":", " ")}`));
61
61
  const logRun = (cmdName, args) => this.log(chalk.green(`[run] shipthis ${cmdName.replaceAll(":", " ")} ${args.join(" ")}`));
62
62
  const iosSteps = [
63
63
  {
64
- command: "game:create",
65
64
  args: ["--quiet"],
65
+ command: "game:create",
66
66
  shouldRun: async () => !game
67
67
  },
68
68
  {
69
- command: "apple:login",
70
69
  args: ["--quiet"],
70
+ command: "apple:login",
71
71
  shouldRun: async () => {
72
72
  const isLoggedIn = await this.hasValidAppleAuthState();
73
73
  return !isLoggedIn;
74
74
  }
75
75
  },
76
76
  {
77
- command: "apple:apiKey:create",
78
77
  args: ["--quiet"],
79
- shouldRun: async () => {
78
+ command: "apple:apiKey:create",
79
+ async shouldRun() {
80
80
  const userCredentials = await getUserCredentials();
81
81
  const userAppleApiKeyCredentials = userCredentials.filter(
82
82
  (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.KEY
@@ -86,9 +86,9 @@ class GameIosWizard extends BaseAuthenticatedCommand {
86
86
  }
87
87
  },
88
88
  {
89
- command: "apple:certificate:create",
90
89
  args: ["--quiet"],
91
- shouldRun: async () => {
90
+ command: "apple:certificate:create",
91
+ async shouldRun() {
92
92
  const userCredentials = await getUserCredentials();
93
93
  const userAppleDistCredentials = userCredentials.filter(
94
94
  (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
@@ -98,24 +98,24 @@ class GameIosWizard extends BaseAuthenticatedCommand {
98
98
  }
99
99
  },
100
100
  {
101
- command: "game:ios:app:create",
102
101
  args: ["--quiet"],
103
- shouldRun: async () => {
102
+ command: "game:ios:app:create",
103
+ async shouldRun() {
104
104
  if (!game) return true;
105
- const hasBundleIdSet = !!game.details?.iosBundleId;
105
+ const hasBundleIdSet = Boolean(game.details?.iosBundleId);
106
106
  return !hasBundleIdSet;
107
107
  }
108
108
  },
109
109
  {
110
- command: "game:ios:app:sync",
111
110
  args: ["--quiet"],
111
+ command: "game:ios:app:sync",
112
112
  // Can always run this
113
113
  shouldRun: async () => true
114
114
  },
115
115
  {
116
- command: "game:ios:profile:create",
117
116
  args: ["--quiet"],
118
- shouldRun: async () => {
117
+ command: "game:ios:profile:create",
118
+ async shouldRun() {
119
119
  if (!game) return true;
120
120
  const projectCredentials = await getProjectCredentials(game.id);
121
121
  const projectAppleProfileCredentials = projectCredentials.filter(
@@ -127,7 +127,7 @@ class GameIosWizard extends BaseAuthenticatedCommand {
127
127
  }
128
128
  ];
129
129
  for (const step of iosSteps) {
130
- const command = step.command;
130
+ const { command } = step;
131
131
  const willRun = isStepForced(command) || await step.shouldRun();
132
132
  if (!willRun) {
133
133
  logSkip(command);