shipthis 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{AppleBundleIdDetails-eoK5F8Qn.js → AppleBundleIdDetails-6H3cNWxw.js} +17 -19
  2. package/dist/Command-WPpmLPkL.js +29 -0
  3. package/dist/CommandGame-cxzWG4nT.js +7 -0
  4. package/dist/{Create-ISdroJ3G.js → Create-3Ob8sjik.js} +20 -20
  5. package/dist/GameStatus-BQEtVKvv.js +137 -0
  6. package/dist/{Import-CfThJF6k.js → Import-CFuPDI0K.js} +33 -35
  7. package/dist/{JobLogTail-BWzbQBZz.js → JobLogTail-0CBLoG8N.js} +53 -52
  8. package/dist/{JobProgress-DjIkuk5U.js → JobProgress-lKqVT88m.js} +35 -36
  9. package/dist/{JobStatusTable-CEqWU73q.js → JobStatusTable-C_ZsZJCm.js} +14 -13
  10. package/dist/{NextSteps-CK9zHOCt.js → NextSteps-DbJHmscQ.js} +1 -3
  11. package/dist/{ProgressSpinner-6pw1T8Iw.js → ProgressSpinner-DGcakQSK.js} +1 -1
  12. package/dist/{ProjectCredentialsTable-u9ruZ9mN.js → ProjectCredentialsTable-B5pHOnGu.js} +11 -10
  13. package/dist/{StatusTable-Dm5St4g-.js → StatusTable-DzRWcMr4.js} +7 -9
  14. package/dist/{Table-CvM6pccN.js → Table-FaNgpyeq.js} +15 -15
  15. package/dist/{UserCredentialsTable-Q7u9M-ap.js → UserCredentialsTable-3W3qesh7.js} +18 -19
  16. package/dist/{baseAppleCommand-zhkGlKq0.js → baseAppleCommand-BGV088--.js} +1 -1
  17. package/dist/{baseGameAndroidCommand-DJ-cMLa_.js → baseGameAndroidCommand-CsemgVjp.js} +23 -23
  18. package/dist/commands/apple/apiKey/create.js +35 -35
  19. package/dist/commands/apple/apiKey/export.js +26 -26
  20. package/dist/commands/apple/apiKey/import.js +27 -27
  21. package/dist/commands/apple/apiKey/status.js +31 -31
  22. package/dist/commands/apple/certificate/create.js +39 -39
  23. package/dist/commands/apple/certificate/export.js +26 -26
  24. package/dist/commands/apple/certificate/import.js +27 -27
  25. package/dist/commands/apple/certificate/status.js +31 -31
  26. package/dist/commands/apple/login.js +15 -16
  27. package/dist/commands/apple/status.js +27 -27
  28. package/dist/commands/dashboard.js +10 -11
  29. package/dist/commands/game/android/apiKey/connect.js +28 -28
  30. package/dist/commands/game/android/apiKey/create.js +28 -28
  31. package/dist/commands/game/android/apiKey/export.js +29 -29
  32. package/dist/commands/game/android/apiKey/import.js +31 -31
  33. package/dist/commands/game/android/apiKey/invite.js +14 -15
  34. package/dist/commands/game/android/apiKey/status.js +29 -29
  35. package/dist/commands/game/android/keyStore/create.js +24 -24
  36. package/dist/commands/game/android/keyStore/export.js +28 -28
  37. package/dist/commands/game/android/keyStore/import.js +35 -35
  38. package/dist/commands/game/android/keyStore/status.js +26 -26
  39. package/dist/commands/game/android/status.js +14 -58
  40. package/dist/commands/game/build/download.js +24 -24
  41. package/dist/commands/game/build/list.js +37 -37
  42. package/dist/commands/game/create.js +15 -16
  43. package/dist/commands/game/details.js +35 -36
  44. package/dist/commands/game/export.js +12 -13
  45. package/dist/commands/game/ios/app/addTester.js +24 -24
  46. package/dist/commands/game/ios/app/create.js +24 -24
  47. package/dist/commands/game/ios/app/status.js +29 -29
  48. package/dist/commands/game/ios/app/sync.js +31 -31
  49. package/dist/commands/game/ios/profile/create.js +30 -30
  50. package/dist/commands/game/ios/profile/export.js +28 -28
  51. package/dist/commands/game/ios/profile/import.js +32 -32
  52. package/dist/commands/game/ios/profile/status.js +36 -36
  53. package/dist/commands/game/ios/status.js +46 -58
  54. package/dist/commands/game/ios/wizard.js +31 -31
  55. package/dist/commands/game/job/list.js +34 -34
  56. package/dist/commands/game/job/status.js +31 -31
  57. package/dist/commands/game/list.js +37 -39
  58. package/dist/commands/game/ship.js +73 -71
  59. package/dist/commands/game/status.js +38 -85
  60. package/dist/commands/game/wizard.js +250 -239
  61. package/dist/commands/internal/fastlane.js +15 -18
  62. package/dist/commands/internal/readme.js +38 -37
  63. package/dist/commands/login.js +14 -15
  64. package/dist/commands/status.js +32 -30
  65. package/dist/{export-DZxo2_e_.js → export-CXsVPXA1.js} +5 -5
  66. package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
  67. package/dist/{import-8pL1AF47.js → import-DGvG5REx.js} +14 -14
  68. package/dist/{index-w3lHxk5O.js → index-BhhiXbey.js} +240 -224
  69. package/dist/{index-BHh0BZvD.js → index-C03TV1_J.js} +37 -55
  70. package/dist/{index-CyvGh-kt.js → index-C66Dd8Xc.js} +77 -87
  71. package/dist/{index-DJ078v-U.js → index-CGBdOm1q.js} +43 -28
  72. package/dist/{index-DKQjnJrC.js → index-CS9Gwcb0.js} +41 -43
  73. package/dist/{index-C6aAyrXW.js → index-CtTI85m-.js} +6 -6
  74. package/dist/{upload-BTpxj3QP.js → upload-8y5MQEm9.js} +22 -22
  75. package/dist/{useAndroidServiceAccountTestResult-Dy3Ag7_r.js → useAndroidServiceAccountTestResult-DZk5SMxI.js} +11 -13
  76. package/dist/{useAppleApp-h1Ogi_qc.js → useAppleApp-DWYGURwU.js} +4 -4
  77. package/dist/{useAppleBundleId-B3TTNap0.js → useAppleBundleId-PsTJ2g1B.js} +6 -6
  78. package/dist/{useProjectCredentials-DpeXZcHP.js → useProjectCredentials-BEphqa18.js} +10 -12
  79. package/dist/{useWebSocket-gyuCsore.js → useWebSocket-5PYa2QER.js} +1 -1
  80. package/dist/utils/help.js +4 -4
  81. package/package.json +4 -3
  82. package/dist/Command-DFdHXDiU.js +0 -44
  83. package/dist/CommandGame-Dif-oSky.js +0 -9
  84. package/dist/{RunWithSpinner-BVXNWGD3.js → RunWithSpinner-gMVA07bZ.js} +2 -2
@@ -1,30 +1,28 @@
1
- import fs__default, { promises } from 'fs';
2
- import path from 'path';
1
+ import fs__default, { promises } from 'node:fs';
2
+ import path from 'node:path';
3
3
  import { Args, Flags } from '@oclif/core';
4
- import { T as BaseCommand } from '../../index-w3lHxk5O.js';
5
- import '@expo/apple-utils/build/index.js';
4
+ import { V as BaseCommand } from '../../index-BhhiXbey.js';
6
5
  import 'axios';
7
6
  import 'crypto-js';
8
7
  import 'uuid';
9
8
  import 'luxon';
10
- import 'crypto';
11
- import 'readline-sync';
9
+ import '@expo/apple-utils/build/index.js';
10
+ import 'node:crypto';
12
11
  import 'node:readline';
13
- import 'node:path';
14
12
  import 'node:url';
13
+ import 'readline-sync';
15
14
  import 'isomorphic-git';
16
- import 'ini';
17
15
  import 'deepmerge';
18
- import 'react';
16
+ import 'ini';
19
17
  import '@tanstack/react-query';
18
+ import 'react';
20
19
  import 'fast-glob';
21
20
  import 'yazl';
22
21
  import 'socket.io-client';
23
- import 'ink';
22
+ import 'fullscreen-ink';
24
23
 
25
24
  function generateFastlaneSession(cookieData) {
26
- return cookieData.cookies.map((cookie) => {
27
- return `- !ruby/object:HTTP::Cookie
25
+ return cookieData.cookies.map((cookie) => `- !ruby/object:HTTP::Cookie
28
26
  name: ${cookie.key}
29
27
  value: ${cookie.value}
30
28
  domain: ${cookie.domain}
@@ -35,13 +33,12 @@ function generateFastlaneSession(cookieData) {
35
33
  expires: ${cookie.expires ? `"${cookie.expires}"` : ""}
36
34
  max_age: ${cookie.maxAge || ""}
37
35
  created_at: ${cookie.creation}
38
- accessed_at: ${cookie.lastAccessed}`;
39
- }).join("\n");
36
+ accessed_at: ${cookie.lastAccessed}`).join("\n");
40
37
  }
41
38
  class AppleFastlane extends BaseCommand {
42
39
  static args = {
43
- username: Args.string({ description: "Your Apple email address", required: true }),
44
- file: Args.string({ description: "Path where the fastlane session will be written", required: true })
40
+ file: Args.string({ description: "Path where the fastlane session will be written", required: true }),
41
+ username: Args.string({ description: "Your Apple email address", required: true })
45
42
  };
46
43
  static description = "Output a fastlane session file which can be used with xcodes";
47
44
  static examples = [
@@ -53,7 +50,7 @@ class AppleFastlane extends BaseCommand {
53
50
  };
54
51
  async run() {
55
52
  const { args } = this;
56
- const { username, file } = args;
53
+ const { file, username } = args;
57
54
  const homeDirectory = this.config.home;
58
55
  const inputFilePath = path.join(homeDirectory, ".app-store", "auth", username, "cookie");
59
56
  if (!fs__default.existsSync(inputFilePath)) {
@@ -63,7 +60,7 @@ class AppleFastlane extends BaseCommand {
63
60
  throw new Error(`The file ${file} already exists. Use --force to overwrite it.`);
64
61
  }
65
62
  const outputFilePath = file;
66
- const fileContent = await promises.readFile(inputFilePath, "utf-8");
63
+ const fileContent = await promises.readFile(inputFilePath, "utf8");
67
64
  const cookieData = JSON.parse(fileContent);
68
65
  const yamlContent = generateFastlaneSession(cookieData);
69
66
  await promises.mkdir(path.dirname(outputFilePath), { recursive: true });
@@ -1,27 +1,28 @@
1
+ import fs__default from 'node:fs';
2
+ import path from 'node:path';
1
3
  import { Args, Flags } from '@oclif/core';
2
- import fs__default from 'fs';
3
- import path from 'path';
4
- import { T as BaseCommand } from '../../index-w3lHxk5O.js';
4
+ import require$$0 from 'fs';
5
+ import require$$1 from 'path';
6
+ import { V as BaseCommand } from '../../index-BhhiXbey.js';
5
7
  import CustomHelp from '../../utils/help.js';
6
- import '@expo/apple-utils/build/index.js';
7
8
  import 'axios';
8
9
  import 'crypto-js';
9
10
  import 'uuid';
10
11
  import 'luxon';
11
- import 'crypto';
12
- import 'readline-sync';
12
+ import '@expo/apple-utils/build/index.js';
13
+ import 'node:crypto';
13
14
  import 'node:readline';
14
- import 'node:path';
15
15
  import 'node:url';
16
+ import 'readline-sync';
16
17
  import 'isomorphic-git';
17
- import 'ini';
18
18
  import 'deepmerge';
19
- import 'react';
19
+ import 'ini';
20
20
  import '@tanstack/react-query';
21
+ import 'react';
21
22
  import 'fast-glob';
22
23
  import 'yazl';
23
24
  import 'socket.io-client';
24
- import 'ink';
25
+ import 'fullscreen-ink';
25
26
 
26
27
  function getDefaultExportFromCjs (x) {
27
28
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -185,8 +186,8 @@ function requireEjs () {
185
186
  * @project EJS
186
187
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
187
188
  */
188
- var fs = fs__default;
189
- var path$1 = path;
189
+ var fs = require$$0;
190
+ var path = require$$1;
190
191
  var utils = requireUtils();
191
192
  var scopeOptionWarned = false;
192
193
  var _VERSION_STRING = require$$3.version;
@@ -217,9 +218,9 @@ function requireEjs () {
217
218
  exports.localsName = _DEFAULT_LOCALS_NAME;
218
219
  exports.promiseImpl = new Function("return this;")().Promise;
219
220
  exports.resolveInclude = function(name, filename, isDir) {
220
- var dirname = path$1.dirname;
221
- var extname = path$1.extname;
222
- var resolve = path$1.resolve;
221
+ var dirname = path.dirname;
222
+ var extname = path.extname;
223
+ var resolve = path.resolve;
223
224
  var includePath = resolve(isDir ? filename : dirname(filename), name);
224
225
  var ext = extname(name);
225
226
  if (!ext) {
@@ -571,7 +572,7 @@ function requireEjs () {
571
572
  };
572
573
  if (opts.filename && typeof Object.defineProperty === "function") {
573
574
  var filename = opts.filename;
574
- var basename = path$1.basename(filename, path$1.extname(filename));
575
+ var basename = path.basename(filename, path.extname(filename));
575
576
  try {
576
577
  Object.defineProperty(returnedFn, "name", {
577
578
  value: basename,
@@ -807,16 +808,16 @@ const COMMAND_TEMPLATE_INCLUDE = `
807
808
  \`\`\`
808
809
  `.trim();
809
810
  function getTopicTree(topics, commands, separateFileDepth) {
810
- const commandIds = commands.map((command) => command.id);
811
+ const commandIds = new Set(commands.map((command) => command.id));
811
812
  const nonInternalTopics = topics.filter((topic) => topic.name !== "internal");
812
- const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.includes(topic.name));
813
- let topicTree = {
813
+ const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.has(topic.name));
814
+ const topicTree = {
814
815
  [ROOT_TOPIC_NAME]: {
816
+ commands: [],
815
817
  filePath: ROOT_TOPIC_FILENAME,
816
- topic: { name: ROOT_TOPIC_NAME, description: ROOT_TOPIC_DESCRIPTION },
818
+ includeTopicsAndCommands: separateFileDepth === 0,
817
819
  subTopics: [],
818
- commands: [],
819
- includeTopicsAndCommands: separateFileDepth === 0
820
+ topic: { description: ROOT_TOPIC_DESCRIPTION, name: ROOT_TOPIC_NAME }
820
821
  }
821
822
  };
822
823
  const topicsByName = Object.fromEntries(topics.map((topic) => [topic.name, topic]));
@@ -826,20 +827,20 @@ function getTopicTree(topics, commands, separateFileDepth) {
826
827
  for (let i = 0; i < topicPath.length; i++) {
827
828
  const name = topicPath.slice(0, i + 1).join(":");
828
829
  const subTopic = currentParent.subTopics.find((subTopic2) => subTopic2.topic.name === name);
829
- if (!subTopic) {
830
+ if (subTopic) {
831
+ currentParent = subTopic;
832
+ } else {
830
833
  const currentDepth = i + 1;
831
834
  const includeTopicsAndCommands = currentParent.includeTopicsAndCommands || currentDepth >= separateFileDepth;
832
835
  const newSubTopic = {
833
- topic: topicsByName[name],
834
- subTopics: [],
835
836
  commands: [],
836
837
  filePath: `${path.join(...name.split(":"))}.md`,
837
- includeTopicsAndCommands
838
+ includeTopicsAndCommands,
839
+ subTopics: [],
840
+ topic: topicsByName[name]
838
841
  };
839
842
  currentParent.subTopics.push(newSubTopic);
840
843
  currentParent = newSubTopic;
841
- } else {
842
- currentParent = subTopic;
843
844
  }
844
845
  }
845
846
  }
@@ -862,11 +863,11 @@ function renderTopic(readmeTopic, config) {
862
863
  const renderedCommands = readmeTopic.commands.map((readmeCommand) => renderCommand(readmeCommand, config));
863
864
  const topicTemplate = readmeTopic.includeTopicsAndCommands ? TOPIC_TEMPLATE_INCLUDE : TOPIC_TEMPLATE;
864
865
  const rendered = ejs.render(topicTemplate, {
865
- topic: readmeTopic.topic,
866
+ commands: renderedCommands,
866
867
  subTopics: renderedSubTopics,
867
- commands: renderedCommands
868
+ topic: readmeTopic.topic
868
869
  });
869
- return { ...readmeTopic, subTopics: renderedSubTopics, commands: renderedCommands, rendered };
870
+ return { ...readmeTopic, commands: renderedCommands, rendered, subTopics: renderedSubTopics };
870
871
  }
871
872
  function renderCommand(readmeCommand, config) {
872
873
  const columns = Number.parseInt(process.env.COLUMNS, 10) || 120;
@@ -911,15 +912,15 @@ class InternalReadme extends BaseCommand {
911
912
  static description = "Generate the readme files for the commands";
912
913
  static examples = ["<%= config.bin %> <%= command.id %>"];
913
914
  static flags = {
915
+ depth: Flags.integer({ char: "d", description: "The depth of the topic tree to render as separate files" }),
914
916
  // By default do nothing
915
917
  notDryRun: Flags.boolean({ char: "n", description: "Set to actually write the files (will not overwrite)" }),
916
- overWrite: Flags.boolean({ char: "o", description: "Overwrite existing files" }),
917
- depth: Flags.integer({ char: "d", description: "The depth of the topic tree to render as separate files" }),
918
- only: Flags.string({ char: "l", description: "Glob pattern - will only write the files which match" })
918
+ only: Flags.string({ char: "l", description: "Glob pattern - will only write the files which match" }),
919
+ overWrite: Flags.boolean({ char: "o", description: "Overwrite existing files" })
919
920
  };
920
921
  async run() {
921
922
  const { outputDir } = this.args;
922
- const { notDryRun, overWrite, depth, only } = this.flags;
923
+ const { depth, notDryRun, only, overWrite } = this.flags;
923
924
  const dryRun = !notDryRun;
924
925
  const { commands, topics } = this.config;
925
926
  const topicTree = getTopicTree(topics, commands, depth || 0);
@@ -928,10 +929,10 @@ class InternalReadme extends BaseCommand {
928
929
  const writeOutput = writeTopic(renderedTopicTree, outputDir, dryRun, overWrite, only);
929
930
  if (writeOutput.created.length > 0)
930
931
  console.log(dryRun ? "Would create the following files:" : "Created the following files:");
931
- writeOutput.created.forEach((file) => console.log(`- ${file}`));
932
+ for (const file of writeOutput.created) console.log(`- ${file}`);
932
933
  if (writeOutput.overwritten.length > 0)
933
934
  console.log(notDryRun && overWrite ? "Overwritten the following files:" : "Would overwrite the following files:");
934
- writeOutput.overwritten.forEach((file) => console.log(`- ${file}`));
935
+ for (const file of writeOutput.overwritten) console.log(`- ${file}`);
935
936
  }
936
937
  }
937
938
 
@@ -1,27 +1,26 @@
1
- import axios from 'axios';
2
1
  import { Flags } from '@oclif/core';
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
- import 'path';
6
- import 'fs';
7
- import '@expo/apple-utils/build/index.js';
2
+ import axios from 'axios';
3
+ import { W as WEB_URL, V as BaseCommand, o as API_URL, Y as setAuthToken, Z as acceptTerms } from '../index-BhhiXbey.js';
4
+ import { a as getInput } from '../index-CGBdOm1q.js';
5
+ import 'node:fs';
8
6
  import 'crypto-js';
9
7
  import 'uuid';
10
8
  import 'luxon';
11
- import 'crypto';
12
- import 'readline-sync';
13
- import 'node:readline';
14
9
  import 'node:path';
10
+ import '@expo/apple-utils/build/index.js';
11
+ import 'node:crypto';
12
+ import 'node:readline';
15
13
  import 'node:url';
14
+ import 'readline-sync';
16
15
  import 'isomorphic-git';
17
- import 'ini';
18
16
  import 'deepmerge';
19
- import 'react';
17
+ import 'ini';
20
18
  import '@tanstack/react-query';
19
+ import 'react';
21
20
  import 'fast-glob';
22
21
  import 'yazl';
23
22
  import 'socket.io-client';
24
- import 'ink';
23
+ import 'fullscreen-ink';
25
24
 
26
25
  const TERMS_URL = new URL("/terms", WEB_URL).href;
27
26
  const PRIVACY_URL = new URL("/privacy", WEB_URL).href;
@@ -33,11 +32,11 @@ class Login extends BaseCommand {
33
32
  "<%= config.bin %> <%= command.id %> --force --email me@email.nowhere"
34
33
  ];
35
34
  static flags = {
36
- force: Flags.boolean({ char: "f" }),
37
35
  email: Flags.string({
38
36
  char: "e",
39
37
  description: "Your email address"
40
- })
38
+ }),
39
+ force: Flags.boolean({ char: "f" })
41
40
  };
42
41
  async run() {
43
42
  const { flags } = this;
@@ -75,7 +74,7 @@ ${[
75
74
  `
76
75
  );
77
76
  const accepted = await getInput("Do you accept the terms of these documents? (yes/no): ");
78
- const answer = accepted.toLowerCase().trim().substring(0, 1);
77
+ const answer = accepted.toLowerCase().trim().slice(0, 1);
79
78
  return answer === "y";
80
79
  };
81
80
  await this.setAuthConfig({ shipThisUser });
@@ -1,43 +1,43 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { render } from 'ink';
3
- import { T as BaseCommand, j as isCWDGodotGame } from '../index-w3lHxk5O.js';
4
- import 'react';
5
- import '../index-CyvGh-kt.js';
3
+ import { V as BaseCommand, j as isCWDGodotGame } from '../index-BhhiXbey.js';
6
4
  import 'ink-spinner';
7
- import 'axios';
8
- import 'crypto-js';
9
- import 'uuid';
10
- import 'fs';
11
- import 'luxon';
12
- import '@inkjs/ui';
13
- import '@tanstack/react-query';
14
- import 'yazl';
15
- import 'crypto';
16
- import 'readline-sync';
17
- import 'node:readline';
5
+ import 'node:crypto';
6
+ import 'node:fs';
18
7
  import 'node:path';
8
+ import 'node:readline';
19
9
  import 'node:url';
20
- import { i as isCWDGitRepo } from '../git-DREGq-jc.js';
10
+ import 'readline-sync';
11
+ import 'luxon';
12
+ import 'axios';
13
+ import { i as isCWDGitRepo } from '../git-BpsfNFZ_.js';
21
14
  import '@oclif/core';
15
+ import '@tanstack/react-query';
16
+ import 'react';
17
+ import 'crypto-js';
18
+ import 'uuid';
22
19
  import 'fast-glob';
20
+ import 'yazl';
23
21
  import 'socket.io-client';
22
+ import 'fullscreen-ink';
23
+ import 'string-length';
24
+ import 'strip-ansi';
25
+ import { S as StatusTable } from '../StatusTable-DzRWcMr4.js';
24
26
  import 'open';
27
+ import '@inkjs/ui';
25
28
  import 'marked';
26
29
  import 'marked-terminal';
27
- import 'path';
28
- import { N as NextSteps } from '../NextSteps-CK9zHOCt.js';
30
+ import { N as NextSteps } from '../NextSteps-DbJHmscQ.js';
29
31
  import 'qrcode';
30
- import { S as StatusTable } from '../StatusTable-Dm5St4g-.js';
31
- import 'string-length';
32
- import 'strip-ansi';
33
- import { C as Command } from '../Command-DFdHXDiU.js';
32
+ import '../index-C66Dd8Xc.js';
33
+ import { C as Command } from '../Command-WPpmLPkL.js';
34
34
  import '@expo/apple-utils/build/index.js';
35
35
  import 'isomorphic-git';
36
- import 'ini';
37
36
  import 'deepmerge';
38
- import '../index-DJ078v-U.js';
39
- import '../useAndroidServiceAccountTestResult-Dy3Ag7_r.js';
37
+ import 'ini';
40
38
  import '../Title-BCQtayg6.js';
39
+ import '../index-CGBdOm1q.js';
40
+ import '../useAndroidServiceAccountTestResult-DZk5SMxI.js';
41
41
 
42
42
  class Status extends BaseCommand {
43
43
  static args = {};
@@ -46,7 +46,7 @@ class Status extends BaseCommand {
46
46
  static flags = {};
47
47
  async run() {
48
48
  const authConfig = await this.getAuthConfig();
49
- const isLoggedIn = !!authConfig.shipThisUser;
49
+ const isLoggedIn = Boolean(authConfig.shipThisUser);
50
50
  const isGodotGame = isCWDGodotGame();
51
51
  const isShipThisConfigured = await this.hasProjectConfig();
52
52
  const isGitRepo = await isCWDGitRepo();
@@ -54,15 +54,16 @@ class Status extends BaseCommand {
54
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
56
  if (!isShipThisConfigured) steps.push("shipthis game wizard");
57
+ const exitCode = steps.length > 0 ? 1 : 0;
57
58
  if (steps.length === 0) steps = ["shipthis game status"];
58
59
  const statusProps = {
59
- title: "Status",
60
60
  statuses: {
61
- "Logged in": isLoggedIn,
61
+ "Git repository detected (not required)": isGitRepo,
62
62
  "Godot project detected": isGodotGame,
63
- "ShipThis project configured": isShipThisConfigured,
64
- "Git repository detected (not required)": isGitRepo
65
- }
63
+ "Logged in": isLoggedIn,
64
+ "ShipThis project configured": isShipThisConfigured
65
+ },
66
+ title: "Status"
66
67
  };
67
68
  render(
68
69
  /* @__PURE__ */ jsxs(Command, { command: this, children: [
@@ -70,6 +71,7 @@ class Status extends BaseCommand {
70
71
  /* @__PURE__ */ jsx(NextSteps, { steps })
71
72
  ] })
72
73
  );
74
+ return process.exit(exitCode);
73
75
  }
74
76
  }
75
77
 
@@ -1,8 +1,8 @@
1
+ import * as fs from 'node:fs';
1
2
  import axios from 'axios';
2
- import * as fs from 'fs';
3
- import { p as getAuthedHeaders, q as API_URL } from './index-w3lHxk5O.js';
3
+ import { o as API_URL, p as getAuthedHeaders } from './index-BhhiXbey.js';
4
4
 
5
- async function exportCredential({ zipPath, credentialId, projectId }) {
5
+ async function exportCredential({ credentialId, projectId, zipPath }) {
6
6
  const headers = getAuthedHeaders();
7
7
  const url = projectId ? `${API_URL}/projects/${projectId}/credentials/${credentialId}/export` : `${API_URL}/credentials/${credentialId}/export`;
8
8
  const { data } = await axios.post(
@@ -16,9 +16,9 @@ async function exportCredential({ zipPath, credentialId, projectId }) {
16
16
  }
17
17
  async function downloadFile(url, destination) {
18
18
  const response = await axios({
19
- url,
20
19
  method: "GET",
21
- responseType: "stream"
20
+ responseType: "stream",
21
+ url
22
22
  });
23
23
  return new Promise((resolve, reject) => {
24
24
  const file = fs.createWriteStream(destination);
@@ -1,12 +1,12 @@
1
+ import { promises } from 'node:fs';
1
2
  import git from 'isomorphic-git';
2
- import { promises } from 'fs';
3
3
 
4
4
  async function isCWDGitRepo() {
5
5
  const dir = process.cwd();
6
6
  try {
7
- await git.log({ fs: promises, dir, depth: 1 });
7
+ await git.log({ depth: 1, dir, fs: promises });
8
8
  return true;
9
- } catch (e) {
9
+ } catch {
10
10
  return false;
11
11
  }
12
12
  }
@@ -14,17 +14,17 @@ async function getCWDGitInfo() {
14
14
  const dir = process.cwd();
15
15
  const empty = {};
16
16
  try {
17
- const commits = await git.log({ fs: promises, dir, depth: 1 });
17
+ const commits = await git.log({ depth: 1, dir, fs: promises });
18
18
  const branch = await git.currentBranch({
19
- fs: promises,
20
19
  dir,
20
+ fs: promises,
21
21
  fullname: false
22
22
  });
23
23
  return {
24
- gitCommitHash: commits[0].oid,
25
- gitBranch: branch
24
+ gitBranch: branch,
25
+ gitCommitHash: commits[0].oid
26
26
  };
27
- } catch (e) {
27
+ } catch {
28
28
  return empty;
29
29
  }
30
30
  }
@@ -1,42 +1,42 @@
1
+ import { promises } from 'node:fs';
1
2
  import axios from 'axios';
2
- import { promises } from 'fs';
3
- import { p as getAuthedHeaders, q as API_URL } from './index-w3lHxk5O.js';
3
+ import { o as API_URL, p as getAuthedHeaders } from './index-BhhiXbey.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`;
7
7
  const headers = getAuthedHeaders();
8
8
  const { data: importInfo } = await axios({
9
+ headers,
9
10
  method: "post",
10
- url,
11
- headers
11
+ url
12
12
  });
13
13
  return importInfo;
14
14
  }
15
15
  async function importCredential({
16
+ platform,
16
17
  projectId,
17
- zipPath,
18
18
  type,
19
- platform
19
+ zipPath
20
20
  }) {
21
21
  const importTicket = await getNewImportTicket(projectId);
22
22
  const zipBuffer = await promises.readFile(zipPath);
23
23
  await axios.put(importTicket.url, zipBuffer, {
24
24
  headers: {
25
- "Content-length": zipBuffer.length,
26
- "Content-Type": "application/zip"
25
+ "Content-Type": "application/zip",
26
+ "Content-length": zipBuffer.length
27
27
  }
28
28
  });
29
29
  const headers = getAuthedHeaders();
30
30
  const url = projectId ? `${API_URL}/projects/${projectId}/credentials/import` : `${API_URL}/credentials/import`;
31
31
  const { data: publicCredential } = await axios({
32
- method: "post",
33
- url,
34
- headers,
35
32
  data: {
36
- uuid: importTicket.uuid,
33
+ platform,
37
34
  type,
38
- platform
39
- }
35
+ uuid: importTicket.uuid
36
+ },
37
+ headers,
38
+ method: "post",
39
+ url
40
40
  });
41
41
  if (projectId) {
42
42
  return publicCredential;