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,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 { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-w3lHxk5O.js';
6
- import { g as getUserCredentials } from '../../../index-C6aAyrXW.js';
7
- import 'react';
8
- import '../../../index-CyvGh-kt.js';
5
+ import { g as getUserCredentials } from '../../../index-CtTI85m-.js';
6
+ import { B as BaseAuthenticatedCommand, 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-DFdHXDiU.js';
34
- import { e as exportCredential } from '../../../export-DZxo2_e_.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-DJ078v-U.js';
39
- import '../../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
37
+ import 'ini';
38
+ import '../../../index-CGBdOm1q.js';
39
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
40
 
41
41
  class AppleApiKeyExport extends BaseAuthenticatedCommand {
42
42
  static args = {
@@ -68,9 +68,9 @@ class AppleApiKeyExport extends BaseAuthenticatedCommand {
68
68
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
69
69
  RunWithSpinner,
70
70
  {
71
- msgInProgress: `Exporting App Store Connect API Key to ${file}...`,
71
+ executeMethod: () => exportCredential({ credentialId: key.id, zipPath: file }),
72
72
  msgComplete: `App Store Connect API Key exported to ${file}`,
73
- executeMethod: () => exportCredential({ zipPath: file, credentialId: key.id }),
73
+ msgInProgress: `Exporting App Store Connect API Key to ${file}...`,
74
74
  onComplete: handleComplete
75
75
  }
76
76
  ) })
@@ -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 { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-w3lHxk5O.js';
6
- import { g as getUserCredentials } from '../../../index-C6aAyrXW.js';
7
- import 'react';
8
- import '../../../index-CyvGh-kt.js';
5
+ import { g as getUserCredentials } from '../../../index-CtTI85m-.js';
6
+ import { B as BaseAuthenticatedCommand, 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-DFdHXDiU.js';
34
- import { i as importCredential } from '../../../import-8pL1AF47.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-DJ078v-U.js';
39
- import '../../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
37
+ import 'ini';
38
+ import '../../../index-CGBdOm1q.js';
39
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
40
 
41
41
  class AppleApiKeyImport extends BaseAuthenticatedCommand {
42
42
  static args = {
@@ -62,7 +62,7 @@ class AppleApiKeyImport extends BaseAuthenticatedCommand {
62
62
  const userAppleApiKeyCredentials = userCredentials.filter(
63
63
  (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.KEY
64
64
  );
65
- if (userAppleApiKeyCredentials.length !== 0 && !force) {
65
+ if (userAppleApiKeyCredentials.length > 0 && !force) {
66
66
  this.error("An App Store Connect API Key already exists. Use --force to overwrite it.");
67
67
  }
68
68
  const handleComplete = async () => {
@@ -72,9 +72,9 @@ class AppleApiKeyImport extends BaseAuthenticatedCommand {
72
72
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
73
73
  RunWithSpinner,
74
74
  {
75
- msgInProgress: `Importing App Store Connect API from ${file}...`,
75
+ executeMethod: () => importCredential({ platform: Platform.IOS, type: CredentialsType.KEY, zipPath: file }),
76
76
  msgComplete: `App Store Connect API imported from ${file}`,
77
- executeMethod: () => importCredential({ zipPath: file, type: CredentialsType.KEY, platform: Platform.IOS }),
77
+ msgInProgress: `Importing App Store Connect API from ${file}...`,
78
78
  onComplete: handleComplete
79
79
  }
80
80
  ) })
@@ -1,43 +1,43 @@
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-w3lHxk5O.js';
5
- import 'react';
6
- import '../../../index-CyvGh-kt.js';
4
+ import { b as getShortDate, A as ApiKey, C as CredentialsType, P as Platform, B as BaseAuthenticatedCommand } 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';
24
25
  import 'open';
26
+ import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-3W3qesh7.js';
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 useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-Q7u9M-ap.js';
32
- import { T as Table } from '../../../Table-CvM6pccN.js';
31
+ import '../../../index-C66Dd8Xc.js';
32
+ import { T as Table } from '../../../Table-FaNgpyeq.js';
33
33
  import { T as Title } from '../../../Title-BCQtayg6.js';
34
- import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
35
- import { C as Command } from '../../../Command-DFdHXDiU.js';
34
+ import { N as NextSteps } from '../../../NextSteps-DbJHmscQ.js';
35
+ import { C as Command } from '../../../Command-WPpmLPkL.js';
36
36
  import '@expo/apple-utils/build/index.js';
37
- import 'ini';
38
37
  import 'deepmerge';
39
- import '../../../index-DJ078v-U.js';
40
- import '../../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
38
+ import 'ini';
39
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
+ import '../../../index-CGBdOm1q.js';
41
41
 
42
42
  async function queryAppleApiKeys({ ctx }) {
43
43
  const keys = await ApiKey.getAsync(ctx);
@@ -50,17 +50,17 @@ const canAppleApiKeyBeUsed = (key, userCredentials) => {
50
50
  };
51
51
  function getAppleApiKeySummary(key, userCredentials) {
52
52
  return {
53
+ canBeUsed: canAppleApiKeyBeUsed(key, userCredentials),
53
54
  keyID: key.id,
54
- name: key.attributes.nickname,
55
- roles: key.attributes.roles?.join(", "),
56
55
  lastUsed: getShortDate(DateTime.fromISO(key.attributes.lastUsed)),
57
- canBeUsed: canAppleApiKeyBeUsed(key, userCredentials)
56
+ name: key.attributes.nickname,
57
+ roles: key.attributes.roles?.join(", ")
58
58
  };
59
59
  }
60
60
  const useAppleApiKeys = (props) => {
61
61
  const queryResult = useQuery({
62
- queryKey: ["appleApiKeys"],
63
- queryFn: () => queryAppleApiKeys(props)
62
+ queryFn: () => queryAppleApiKeys(props),
63
+ queryKey: ["appleApiKeys"]
64
64
  });
65
65
  return queryResult;
66
66
  };
@@ -74,7 +74,7 @@ const AppleApiKeysTable = ({ ctx, ...boxProps }) => {
74
74
  /* @__PURE__ */ jsx(Title, { children: "App Store Connect API Keys in your Apple account" }),
75
75
  isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
76
76
  keys && userCredentialsResponse && /* @__PURE__ */ jsxs(Fragment, { children: [
77
- /* @__PURE__ */ jsxs(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: [
77
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 2, children: [
78
78
  /* @__PURE__ */ jsx(Text, { children: `You have ${keys.length} App Store Connect API Keys in your Apple account` }),
79
79
  /* @__PURE__ */ jsx(Text, { children: `${hasUsable ? "One" : "None"} of these can be used by ShipThis` })
80
80
  ] }),
@@ -110,7 +110,7 @@ class AppleApiKeyStatus extends BaseAuthenticatedCommand {
110
110
  UserCredentialsTable,
111
111
  {
112
112
  credentialTypeName: "App Store Connect API Key",
113
- queryProps: { type: CredentialsType.KEY, platform: Platform.IOS }
113
+ queryProps: { platform: Platform.IOS, type: CredentialsType.KEY }
114
114
  }
115
115
  ),
116
116
  showApple && /* @__PURE__ */ jsx(AppleApiKeysTable, { ctx })
@@ -1,44 +1,44 @@
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-w3lHxk5O.js';
5
- import { g as getUserCredentials } from '../../../index-C6aAyrXW.js';
6
- import 'react';
7
- import '../../../index-CyvGh-kt.js';
4
+ import { g as getUserCredentials } from '../../../index-CtTI85m-.js';
5
+ import forge from 'node-forge';
6
+ import { l as CertificateType, k as Certificate, P as Platform, C as CredentialsType } from '../../../index-BhhiXbey.js';
8
7
  import 'ink-spinner';
9
- import 'axios';
10
- import 'crypto-js';
11
- import 'uuid';
12
- import 'fs';
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';
9
+ import 'node:fs';
20
10
  import 'node:path';
11
+ import 'node:readline';
21
12
  import 'node:url';
13
+ import 'readline-sync';
14
+ import 'luxon';
15
+ import 'axios';
22
16
  import 'isomorphic-git';
17
+ import '@tanstack/react-query';
18
+ import 'react';
19
+ import 'crypto-js';
20
+ import 'uuid';
23
21
  import 'fast-glob';
22
+ import 'yazl';
24
23
  import 'socket.io-client';
24
+ import 'fullscreen-ink';
25
+ import 'string-length';
26
+ import 'strip-ansi';
25
27
  import 'open';
28
+ import '@inkjs/ui';
26
29
  import 'marked';
27
30
  import 'marked-terminal';
28
- import 'path';
29
31
  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-DFdHXDiU.js';
34
- import forge from 'node-forge';
35
- import { B as BaseAppleCommand } from '../../../baseAppleCommand-zhkGlKq0.js';
36
- import { u as uploadUserCredentials } from '../../../upload-BTpxj3QP.js';
32
+ import { R as RunWithSpinner } from '../../../RunWithSpinner-gMVA07bZ.js';
33
+ import '../../../index-C66Dd8Xc.js';
34
+ import { C as Command } from '../../../Command-WPpmLPkL.js';
35
+ import { B as BaseAppleCommand } from '../../../baseAppleCommand-BGV088--.js';
36
+ import { u as uploadUserCredentials } from '../../../upload-8y5MQEm9.js';
37
37
  import '@expo/apple-utils/build/index.js';
38
- import 'ini';
39
38
  import 'deepmerge';
40
- import '../../../index-DJ078v-U.js';
41
- import '../../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
39
+ import 'ini';
40
+ import '../../../index-CGBdOm1q.js';
41
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
42
42
 
43
43
  function decodeCertificate(certificateContent) {
44
44
  const decodedContent = forge.util.decode64(certificateContent);
@@ -51,12 +51,12 @@ function encodePkcs12(pkcs12Asn1) {
51
51
  }
52
52
  async function createCertificate(ctx, certificateType = CertificateType.IOS_DISTRIBUTION) {
53
53
  const {
54
- pem: csrPem,
55
- keyPair: { privateKey }
54
+ keyPair: { privateKey },
55
+ pem: csrPem
56
56
  } = await Certificate.createCertificateSigningRequestAsync();
57
57
  const certificate = await Certificate.createAsync(ctx, {
58
- csrContent: csrPem,
59
- certificateType
58
+ certificateType,
59
+ csrContent: csrPem
60
60
  });
61
61
  return {
62
62
  certificate,
@@ -68,8 +68,8 @@ function exportCertificate(certificate, privateKey) {
68
68
  const decodedCertificate = decodeCertificate(certificate.attributes.certificateContent);
69
69
  const password = forge.util.encode64(forge.random.getBytesSync(16));
70
70
  const pkcs12Asn1 = forge.pkcs12.toPkcs12Asn1(privateKey, [decodedCertificate], password, {
71
- friendlyName: "key",
72
- algorithm: "3des"
71
+ algorithm: "3des",
72
+ friendlyName: "key"
73
73
  });
74
74
  const encodedPkcs12 = encodePkcs12(pkcs12Asn1);
75
75
  return {
@@ -93,7 +93,7 @@ class AppleCertificateCreate extends BaseAppleCommand {
93
93
  const userAppleDistCredentials = userCredentials.filter(
94
94
  (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
95
95
  );
96
- if (userAppleDistCredentials.length !== 0 && !force) {
96
+ if (userAppleDistCredentials.length > 0 && !force) {
97
97
  this.error("An Apple Distribution Certificate already exists. Use --force to overwrite it.");
98
98
  }
99
99
  const authState = await this.refreshAppleAuthState();
@@ -101,15 +101,15 @@ class AppleCertificateCreate extends BaseAppleCommand {
101
101
  const createCert = async () => {
102
102
  const { certificate, privateKey } = await createCertificate(ctx);
103
103
  const exported = exportCertificate(certificate, privateKey);
104
- const serialNumber = certificate.attributes.serialNumber;
104
+ const { serialNumber } = certificate.attributes;
105
105
  await uploadUserCredentials({
106
- platform: Platform.IOS,
107
- type: CredentialsType.CERTIFICATE,
108
106
  contents: {
109
107
  serialNumber,
110
108
  ...exported
111
109
  },
112
- serialNumber
110
+ platform: Platform.IOS,
111
+ serialNumber,
112
+ type: CredentialsType.CERTIFICATE
113
113
  });
114
114
  };
115
115
  const handleComplete = async () => {
@@ -120,9 +120,9 @@ class AppleCertificateCreate extends BaseAppleCommand {
120
120
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
121
121
  RunWithSpinner,
122
122
  {
123
- msgInProgress: `Creating certificate in the Apple Developer Portal...`,
124
- msgComplete: `Certificate created and saved to ShipThis`,
125
123
  executeMethod: createCert,
124
+ msgComplete: `Certificate created and saved to ShipThis`,
125
+ msgInProgress: `Creating certificate in the Apple Developer Portal...`,
126
126
  onComplete: handleComplete
127
127
  }
128
128
  ) })
@@ -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 { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-w3lHxk5O.js';
6
- import { g as getUserCredentials } from '../../../index-C6aAyrXW.js';
7
- import 'react';
8
- import '../../../index-CyvGh-kt.js';
5
+ import { g as getUserCredentials } from '../../../index-CtTI85m-.js';
6
+ import { B as BaseAuthenticatedCommand, 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-DFdHXDiU.js';
34
- import { e as exportCredential } from '../../../export-DZxo2_e_.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-DJ078v-U.js';
39
- import '../../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
37
+ import 'ini';
38
+ import '../../../index-CGBdOm1q.js';
39
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
40
 
41
41
  class AppleCertificateExport extends BaseAuthenticatedCommand {
42
42
  static args = {
@@ -68,9 +68,9 @@ class AppleCertificateExport extends BaseAuthenticatedCommand {
68
68
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
69
69
  RunWithSpinner,
70
70
  {
71
- msgInProgress: `Exporting certificate to ${file}...`,
71
+ executeMethod: () => exportCredential({ credentialId: cert.id, zipPath: file }),
72
72
  msgComplete: `Certificate exported to ${file}`,
73
- executeMethod: () => exportCredential({ zipPath: file, credentialId: cert.id }),
73
+ msgInProgress: `Exporting certificate to ${file}...`,
74
74
  onComplete: handleComplete
75
75
  }
76
76
  ) })
@@ -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 { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-w3lHxk5O.js';
6
- import { g as getUserCredentials } from '../../../index-C6aAyrXW.js';
7
- import 'react';
8
- import '../../../index-CyvGh-kt.js';
5
+ import { g as getUserCredentials } from '../../../index-CtTI85m-.js';
6
+ import { B as BaseAuthenticatedCommand, 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-DFdHXDiU.js';
34
- import { i as importCredential } from '../../../import-8pL1AF47.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-DJ078v-U.js';
39
- import '../../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
37
+ import 'ini';
38
+ import '../../../index-CGBdOm1q.js';
39
+ import '../../../useAndroidServiceAccountTestResult-DZk5SMxI.js';
40
40
 
41
41
  class AppleCertificateImport extends BaseAuthenticatedCommand {
42
42
  static args = {
@@ -62,7 +62,7 @@ class AppleCertificateImport extends BaseAuthenticatedCommand {
62
62
  const userAppleDistCredentials = userCredentials.filter(
63
63
  (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
64
64
  );
65
- if (userAppleDistCredentials.length !== 0 && !force) {
65
+ if (userAppleDistCredentials.length > 0 && !force) {
66
66
  this.error("An Apple Distribution Certificate already exists. Use --force to overwrite it.");
67
67
  }
68
68
  const handleComplete = async () => {
@@ -72,9 +72,9 @@ class AppleCertificateImport extends BaseAuthenticatedCommand {
72
72
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
73
73
  RunWithSpinner,
74
74
  {
75
- msgInProgress: `Importing certificate from ${file}...`,
75
+ executeMethod: () => importCredential({ platform: Platform.IOS, type: CredentialsType.CERTIFICATE, zipPath: file }),
76
76
  msgComplete: `Certificate imported from ${file}`,
77
- executeMethod: () => importCredential({ zipPath: file, type: CredentialsType.CERTIFICATE, platform: Platform.IOS }),
77
+ msgInProgress: `Importing certificate from ${file}...`,
78
78
  onComplete: handleComplete
79
79
  }
80
80
  ) })