shipthis 0.1.30 → 0.1.31

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 (78) hide show
  1. package/README.md +122 -41
  2. package/assets/markdown/create-google-play-game.md +2 -4
  3. package/assets/markdown/ship-success.md +1 -1
  4. package/dist/{AppleBundleIdDetails-Fp5COwTa.js → AppleBundleIdDetails-eoK5F8Qn.js} +4 -4
  5. package/dist/Command-DFdHXDiU.js +44 -0
  6. package/dist/{CommandGame-Z4eUQBjn.js → CommandGame-Dif-oSky.js} +2 -2
  7. package/dist/{Create-1xAdntNl.js → Create-ISdroJ3G.js} +3 -3
  8. package/dist/{Import-CzC-M4ln.js → Import-CfThJF6k.js} +4 -4
  9. package/dist/{JobLogTail-CZxoMSd5.js → JobLogTail-BWzbQBZz.js} +5 -5
  10. package/dist/{JobProgress-BjNgtIjm.js → JobProgress-DjIkuk5U.js} +20 -10
  11. package/dist/{JobStatusTable-BB-PWlwj.js → JobStatusTable-CEqWU73q.js} +4 -4
  12. package/dist/{ProjectCredentialsTable-DyZep993.js → ProjectCredentialsTable-u9ruZ9mN.js} +2 -2
  13. package/dist/{UserCredentialsTable-BraKyDWT.js → UserCredentialsTable-Q7u9M-ap.js} +3 -3
  14. package/dist/{baseAppleCommand-BHRIBtTj.js → baseAppleCommand-zhkGlKq0.js} +1 -1
  15. package/dist/{baseGameAndroidCommand-SrDRbhAG.js → baseGameAndroidCommand-DJ-cMLa_.js} +2 -2
  16. package/dist/commands/apple/apiKey/create.js +8 -8
  17. package/dist/commands/apple/apiKey/export.js +7 -7
  18. package/dist/commands/apple/apiKey/import.js +7 -7
  19. package/dist/commands/apple/apiKey/status.js +6 -6
  20. package/dist/commands/apple/certificate/create.js +8 -8
  21. package/dist/commands/apple/certificate/export.js +7 -7
  22. package/dist/commands/apple/certificate/import.js +7 -7
  23. package/dist/commands/apple/certificate/status.js +6 -6
  24. package/dist/commands/apple/login.js +3 -2
  25. package/dist/commands/apple/status.js +6 -6
  26. package/dist/commands/dashboard.js +2 -1
  27. package/dist/commands/game/android/apiKey/connect.js +9 -9
  28. package/dist/commands/game/android/apiKey/create.js +11 -11
  29. package/dist/commands/game/android/apiKey/export.js +8 -8
  30. package/dist/commands/game/android/apiKey/import.js +8 -8
  31. package/dist/commands/game/android/apiKey/invite.js +5 -4
  32. package/dist/commands/game/android/apiKey/status.js +8 -8
  33. package/dist/commands/game/android/keyStore/create.js +9 -9
  34. package/dist/commands/game/android/keyStore/export.js +7 -7
  35. package/dist/commands/game/android/keyStore/import.js +10 -10
  36. package/dist/commands/game/android/keyStore/status.js +7 -7
  37. package/dist/commands/game/android/status.js +6 -6
  38. package/dist/commands/game/build/download.js +5 -5
  39. package/dist/commands/game/build/list.js +6 -6
  40. package/dist/commands/game/create.js +3 -2
  41. package/dist/commands/game/details.js +5 -5
  42. package/dist/commands/game/export.js +2 -1
  43. package/dist/commands/game/ios/app/addTester.js +6 -6
  44. package/dist/commands/game/ios/app/create.js +5 -5
  45. package/dist/commands/game/ios/app/status.js +8 -8
  46. package/dist/commands/game/ios/app/sync.js +6 -6
  47. package/dist/commands/game/ios/profile/create.js +8 -8
  48. package/dist/commands/game/ios/profile/export.js +7 -7
  49. package/dist/commands/game/ios/profile/import.js +7 -7
  50. package/dist/commands/game/ios/profile/status.js +7 -7
  51. package/dist/commands/game/ios/status.js +9 -9
  52. package/dist/commands/game/ios/wizard.js +5 -5
  53. package/dist/commands/game/job/list.js +5 -5
  54. package/dist/commands/game/job/status.js +8 -8
  55. package/dist/commands/game/list.js +14 -8
  56. package/dist/commands/game/ship.js +11 -10
  57. package/dist/commands/game/status.js +14 -11
  58. package/dist/commands/game/wizard.js +45 -92
  59. package/dist/commands/internal/fastlane.js +2 -1
  60. package/dist/commands/internal/readme.js +2 -1
  61. package/dist/commands/login.js +3 -2
  62. package/dist/commands/status.js +8 -8
  63. package/dist/{export-BKn02-NH.js → export-DZxo2_e_.js} +1 -1
  64. package/dist/{import-CRMaNBVF.js → import-8pL1AF47.js} +1 -1
  65. package/dist/{index-OZi8bvu8.js → index-BHh0BZvD.js} +47 -13
  66. package/dist/{index-u1aj1OQW.js → index-C6aAyrXW.js} +1 -1
  67. package/dist/{index-BTAL7EB_.js → index-CyvGh-kt.js} +20 -9
  68. package/dist/{index-35Eswf6F.js → index-DJ078v-U.js} +2 -1
  69. package/dist/{index--EbYyBAZ.js → index-DKQjnJrC.js} +5 -5
  70. package/dist/{index-DxzXU9Hd.js → index-w3lHxk5O.js} +8 -1
  71. package/dist/{upload-Bw0zrS4M.js → upload-BTpxj3QP.js} +1 -1
  72. package/dist/{useAndroidServiceAccountTestResult-CJLIEYmA.js → useAndroidServiceAccountTestResult-Dy3Ag7_r.js} +1 -1
  73. package/dist/{useAppleApp-cnb8gX0x.js → useAppleApp-h1Ogi_qc.js} +1 -1
  74. package/dist/{useAppleBundleId-B0Etav8g.js → useAppleBundleId-B3TTNap0.js} +1 -1
  75. package/dist/{useProjectCredentials-DX3e_PPc.js → useProjectCredentials-DpeXZcHP.js} +3 -3
  76. package/dist/{useWebSocket-BOCa8v6o.js → useWebSocket-gyuCsore.js} +1 -1
  77. package/package.json +2 -1
  78. package/dist/Command-1p5alCz3.js +0 -28
@@ -1,9 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { render, Text, Box } from 'ink';
2
+ import { render, Box, Text } from 'ink';
3
3
  import { Flags } from '@oclif/core';
4
- import { B as BaseAuthenticatedCommand, g as getProjects, b as getShortDate } from '../../index-DxzXU9Hd.js';
4
+ import { B as BaseAuthenticatedCommand, g as getProjects, b as getShortDate } from '../../index-w3lHxk5O.js';
5
5
  import 'react';
6
- import '../../index-BTAL7EB_.js';
6
+ import '../../index-CyvGh-kt.js';
7
7
  import 'ink-spinner';
8
8
  import '@inkjs/ui';
9
9
  import 'axios';
@@ -11,7 +11,7 @@ import '@tanstack/react-query';
11
11
  import 'fs';
12
12
  import 'uuid';
13
13
  import 'yazl';
14
- import { g as getShortUUID } from '../../index-35Eswf6F.js';
14
+ import { g as getShortUUID } from '../../index-DJ078v-U.js';
15
15
  import 'open';
16
16
  import 'marked';
17
17
  import 'marked-terminal';
@@ -22,7 +22,7 @@ import 'string-length';
22
22
  import 'strip-ansi';
23
23
  import 'luxon';
24
24
  import 'fast-glob';
25
- import { C as Command } from '../../Command-1p5alCz3.js';
25
+ import { C as Command } from '../../Command-DFdHXDiU.js';
26
26
  import 'socket.io-client';
27
27
  import '@expo/apple-utils/build/index.js';
28
28
  import 'crypto-js';
@@ -34,7 +34,7 @@ import 'node:url';
34
34
  import 'isomorphic-git';
35
35
  import 'ini';
36
36
  import 'deepmerge';
37
- import '../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
37
+ import '../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
38
38
 
39
39
  class GameList extends BaseAuthenticatedCommand {
40
40
  static args = {};
@@ -69,8 +69,14 @@ class GameList extends BaseAuthenticatedCommand {
69
69
  });
70
70
  render(
71
71
  /* @__PURE__ */ jsxs(Command, { command: this, children: [
72
- gameListResponse.data.length === 0 && params.pageNumber == 0 && /* @__PURE__ */ jsx(Text, { children: "No games found. Create one now with $ shipthis game wizard" }),
73
- gameListResponse.data.length > 0 && /* @__PURE__ */ jsx(Table, { data }),
72
+ data.length === 0 && params.pageNumber == 0 && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
73
+ /* @__PURE__ */ jsx(Text, { children: "No games found. Create one now with:" }),
74
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: [
75
+ /* @__PURE__ */ jsx(Text, { children: "shipthis game wizard android" }),
76
+ /* @__PURE__ */ jsx(Text, { children: "shipthis game wizard ios" })
77
+ ] })
78
+ ] }),
79
+ data.length > 0 && /* @__PURE__ */ jsx(Table, { data }),
74
80
  gameListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
75
81
  /* @__PURE__ */ jsx(Text, { children: `Showing page ${flags.pageNumber + 1} of ${gameListResponse.pageCount}.` }),
76
82
  /* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
@@ -1,9 +1,9 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { useInput, Box, Text, render } from 'ink';
4
- import { M as LogLevel, a2 as getShortAuthRequiredUrl, W as WEB_URL, c as BaseGameCommand, E as getJob, H as downloadBuildById } from '../../index-DxzXU9Hd.js';
4
+ import { L as LogLevel, a2 as getShortAuthRequiredUrl, W as WEB_URL, c as BaseGameCommand, E as getJob, H as downloadBuildById } from '../../index-w3lHxk5O.js';
5
5
  import { useContext, useState, useEffect } from 'react';
6
- import { d as CommandContext, b as GameContext, M as Markdown } from '../../index-BTAL7EB_.js';
6
+ import { d as CommandContext, b as GameContext, M as Markdown } from '../../index-CyvGh-kt.js';
7
7
  import 'ink-spinner';
8
8
  import '@inkjs/ui';
9
9
  import axios from 'axios';
@@ -27,20 +27,20 @@ import 'path';
27
27
  import 'qrcode';
28
28
  import 'string-length';
29
29
  import 'strip-ansi';
30
- import { C as CommandGame } from '../../CommandGame-Z4eUQBjn.js';
31
- import { g as getShortUUID } from '../../index-35Eswf6F.js';
32
- import { u as useShip, J as JobProgress } from '../../JobProgress-BjNgtIjm.js';
30
+ import { C as CommandGame } from '../../CommandGame-Dif-oSky.js';
31
+ import { g as getShortUUID } from '../../index-DJ078v-U.js';
32
+ import { u as useShip, J as JobProgress } from '../../JobProgress-DjIkuk5U.js';
33
33
  import 'crypto-js';
34
- import { u as useJobWatching, J as JobLogTail } from '../../JobLogTail-CZxoMSd5.js';
35
- import { J as JobStatusTable } from '../../JobStatusTable-BB-PWlwj.js';
34
+ import { u as useJobWatching, J as JobLogTail } from '../../JobLogTail-BWzbQBZz.js';
35
+ import { J as JobStatusTable } from '../../JobStatusTable-CEqWU73q.js';
36
36
  import '@expo/apple-utils/build/index.js';
37
37
  import 'ini';
38
38
  import 'deepmerge';
39
- import '../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
40
- import '../../Command-1p5alCz3.js';
39
+ import '../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
40
+ import '../../Command-DFdHXDiU.js';
41
41
  import '../../git-DREGq-jc.js';
42
42
  import '../../ProgressSpinner-6pw1T8Iw.js';
43
- import '../../useWebSocket-BOCa8v6o.js';
43
+ import '../../useWebSocket-gyuCsore.js';
44
44
  import '../../Title-BCQtayg6.js';
45
45
  import '../../StatusTable-Dm5St4g-.js';
46
46
 
@@ -156,6 +156,7 @@ const Ship = ({ onComplete, onError }) => {
156
156
  {
157
157
  filename: "ship-success.md",
158
158
  templateVars: {
159
+ wasPublished: flags?.skipPublish ? false : true,
159
160
  gameBuildsUrl: `${WEB_URL}games/${getShortUUID(gameId)}/builds`
160
161
  }
161
162
  }
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { render } from 'ink';
3
3
  import { Flags } from '@oclif/core';
4
4
  import 'react';
5
- import '../../index-BTAL7EB_.js';
6
- import { B as BaseAuthenticatedCommand, F as getProject, P as Platform, k as getProjectPlatformProgress, b as getShortDate } from '../../index-DxzXU9Hd.js';
5
+ import '../../index-CyvGh-kt.js';
6
+ import { B as BaseAuthenticatedCommand, F as getProject, P as Platform, k as getProjectPlatformProgress, b as getShortDate } from '../../index-w3lHxk5O.js';
7
7
  import 'ink-spinner';
8
8
  import '@inkjs/ui';
9
9
  import 'axios';
@@ -11,7 +11,7 @@ import '@tanstack/react-query';
11
11
  import 'fs';
12
12
  import 'uuid';
13
13
  import 'yazl';
14
- import { g as getShortUUID, m as makeHumanReadable } from '../../index-35Eswf6F.js';
14
+ import { g as getShortUUID, m as makeHumanReadable } from '../../index-DJ078v-U.js';
15
15
  import 'open';
16
16
  import 'marked';
17
17
  import 'marked-terminal';
@@ -23,9 +23,9 @@ import 'string-length';
23
23
  import 'strip-ansi';
24
24
  import 'luxon';
25
25
  import 'fast-glob';
26
- import { C as Command } from '../../Command-1p5alCz3.js';
26
+ import { C as Command } from '../../Command-DFdHXDiU.js';
27
27
  import 'socket.io-client';
28
- import '../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
28
+ import '../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
29
29
  import '@expo/apple-utils/build/index.js';
30
30
  import 'crypto-js';
31
31
  import 'crypto';
@@ -43,15 +43,15 @@ function getSteps(platform, progress) {
43
43
  switch (platform) {
44
44
  case Platform.ANDROID:
45
45
  return [
46
- !progress.hasCredentialsForPlatform && "$ shipthis game android keyStore create",
47
- !progress.hasApiKeyForPlatform && "$ shipthis game android apiKey create",
48
- progress.hasCredentialsForPlatform && progress.hasApiKeyForPlatform && "$ shipthis game ship"
46
+ !progress.hasCredentialsForPlatform && "shipthis game android keyStore create",
47
+ !progress.hasApiKeyForPlatform && "shipthis game android apiKey create",
48
+ progress.hasCredentialsForPlatform && progress.hasApiKeyForPlatform && "shipthis game ship"
49
49
  ].filter(Boolean);
50
50
  case Platform.IOS:
51
51
  return [
52
- !progress.hasApiKeyForPlatform && "$ shipthis apple apiKey create",
53
- !progress.hasCredentialsForPlatform && "$ shipthis game ios profile create",
54
- progress.hasApiKeyForPlatform && progress.hasCredentialsForPlatform && "$ shipthis game ship"
52
+ !progress.hasApiKeyForPlatform && "shipthis apple apiKey create",
53
+ !progress.hasCredentialsForPlatform && "shipthis game ios profile create",
54
+ progress.hasApiKeyForPlatform && progress.hasCredentialsForPlatform && "shipthis game ship"
55
55
  ].filter(Boolean);
56
56
  default:
57
57
  throw new Error("Invalid platform");
@@ -82,6 +82,9 @@ class GameStatus extends BaseAuthenticatedCommand {
82
82
  let steps = [];
83
83
  if (hasConfiguredIos) steps = steps.concat(getSteps(Platform.IOS, statuses[Platform.IOS]));
84
84
  if (hasConfiguredAndroid) steps = steps.concat(getSteps(Platform.ANDROID, statuses[Platform.ANDROID]));
85
+ if (!hasConfiguredIos && !hasConfiguredAndroid) {
86
+ steps = steps.concat(["shipthis game wizard android", "shipthis game wizard ios"]);
87
+ }
85
88
  const progressToStatuses = (progress) => {
86
89
  const { platform, ...rest } = progress;
87
90
  return makeHumanReadable(rest);
@@ -1,9 +1,9 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { Args } from '@oclif/core';
3
- import { Text, Box, useInput, useFocus, measureElement, render } from 'ink';
4
- import { p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates, K as queryClient, a8 as updateProject, u as getGodotVersion, t as GameEngine, v as createProject, w as DEFAULT_IGNORED_FILES_GLOBS, x as DEFAULT_SHIPPED_FILES_GLOBS, P as Platform, J as JobStatus, W as WEB_URL, F as getProject, C as CredentialsType, R as getGoogleStatus, B as BaseAuthenticatedCommand, j as isCWDGodotGame } from '../../index-DxzXU9Hd.js';
5
- import React, { useState, useContext, useEffect, useRef, useReducer } from 'react';
6
- import { d as CommandContext, b as GameContext, M as Markdown, u as useBuilds, q as queryBuilds, G as GameProvider, f as CreateGooglePlayGame } from '../../index-BTAL7EB_.js';
3
+ import { p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates, _ as queryClient, a9 as updateProject, u as getGodotVersion, t as GameEngine, v as createProject, w as DEFAULT_IGNORED_FILES_GLOBS, x as DEFAULT_SHIPPED_FILES_GLOBS, P as Platform, J as JobStatus, W as WEB_URL, F as getProject, C as CredentialsType, Q as getGoogleStatus, B as BaseAuthenticatedCommand, j as isCWDGodotGame } from '../../index-w3lHxk5O.js';
4
+ import React, { useState, useContext, useEffect, useRef } from 'react';
5
+ import { Text, Box, useInput } from 'ink';
6
+ import { d as CommandContext, b as GameContext, M as Markdown, u as useBuilds, q as queryBuilds, G as GameProvider, f as CreateGooglePlayGame } from '../../index-CyvGh-kt.js';
7
7
  import Spinner from 'ink-spinner';
8
8
  import { Alert, TextInput } from '@inkjs/ui';
9
9
  import axios from 'axios';
@@ -28,24 +28,25 @@ import 'path';
28
28
  import 'qrcode';
29
29
  import 'string-length';
30
30
  import 'strip-ansi';
31
- import { C as CreateKeystore } from '../../Create-1xAdntNl.js';
32
- import { I as ImportKeystore } from '../../Import-CzC-M4ln.js';
33
- import { C as ConnectGoogle } from '../../index-OZi8bvu8.js';
34
- import { C as CreateServiceAccountKey } from '../../index--EbYyBAZ.js';
35
- import { g as getShortUUID } from '../../index-35Eswf6F.js';
36
- import { u as useShip, J as JobProgress } from '../../JobProgress-BjNgtIjm.js';
37
- import { c as cacheKeys, f as fetchKeyTestResult, K as KeyTestStatus, a as KeyTestError } from '../../useAndroidServiceAccountTestResult-CJLIEYmA.js';
38
- import { J as JobLogTail } from '../../JobLogTail-CZxoMSd5.js';
39
- import { a as getProjectCredentials } from '../../index-u1aj1OQW.js';
31
+ import { C as CreateKeystore } from '../../Create-ISdroJ3G.js';
32
+ import { I as ImportKeystore } from '../../Import-CfThJF6k.js';
33
+ import { u as useResponsive, C as ConnectGoogle } from '../../index-BHh0BZvD.js';
34
+ import { C as CreateServiceAccountKey } from '../../index-DKQjnJrC.js';
35
+ import { g as getShortUUID } from '../../index-DJ078v-U.js';
36
+ import { u as useShip, J as JobProgress } from '../../JobProgress-DjIkuk5U.js';
37
+ import { c as cacheKeys, f as fetchKeyTestResult, K as KeyTestStatus, a as KeyTestError } from '../../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
38
+ import { J as JobLogTail } from '../../JobLogTail-BWzbQBZz.js';
39
+ import { a as getProjectCredentials } from '../../index-C6aAyrXW.js';
40
40
  import { T as Title } from '../../Title-BCQtayg6.js';
41
- import { C as Command } from '../../Command-1p5alCz3.js';
41
+ import { C as Command } from '../../Command-DFdHXDiU.js';
42
+ import { withFullScreen } from 'fullscreen-ink';
42
43
  import '@expo/apple-utils/build/index.js';
43
44
  import 'ini';
44
45
  import 'deepmerge';
45
46
  import '../../RunWithSpinner-BVXNWGD3.js';
46
- import '../../import-CRMaNBVF.js';
47
- import '../../useWebSocket-BOCa8v6o.js';
48
- import '../../useProjectCredentials-DX3e_PPc.js';
47
+ import '../../import-8pL1AF47.js';
48
+ import '../../useWebSocket-gyuCsore.js';
49
+ import '../../useProjectCredentials-DpeXZcHP.js';
49
50
  import '../../ProgressSpinner-6pw1T8Iw.js';
50
51
  import '../../git-DREGq-jc.js';
51
52
 
@@ -360,7 +361,11 @@ const CreateForGame = ({ onComplete, onError, gameId, ...boxProps }) => {
360
361
  if (shouldRun)
361
362
  shipMutation.mutateAsync({
362
363
  command,
363
- log: setShipLog
364
+ log: setShipLog,
365
+ shipFlags: {
366
+ platform: "android",
367
+ skipPublish: true
368
+ }
364
369
  }).catch(onError);
365
370
  }, [buildData, jobData, command]);
366
371
  const androidJob = jobData?.data.find(
@@ -554,6 +559,17 @@ const StepStatusTable = ({ stepStatuses }) => {
554
559
  }) });
555
560
  };
556
561
 
562
+ const WizardHeader = ({ currentStepIndex, stepStatuses }) => {
563
+ const { isTall } = useResponsive();
564
+ const stepCount = stepStatuses ? stepStatuses.length : 0;
565
+ const currentStep = currentStepIndex !== null ? currentStepIndex + 1 : null;
566
+ const title = isTall ? "ShipThis Android Wizard" : `ShipThis Android Wizard (step ${currentStep} of ${stepCount})`;
567
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
568
+ /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Title, { children: title }) }),
569
+ stepStatuses && isTall && /* @__PURE__ */ jsx(StepStatusTable, { stepStatuses })
570
+ ] });
571
+ };
572
+
557
573
  const stepComponentMap = {
558
574
  createGame: CreateGame,
559
575
  createKeystore: CreateOrImport,
@@ -566,7 +582,9 @@ const stepComponentMap = {
566
582
  const ON_COMPLETE_DELAY_MS = 500;
567
583
  const AndroidWizard = (props) => {
568
584
  const { command } = React.useContext(CommandContext);
585
+ const { isWide, isTall } = useResponsive();
569
586
  const [currentStep, setCurrentStep] = useState(null);
587
+ const [currentStepIndex, setCurrentStepIndex] = useState(null);
570
588
  const [stepStatuses, setStepStatuses] = useState(null);
571
589
  const [showSuccess, setShowSuccess] = useState(false);
572
590
  const determineStep = async () => {
@@ -579,6 +597,7 @@ const AndroidWizard = (props) => {
579
597
  if (index === firstPending) return StepStatus.RUNNING;
580
598
  return status;
581
599
  });
600
+ setCurrentStepIndex(firstPending);
582
601
  setCurrentStep(pendingStep);
583
602
  setStepStatuses(withPending);
584
603
  const isAllDone = firstPending === -1;
@@ -594,87 +613,21 @@ const AndroidWizard = (props) => {
594
613
  iosSetupURL: new URL("/docs/ios", WEB_URL).toString(),
595
614
  docsURL: new URL("/docs", WEB_URL).toString()
596
615
  };
597
- return /* @__PURE__ */ jsx(GameProvider, { children: /* @__PURE__ */ jsxs(ScrollArea, { height: process.stdout.rows || 24, children: [
598
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
599
- /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Title, { children: "ShipThis Android Wizard" }) }),
600
- stepStatuses && /* @__PURE__ */ jsx(StepStatusTable, { stepStatuses })
601
- ] }),
616
+ return /* @__PURE__ */ jsxs(GameProvider, { children: [
617
+ /* @__PURE__ */ jsx(WizardHeader, { stepStatuses, currentStepIndex }),
602
618
  StepInterface && /* @__PURE__ */ jsx(
603
619
  StepInterface,
604
620
  {
605
621
  onComplete: handleStepComplete,
606
622
  onError: props.onError,
607
- margin: 1,
608
- borderStyle: "single",
609
- padding: 1
623
+ margin: isTall && isWide ? 1 : 0,
624
+ borderStyle: isTall && isWide ? "single" : void 0,
625
+ padding: isTall && isWide ? 1 : 0
610
626
  }
611
627
  ),
612
628
  showSuccess && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Markdown, { filename: "android-success.md", templateVars }) })
613
- ] }) });
614
- };
615
-
616
- const reducer = (state, action) => {
617
- switch (action.type) {
618
- case "SET_INNER_HEIGHT":
619
- return {
620
- ...state,
621
- innerHeight: action.innerHeight
622
- };
623
- case "SET_HEIGHT":
624
- return {
625
- ...state,
626
- height: action.height
627
- };
628
- case "SCROLL_DOWN":
629
- return {
630
- ...state,
631
- scrollTop: Math.min(
632
- state.innerHeight <= state.height ? 0 : state.innerHeight - state.height,
633
- state.scrollTop + 1
634
- )
635
- };
636
- case "SCROLL_UP":
637
- return {
638
- ...state,
639
- scrollTop: Math.max(0, state.scrollTop - 1)
640
- };
641
- default:
642
- return state;
643
- }
629
+ ] });
644
630
  };
645
- function ScrollArea({ height, children }) {
646
- useFocus();
647
- const [state, dispatch] = useReducer(reducer, {
648
- height,
649
- scrollTop: 0,
650
- innerHeight: 0
651
- });
652
- const innerRef = useRef(null);
653
- useEffect(() => {
654
- dispatch({ type: "SET_HEIGHT", height });
655
- }, [height]);
656
- useEffect(() => {
657
- if (!innerRef.current) return;
658
- const dimensions = measureElement(innerRef.current);
659
- dispatch({
660
- type: "SET_INNER_HEIGHT",
661
- innerHeight: dimensions.height
662
- });
663
- }, []);
664
- useInput((_input, key) => {
665
- if (key.downArrow) {
666
- dispatch({
667
- type: "SCROLL_DOWN"
668
- });
669
- }
670
- if (key.upArrow) {
671
- dispatch({
672
- type: "SCROLL_UP"
673
- });
674
- }
675
- });
676
- return /* @__PURE__ */ jsx(Box, { height, flexDirection: "column", flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ jsx(Box, { ref: innerRef, flexShrink: 0, flexDirection: "column", marginTop: -state.scrollTop, children }) });
677
- }
678
631
 
679
632
  class GameWizard extends BaseAuthenticatedCommand {
680
633
  static args = {
@@ -695,9 +648,9 @@ class GameWizard extends BaseAuthenticatedCommand {
695
648
  if (args.platform === "ios") {
696
649
  return this.config.runCommand("game:ios:wizard");
697
650
  }
698
- render(
651
+ withFullScreen(
699
652
  /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(AndroidWizard, { onComplete: () => process.exit(0), onError: (e) => this.error(e) }) })
700
- );
653
+ ).start();
701
654
  }
702
655
  }
703
656
 
@@ -1,7 +1,7 @@
1
1
  import fs__default, { promises } from 'fs';
2
2
  import path from 'path';
3
3
  import { Args, Flags } from '@oclif/core';
4
- import { V as BaseCommand } from '../../index-DxzXU9Hd.js';
4
+ import { T as BaseCommand } from '../../index-w3lHxk5O.js';
5
5
  import '@expo/apple-utils/build/index.js';
6
6
  import 'axios';
7
7
  import 'crypto-js';
@@ -20,6 +20,7 @@ import '@tanstack/react-query';
20
20
  import 'fast-glob';
21
21
  import 'yazl';
22
22
  import 'socket.io-client';
23
+ import 'ink';
23
24
 
24
25
  function generateFastlaneSession(cookieData) {
25
26
  return cookieData.cookies.map((cookie) => {
@@ -1,7 +1,7 @@
1
1
  import { Args, Flags } from '@oclif/core';
2
2
  import fs__default from 'fs';
3
3
  import path from 'path';
4
- import { V as BaseCommand } from '../../index-DxzXU9Hd.js';
4
+ import { T as BaseCommand } from '../../index-w3lHxk5O.js';
5
5
  import CustomHelp from '../../utils/help.js';
6
6
  import '@expo/apple-utils/build/index.js';
7
7
  import 'axios';
@@ -21,6 +21,7 @@ import '@tanstack/react-query';
21
21
  import 'fast-glob';
22
22
  import 'yazl';
23
23
  import 'socket.io-client';
24
+ import 'ink';
24
25
 
25
26
  function getDefaultExportFromCjs (x) {
26
27
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios';
2
2
  import { Flags } from '@oclif/core';
3
- import { W as WEB_URL, V as BaseCommand, q as API_URL, Y as setAuthToken, Z as acceptTerms } from '../index-DxzXU9Hd.js';
4
- import { a as getInput } from '../index-35Eswf6F.js';
3
+ import { W as WEB_URL, T as BaseCommand, q as API_URL, X as setAuthToken, Y as acceptTerms } from '../index-w3lHxk5O.js';
4
+ import { a as getInput } from '../index-DJ078v-U.js';
5
5
  import 'path';
6
6
  import 'fs';
7
7
  import '@expo/apple-utils/build/index.js';
@@ -21,6 +21,7 @@ import '@tanstack/react-query';
21
21
  import 'fast-glob';
22
22
  import 'yazl';
23
23
  import 'socket.io-client';
24
+ import 'ink';
24
25
 
25
26
  const TERMS_URL = new URL("/terms", WEB_URL).href;
26
27
  const PRIVACY_URL = new URL("/privacy", WEB_URL).href;
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { render } from 'ink';
3
- import { V as BaseCommand, j as isCWDGodotGame } from '../index-DxzXU9Hd.js';
3
+ import { T as BaseCommand, j as isCWDGodotGame } from '../index-w3lHxk5O.js';
4
4
  import 'react';
5
- import '../index-BTAL7EB_.js';
5
+ import '../index-CyvGh-kt.js';
6
6
  import 'ink-spinner';
7
7
  import 'axios';
8
8
  import 'crypto-js';
@@ -30,13 +30,13 @@ import 'qrcode';
30
30
  import { S as StatusTable } from '../StatusTable-Dm5St4g-.js';
31
31
  import 'string-length';
32
32
  import 'strip-ansi';
33
- import { C as Command } from '../Command-1p5alCz3.js';
33
+ import { C as Command } from '../Command-DFdHXDiU.js';
34
34
  import '@expo/apple-utils/build/index.js';
35
35
  import 'isomorphic-git';
36
36
  import 'ini';
37
37
  import 'deepmerge';
38
- import '../index-35Eswf6F.js';
39
- import '../useAndroidServiceAccountTestResult-CJLIEYmA.js';
38
+ import '../index-DJ078v-U.js';
39
+ import '../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
40
40
  import '../Title-BCQtayg6.js';
41
41
 
42
42
  class Status extends BaseCommand {
@@ -51,10 +51,10 @@ class Status extends BaseCommand {
51
51
  const isShipThisConfigured = await this.hasProjectConfig();
52
52
  const isGitRepo = await isCWDGitRepo();
53
53
  let steps = [];
54
- if (!isLoggedIn) steps.push("$ shipthis login --email my.email@address.nowhere");
54
+ if (!isLoggedIn) steps.push("shipthis login --email my.email@address.nowhere");
55
55
  if (!isGodotGame) steps.push("Run this command in a Godot project directory");
56
- if (!isShipThisConfigured) steps.push("$ shipthis game wizard");
57
- if (steps.length === 0) steps = ["$ shipthis game status"];
56
+ if (!isShipThisConfigured) steps.push("shipthis game wizard");
57
+ if (steps.length === 0) steps = ["shipthis game status"];
58
58
  const statusProps = {
59
59
  title: "Status",
60
60
  statuses: {
@@ -1,6 +1,6 @@
1
1
  import axios from 'axios';
2
2
  import * as fs from 'fs';
3
- import { p as getAuthedHeaders, q as API_URL } from './index-DxzXU9Hd.js';
3
+ import { p as getAuthedHeaders, q as API_URL } from './index-w3lHxk5O.js';
4
4
 
5
5
  async function exportCredential({ zipPath, credentialId, projectId }) {
6
6
  const headers = getAuthedHeaders();
@@ -1,6 +1,6 @@
1
1
  import axios from 'axios';
2
2
  import { promises } from 'fs';
3
- import { p as getAuthedHeaders, q as API_URL } from './index-DxzXU9Hd.js';
3
+ import { p as getAuthedHeaders, q as API_URL } from './index-w3lHxk5O.js';
4
4
 
5
5
  async function getNewImportTicket(projectId) {
6
6
  const url = projectId ? `${API_URL}/projects/${projectId}/credentials/import/url` : `${API_URL}/credentials/import/url`;
@@ -2,7 +2,7 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { Text, useInput, Box } from 'ink';
3
3
  import open from 'open';
4
4
  import { useState, useEffect, useContext } from 'react';
5
- import { R as getGoogleStatus, a2 as getShortAuthRequiredUrl, a3 as getGoogleAuthUrl, W as WEB_URL } from './index-DxzXU9Hd.js';
5
+ import { Q as getGoogleStatus, a2 as getShortAuthRequiredUrl, a8 as getGoogleAuthUrl, W as WEB_URL } from './index-w3lHxk5O.js';
6
6
  import 'crypto';
7
7
  import 'fs';
8
8
  import 'readline-sync';
@@ -19,9 +19,10 @@ import 'uuid';
19
19
  import 'fast-glob';
20
20
  import 'yazl';
21
21
  import 'socket.io-client';
22
- import { u as useWebSocket } from './useWebSocket-BOCa8v6o.js';
23
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-CJLIEYmA.js';
24
- import { b as GameContext, M as Markdown } from './index-BTAL7EB_.js';
22
+ import { u as useWebSocket } from './useWebSocket-gyuCsore.js';
23
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
24
+ import { u as useScreenSize } from './Command-DFdHXDiU.js';
25
+ import { b as GameContext, M as Markdown } from './index-CyvGh-kt.js';
25
26
  import 'ink-spinner';
26
27
  import '@inkjs/ui';
27
28
  import 'string-length';
@@ -64,6 +65,20 @@ function useGoogleStatusWatching({
64
65
  };
65
66
  }
66
67
 
68
+ const WIDE_BREAKPOINT = 100;
69
+ const TALL_BREAKPOINT = 35;
70
+ function useResponsive() {
71
+ const { width, height } = useScreenSize();
72
+ const isWide = width >= WIDE_BREAKPOINT;
73
+ const isTall = height >= TALL_BREAKPOINT;
74
+ return {
75
+ width,
76
+ height,
77
+ isWide,
78
+ isTall
79
+ };
80
+ }
81
+
67
82
  const QRCodeTerminal = ({ url }) => {
68
83
  const [code, setCode] = useState(null);
69
84
  const handleLoad = async () => {
@@ -98,6 +113,8 @@ const ConnectGoogle = (props) => {
98
113
  return /* @__PURE__ */ jsx(Fragment, { children: gameId && /* @__PURE__ */ jsx(ConnectForGame, { gameId, ...props }) });
99
114
  };
100
115
  const ConnectForGame = ({ onComplete, onError, helpPage, gameId, ...boxProps }) => {
116
+ const { isTall } = useResponsive();
117
+ const [showQRCode, setShowQRCode] = useState(isTall);
101
118
  useGoogleStatusWatching({
102
119
  projectId: gameId,
103
120
  isWatching: true,
@@ -106,20 +123,37 @@ const ConnectForGame = ({ onComplete, onError, helpPage, gameId, ...boxProps })
106
123
  }
107
124
  });
108
125
  useInput(async (input) => {
109
- if (!gameId) return;
110
- if (input !== "d") return;
111
- const url = await getConnectUrl(gameId, true);
112
- await open(url);
126
+ switch (input) {
127
+ case "q":
128
+ setShowQRCode(true);
129
+ return;
130
+ case "x":
131
+ setShowQRCode(false);
132
+ return;
133
+ case "b":
134
+ if (!gameId) return;
135
+ const url = await getConnectUrl(gameId, true);
136
+ await open(url);
137
+ return;
138
+ default:
139
+ return;
140
+ }
113
141
  });
114
142
  const templateVars = {
115
143
  privacyURL: new URL("/privacy", WEB_URL).toString()
116
144
  };
117
145
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, ...boxProps, children: [
118
- /* @__PURE__ */ jsx(Markdown, { filename: "privacy-notification.md", templateVars }),
119
- /* @__PURE__ */ jsx(Text, { children: "Scan the QR code below to connect your Google account to ShipThis:" }),
120
- gameId && /* @__PURE__ */ jsx(GoogleAuthQRCode, { gameId, helpPage: !!helpPage }),
121
- /* @__PURE__ */ jsx(Text, { children: "Or press D to sign-in using your browser" })
146
+ !showQRCode && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
147
+ /* @__PURE__ */ jsx(Markdown, { filename: "privacy-notification.md", templateVars }),
148
+ /* @__PURE__ */ jsx(Text, { bold: true, color: "#4CE64C", children: "Press B to open your browser and connect your Google account to ShipThis" }),
149
+ /* @__PURE__ */ jsx(Text, { bold: true, color: "#4CE64C", children: "Press Q to show a QR-code to connect using your mobile phone" })
150
+ ] }),
151
+ showQRCode && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
152
+ /* @__PURE__ */ jsx(Text, { children: "Scan the QR code below to connect your Google account to ShipThis:" }),
153
+ gameId && /* @__PURE__ */ jsx(GoogleAuthQRCode, { gameId, helpPage: !!helpPage }),
154
+ /* @__PURE__ */ jsx(Text, { bold: true, color: "#4CE64C", children: "Press X to hide the QR code" })
155
+ ] })
122
156
  ] });
123
157
  };
124
158
 
125
- export { ConnectGoogle as C };
159
+ export { ConnectGoogle as C, useResponsive as u };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates } from './index-DxzXU9Hd.js';
2
+ import { p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates } from './index-w3lHxk5O.js';
3
3
  import 'fs';
4
4
 
5
5
  async function getUserCredentials(pageSize = 100) {