shipthis 0.1.32 → 0.1.34

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 +8 -7
  2. package/assets/markdown/apikey-create.md +11 -0
  3. package/dist/{AppleBundleIdDetails-6H3cNWxw.js → AppleBundleIdDetails-By-sSGNl.js} +4 -4
  4. package/dist/{Command-WPpmLPkL.js → Command-VWMnGslo.js} +2 -2
  5. package/dist/{CommandGame-cxzWG4nT.js → CommandGame-BSVPZzNl.js} +2 -2
  6. package/dist/{Create-3Ob8sjik.js → Create-SR1Mq7BY.js} +4 -4
  7. package/dist/{GameStatus-BQEtVKvv.js → GameStatus-1ntFyxEx.js} +3 -3
  8. package/dist/{Import-CFuPDI0K.js → Import-cedOWPDz.js} +6 -6
  9. package/dist/{JobLogTail-0CBLoG8N.js → JobLogTail-C_W8UAMg.js} +5 -5
  10. package/dist/{JobProgress-lKqVT88m.js → JobProgress-CI385G53.js} +11 -8
  11. package/dist/{JobStatusTable-C_ZsZJCm.js → JobStatusTable-CdbKtwJE.js} +4 -4
  12. package/dist/{ProgressSpinner-DGcakQSK.js → ProgressSpinner-Um6ARKlk.js} +1 -1
  13. package/dist/{ProjectCredentialsTable-B5pHOnGu.js → ProjectCredentialsTable-ZnuIfcDB.js} +2 -2
  14. package/dist/{RunWithSpinner-gMVA07bZ.js → RunWithSpinner-DucRnFp6.js} +2 -1
  15. package/dist/{UserCredentialsTable-3W3qesh7.js → UserCredentialsTable-DRkAYgEA.js} +3 -3
  16. package/dist/{baseAppleCommand-BGV088--.js → baseAppleCommand-CsO-_Yzn.js} +1 -1
  17. package/dist/{baseGameAndroidCommand-CsemgVjp.js → baseGameAndroidCommand-CdjaAbNX.js} +2 -2
  18. package/dist/commands/apiKey/create.js +97 -0
  19. package/dist/commands/apiKey/list.js +91 -0
  20. package/dist/commands/apiKey/revoke.js +82 -0
  21. package/dist/commands/apple/apiKey/create.js +10 -10
  22. package/dist/commands/apple/apiKey/export.js +9 -9
  23. package/dist/commands/apple/apiKey/import.js +9 -9
  24. package/dist/commands/apple/apiKey/status.js +7 -7
  25. package/dist/commands/apple/certificate/create.js +10 -10
  26. package/dist/commands/apple/certificate/export.js +9 -9
  27. package/dist/commands/apple/certificate/import.js +9 -9
  28. package/dist/commands/apple/certificate/status.js +8 -8
  29. package/dist/commands/apple/login.js +3 -2
  30. package/dist/commands/apple/status.js +5 -5
  31. package/dist/commands/dashboard.js +2 -1
  32. package/dist/commands/game/android/apiKey/connect.js +9 -9
  33. package/dist/commands/game/android/apiKey/create.js +13 -13
  34. package/dist/commands/game/android/apiKey/export.js +10 -10
  35. package/dist/commands/game/android/apiKey/import.js +10 -10
  36. package/dist/commands/game/android/apiKey/invite.js +5 -4
  37. package/dist/commands/game/android/apiKey/status.js +9 -9
  38. package/dist/commands/game/android/keyStore/create.js +11 -11
  39. package/dist/commands/game/android/keyStore/export.js +9 -9
  40. package/dist/commands/game/android/keyStore/import.js +11 -11
  41. package/dist/commands/game/android/keyStore/status.js +7 -7
  42. package/dist/commands/game/android/status.js +2 -1
  43. package/dist/commands/game/build/download.js +6 -6
  44. package/dist/commands/game/build/list.js +6 -6
  45. package/dist/commands/game/create.js +3 -2
  46. package/dist/commands/game/details.js +5 -5
  47. package/dist/commands/game/export.js +2 -1
  48. package/dist/commands/game/ios/app/addTester.js +20 -15
  49. package/dist/commands/game/ios/app/create.js +6 -6
  50. package/dist/commands/game/ios/app/status.js +8 -8
  51. package/dist/commands/game/ios/app/sync.js +7 -7
  52. package/dist/commands/game/ios/profile/create.js +11 -11
  53. package/dist/commands/game/ios/profile/export.js +9 -9
  54. package/dist/commands/game/ios/profile/import.js +9 -9
  55. package/dist/commands/game/ios/profile/status.js +7 -7
  56. package/dist/commands/game/ios/status.js +10 -10
  57. package/dist/commands/game/ios/wizard.js +13 -8
  58. package/dist/commands/game/job/list.js +5 -5
  59. package/dist/commands/game/job/status.js +9 -9
  60. package/dist/commands/game/list.js +6 -6
  61. package/dist/commands/game/ship.js +19 -17
  62. package/dist/commands/game/status.js +7 -7
  63. package/dist/commands/game/wizard.js +22 -22
  64. package/dist/commands/internal/fastlane.js +2 -1
  65. package/dist/commands/internal/readme.js +2 -1
  66. package/dist/commands/login.js +3 -2
  67. package/dist/commands/status.js +5 -5
  68. package/dist/{export-CXsVPXA1.js → export-B5Yfd9vw.js} +1 -1
  69. package/dist/{import-DGvG5REx.js → import-A2WcStHl.js} +1 -1
  70. package/dist/{index-CS9Gwcb0.js → index-BBLtvl1Y.js} +7 -7
  71. package/dist/{index-C03TV1_J.js → index-Bz1qt_8T.js} +17 -9
  72. package/dist/{index-C66Dd8Xc.js → index-CA6-uLMn.js} +23 -12
  73. package/dist/{index-BhhiXbey.js → index-CO_ssVFA.js} +28 -4
  74. package/dist/{index-CGBdOm1q.js → index-CYjZ26If.js} +2 -1
  75. package/dist/{index-CtTI85m-.js → index-CgzANgJt.js} +1 -1
  76. package/dist/{upload-8y5MQEm9.js → upload-BIsFZzBO.js} +1 -1
  77. package/dist/{useAndroidServiceAccountTestResult-DZk5SMxI.js → useAndroidServiceAccountTestResult-DueKynFy.js} +1 -1
  78. package/dist/{useAppleApp-DWYGURwU.js → useAppleApp-BZR94exU.js} +1 -1
  79. package/dist/{useAppleBundleId-PsTJ2g1B.js → useAppleBundleId-Dg5DsItN.js} +1 -1
  80. package/dist/{useProjectCredentials-BEphqa18.js → useProjectCredentials-jQYGcDhT.js} +3 -3
  81. package/dist/{useWebSocket-5PYa2QER.js → useWebSocket-CIxkPaYi.js} +1 -1
  82. package/docs/apiKey/create.md +27 -0
  83. package/docs/apiKey/list.md +30 -0
  84. package/docs/apiKey/revoke.md +26 -0
  85. package/docs/apiKey.md +93 -0
  86. package/package.json +10 -4
package/README.md CHANGED
@@ -199,18 +199,19 @@ ShipThis is currently in open-beta as so it is completely free to use. You can s
199
199
 
200
200
  ### 🗂 Topics
201
201
 
202
- - [apple](https://shipth.is/docs/reference/apple) Commands that relate to linking your ShipThis account with your Apple Developer Account
203
- - [game](https://shipth.is/docs/reference/game) Commands that relate to configuring the specific game in the current working directory.
202
+ - [apiKey](https://shipth.is/docs/reference/apiKey) - Commands related to ShipThis API Keys
203
+ - [apple](https://shipth.is/docs/reference/apple) - Commands that relate to linking your ShipThis account with your Apple Developer Account
204
+ - [game](https://shipth.is/docs/reference/game) - Commands that relate to configuring the specific game in the current working directory.
204
205
 
205
206
  ### 🔧 Commands
206
207
 
207
- - [dashboard](https://shipth.is/docs/reference/dashboard) Opens the web browser to your shipth.is dashboard
208
- - [login](https://shipth.is/docs/reference/login) Sign in or create a new account
209
- - [status](https://shipth.is/docs/reference/status) Display your overall ShipThis account status
210
- - [help](https://shipth.is/docs/reference/help) Display help for a specific topic or command
208
+ - [dashboard](https://shipth.is/docs/reference/dashboard) - Opens the web browser to your shipth.is dashboard
209
+ - [login](https://shipth.is/docs/reference/login) - Sign in or create a new account
210
+ - [status](https://shipth.is/docs/reference/status) - Display your overall ShipThis account status
211
+ - [help](https://shipth.is/docs/reference/help) - Display help for a specific topic or command
211
212
 
212
213
  ## 🌍 Community
213
214
 
214
215
  - 💬 [Join us on Discord](https://discord.gg/gPjn3S99k4)
215
216
  - 🐛 [Report an issue](https://github.com/shipth-is/cli/issues)
216
- - 📣 Feature ideas? Feedback? We’d love to hear from you email support@shipth.is
217
+ - 📣 Feature ideas? Feedback? We’d love to hear from you - email support@shipth.is
@@ -0,0 +1,11 @@
1
+ # Your ShipThis API Key has been created
2
+
3
+ - ID: **${keyId}**
4
+ - Name: **${keyName}**
5
+ - Expiry: **${keyExpiry}**
6
+
7
+ **The secret will not be shown again. Store it securely.**
8
+
9
+ ## Secret value
10
+
11
+ ${keySecret}
@@ -11,13 +11,13 @@ import 'readline-sync';
11
11
  import 'luxon';
12
12
  import 'axios';
13
13
  import 'isomorphic-git';
14
- import './index-BhhiXbey.js';
14
+ import './index-CO_ssVFA.js';
15
15
  import '@oclif/core';
16
16
  import '@tanstack/react-query';
17
17
  import 'react';
18
18
  import 'crypto-js';
19
19
  import 'uuid';
20
- import { u as useAppleApp } from './useAppleApp-DWYGURwU.js';
20
+ import { u as useAppleApp } from './useAppleApp-BZR94exU.js';
21
21
  import 'fast-glob';
22
22
  import 'yazl';
23
23
  import 'socket.io-client';
@@ -27,11 +27,11 @@ import { T as Title } from './Title-BCQtayg6.js';
27
27
  import 'string-length';
28
28
  import 'strip-ansi';
29
29
  import 'open';
30
- import './index-C66Dd8Xc.js';
30
+ import './index-CA6-uLMn.js';
31
31
  import 'marked';
32
32
  import 'marked-terminal';
33
33
  import 'qrcode';
34
- import { u as useAppleBundleId } from './useAppleBundleId-PsTJ2g1B.js';
34
+ import { u as useAppleBundleId } from './useAppleBundleId-Dg5DsItN.js';
35
35
 
36
36
  const AppleAppDetails = (props) => {
37
37
  const { data, isLoading } = useAppleApp(props);
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { QueryClientProvider } from '@tanstack/react-query';
3
3
  import { useScreenSize } from 'fullscreen-ink';
4
4
  import { Box } from 'ink';
5
- import { K as queryClient } from './index-BhhiXbey.js';
5
+ import { K as queryClient } from './index-CO_ssVFA.js';
6
6
  import 'axios';
7
7
  import 'node:fs';
8
8
  import 'crypto-js';
@@ -19,7 +19,7 @@ import 'react';
19
19
  import 'socket.io-client';
20
20
  import 'fast-glob';
21
21
  import 'yazl';
22
- import { b as CommandProvider } from './index-C66Dd8Xc.js';
22
+ import { b as CommandProvider } from './index-CA6-uLMn.js';
23
23
 
24
24
  const Command = ({ children, command }) => {
25
25
  const { width } = useScreenSize();
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { c as GameProvider } from './index-C66Dd8Xc.js';
3
- import { C as Command } from './Command-WPpmLPkL.js';
2
+ import { c as GameProvider } from './index-CA6-uLMn.js';
3
+ import { C as Command } from './Command-VWMnGslo.js';
4
4
 
5
5
  const CommandGame = ({ children, command }) => /* @__PURE__ */ jsx(Command, { command, children: /* @__PURE__ */ jsx(GameProvider, { children }) });
6
6
 
@@ -3,7 +3,7 @@ import { useQueryClient } from '@tanstack/react-query';
3
3
  import axios from 'axios';
4
4
  import { Box } from 'ink';
5
5
  import { useContext } from 'react';
6
- import { p as getAuthedHeaders, o as API_URL } from './index-BhhiXbey.js';
6
+ import { p as getAuthedHeaders, o as API_URL } from './index-CO_ssVFA.js';
7
7
  import 'ink-spinner';
8
8
  import 'node:crypto';
9
9
  import 'node:fs';
@@ -14,7 +14,7 @@ import 'readline-sync';
14
14
  import 'luxon';
15
15
  import 'isomorphic-git';
16
16
  import '@oclif/core';
17
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DZk5SMxI.js';
17
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
18
18
  import 'fast-glob';
19
19
  import 'uuid';
20
20
  import 'yazl';
@@ -27,8 +27,8 @@ import '@inkjs/ui';
27
27
  import 'marked';
28
28
  import 'marked-terminal';
29
29
  import 'qrcode';
30
- import { R as RunWithSpinner } from './RunWithSpinner-gMVA07bZ.js';
31
- import { G as GameContext } from './index-C66Dd8Xc.js';
30
+ import { R as RunWithSpinner } from './RunWithSpinner-DucRnFp6.js';
31
+ import { G as GameContext } from './index-CA6-uLMn.js';
32
32
 
33
33
  const CreateKeystore = ({ onComplete, onError, ...boxProps }) => {
34
34
  const { gameId } = useContext(GameContext);
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Text, Box } from 'ink';
3
3
  import { useState, useEffect, useContext } from 'react';
4
- import { b as getShortDate, P as Platform, E as getProject, F as getProjectPlatformProgress } from './index-BhhiXbey.js';
4
+ import { b as getShortDate, P as Platform, E as getProject, F as getProjectPlatformProgress } from './index-CO_ssVFA.js';
5
5
  import 'ink-spinner';
6
- import { g as getShortUUID, m as makeHumanReadable } from './index-CGBdOm1q.js';
6
+ import { g as getShortUUID, m as makeHumanReadable } from './index-CYjZ26If.js';
7
7
  import '@tanstack/react-query';
8
8
  import 'axios';
9
9
  import 'luxon';
@@ -23,7 +23,7 @@ import 'marked';
23
23
  import 'marked-terminal';
24
24
  import { N as NextSteps } from './NextSteps-DbJHmscQ.js';
25
25
  import 'qrcode';
26
- import { G as GameContext, C as CommandContext } from './index-C66Dd8Xc.js';
26
+ import { G as GameContext, C as CommandContext } from './index-CA6-uLMn.js';
27
27
 
28
28
  function isPlatformConfigured(platform, progress) {
29
29
  if (!progress) return false;
@@ -11,13 +11,13 @@ import 'readline-sync';
11
11
  import 'luxon';
12
12
  import 'axios';
13
13
  import 'isomorphic-git';
14
- import { K as queryClient, P as Platform, C as CredentialsType } from './index-BhhiXbey.js';
14
+ import { K as queryClient, P as Platform, C as CredentialsType } from './index-CO_ssVFA.js';
15
15
  import '@oclif/core';
16
16
  import { useMutation } from '@tanstack/react-query';
17
17
  import 'crypto-js';
18
18
  import { v4 } from 'uuid';
19
19
  import 'fast-glob';
20
- import yazl from 'yazl';
20
+ import { ZipFile } from 'yazl';
21
21
  import 'socket.io-client';
22
22
  import 'fullscreen-ink';
23
23
  import 'string-length';
@@ -27,9 +27,9 @@ import '@inkjs/ui';
27
27
  import 'marked';
28
28
  import 'marked-terminal';
29
29
  import 'qrcode';
30
- import { G as GameContext } from './index-C66Dd8Xc.js';
31
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DZk5SMxI.js';
32
- import { i as importCredential } from './import-DGvG5REx.js';
30
+ import { G as GameContext } from './index-CA6-uLMn.js';
31
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
32
+ import { i as importCredential } from './import-A2WcStHl.js';
33
33
 
34
34
  async function importKeystore({ log = () => {
35
35
  }, ...opt }) {
@@ -50,7 +50,7 @@ async function importKeystore({ log = () => {
50
50
  zip.outputStream.pipe(outputStream).on("close", () => resolve());
51
51
  zip.end();
52
52
  });
53
- const zipFile = new yazl.ZipFile();
53
+ const zipFile = new ZipFile();
54
54
  log("Adding keyStore.jks to zip file...");
55
55
  zipFile.addFile(opt.jksFilePath, "keyStore.jks");
56
56
  log("Adding password.txt and keyPassword.txt to zip file...");
@@ -7,13 +7,13 @@ 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, a4 as castJobDates, a1 as castObjectDates, a5 as getShortTime } from './index-BhhiXbey.js';
11
- import { d as getStageColor, j as getMessageColor } from './index-CGBdOm1q.js';
10
+ import { p as getAuthedHeaders, o as API_URL, I as castArrayObjectDates, J as JobStatus, a7 as castJobDates, a4 as castObjectDates, a8 as getShortTime } from './index-CO_ssVFA.js';
11
+ import { d as getStageColor, j as getMessageColor } from './index-CYjZ26If.js';
12
12
  import 'luxon';
13
13
  import 'fast-glob';
14
14
  import 'yazl';
15
15
  import 'socket.io-client';
16
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DZk5SMxI.js';
16
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
17
17
  import 'node:crypto';
18
18
  import 'node:path';
19
19
  import 'node:readline';
@@ -22,8 +22,8 @@ import 'readline-sync';
22
22
  import 'isomorphic-git';
23
23
  import '@oclif/core';
24
24
  import 'fullscreen-ink';
25
- import { e as useJob } from './index-C66Dd8Xc.js';
26
- import { u as useWebSocket } from './useWebSocket-5PYa2QER.js';
25
+ import { f as useJob } from './index-CA6-uLMn.js';
26
+ import { u as useWebSocket } from './useWebSocket-CIxkPaYi.js';
27
27
  import { T as Title } from './Title-BCQtayg6.js';
28
28
  import stringLength from 'string-length';
29
29
  import stripAnsi from 'strip-ansi';
@@ -3,10 +3,10 @@ import { useMutation } from '@tanstack/react-query';
3
3
  import axios from 'axios';
4
4
  import fg from 'fast-glob';
5
5
  import { v4 } from 'uuid';
6
- import yazl from 'yazl';
7
- import { K as queryClient, v as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, $ as getNewUploadTicket, a0 as startJobsFromUpload } from './index-BhhiXbey.js';
8
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DZk5SMxI.js';
9
- import { f as getFileHash, h as getPlatformName } from './index-CGBdOm1q.js';
6
+ import { ZipFile } from 'yazl';
7
+ import { K as queryClient, v as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a2 as getNewUploadTicket, a3 as startJobsFromUpload } from './index-CO_ssVFA.js';
8
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
9
+ import { f as getFileHash, h as getPlatformName } from './index-CYjZ26If.js';
10
10
  import { g as getCWDGitInfo } from './git-BpsfNFZ_.js';
11
11
  import { jsx, Fragment } from 'react/jsx-runtime';
12
12
  import 'ink';
@@ -15,7 +15,7 @@ import 'react';
15
15
  import 'crypto-js';
16
16
  import 'luxon';
17
17
  import 'socket.io-client';
18
- import { u as useJobWatching } from './JobLogTail-0CBLoG8N.js';
18
+ import { u as useJobWatching } from './JobLogTail-C_W8UAMg.js';
19
19
  import 'fullscreen-ink';
20
20
  import 'string-length';
21
21
  import 'strip-ansi';
@@ -24,9 +24,9 @@ import '@inkjs/ui';
24
24
  import 'node:path';
25
25
  import 'marked';
26
26
  import 'marked-terminal';
27
- import { P as ProgressSpinner } from './ProgressSpinner-DGcakQSK.js';
27
+ import { P as ProgressSpinner } from './ProgressSpinner-Um6ARKlk.js';
28
28
  import 'qrcode';
29
- import './index-C66Dd8Xc.js';
29
+ import './index-CA6-uLMn.js';
30
30
 
31
31
  async function ship({ command, log = () => {
32
32
  }, shipFlags }) {
@@ -46,7 +46,7 @@ async function ship({ command, log = () => {
46
46
  log("Finding files to include in zip...");
47
47
  const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
48
48
  log(`Found ${files.length} files, adding to zip...`);
49
- const zipFile = new yazl.ZipFile();
49
+ const zipFile = new ZipFile();
50
50
  for (const file of files) {
51
51
  zipFile.addFile(file, file);
52
52
  }
@@ -92,6 +92,9 @@ async function ship({ command, log = () => {
92
92
  if (jobs.length === 0) {
93
93
  throw new Error("No jobs were created. Please check your game configuration and try again.");
94
94
  }
95
+ if (finalFlags?.follow) {
96
+ log("Waiting for job to start...");
97
+ }
95
98
  return jobs;
96
99
  }
97
100
  const useShip = () => useMutation({
@@ -3,18 +3,18 @@ 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-BhhiXbey.js';
6
+ import { J as JobStatus } from './index-CO_ssVFA.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-CGBdOm1q.js';
13
- import { a as getJobSummary } from './index-C66Dd8Xc.js';
12
+ import { d as getStageColor, c as getJobStatusColor } from './index-CYjZ26If.js';
13
+ import { a as getJobSummary } from './index-CA6-uLMn.js';
14
14
  import 'fast-glob';
15
15
  import 'yazl';
16
16
  import 'socket.io-client';
17
- import { u as useJobWatching } from './JobLogTail-0CBLoG8N.js';
17
+ import { u as useJobWatching } from './JobLogTail-C_W8UAMg.js';
18
18
  import 'fullscreen-ink';
19
19
  import { a as StatusRow, b as StatusRowLabel } from './StatusTable-DzRWcMr4.js';
20
20
  import { T as Title } from './Title-BCQtayg6.js';
@@ -4,7 +4,7 @@ import { Box, Text } from 'ink';
4
4
  import Spinner from 'ink-spinner';
5
5
 
6
6
  const ProgressSpinner = ({ boxProps, label, labelProps, progress, spinnerType }) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Box, { flexDirection: "column", gap: 1, ...boxProps, children: /* @__PURE__ */ jsxs(Box, { flexDirection: "row", gap: 1, children: [
7
- label && label != "" && /* @__PURE__ */ jsx(Text, { ...labelProps, children: label }),
7
+ label && label !== "" && /* @__PURE__ */ jsx(Text, { ...labelProps, children: label }),
8
8
  /* @__PURE__ */ jsx(ProgressBar, { value: progress || 0 }),
9
9
  /* @__PURE__ */ jsx(Box, { width: 4, children: /* @__PURE__ */ jsxs(Text, { children: [
10
10
  Math.floor(progress || 0),
@@ -10,13 +10,13 @@ import 'readline-sync';
10
10
  import 'luxon';
11
11
  import 'axios';
12
12
  import 'isomorphic-git';
13
- import './index-BhhiXbey.js';
13
+ import './index-CO_ssVFA.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-BEphqa18.js';
19
+ import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-jQYGcDhT.js';
20
20
  import 'fast-glob';
21
21
  import 'yazl';
22
22
  import 'socket.io-client';
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { Box, Text } from 'ink';
3
3
  import Spinner from 'ink-spinner';
4
4
  import React from 'react';
@@ -18,6 +18,7 @@ const RunWithSpinner = ({
18
18
  return onComplete();
19
19
  });
20
20
  }, []);
21
+ if (!isInProgress && !msgComplete) return /* @__PURE__ */ jsx(Fragment, {});
21
22
  return /* @__PURE__ */ jsxs(Box, { children: [
22
23
  /* @__PURE__ */ jsx(Text, { children: isInProgress ? msgInProgress : msgComplete }),
23
24
  isInProgress && /* @__PURE__ */ jsx(Spinner, { type: spinnerType })
@@ -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-BhhiXbey.js';
13
+ import { b as getShortDate, p as getAuthedHeaders, o as API_URL, I as castArrayObjectDates } from './index-CO_ssVFA.js';
14
14
  import '@oclif/core';
15
15
  import { useQuery } from '@tanstack/react-query';
16
16
  import 'react';
@@ -18,8 +18,8 @@ import 'crypto-js';
18
18
  import 'uuid';
19
19
  import 'fast-glob';
20
20
  import 'yazl';
21
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DZk5SMxI.js';
22
- import { g as getShortUUID } from './index-CGBdOm1q.js';
21
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
22
+ import { g as getShortUUID } from './index-CYjZ26If.js';
23
23
  import 'socket.io-client';
24
24
  import 'fullscreen-ink';
25
25
  import { T as Table } from './Table-FaNgpyeq.js';
@@ -1,4 +1,4 @@
1
- import { B as BaseAuthenticatedCommand } from './index-BhhiXbey.js';
1
+ import { B as BaseAuthenticatedCommand } from './index-CO_ssVFA.js';
2
2
 
3
3
  class BaseAppleCommand extends BaseAuthenticatedCommand {
4
4
  async init() {
@@ -1,5 +1,5 @@
1
- import { c as BaseGameCommand, Q as getGoogleStatus, R as getGodotAndroidPackageName } from './index-BhhiXbey.js';
2
- import { b as generatePackageName, a as getInput } from './index-CGBdOm1q.js';
1
+ import { c as BaseGameCommand, Q as getGoogleStatus, R as getGodotAndroidPackageName } from './index-CO_ssVFA.js';
2
+ import { b as generatePackageName, a as getInput } from './index-CYjZ26If.js';
3
3
 
4
4
  class BaseGameAndroidCommand extends BaseGameCommand {
5
5
  async checkGoogleAuth(waitForAuth = false) {
@@ -0,0 +1,97 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { B as BaseAuthenticatedCommand, Y as createAPIKey, b as getShortDate } from '../../index-CO_ssVFA.js';
3
+ import { Flags } from '@oclif/core';
4
+ import { render } from 'ink';
5
+ import { v4 } from 'uuid';
6
+ import { g as getShortUUID } from '../../index-CYjZ26If.js';
7
+ import 'ink-spinner';
8
+ import 'react';
9
+ import '@tanstack/react-query';
10
+ import 'axios';
11
+ import 'luxon';
12
+ import 'node:fs';
13
+ import 'fast-glob';
14
+ import 'yazl';
15
+ import 'socket.io-client';
16
+ import 'fullscreen-ink';
17
+ import 'string-length';
18
+ import 'strip-ansi';
19
+ import 'open';
20
+ import '@inkjs/ui';
21
+ import { g as getRenderedMarkdown } from '../../index-CA6-uLMn.js';
22
+ import 'qrcode';
23
+ import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js';
24
+ import { C as Command } from '../../Command-VWMnGslo.js';
25
+ import 'crypto-js';
26
+ import 'node:path';
27
+ import '@expo/apple-utils/build/index.js';
28
+ import 'node:crypto';
29
+ import 'node:readline';
30
+ import 'node:url';
31
+ import 'readline-sync';
32
+ import 'isomorphic-git';
33
+ import 'deepmerge';
34
+ import 'ini';
35
+ import '../../useAndroidServiceAccountTestResult-DueKynFy.js';
36
+ import 'marked';
37
+ import 'marked-terminal';
38
+
39
+ class ApiKeyCreate extends BaseAuthenticatedCommand {
40
+ static args = {};
41
+ static description = "Create a new API key for your ShipThis account.";
42
+ static examples = [
43
+ "<%= config.bin %> <%= command.id %> --durationDays 30",
44
+ "<%= config.bin %> <%= command.id %> --name ci-key --durationDays 90",
45
+ "<%= config.bin %> <%= command.id %> --name ci-key-headless --durationDays 365 --quiet"
46
+ ];
47
+ static flags = {
48
+ name: Flags.string({
49
+ char: "n",
50
+ description: "name to apply to the API key (if not provided, a random name will be generated)"
51
+ }),
52
+ durationDays: Flags.integer({
53
+ char: "d",
54
+ description: "duration of the API key in days",
55
+ default: 365
56
+ }),
57
+ quiet: Flags.boolean({
58
+ char: "q",
59
+ description: "Outputs just the secret value",
60
+ default: false
61
+ })
62
+ };
63
+ async run() {
64
+ const { name, durationDays } = this.flags;
65
+ const createKey = async () => {
66
+ const apiKeyName = name ? name : `api-key-${getShortUUID(v4())}`;
67
+ const apiKeyWithSecret = await createAPIKey({ name: apiKeyName, durationDays });
68
+ const successMessage = getRenderedMarkdown({
69
+ filename: "apikey-create.md",
70
+ templateVars: {
71
+ keyId: getShortUUID(apiKeyWithSecret.id),
72
+ keyName: apiKeyWithSecret.name,
73
+ keyExpiry: getShortDate(apiKeyWithSecret.expiresAt),
74
+ keySecret: apiKeyWithSecret.secret
75
+ }
76
+ });
77
+ if (this.flags.quiet) {
78
+ this.log(apiKeyWithSecret.secret);
79
+ return;
80
+ }
81
+ this.log(successMessage);
82
+ };
83
+ if (this.flags.quiet) return await createKey();
84
+ render(
85
+ /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
86
+ RunWithSpinner,
87
+ {
88
+ executeMethod: createKey,
89
+ msgInProgress: "Creating ShipThis API key...",
90
+ onComplete: () => process.exit(0)
91
+ }
92
+ ) })
93
+ );
94
+ }
95
+ }
96
+
97
+ export { ApiKeyCreate as default };
@@ -0,0 +1,91 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { B as BaseAuthenticatedCommand, X as getAPIKeys, b as getShortDate } from '../../index-CO_ssVFA.js';
3
+ import { Flags } from '@oclif/core';
4
+ import { render, Box, Text } from 'ink';
5
+ import { g as getShortUUID } from '../../index-CYjZ26If.js';
6
+ import 'ink-spinner';
7
+ import { T as Table } from '../../Table-FaNgpyeq.js';
8
+ import 'react';
9
+ import '@tanstack/react-query';
10
+ import 'axios';
11
+ import 'luxon';
12
+ import 'node:fs';
13
+ import 'fast-glob';
14
+ import 'uuid';
15
+ import 'yazl';
16
+ import 'socket.io-client';
17
+ import 'fullscreen-ink';
18
+ import 'string-length';
19
+ import 'strip-ansi';
20
+ import 'open';
21
+ import '@inkjs/ui';
22
+ import 'node:path';
23
+ import 'marked';
24
+ import 'marked-terminal';
25
+ import 'qrcode';
26
+ import '../../index-CA6-uLMn.js';
27
+ import { C as Command } from '../../Command-VWMnGslo.js';
28
+ import 'crypto-js';
29
+ import '@expo/apple-utils/build/index.js';
30
+ import 'node:crypto';
31
+ import 'node:readline';
32
+ import 'node:url';
33
+ import 'readline-sync';
34
+ import 'isomorphic-git';
35
+ import 'deepmerge';
36
+ import 'ini';
37
+ import '../../useAndroidServiceAccountTestResult-DueKynFy.js';
38
+
39
+ class ApiKeyList extends BaseAuthenticatedCommand {
40
+ static args = {};
41
+ static description = "Displays a list of your ShipThis API keys.";
42
+ static examples = [
43
+ "<%= config.bin %> <%= command.id %>",
44
+ "<%= config.bin %> <%= command.id %> --pageNumber 1",
45
+ "<%= config.bin %> <%= command.id %> --orderBy createdAt --order asc"
46
+ ];
47
+ static flags = {
48
+ order: Flags.string({
49
+ char: "r",
50
+ default: "desc",
51
+ description: "The order to sort by",
52
+ options: ["asc", "desc"]
53
+ }),
54
+ orderBy: Flags.string({
55
+ char: "o",
56
+ default: "createdAt",
57
+ description: "The field to order by",
58
+ options: ["createdAt", "updatedAt", "name"]
59
+ }),
60
+ pageNumber: Flags.integer({ char: "p", default: 0, description: "The page number to show (starts at 0)" }),
61
+ pageSize: Flags.integer({ char: "s", default: 10, description: "The number of items to show per page" })
62
+ };
63
+ async run() {
64
+ const { flags } = this;
65
+ const params = flags;
66
+ const apiKeysListResponse = await getAPIKeys(params);
67
+ const data = apiKeysListResponse.data.map((apiKey) => ({
68
+ id: getShortUUID(apiKey.id),
69
+ name: apiKey.name,
70
+ expiresAt: getShortDate(apiKey.expiresAt),
71
+ lastUsedAt: apiKey.lastUsedAt ? getShortDate(apiKey.lastUsedAt) : "Never",
72
+ revokedAt: apiKey.revokedAt ? getShortDate(apiKey.revokedAt) : "Active"
73
+ }));
74
+ const emptyState = /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
75
+ /* @__PURE__ */ jsx(Text, { children: "No API keys found. Create one now with:" }),
76
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: /* @__PURE__ */ jsx(Text, { children: "shipthis apiKey create" }) })
77
+ ] });
78
+ render(
79
+ /* @__PURE__ */ jsxs(Command, { command: this, children: [
80
+ data.length === 0 && params.pageNumber === 0 && emptyState,
81
+ data.length > 0 && /* @__PURE__ */ jsx(Table, { data }),
82
+ apiKeysListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
83
+ /* @__PURE__ */ jsx(Text, { children: `Showing page ${flags.pageNumber + 1} of ${apiKeysListResponse.pageCount}.` }),
84
+ /* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
85
+ ] })
86
+ ] })
87
+ );
88
+ }
89
+ }
90
+
91
+ export { ApiKeyList as default };
@@ -0,0 +1,82 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Args, Flags } from '@oclif/core';
3
+ import { render } from 'ink';
4
+ import { B as BaseAuthenticatedCommand, Z as revokeAPIKey } from '../../index-CO_ssVFA.js';
5
+ import { g as getShortUUID } from '../../index-CYjZ26If.js';
6
+ import 'ink-spinner';
7
+ import 'react';
8
+ import '@tanstack/react-query';
9
+ import 'axios';
10
+ import 'luxon';
11
+ import 'node:fs';
12
+ import 'fast-glob';
13
+ import 'uuid';
14
+ import 'yazl';
15
+ import 'socket.io-client';
16
+ import 'fullscreen-ink';
17
+ import 'string-length';
18
+ import 'strip-ansi';
19
+ import 'open';
20
+ import '@inkjs/ui';
21
+ import 'node:path';
22
+ import 'marked';
23
+ import 'marked-terminal';
24
+ import 'qrcode';
25
+ import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js';
26
+ import '../../index-CA6-uLMn.js';
27
+ import { C as Command } from '../../Command-VWMnGslo.js';
28
+ import 'crypto-js';
29
+ import '@expo/apple-utils/build/index.js';
30
+ import 'node:crypto';
31
+ import 'node:readline';
32
+ import 'node:url';
33
+ import 'readline-sync';
34
+ import 'isomorphic-git';
35
+ import 'deepmerge';
36
+ import 'ini';
37
+ import '../../useAndroidServiceAccountTestResult-DueKynFy.js';
38
+
39
+ class ApiKeyRevoke extends BaseAuthenticatedCommand {
40
+ static args = {
41
+ apiKeyId: Args.string({
42
+ description: "The ID of the API key to revoke",
43
+ required: true
44
+ })
45
+ };
46
+ static description = "Revokes a specific ShipThis API key.";
47
+ static examples = [
48
+ "<%= config.bin %> <%= command.id %> abcd1234",
49
+ "<%= config.bin %> <%= command.id %> abcd1234 --quiet"
50
+ ];
51
+ static flags = {
52
+ quiet: Flags.boolean({
53
+ char: "q",
54
+ description: "Suppress output except for errors",
55
+ default: false
56
+ })
57
+ };
58
+ async run() {
59
+ const revokeKey = async () => {
60
+ const apiKeyId = this.args.apiKeyId;
61
+ await revokeAPIKey(apiKeyId);
62
+ console.log(`Revoked API key with ID: ${getShortUUID(apiKeyId)}`);
63
+ };
64
+ const handleComplete = async () => {
65
+ process.exit(0);
66
+ };
67
+ if (this.flags.quiet) return await revokeKey();
68
+ render(
69
+ /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
70
+ RunWithSpinner,
71
+ {
72
+ executeMethod: revokeKey,
73
+ msgComplete: "ShipThis API key revoked successfully",
74
+ msgInProgress: "Revoking ShipThis API key...",
75
+ onComplete: handleComplete
76
+ }
77
+ ) })
78
+ );
79
+ }
80
+ }
81
+
82
+ export { ApiKeyRevoke as default };