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
@@ -3,9 +3,9 @@ import { Text, useInput, Box } from 'ink';
3
3
  import React, { useState, useEffect, useContext, useRef } from 'react';
4
4
  import Spinner from 'ink-spinner';
5
5
  import open from 'open';
6
- import { g as getShortUUID, h as getPlatformName, s as scriptDir } from './index-35Eswf6F.js';
7
- import { c as cacheKeys, u as useAndroidServiceAccountTestResult, K as KeyTestStatus, a as KeyTestError } from './useAndroidServiceAccountTestResult-CJLIEYmA.js';
8
- import { p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates, P as Platform, a6 as getShortDateTime, J as JobStatus, a7 as getShortTimeDelta, E as getJob, F as getProject, a2 as getShortAuthRequiredUrl, K as queryClient, W as WEB_URL } from './index-DxzXU9Hd.js';
6
+ import { g as getShortUUID, h as getPlatformName, s as scriptDir } from './index-DJ078v-U.js';
7
+ import { c as cacheKeys, u as useAndroidServiceAccountTestResult, K as KeyTestStatus, a as KeyTestError } from './useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
8
+ import { p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates, P as Platform, a5 as getShortDateTime, J as JobStatus, a6 as getShortTimeDelta, E as getJob, F as getProject, a2 as getShortAuthRequiredUrl, _ as queryClient, a7 as BuildType, W as WEB_URL } from './index-w3lHxk5O.js';
9
9
  import '@inkjs/ui';
10
10
  import axios from 'axios';
11
11
  import { useQuery } from '@tanstack/react-query';
@@ -37,13 +37,13 @@ async function queryBuilds({ projectId, ...pageAndSortParams }) {
37
37
  }
38
38
  }
39
39
  function getBuildSummary(build) {
40
- const buildType = build.buildType || (build.platform == Platform.IOS ? "IPA" : "AAB");
41
- const filename = `game.${buildType.toLowerCase()}`;
40
+ const ext = build.buildType || (build.platform == Platform.IOS ? "IPA" : "AAB");
41
+ const filename = `game.${ext.toLowerCase()}`;
42
42
  return {
43
43
  id: getShortUUID(build.id),
44
44
  jobId: getShortUUID(build.jobId),
45
45
  ...getJobDetailsSummary(build.jobDetails),
46
- type: `${getPlatformName(build.platform)} ${buildType}`,
46
+ type: `${getPlatformName(build.platform)} ${build.buildType || ""}`.trim(),
47
47
  createdAt: getShortDateTime(build.createdAt),
48
48
  cmd: `shipthis game build download ${getShortUUID(build.id)} ${filename}`
49
49
  };
@@ -140,7 +140,16 @@ const getRenderedMarkdown = ({ filename, templateVars, ...options }) => {
140
140
  const root = path.dirname(entrypointPath);
141
141
  const mdPath = path.join(root, "..", "assets", "markdown", filename);
142
142
  const mdTemplate = fs__default.readFileSync(mdPath, "utf8").trim();
143
- const markdown = !templateVars ? mdTemplate : mdTemplate.replace(/\${(.*?)}/g, (_, key) => templateVars[key.trim()] || "");
143
+ let markdown = mdTemplate;
144
+ if (templateVars) {
145
+ markdown = markdown.replace(/\${if (.*?)\}([\s\S]*?)\${endif}/g, (_, key, content) => {
146
+ return templateVars[key.trim()] ? content : "";
147
+ });
148
+ markdown = markdown.replace(/\${(.*?)}/g, (_, key) => {
149
+ const trimmed = key.trim();
150
+ return templateVars[trimmed] ? String(templateVars[trimmed]) : "";
151
+ });
152
+ }
144
153
  const rendered = parse(markdown).trim();
145
154
  const cleaned = cleanHyperlinks(rendered);
146
155
  return cleaned;
@@ -191,8 +200,10 @@ const Create = ({ onComplete, onError, gameId, ...boxProps }) => {
191
200
  queryKey: cacheKeys.androidKeyTestResult({ projectId: gameId })
192
201
  });
193
202
  });
194
- const initialBuild = builds?.data.find((build) => build.platform === Platform.ANDROID);
195
- const downloadCmd = initialBuild ? `${getBuildSummary(initialBuild).cmd}` : "";
203
+ const initialBuild = builds?.data.find((build) => {
204
+ return build.platform === Platform.ANDROID && build.buildType === BuildType.AAB;
205
+ });
206
+ const downloadCmd = initialBuild ? `${getBuildSummary(initialBuild).cmd}` : "Initial AAB build not found!";
196
207
  const templateVars = {
197
208
  downloadCmd,
198
209
  dashboardURL: new URL(`/games/${getShortUUID(gameId)}/builds`, WEB_URL).toString()
@@ -4,7 +4,7 @@ import readlineSync from 'readline-sync';
4
4
  import { promises } from 'node:readline';
5
5
  import path from 'node:path';
6
6
  import { fileURLToPath } from 'node:url';
7
- import { L as JobStage, P as Platform, M as LogLevel, J as JobStatus } from './index-DxzXU9Hd.js';
7
+ import { K as JobStage, P as Platform, L as LogLevel, J as JobStatus } from './index-w3lHxk5O.js';
8
8
  import 'luxon';
9
9
  import 'axios';
10
10
  import 'isomorphic-git';
@@ -16,6 +16,7 @@ import 'uuid';
16
16
  import 'fast-glob';
17
17
  import 'yazl';
18
18
  import 'socket.io-client';
19
+ import 'ink';
19
20
 
20
21
  function getShortUUID(originalUuid) {
21
22
  return originalUuid.slice(0, 8);
@@ -2,8 +2,8 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { Box, Text } from 'ink';
3
3
  import { useState, useRef, useEffect, useContext } from 'react';
4
4
  import Spinner from 'ink-spinner';
5
- import { b as GameContext } from './index-BTAL7EB_.js';
6
- import { p as getAuthedHeaders, q as API_URL, a1 as castObjectDates, P as Platform, C as CredentialsType, R as getGoogleStatus } from './index-DxzXU9Hd.js';
5
+ import { b as GameContext } from './index-CyvGh-kt.js';
6
+ import { p as getAuthedHeaders, q as API_URL, a1 as castObjectDates, P as Platform, C as CredentialsType, Q as getGoogleStatus } from './index-w3lHxk5O.js';
7
7
  import axios from 'axios';
8
8
  import 'crypto-js';
9
9
  import 'uuid';
@@ -19,11 +19,11 @@ import 'node:path';
19
19
  import 'node:url';
20
20
  import 'isomorphic-git';
21
21
  import '@oclif/core';
22
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-CJLIEYmA.js';
22
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
23
23
  import 'fast-glob';
24
24
  import 'socket.io-client';
25
- import { u as useWebSocket } from './useWebSocket-BOCa8v6o.js';
26
- import { u as useProjectCredentials } from './useProjectCredentials-DX3e_PPc.js';
25
+ import { u as useWebSocket } from './useWebSocket-gyuCsore.js';
26
+ import { u as useProjectCredentials } from './useProjectCredentials-DpeXZcHP.js';
27
27
  import 'open';
28
28
  import 'marked';
29
29
  import 'marked-terminal';
@@ -20,6 +20,7 @@ import { QueryClient } from '@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
  const defaultExport = expo.default;
25
26
  const {
@@ -335,6 +336,12 @@ var CredentialsType = /* @__PURE__ */ ((CredentialsType2) => {
335
336
  CredentialsType2["KEY"] = "KEY";
336
337
  return CredentialsType2;
337
338
  })(CredentialsType || {});
339
+ var BuildType = /* @__PURE__ */ ((BuildType2) => {
340
+ BuildType2["IPA"] = "IPA";
341
+ BuildType2["APK"] = "APK";
342
+ BuildType2["AAB"] = "AAB";
343
+ return BuildType2;
344
+ })(BuildType || {});
338
345
 
339
346
  function isCWDGodotGame() {
340
347
  const cwd = process.cwd();
@@ -722,4 +729,4 @@ const DetailsFlags = {
722
729
  gcpServiceAccountId: Flags.string({ char: "c", description: "Set the GCP service account ID" })
723
730
  };
724
731
 
725
- export { getNewUploadTicket as $, ApiKey as A, BaseAuthenticatedCommand as B, CredentialsType as C, DetailsFlags as D, getJob as E, getProject as F, GODOT_CAPABILITIES as G, downloadBuildById as H, castArrayObjectDates as I, JobStatus as J, queryClient as K, JobStage as L, LogLevel as M, getAuthToken as N, WS_URL as O, Platform as P, getGodotAndroidPackageName as Q, getGoogleStatus as R, inviteServiceAccount as S, disconnectGoogle as T, UserRole as U, BaseCommand as V, WEB_URL as W, getSingleUseUrl as X, setAuthToken as Y, acceptTerms as Z, Auth as _, ApiKeyType as a, startJobsFromUpload as a0, castObjectDates as a1, getShortAuthRequiredUrl as a2, getGoogleAuthUrl as a3, castJobDates as a4, getShortTime as a5, getShortDateTime as a6, getShortTimeDelta as a7, updateProject as a8, getShortDate as b, BaseGameCommand as c, getGodotAppleBundleIdentifier as d, BundleId as e, App as f, getProjects as g, CapabilityTypeOption as h, BetaGroup as i, isCWDGodotGame as j, getProjectPlatformProgress as k, Certificate as l, CertificateType as m, Profile as n, ProfileType as o, getAuthedHeaders as p, API_URL as q, getGodotProjectCapabilities as r, CapabilityType as s, GameEngine as t, getGodotVersion as u, createProject as v, DEFAULT_IGNORED_FILES_GLOBS as w, DEFAULT_SHIPPED_FILES_GLOBS as x, getGodotProjectName as y, getProjectJobs as z };
732
+ export { getNewUploadTicket as $, ApiKey as A, BaseAuthenticatedCommand as B, CredentialsType as C, DetailsFlags as D, getJob as E, getProject as F, GODOT_CAPABILITIES as G, downloadBuildById as H, castArrayObjectDates as I, JobStatus as J, JobStage as K, LogLevel as L, getAuthToken as M, WS_URL as N, getGodotAndroidPackageName as O, Platform as P, getGoogleStatus as Q, inviteServiceAccount as R, disconnectGoogle as S, BaseCommand as T, UserRole as U, getSingleUseUrl as V, WEB_URL as W, setAuthToken as X, acceptTerms as Y, Auth as Z, queryClient as _, ApiKeyType as a, startJobsFromUpload as a0, castObjectDates as a1, getShortAuthRequiredUrl as a2, castJobDates as a3, getShortTime as a4, getShortDateTime as a5, getShortTimeDelta as a6, BuildType as a7, getGoogleAuthUrl as a8, updateProject as a9, getShortDate as b, BaseGameCommand as c, getGodotAppleBundleIdentifier as d, BundleId as e, App as f, getProjects as g, CapabilityTypeOption as h, BetaGroup as i, isCWDGodotGame as j, getProjectPlatformProgress as k, Certificate as l, CertificateType as m, Profile as n, ProfileType as o, getAuthedHeaders as p, API_URL as q, getGodotProjectCapabilities as r, CapabilityType as s, GameEngine as t, getGodotVersion as u, createProject as v, DEFAULT_IGNORED_FILES_GLOBS as w, DEFAULT_SHIPPED_FILES_GLOBS as x, getGodotProjectName as y, getProjectJobs as z };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { p as getAuthedHeaders, q as API_URL } from './index-DxzXU9Hd.js';
2
+ import { p as getAuthedHeaders, q as API_URL } from './index-w3lHxk5O.js';
3
3
 
4
4
  async function getNewUploadTicket(projectId = null) {
5
5
  const url = projectId ? `${API_URL}/projects/${projectId}/credentials/url` : `${API_URL}/credentials/url`;
@@ -1,4 +1,4 @@
1
- import { p as getAuthedHeaders, q as API_URL } from './index-DxzXU9Hd.js';
1
+ import { p as getAuthedHeaders, q as API_URL } from './index-w3lHxk5O.js';
2
2
  import axios from 'axios';
3
3
  import { useQuery } from '@tanstack/react-query';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
- import { f as App } from './index-DxzXU9Hd.js';
2
+ import { f as App } from './index-w3lHxk5O.js';
3
3
 
4
4
  const queryAppleApp = async ({ ctx, iosBundleId }) => {
5
5
  if (!iosBundleId) {
@@ -1,5 +1,5 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
- import { e as BundleId, r as getGodotProjectCapabilities, P as Platform, G as GODOT_CAPABILITIES, s as CapabilityType } from './index-DxzXU9Hd.js';
2
+ import { e as BundleId, r as getGodotProjectCapabilities, P as Platform, G as GODOT_CAPABILITIES, s as CapabilityType } from './index-w3lHxk5O.js';
3
3
 
4
4
  async function getBundleIdCapabilities(bundleId) {
5
5
  const current = await bundleId.getBundleIdCapabilitiesAsync();
@@ -1,8 +1,8 @@
1
1
  import axios from 'axios';
2
2
  import { useQuery } from '@tanstack/react-query';
3
- import { c as cacheKeys } from './useAndroidServiceAccountTestResult-CJLIEYmA.js';
4
- import { b as getShortDate, p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates } from './index-DxzXU9Hd.js';
5
- import { g as getShortUUID } from './index-35Eswf6F.js';
3
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
4
+ import { b as getShortDate, p as getAuthedHeaders, q as API_URL, I as castArrayObjectDates } from './index-w3lHxk5O.js';
5
+ import { g as getShortUUID } from './index-DJ078v-U.js';
6
6
 
7
7
  async function queryProjectCredentials({
8
8
  projectId,
@@ -1,6 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
  import { io } from 'socket.io-client';
3
- import { N as getAuthToken, O as WS_URL } from './index-DxzXU9Hd.js';
3
+ import { M as getAuthToken, N as WS_URL } from './index-w3lHxk5O.js';
4
4
 
5
5
  function useWebSocket(listeners = []) {
6
6
  const log = () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shipthis",
3
3
  "description": "ShipThis manages building and uploading your Godot games to the App Store and Google Play.",
4
- "version": "0.1.30",
4
+ "version": "0.1.31",
5
5
  "author": "Hello Invent Ltd",
6
6
  "bin": {
7
7
  "shipthis": "./bin/run.js"
@@ -22,6 +22,7 @@
22
22
  "deepmerge": "^4.3.1",
23
23
  "fast-glob": "^3.3.2",
24
24
  "fs-extra": "^11.2.0",
25
+ "fullscreen-ink": "^0.0.2",
25
26
  "ini": "^5.0.0",
26
27
  "ink": "^5.0.1",
27
28
  "ink-spinner": "^5.0.0",
@@ -1,28 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { Box } from 'ink';
3
- import { QueryClientProvider } from '@tanstack/react-query';
4
- import { K as queryClient } from './index-DxzXU9Hd.js';
5
- import 'axios';
6
- import 'crypto';
7
- import 'fs';
8
- import 'readline-sync';
9
- import 'node:readline';
10
- import 'node:path';
11
- import 'node:url';
12
- import 'luxon';
13
- import 'isomorphic-git';
14
- import '@oclif/core';
15
- import 'react';
16
- import 'crypto-js';
17
- import 'uuid';
18
- import 'socket.io-client';
19
- import 'fast-glob';
20
- import 'yazl';
21
- import { C as CommandProvider } from './index-BTAL7EB_.js';
22
-
23
- const Command = ({ children, command }) => {
24
- const width = process.stdout.columns || 80;
25
- return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(CommandProvider, { command, children: /* @__PURE__ */ jsx(Box, { width, flexDirection: "column", children }) }) });
26
- };
27
-
28
- export { Command as C };