shipthis 0.1.35 → 0.1.37

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 (108) hide show
  1. package/README.md +231 -80
  2. package/assets/markdown/agreement-update.md.ejs +12 -0
  3. package/assets/markdown/confirm-delete-android-keystore.md.ejs +22 -0
  4. package/assets/markdown/confirm-delete-android-serviceaccountkey.md.ejs +24 -0
  5. package/assets/markdown/confirm-delete-apple-credential.md.ejs +29 -0
  6. package/dist/{AppleBundleIdDetails-N_j1wv6f.js → AppleBundleIdDetails-KMzyex1H.js} +3 -5
  7. package/dist/{Command-DN1j3tjt.js → Command-CHh8RDXK.js} +1 -2
  8. package/dist/{CommandGame-D2NqytWc.js → CommandGame-Rvmsa7b0.js} +2 -2
  9. package/dist/{Create-BRdv5jXQ.js → Create-DInZ_pw-.js} +1 -4
  10. package/dist/{GameStatus-joyHPy0f.js → GameStatus-D7ID10tS.js} +1 -4
  11. package/dist/{Import-BNMHsJoM.js → Import-BmO8EYKj.js} +2 -5
  12. package/dist/{JobLogTail-D35FO5v-.js → JobLogTail-CYdceTKL.js} +2 -5
  13. package/dist/{JobProgress-D-9KESaA.js → JobProgress-DBCYbWrO.js} +16 -18
  14. package/dist/{JobStatusTable-DIJ_h-gi.js → JobStatusTable-DhnhY1_i.js} +2 -4
  15. package/dist/{ProjectCredentialsTable-BMKgv99h.js → ProjectCredentialsTable-BDYVYqAq.js} +5 -3
  16. package/dist/{UserCredentialsTable-CUrTDzTK.js → UserCredentialsTable-cDPvjF-F.js} +4 -4
  17. package/dist/{baseAppleCommand-Cs9a52e5.js → baseAppleCommand-CQ5dOna7.js} +1 -1
  18. package/dist/{baseGameAndroidCommand-BCB1SMCf.js → baseGameAndroidCommand-D4ryZS6A.js} +1 -2
  19. package/dist/commands/apiKey/create.js +3 -6
  20. package/dist/commands/apiKey/list.js +3 -6
  21. package/dist/commands/apiKey/revoke.js +3 -6
  22. package/dist/commands/apple/apiKey/create.js +7 -10
  23. package/dist/commands/apple/apiKey/delete.js +118 -0
  24. package/dist/commands/apple/apiKey/export.js +6 -9
  25. package/dist/commands/apple/apiKey/import.js +6 -9
  26. package/dist/commands/apple/apiKey/status.js +4 -7
  27. package/dist/commands/apple/certificate/create.js +7 -10
  28. package/dist/commands/apple/certificate/delete.js +127 -0
  29. package/dist/commands/apple/certificate/export.js +6 -9
  30. package/dist/commands/apple/certificate/import.js +6 -9
  31. package/dist/commands/apple/certificate/status.js +4 -7
  32. package/dist/commands/apple/login.js +23 -4
  33. package/dist/commands/apple/status.js +4 -7
  34. package/dist/commands/dashboard.js +12 -1
  35. package/dist/commands/game/android/apiKey/connect.js +8 -11
  36. package/dist/commands/game/android/apiKey/create.js +10 -13
  37. package/dist/commands/game/android/apiKey/delete.js +100 -0
  38. package/dist/commands/game/android/apiKey/export.js +6 -9
  39. package/dist/commands/game/android/apiKey/import.js +6 -9
  40. package/dist/commands/game/android/apiKey/invite.js +14 -4
  41. package/dist/commands/game/android/apiKey/policy.js +3 -6
  42. package/dist/commands/game/android/apiKey/status.js +6 -9
  43. package/dist/commands/game/android/keyStore/create.js +7 -10
  44. package/dist/commands/game/android/keyStore/delete.js +100 -0
  45. package/dist/commands/game/android/keyStore/export.js +5 -8
  46. package/dist/commands/game/android/keyStore/import.js +8 -11
  47. package/dist/commands/game/android/keyStore/status.js +7 -10
  48. package/dist/commands/game/android/status.js +13 -1
  49. package/dist/commands/game/build/download.js +3 -6
  50. package/dist/commands/game/build/list.js +4 -7
  51. package/dist/commands/game/create.js +13 -2
  52. package/dist/commands/game/details.js +4 -7
  53. package/dist/commands/game/export.js +13 -1
  54. package/dist/commands/game/ios/app/addTester.js +4 -7
  55. package/dist/commands/game/ios/app/create.js +3 -6
  56. package/dist/commands/game/ios/app/status.js +6 -9
  57. package/dist/commands/game/ios/app/sync.js +4 -7
  58. package/dist/commands/game/ios/profile/create.js +6 -9
  59. package/dist/commands/game/ios/profile/delete.js +123 -0
  60. package/dist/commands/game/ios/profile/export.js +5 -8
  61. package/dist/commands/game/ios/profile/import.js +5 -8
  62. package/dist/commands/game/ios/profile/status.js +8 -51
  63. package/dist/commands/game/ios/status.js +10 -13
  64. package/dist/commands/game/ios/wizard.js +2 -6
  65. package/dist/commands/game/job/list.js +3 -6
  66. package/dist/commands/game/job/status.js +8 -11
  67. package/dist/commands/game/list.js +3 -6
  68. package/dist/commands/game/ship.js +17 -14
  69. package/dist/commands/game/status.js +7 -10
  70. package/dist/commands/game/wizard.js +14 -17
  71. package/dist/commands/internal/fastlane.js +13 -1
  72. package/dist/commands/internal/readme.js +13 -4
  73. package/dist/commands/login.js +27 -4
  74. package/dist/commands/status.js +6 -8
  75. package/dist/{export-DFCZKNQk.js → export-DujIwhJw.js} +1 -1
  76. package/dist/{import-BpGyif-m.js → import-DGCqCAcC.js} +1 -1
  77. package/dist/{index-DlE_SPt3.js → index-9LxGafAo.js} +3 -5
  78. package/dist/{index-BTXEUd8W.js → index-BPh_qt7t.js} +4 -6
  79. package/dist/index-CNsmEDXi.js +48 -0
  80. package/dist/index-CmuXyPed.js +1905 -0
  81. package/dist/{upload-D19OQsbn.js → upload-D4x4yCia.js} +1 -1
  82. package/dist/{useAppleApp-BZc_cNa-.js → useAppleApp-taaewPSf.js} +1 -1
  83. package/dist/{useAppleBundleId-DvMXAvWD.js → useAppleBundleId-BeGViMe7.js} +1 -1
  84. package/dist/useAppleProfiles-1TtO0aO6.js +63 -0
  85. package/dist/{useGoogleStatus-Cx_QIsXa.js → useGoogleStatus-CSsxEvX7.js} +1 -2
  86. package/dist/{useProjectCredentials-DxdwJCfU.js → useProjectCredentials-Cm50WMZU.js} +1 -3
  87. package/dist/{useWebSocket-cM5yOcDv.js → useWebSocket-BVfn36be.js} +1 -1
  88. package/docs/apple/apiKey/delete.md +25 -0
  89. package/docs/apple/apiKey.md +26 -0
  90. package/docs/apple/certificate/delete.md +25 -0
  91. package/docs/apple/certificate.md +26 -0
  92. package/docs/assets/st.png +0 -0
  93. package/docs/game/android/apiKey/delete.md +25 -0
  94. package/docs/game/android/apiKey.md +26 -0
  95. package/docs/game/android/keyStore/delete.md +25 -0
  96. package/docs/game/android/keyStore.md +26 -0
  97. package/docs/game/ios/profile/delete.md +26 -0
  98. package/docs/game/ios/profile.md +27 -0
  99. package/docs/game/ship.md +4 -4
  100. package/docs/login.md +6 -2
  101. package/docs/status.md +1 -1
  102. package/package.json +13 -2
  103. package/dist/ejs-DirFZbza.js +0 -716
  104. package/dist/index-BwnzoldS.js +0 -784
  105. package/dist/index-CJWMt1s-.js +0 -153
  106. package/dist/index-hoHfGrjg.js +0 -221
  107. package/dist/index-izrACZbC.js +0 -24
  108. package/dist/useAndroidServiceAccountTestResult-CwKeW0ED.js +0 -50
@@ -7,13 +7,11 @@ import { useState, useRef, useEffect } from 'react';
7
7
  import 'node:fs';
8
8
  import 'crypto-js';
9
9
  import 'uuid';
10
- import { p as getAuthedHeaders, o as API_URL, I as castArrayObjectDates, J as JobStatus, a9 as castJobDates, a7 as castObjectDates, aa as getShortTime } from './index-BwnzoldS.js';
11
- import { d as getStageColor, j as getMessageColor } from './index-CJWMt1s-.js';
10
+ import { a0 as cacheKeys, t as getAuthedHeaders, s as API_URL, V as castArrayObjectDates, L as JobStatus, ay as useJob, az as castJobDates, aw as castObjectDates, M as getStageColor, aA as getMessageColor, aB as getShortTime } from './index-CmuXyPed.js';
12
11
  import 'luxon';
13
12
  import 'fast-glob';
14
13
  import 'yazl';
15
14
  import 'socket.io-client';
16
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-CwKeW0ED.js';
17
15
  import 'node:crypto';
18
16
  import 'node:path';
19
17
  import 'node:readline';
@@ -22,8 +20,7 @@ import 'readline-sync';
22
20
  import 'isomorphic-git';
23
21
  import '@oclif/core';
24
22
  import 'fullscreen-ink';
25
- import { f as useJob } from './index-hoHfGrjg.js';
26
- import { u as useWebSocket } from './useWebSocket-cM5yOcDv.js';
23
+ import { u as useWebSocket } from './useWebSocket-BVfn36be.js';
27
24
  import { T as Title } from './Title-BCQtayg6.js';
28
25
  import stringLength from 'string-length';
29
26
  import stripAnsi from 'strip-ansi';
@@ -4,9 +4,7 @@ import axios from 'axios';
4
4
  import fg from 'fast-glob';
5
5
  import { v4 } from 'uuid';
6
6
  import { ZipFile } from 'yazl';
7
- import { K as queryClient, v as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a4 as getNewUploadTicket, a5 as startJobsFromUpload } from './index-BwnzoldS.js';
8
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-CwKeW0ED.js';
9
- import { f as getFileHash, h as getPlatformName } from './index-CJWMt1s-.js';
7
+ import { X as queryClient, a0 as cacheKeys, z as DEFAULT_SHIPPED_FILES_GLOBS, E as DEFAULT_IGNORED_FILES_GLOBS, am as getNewUploadTicket, an as getFileHash, ao as startJobsFromUpload, ap as getPlatformName } from './index-CmuXyPed.js';
10
8
  import { g as getCWDGitInfo } from './git-BpsfNFZ_.js';
11
9
  import { jsx, Fragment } from 'react/jsx-runtime';
12
10
  import 'ink';
@@ -15,23 +13,22 @@ import 'react';
15
13
  import 'crypto-js';
16
14
  import 'luxon';
17
15
  import 'socket.io-client';
18
- import { u as useJobWatching } from './JobLogTail-D35FO5v-.js';
16
+ import { u as useJobWatching } from './JobLogTail-CYdceTKL.js';
19
17
  import 'fullscreen-ink';
20
18
  import 'string-length';
21
19
  import 'strip-ansi';
22
20
  import 'open';
23
21
  import '@inkjs/ui';
24
22
  import 'node:path';
25
- import './ejs-DirFZbza.js';
26
23
  import 'marked';
27
24
  import 'marked-terminal';
28
25
  import { P as ProgressSpinner } from './ProgressSpinner-Um6ARKlk.js';
29
26
  import 'qrcode';
30
- import './index-hoHfGrjg.js';
31
27
 
32
28
  async function ship({ command, log = () => {
33
29
  }, shipFlags }) {
34
- log("Fetching game config...");
30
+ const verbose = Boolean(shipFlags?.verbose || command.getFlags().verbose);
31
+ verbose && log("Fetching game config...");
35
32
  const projectConfig = await command.getProjectConfig();
36
33
  if (!projectConfig.project) throw new Error("No project found in project config");
37
34
  const hasConfiguredIos = Boolean(projectConfig.project.details?.iosBundleId);
@@ -41,12 +38,12 @@ async function ship({ command, log = () => {
41
38
  "No Android or iOS configuration found. Please run `shipthis game wizard android` or `shipthis game wizard ios` to configure your game."
42
39
  );
43
40
  }
44
- log("Retrieving file globs...");
41
+ verbose && log("Retrieving file globs...");
45
42
  const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
46
43
  const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
47
- log("Finding files to include in zip...");
44
+ verbose && log("Finding files to include in zip...");
48
45
  const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
49
- log(`Found ${files.length} files, adding to zip...`);
46
+ verbose && log(`Found ${files.length} files, adding to zip...`);
50
47
  const zipFile = new ZipFile();
51
48
  for (const file of files) {
52
49
  zipFile.addFile(file, file);
@@ -59,10 +56,10 @@ async function ship({ command, log = () => {
59
56
  const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
60
57
  log(`Creating zip file: ${tmpZipFile}`);
61
58
  await outputZipToFile(zipFile, tmpZipFile);
62
- log("Reading zip file buffer...");
59
+ verbose && log("Reading zip file buffer...");
63
60
  const zipBuffer = fs__default.readFileSync(tmpZipFile);
64
61
  const { size } = fs__default.statSync(tmpZipFile);
65
- log("Requesting upload ticket...");
62
+ verbose && log("Requesting upload ticket...");
66
63
  const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
67
64
  log("Uploading zip file...");
68
65
  await axios.put(uploadTicket.url, zipBuffer, {
@@ -71,25 +68,26 @@ async function ship({ command, log = () => {
71
68
  "Content-length": size
72
69
  }
73
70
  });
74
- log("Fetching Git info...");
71
+ verbose && log("Fetching Git info...");
75
72
  const gitInfo = await getCWDGitInfo();
76
- log("Computing file hash...");
73
+ verbose && log("Computing file hash...");
77
74
  const zipFileMd5 = await getFileHash(tmpZipFile);
78
75
  const uploadDetails = {
79
76
  ...gitInfo,
80
77
  zipFileMd5
81
78
  };
82
- log("Starting jobs from upload...");
79
+ verbose && log("Starting jobs from upload...");
83
80
  const finalFlags = shipFlags || command.getFlags();
84
81
  const startJobsOptions = {
85
82
  ...uploadDetails,
86
83
  platform: finalFlags.platform?.toUpperCase(),
87
- skipPublish: finalFlags.skipPublish
84
+ skipPublish: finalFlags.skipPublish,
85
+ verbose: finalFlags.verbose
88
86
  };
89
87
  const jobs = await startJobsFromUpload(uploadTicket.id, startJobsOptions);
90
- log("Cleaning up temporary zip file...");
88
+ verbose && log("Cleaning up temporary zip file...");
91
89
  fs__default.unlinkSync(tmpZipFile);
92
- log("Job submission complete.");
90
+ verbose && log("Job submission complete.");
93
91
  if (jobs.length === 0) {
94
92
  throw new Error("No jobs were created. Please check your game configuration and try again.");
95
93
  }
@@ -3,18 +3,16 @@ import { Box, Text } from 'ink';
3
3
  import Spinner from 'ink-spinner';
4
4
  import { DateTime } from 'luxon';
5
5
  import { useState, useEffect } from 'react';
6
- import { J as JobStatus } from './index-BwnzoldS.js';
6
+ import { L as JobStatus, I as getJobSummary, M as getStageColor, J as getJobStatusColor } from './index-CmuXyPed.js';
7
7
  import '@tanstack/react-query';
8
8
  import 'axios';
9
9
  import 'node:fs';
10
10
  import 'crypto-js';
11
11
  import 'uuid';
12
- import { d as getStageColor, c as getJobStatusColor } from './index-CJWMt1s-.js';
13
- import { a as getJobSummary } from './index-hoHfGrjg.js';
14
12
  import 'fast-glob';
15
13
  import 'yazl';
16
14
  import 'socket.io-client';
17
- import { u as useJobWatching } from './JobLogTail-D35FO5v-.js';
15
+ import { u as useJobWatching } from './JobLogTail-CYdceTKL.js';
18
16
  import 'fullscreen-ink';
19
17
  import { a as StatusRow, b as StatusRowLabel } from './StatusTable-DzRWcMr4.js';
20
18
  import { T as Title } from './Title-BCQtayg6.js';
@@ -10,13 +10,13 @@ import 'readline-sync';
10
10
  import 'luxon';
11
11
  import 'axios';
12
12
  import 'isomorphic-git';
13
- import './index-BwnzoldS.js';
13
+ import './index-CmuXyPed.js';
14
14
  import '@oclif/core';
15
15
  import '@tanstack/react-query';
16
16
  import 'react';
17
17
  import 'crypto-js';
18
18
  import 'uuid';
19
- import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-DxdwJCfU.js';
19
+ import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-Cm50WMZU.js';
20
20
  import 'fast-glob';
21
21
  import 'yazl';
22
22
  import 'socket.io-client';
@@ -27,11 +27,13 @@ import { T as Title } from './Title-BCQtayg6.js';
27
27
  const ProjectCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
28
28
  const { data, isLoading } = useProjectCredentials(queryProps);
29
29
  const hasActive = data?.data.some((credential) => credential.isActive);
30
+ const hasInactive = data?.data.some((credential) => !credential.isActive);
30
31
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
31
32
  /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
32
33
  /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
33
34
  isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
34
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getProjectCredentialSummary) })
35
+ data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getProjectCredentialSummary) }),
36
+ hasInactive && /* @__PURE__ */ jsx(Text, { children: "Inactive credentials are automatically removed from storage after 24 hours." })
35
37
  ] });
36
38
  };
37
39
 
@@ -10,7 +10,7 @@ import 'readline-sync';
10
10
  import 'luxon';
11
11
  import axios from 'axios';
12
12
  import 'isomorphic-git';
13
- import { b as getShortDate, p as getAuthedHeaders, o as API_URL, I as castArrayObjectDates } from './index-BwnzoldS.js';
13
+ import { a0 as cacheKeys, g as getShortUUID, f as getShortDate, t as getAuthedHeaders, s as API_URL, V as castArrayObjectDates } from './index-CmuXyPed.js';
14
14
  import '@oclif/core';
15
15
  import { useQuery } from '@tanstack/react-query';
16
16
  import 'react';
@@ -18,8 +18,6 @@ import 'crypto-js';
18
18
  import 'uuid';
19
19
  import 'fast-glob';
20
20
  import 'yazl';
21
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-CwKeW0ED.js';
22
- import { g as getShortUUID } from './index-CJWMt1s-.js';
23
21
  import 'socket.io-client';
24
22
  import 'fullscreen-ink';
25
23
  import { T as Table } from './Table-FaNgpyeq.js';
@@ -70,11 +68,13 @@ const useUserCredentials = ({
70
68
  const UserCredentialsTable = ({ credentialTypeName, queryProps, ...boxProps }) => {
71
69
  const { data, isLoading } = useUserCredentials(queryProps);
72
70
  const hasActive = data?.data.some((credential) => credential.isActive);
71
+ const hasInactive = data?.data.some((credential) => !credential.isActive);
73
72
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
74
73
  /* @__PURE__ */ jsx(Title, { children: `${credentialTypeName}s in your ShipThis account` }),
75
74
  /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { children: hasActive ? `You have an active ${credentialTypeName} in your ShipThis account.` : `You DO NOT have an active ${credentialTypeName} which ShipThis can use.` }) }),
76
75
  isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
77
- data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getUserCredentialSummary) })
76
+ data && data.data.length > 0 && /* @__PURE__ */ jsx(Table, { data: data.data.map(getUserCredentialSummary) }),
77
+ hasInactive && /* @__PURE__ */ jsx(Text, { children: "Inactive credentials are automatically removed from storage after 24 hours." })
78
78
  ] });
79
79
  };
80
80
 
@@ -1,4 +1,4 @@
1
- import { B as BaseAuthenticatedCommand } from './index-BwnzoldS.js';
1
+ import { B as BaseAuthenticatedCommand } from './index-CmuXyPed.js';
2
2
 
3
3
  class BaseAppleCommand extends BaseAuthenticatedCommand {
4
4
  async init() {
@@ -1,5 +1,4 @@
1
- import { c as BaseGameCommand, Q as getGoogleStatus, R as getGodotAndroidPackageName } from './index-BwnzoldS.js';
2
- import { b as generatePackageName, a as getInput } from './index-CJWMt1s-.js';
1
+ import { h as BaseGameCommand, a2 as getGoogleStatus, i as generatePackageName, a3 as getGodotAndroidPackageName, c as getInput } from './index-CmuXyPed.js';
3
2
 
4
3
  class BaseGameAndroidCommand extends BaseGameCommand {
5
4
  async checkGoogleAuth(waitForAuth = false) {
@@ -2,9 +2,8 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
4
  import { v4 } from 'uuid';
5
- import { B as BaseAuthenticatedCommand, _ as createAPIKey, b as getShortDate } from '../../index-BwnzoldS.js';
5
+ import { B as BaseAuthenticatedCommand, g as getShortUUID, af as createAPIKey, b as getRenderedMarkdown, f as getShortDate } from '../../index-CmuXyPed.js';
6
6
  import 'ink-spinner';
7
- import { g as getShortUUID } from '../../index-CJWMt1s-.js';
8
7
  import 'react';
9
8
  import '@tanstack/react-query';
10
9
  import 'axios';
@@ -18,12 +17,12 @@ import 'string-length';
18
17
  import 'strip-ansi';
19
18
  import 'open';
20
19
  import '@inkjs/ui';
21
- import { g as getRenderedMarkdown } from '../../index-hoHfGrjg.js';
22
20
  import 'qrcode';
23
21
  import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js';
24
- import { C as Command } from '../../Command-DN1j3tjt.js';
22
+ import { C as Command } from '../../Command-CHh8RDXK.js';
25
23
  import 'crypto-js';
26
24
  import 'node:path';
25
+ import 'chalk';
27
26
  import '@expo/apple-utils/build/index.js';
28
27
  import 'node:crypto';
29
28
  import 'node:readline';
@@ -32,8 +31,6 @@ import 'readline-sync';
32
31
  import 'isomorphic-git';
33
32
  import 'deepmerge';
34
33
  import 'ini';
35
- import '../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
36
- import '../../ejs-DirFZbza.js';
37
34
  import 'fs';
38
35
  import 'path';
39
36
  import 'marked';
@@ -1,9 +1,8 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { render, Box, Text } from 'ink';
4
- import { B as BaseAuthenticatedCommand, Z as getAPIKeys, b as getShortDate } from '../../index-BwnzoldS.js';
4
+ import { B as BaseAuthenticatedCommand, ae as getAPIKeys, f as getShortDate, g as getShortUUID } from '../../index-CmuXyPed.js';
5
5
  import 'ink-spinner';
6
- import { g as getShortUUID } from '../../index-CJWMt1s-.js';
7
6
  import { T as Table } from '../../Table-FaNgpyeq.js';
8
7
  import 'react';
9
8
  import '@tanstack/react-query';
@@ -20,13 +19,12 @@ import 'strip-ansi';
20
19
  import 'open';
21
20
  import '@inkjs/ui';
22
21
  import 'node:path';
23
- import '../../ejs-DirFZbza.js';
24
22
  import 'marked';
25
23
  import 'marked-terminal';
26
24
  import 'qrcode';
27
- import '../../index-hoHfGrjg.js';
28
- import { C as Command } from '../../Command-DN1j3tjt.js';
25
+ import { C as Command } from '../../Command-CHh8RDXK.js';
29
26
  import 'crypto-js';
27
+ import 'chalk';
30
28
  import '@expo/apple-utils/build/index.js';
31
29
  import 'node:crypto';
32
30
  import 'node:readline';
@@ -37,7 +35,6 @@ import 'deepmerge';
37
35
  import 'ini';
38
36
  import 'fs';
39
37
  import 'path';
40
- import '../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
41
38
 
42
39
  class ApiKeyList extends BaseAuthenticatedCommand {
43
40
  static args = {};
@@ -1,9 +1,8 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
- import { B as BaseAuthenticatedCommand, $ as revokeAPIKey } from '../../index-BwnzoldS.js';
4
+ import { B as BaseAuthenticatedCommand, ag as revokeAPIKey, g as getShortUUID } from '../../index-CmuXyPed.js';
5
5
  import 'ink-spinner';
6
- import { g as getShortUUID } from '../../index-CJWMt1s-.js';
7
6
  import 'react';
8
7
  import '@tanstack/react-query';
9
8
  import 'axios';
@@ -19,14 +18,13 @@ import 'strip-ansi';
19
18
  import 'open';
20
19
  import '@inkjs/ui';
21
20
  import 'node:path';
22
- import '../../ejs-DirFZbza.js';
23
21
  import 'marked';
24
22
  import 'marked-terminal';
25
23
  import 'qrcode';
26
24
  import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js';
27
- import '../../index-hoHfGrjg.js';
28
- import { C as Command } from '../../Command-DN1j3tjt.js';
25
+ import { C as Command } from '../../Command-CHh8RDXK.js';
29
26
  import 'crypto-js';
27
+ import 'chalk';
30
28
  import '@expo/apple-utils/build/index.js';
31
29
  import 'node:crypto';
32
30
  import 'node:readline';
@@ -37,7 +35,6 @@ import 'deepmerge';
37
35
  import 'ini';
38
36
  import 'fs';
39
37
  import 'path';
40
- import '../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
41
38
 
42
39
  class ApiKeyRevoke extends BaseAuthenticatedCommand {
43
40
  static args = {
@@ -1,8 +1,8 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { render } from 'ink';
4
- import { g as getUserCredentials } from '../../../index-izrACZbC.js';
5
- import { P as Platform, C as CredentialsType, A as ApiKey, U as UserRole, a as ApiKeyType } from '../../../index-BwnzoldS.js';
4
+ import { g as getUserCredentials } from '../../../index-CNsmEDXi.js';
5
+ import { P as Platform, C as CredentialsType, A as ApiKey, U as UserRole, a as ApiKeyType } from '../../../index-CmuXyPed.js';
6
6
  import 'ink-spinner';
7
7
  import 'node:crypto';
8
8
  import 'node:fs';
@@ -25,22 +25,19 @@ import 'string-length';
25
25
  import 'strip-ansi';
26
26
  import 'open';
27
27
  import '@inkjs/ui';
28
- import '../../../ejs-DirFZbza.js';
29
28
  import 'marked';
30
29
  import 'marked-terminal';
31
30
  import 'qrcode';
32
31
  import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
33
- import '../../../index-hoHfGrjg.js';
34
- import { C as Command } from '../../../Command-DN1j3tjt.js';
35
- import { B as BaseAppleCommand } from '../../../baseAppleCommand-Cs9a52e5.js';
36
- import { u as uploadUserCredentials } from '../../../upload-D19OQsbn.js';
32
+ import { C as Command } from '../../../Command-CHh8RDXK.js';
33
+ import { B as BaseAppleCommand } from '../../../baseAppleCommand-CQ5dOna7.js';
34
+ import { u as uploadUserCredentials } from '../../../upload-D4x4yCia.js';
35
+ import 'chalk';
37
36
  import '@expo/apple-utils/build/index.js';
38
37
  import 'deepmerge';
39
38
  import 'ini';
40
39
  import 'fs';
41
40
  import 'path';
42
- import '../../../index-CJWMt1s-.js';
43
- import '../../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
44
41
 
45
42
  class AppleApiKeyCreate extends BaseAppleCommand {
46
43
  static args = {};
@@ -55,7 +52,7 @@ class AppleApiKeyCreate extends BaseAppleCommand {
55
52
  const { force } = flags;
56
53
  const userCredentials = await getUserCredentials();
57
54
  const userAppleApiKeyCredentials = userCredentials.filter(
58
- (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY
55
+ (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY && cred.isActive
59
56
  );
60
57
  if (userAppleApiKeyCredentials.length > 0 && !force) {
61
58
  this.error("An App Store Connect API already exists. Use --force to overwrite it.");
@@ -0,0 +1,118 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { P as Platform, C as CredentialsType, A as ApiKey, g as getShortUUID, b as getRenderedMarkdown, c as getInput } from '../../../index-CmuXyPed.js';
3
+ import 'node:fs';
4
+ import 'axios';
5
+ import 'crypto-js';
6
+ import 'uuid';
7
+ import 'luxon';
8
+ import { g as getUserCredentials, d as deleteUserCredential } from '../../../index-CNsmEDXi.js';
9
+ import 'react/jsx-runtime';
10
+ import '@inkjs/ui';
11
+ import 'ink';
12
+ import 'ink-spinner';
13
+ import 'react';
14
+ import '@tanstack/react-query';
15
+ import 'fast-glob';
16
+ import 'yazl';
17
+ import 'socket.io-client';
18
+ import 'fullscreen-ink';
19
+ import 'string-length';
20
+ import 'strip-ansi';
21
+ import 'open';
22
+ import 'qrcode';
23
+ import { B as BaseAppleCommand } from '../../../baseAppleCommand-CQ5dOna7.js';
24
+ import 'node:path';
25
+ import 'chalk';
26
+ import '@expo/apple-utils/build/index.js';
27
+ import 'node:crypto';
28
+ import 'node:readline';
29
+ import 'node:url';
30
+ import 'readline-sync';
31
+ import 'isomorphic-git';
32
+ import 'deepmerge';
33
+ import 'ini';
34
+ import 'fs';
35
+ import 'path';
36
+ import 'marked';
37
+ import 'marked-terminal';
38
+
39
+ class AppleApiKeyDelete extends BaseAppleCommand {
40
+ static args = {};
41
+ static description = "Delete an Apple API Key from ShipThis and optionally from Apple";
42
+ static examples = [
43
+ "<%= config.bin %> <%= command.id %>",
44
+ "<%= config.bin %> <%= command.id %> --immediate --revokeInApple --iAmSure"
45
+ ];
46
+ static flags = {
47
+ immediate: Flags.boolean({
48
+ char: "i",
49
+ description: "Remove from storage immediately (rather than waiting for automatic cleanup - cannot be undone)",
50
+ required: false
51
+ }),
52
+ iAmSure: Flags.boolean({
53
+ char: "y",
54
+ description: "I am sure I want to do this - do not prompt me",
55
+ required: false
56
+ }),
57
+ revokeInApple: Flags.boolean({
58
+ char: "a",
59
+ description: "Also revoke the API Key in Apple (cannot be undone)",
60
+ required: false
61
+ })
62
+ };
63
+ async run() {
64
+ const { flags } = await this.parse(AppleApiKeyDelete);
65
+ const { immediate, iAmSure, revokeInApple } = flags;
66
+ const userCredentials = await getUserCredentials();
67
+ const userKeys = userCredentials.filter(
68
+ (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY && cred.isActive
69
+ );
70
+ if (userKeys.length === 0) {
71
+ this.error("No App Store Connect API Key found which can be deleted.");
72
+ }
73
+ const [key] = userKeys;
74
+ let appleKey = null;
75
+ if (revokeInApple) {
76
+ const authState = await this.refreshAppleAuthState();
77
+ const ctx = authState.context;
78
+ appleKey = await ApiKey.infoAsync(ctx, { id: key.serialNumber });
79
+ if (!appleKey?.id) {
80
+ this.error("The App Store Connect API Key was not found in Apple, so cannot be revoked there.");
81
+ }
82
+ }
83
+ const getAreYouSure = async () => {
84
+ if (iAmSure) return true;
85
+ const confirmString = getShortUUID(key.id);
86
+ const prompt = getRenderedMarkdown({
87
+ filename: "confirm-delete-apple-credential.md.ejs",
88
+ templateVars: {
89
+ confirmString,
90
+ credentialType: "App Store Connect API Key",
91
+ exportCommand: `shipthis apple apiKey export appleApiKey.zip`,
92
+ immediate,
93
+ revokeInApple
94
+ }
95
+ });
96
+ this.log(prompt);
97
+ const input = await getInput("");
98
+ return input.trim().toLowerCase() === confirmString.toLowerCase();
99
+ };
100
+ const areYouSure = await getAreYouSure();
101
+ if (!areYouSure) {
102
+ this.log("Aborting - not deleting the API Key");
103
+ this.exit(0);
104
+ }
105
+ await deleteUserCredential({
106
+ credentialId: key.id,
107
+ isImmediate: immediate
108
+ });
109
+ this.log("The API Key has been deleted from ShipThis.");
110
+ if (revokeInApple && appleKey?.id) {
111
+ await appleKey.revokeAsync();
112
+ this.log("The API Key has been revoked in Apple.");
113
+ }
114
+ await this.config.runCommand(`apple:apiKey:status`, [!revokeInApple ? "--noAppleAuth" : ""].filter(Boolean));
115
+ }
116
+ }
117
+
118
+ export { AppleApiKeyDelete as default };
@@ -2,8 +2,8 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import * as fs from 'node:fs';
3
3
  import { Args, Flags } from '@oclif/core';
4
4
  import { render } from 'ink';
5
- import { g as getUserCredentials } from '../../../index-izrACZbC.js';
6
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BwnzoldS.js';
5
+ import { g as getUserCredentials } from '../../../index-CNsmEDXi.js';
6
+ import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-CmuXyPed.js';
7
7
  import 'ink-spinner';
8
8
  import 'node:crypto';
9
9
  import 'node:path';
@@ -25,21 +25,18 @@ import 'string-length';
25
25
  import 'strip-ansi';
26
26
  import 'open';
27
27
  import '@inkjs/ui';
28
- import '../../../ejs-DirFZbza.js';
29
28
  import 'marked';
30
29
  import 'marked-terminal';
31
30
  import 'qrcode';
32
31
  import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
33
- import '../../../index-hoHfGrjg.js';
34
- import { C as Command } from '../../../Command-DN1j3tjt.js';
35
- import { e as exportCredential } from '../../../export-DFCZKNQk.js';
32
+ import { C as Command } from '../../../Command-CHh8RDXK.js';
33
+ import { e as exportCredential } from '../../../export-DujIwhJw.js';
34
+ import 'chalk';
36
35
  import '@expo/apple-utils/build/index.js';
37
36
  import 'deepmerge';
38
37
  import 'ini';
39
38
  import 'fs';
40
39
  import 'path';
41
- import '../../../index-CJWMt1s-.js';
42
- import '../../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
43
40
 
44
41
  class AppleApiKeyExport extends BaseAuthenticatedCommand {
45
42
  static args = {
@@ -60,7 +57,7 @@ class AppleApiKeyExport extends BaseAuthenticatedCommand {
60
57
  }
61
58
  const userCredentials = await getUserCredentials();
62
59
  const userAppleApiKeyCredentials = userCredentials.filter(
63
- (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY
60
+ (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY && cred.isActive
64
61
  );
65
62
  if (userAppleApiKeyCredentials.length === 0) {
66
63
  this.error("No App Store Connect API Key found which can be exported.");
@@ -2,8 +2,8 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import * as fs from 'node:fs';
3
3
  import { Args, Flags } from '@oclif/core';
4
4
  import { render } from 'ink';
5
- import { g as getUserCredentials } from '../../../index-izrACZbC.js';
6
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BwnzoldS.js';
5
+ import { g as getUserCredentials } from '../../../index-CNsmEDXi.js';
6
+ import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-CmuXyPed.js';
7
7
  import 'ink-spinner';
8
8
  import 'node:crypto';
9
9
  import 'node:path';
@@ -25,21 +25,18 @@ import 'string-length';
25
25
  import 'strip-ansi';
26
26
  import 'open';
27
27
  import '@inkjs/ui';
28
- import '../../../ejs-DirFZbza.js';
29
28
  import 'marked';
30
29
  import 'marked-terminal';
31
30
  import 'qrcode';
32
31
  import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
33
- import '../../../index-hoHfGrjg.js';
34
- import { C as Command } from '../../../Command-DN1j3tjt.js';
35
- import { i as importCredential } from '../../../import-BpGyif-m.js';
32
+ import { C as Command } from '../../../Command-CHh8RDXK.js';
33
+ import { i as importCredential } from '../../../import-DGCqCAcC.js';
34
+ import 'chalk';
36
35
  import '@expo/apple-utils/build/index.js';
37
36
  import 'deepmerge';
38
37
  import 'ini';
39
38
  import 'fs';
40
39
  import 'path';
41
- import '../../../index-CJWMt1s-.js';
42
- import '../../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
43
40
 
44
41
  class AppleApiKeyImport extends BaseAuthenticatedCommand {
45
42
  static args = {
@@ -63,7 +60,7 @@ class AppleApiKeyImport extends BaseAuthenticatedCommand {
63
60
  }
64
61
  const userCredentials = await getUserCredentials();
65
62
  const userAppleApiKeyCredentials = userCredentials.filter(
66
- (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY
63
+ (cred) => cred.platform === Platform.IOS && cred.type === CredentialsType.KEY && cred.isActive
67
64
  );
68
65
  if (userAppleApiKeyCredentials.length > 0 && !force) {
69
66
  this.error("An App Store Connect API Key already exists. Use --force to overwrite it.");
@@ -1,7 +1,7 @@
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-BwnzoldS.js';
4
+ import { f as getShortDate, A as ApiKey, C as CredentialsType, P as Platform, B as BaseAuthenticatedCommand } from '../../../index-CmuXyPed.js';
5
5
  import Spinner from 'ink-spinner';
6
6
  import 'node:crypto';
7
7
  import 'node:fs';
@@ -23,22 +23,19 @@ import 'fullscreen-ink';
23
23
  import 'string-length';
24
24
  import 'strip-ansi';
25
25
  import 'open';
26
- import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-CUrTDzTK.js';
26
+ import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-cDPvjF-F.js';
27
27
  import '@inkjs/ui';
28
- import '../../../ejs-DirFZbza.js';
29
28
  import 'marked';
30
29
  import 'marked-terminal';
31
30
  import 'qrcode';
32
- import '../../../index-hoHfGrjg.js';
33
31
  import { T as Table } from '../../../Table-FaNgpyeq.js';
34
32
  import { T as Title } from '../../../Title-BCQtayg6.js';
35
33
  import { N as NextSteps } from '../../../NextSteps-DbJHmscQ.js';
36
- import { C as Command } from '../../../Command-DN1j3tjt.js';
34
+ import { C as Command } from '../../../Command-CHh8RDXK.js';
35
+ import 'chalk';
37
36
  import '@expo/apple-utils/build/index.js';
38
37
  import 'deepmerge';
39
38
  import 'ini';
40
- import '../../../useAndroidServiceAccountTestResult-CwKeW0ED.js';
41
- import '../../../index-CJWMt1s-.js';
42
39
  import 'fs';
43
40
  import 'path';
44
41