shipthis 0.1.31 → 0.1.33

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-BhHPCvRm.js} +17 -19
  2. package/dist/Command-BDIkuv2g.js +29 -0
  3. package/dist/CommandGame-CvBIjPZp.js +7 -0
  4. package/dist/{Create-ISdroJ3G.js → Create-Lpe0B8nT.js} +20 -20
  5. package/dist/GameStatus-5XpufIY_.js +137 -0
  6. package/dist/{Import-CfThJF6k.js → Import-DFzrAG04.js} +34 -36
  7. package/dist/{JobLogTail-BWzbQBZz.js → JobLogTail-BYcJgPcL.js} +53 -52
  8. package/dist/{JobProgress-DjIkuk5U.js → JobProgress-BcrE7CUK.js} +40 -38
  9. package/dist/{JobStatusTable-CEqWU73q.js → JobStatusTable-Bi-y8ZZT.js} +14 -13
  10. package/dist/{NextSteps-CK9zHOCt.js → NextSteps-DbJHmscQ.js} +1 -3
  11. package/dist/{ProgressSpinner-6pw1T8Iw.js → ProgressSpinner-Um6ARKlk.js} +2 -2
  12. package/dist/{ProjectCredentialsTable-u9ruZ9mN.js → ProjectCredentialsTable-B4vDJl4l.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-CwkZTFBD.js} +18 -19
  16. package/dist/{baseAppleCommand-zhkGlKq0.js → baseAppleCommand-BKXweb-U.js} +1 -1
  17. package/dist/{baseGameAndroidCommand-DJ-cMLa_.js → baseGameAndroidCommand-CAi-BSsH.js} +23 -23
  18. package/dist/commands/apple/apiKey/create.js +36 -36
  19. package/dist/commands/apple/apiKey/export.js +27 -27
  20. package/dist/commands/apple/apiKey/import.js +28 -28
  21. package/dist/commands/apple/apiKey/status.js +32 -32
  22. package/dist/commands/apple/certificate/create.js +40 -40
  23. package/dist/commands/apple/certificate/export.js +27 -27
  24. package/dist/commands/apple/certificate/import.js +28 -28
  25. package/dist/commands/apple/certificate/status.js +33 -33
  26. package/dist/commands/apple/login.js +15 -15
  27. package/dist/commands/apple/status.js +27 -27
  28. package/dist/commands/dashboard.js +10 -10
  29. package/dist/commands/game/android/apiKey/connect.js +28 -28
  30. package/dist/commands/game/android/apiKey/create.js +29 -29
  31. package/dist/commands/game/android/apiKey/export.js +30 -30
  32. package/dist/commands/game/android/apiKey/import.js +32 -32
  33. package/dist/commands/game/android/apiKey/invite.js +14 -14
  34. package/dist/commands/game/android/apiKey/status.js +30 -30
  35. package/dist/commands/game/android/keyStore/create.js +25 -25
  36. package/dist/commands/game/android/keyStore/export.js +29 -29
  37. package/dist/commands/game/android/keyStore/import.js +36 -36
  38. package/dist/commands/game/android/keyStore/status.js +26 -26
  39. package/dist/commands/game/android/status.js +15 -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 -15
  43. package/dist/commands/game/details.js +35 -36
  44. package/dist/commands/game/export.js +12 -12
  45. package/dist/commands/game/ios/app/addTester.js +37 -32
  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 +32 -32
  50. package/dist/commands/game/ios/profile/export.js +29 -29
  51. package/dist/commands/game/ios/profile/import.js +33 -33
  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 +39 -34
  55. package/dist/commands/game/job/list.js +34 -34
  56. package/dist/commands/game/job/status.js +32 -32
  57. package/dist/commands/game/list.js +38 -40
  58. package/dist/commands/game/ship.js +81 -77
  59. package/dist/commands/game/status.js +38 -85
  60. package/dist/commands/game/wizard.js +253 -242
  61. package/dist/commands/internal/fastlane.js +15 -17
  62. package/dist/commands/internal/readme.js +38 -36
  63. package/dist/commands/login.js +14 -14
  64. package/dist/commands/status.js +32 -30
  65. package/dist/{export-DZxo2_e_.js → export-DLQrUEBK.js} +5 -5
  66. package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
  67. package/dist/{import-8pL1AF47.js → import-BoY5e0uJ.js} +14 -14
  68. package/dist/{index-DJ078v-U.js → index-B27WJDxn.js} +43 -27
  69. package/dist/{index-DKQjnJrC.js → index-CisLwc7e.js} +42 -44
  70. package/dist/{index-C6aAyrXW.js → index-Crv7S0bl.js} +6 -6
  71. package/dist/{index-BHh0BZvD.js → index-DC0GJtAy.js} +50 -60
  72. package/dist/{index-CyvGh-kt.js → index-DfUg5j06.js} +93 -92
  73. package/dist/{index-w3lHxk5O.js → index-pj8JVg5X.js} +242 -225
  74. package/dist/{upload-BTpxj3QP.js → upload-C8S17EU_.js} +22 -22
  75. package/dist/{useAndroidServiceAccountTestResult-Dy3Ag7_r.js → useAndroidServiceAccountTestResult-D4e5AKAZ.js} +11 -13
  76. package/dist/{useAppleApp-h1Ogi_qc.js → useAppleApp-Dr6URQvC.js} +4 -4
  77. package/dist/{useAppleBundleId-B3TTNap0.js → useAppleBundleId-DELAwSQp.js} +6 -6
  78. package/dist/{useProjectCredentials-DpeXZcHP.js → useProjectCredentials-BjvdJdQg.js} +10 -12
  79. package/dist/{useWebSocket-gyuCsore.js → useWebSocket-CRV7V69Q.js} +1 -1
  80. package/dist/utils/help.js +4 -4
  81. package/package.json +5 -4
  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,29 @@
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-pj8JVg5X.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';
22
+ import 'fullscreen-ink';
23
23
  import 'ink';
24
24
 
25
25
  function generateFastlaneSession(cookieData) {
26
- return cookieData.cookies.map((cookie) => {
27
- return `- !ruby/object:HTTP::Cookie
26
+ return cookieData.cookies.map((cookie) => `- !ruby/object:HTTP::Cookie
28
27
  name: ${cookie.key}
29
28
  value: ${cookie.value}
30
29
  domain: ${cookie.domain}
@@ -35,13 +34,12 @@ function generateFastlaneSession(cookieData) {
35
34
  expires: ${cookie.expires ? `"${cookie.expires}"` : ""}
36
35
  max_age: ${cookie.maxAge || ""}
37
36
  created_at: ${cookie.creation}
38
- accessed_at: ${cookie.lastAccessed}`;
39
- }).join("\n");
37
+ accessed_at: ${cookie.lastAccessed}`).join("\n");
40
38
  }
41
39
  class AppleFastlane extends BaseCommand {
42
40
  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 })
41
+ file: Args.string({ description: "Path where the fastlane session will be written", required: true }),
42
+ username: Args.string({ description: "Your Apple email address", required: true })
45
43
  };
46
44
  static description = "Output a fastlane session file which can be used with xcodes";
47
45
  static examples = [
@@ -53,7 +51,7 @@ class AppleFastlane extends BaseCommand {
53
51
  };
54
52
  async run() {
55
53
  const { args } = this;
56
- const { username, file } = args;
54
+ const { file, username } = args;
57
55
  const homeDirectory = this.config.home;
58
56
  const inputFilePath = path.join(homeDirectory, ".app-store", "auth", username, "cookie");
59
57
  if (!fs__default.existsSync(inputFilePath)) {
@@ -63,7 +61,7 @@ class AppleFastlane extends BaseCommand {
63
61
  throw new Error(`The file ${file} already exists. Use --force to overwrite it.`);
64
62
  }
65
63
  const outputFilePath = file;
66
- const fileContent = await promises.readFile(inputFilePath, "utf-8");
64
+ const fileContent = await promises.readFile(inputFilePath, "utf8");
67
65
  const cookieData = JSON.parse(fileContent);
68
66
  const yamlContent = generateFastlaneSession(cookieData);
69
67
  await promises.mkdir(path.dirname(outputFilePath), { recursive: true });
@@ -1,26 +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-pj8JVg5X.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';
25
+ import 'fullscreen-ink';
24
26
  import 'ink';
25
27
 
26
28
  function getDefaultExportFromCjs (x) {
@@ -185,8 +187,8 @@ function requireEjs () {
185
187
  * @project EJS
186
188
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
187
189
  */
188
- var fs = fs__default;
189
- var path$1 = path;
190
+ var fs = require$$0;
191
+ var path = require$$1;
190
192
  var utils = requireUtils();
191
193
  var scopeOptionWarned = false;
192
194
  var _VERSION_STRING = require$$3.version;
@@ -217,9 +219,9 @@ function requireEjs () {
217
219
  exports.localsName = _DEFAULT_LOCALS_NAME;
218
220
  exports.promiseImpl = new Function("return this;")().Promise;
219
221
  exports.resolveInclude = function(name, filename, isDir) {
220
- var dirname = path$1.dirname;
221
- var extname = path$1.extname;
222
- var resolve = path$1.resolve;
222
+ var dirname = path.dirname;
223
+ var extname = path.extname;
224
+ var resolve = path.resolve;
223
225
  var includePath = resolve(isDir ? filename : dirname(filename), name);
224
226
  var ext = extname(name);
225
227
  if (!ext) {
@@ -571,7 +573,7 @@ function requireEjs () {
571
573
  };
572
574
  if (opts.filename && typeof Object.defineProperty === "function") {
573
575
  var filename = opts.filename;
574
- var basename = path$1.basename(filename, path$1.extname(filename));
576
+ var basename = path.basename(filename, path.extname(filename));
575
577
  try {
576
578
  Object.defineProperty(returnedFn, "name", {
577
579
  value: basename,
@@ -807,16 +809,16 @@ const COMMAND_TEMPLATE_INCLUDE = `
807
809
  \`\`\`
808
810
  `.trim();
809
811
  function getTopicTree(topics, commands, separateFileDepth) {
810
- const commandIds = commands.map((command) => command.id);
812
+ const commandIds = new Set(commands.map((command) => command.id));
811
813
  const nonInternalTopics = topics.filter((topic) => topic.name !== "internal");
812
- const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.includes(topic.name));
813
- let topicTree = {
814
+ const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.has(topic.name));
815
+ const topicTree = {
814
816
  [ROOT_TOPIC_NAME]: {
817
+ commands: [],
815
818
  filePath: ROOT_TOPIC_FILENAME,
816
- topic: { name: ROOT_TOPIC_NAME, description: ROOT_TOPIC_DESCRIPTION },
819
+ includeTopicsAndCommands: separateFileDepth === 0,
817
820
  subTopics: [],
818
- commands: [],
819
- includeTopicsAndCommands: separateFileDepth === 0
821
+ topic: { description: ROOT_TOPIC_DESCRIPTION, name: ROOT_TOPIC_NAME }
820
822
  }
821
823
  };
822
824
  const topicsByName = Object.fromEntries(topics.map((topic) => [topic.name, topic]));
@@ -826,20 +828,20 @@ function getTopicTree(topics, commands, separateFileDepth) {
826
828
  for (let i = 0; i < topicPath.length; i++) {
827
829
  const name = topicPath.slice(0, i + 1).join(":");
828
830
  const subTopic = currentParent.subTopics.find((subTopic2) => subTopic2.topic.name === name);
829
- if (!subTopic) {
831
+ if (subTopic) {
832
+ currentParent = subTopic;
833
+ } else {
830
834
  const currentDepth = i + 1;
831
835
  const includeTopicsAndCommands = currentParent.includeTopicsAndCommands || currentDepth >= separateFileDepth;
832
836
  const newSubTopic = {
833
- topic: topicsByName[name],
834
- subTopics: [],
835
837
  commands: [],
836
838
  filePath: `${path.join(...name.split(":"))}.md`,
837
- includeTopicsAndCommands
839
+ includeTopicsAndCommands,
840
+ subTopics: [],
841
+ topic: topicsByName[name]
838
842
  };
839
843
  currentParent.subTopics.push(newSubTopic);
840
844
  currentParent = newSubTopic;
841
- } else {
842
- currentParent = subTopic;
843
845
  }
844
846
  }
845
847
  }
@@ -862,11 +864,11 @@ function renderTopic(readmeTopic, config) {
862
864
  const renderedCommands = readmeTopic.commands.map((readmeCommand) => renderCommand(readmeCommand, config));
863
865
  const topicTemplate = readmeTopic.includeTopicsAndCommands ? TOPIC_TEMPLATE_INCLUDE : TOPIC_TEMPLATE;
864
866
  const rendered = ejs.render(topicTemplate, {
865
- topic: readmeTopic.topic,
867
+ commands: renderedCommands,
866
868
  subTopics: renderedSubTopics,
867
- commands: renderedCommands
869
+ topic: readmeTopic.topic
868
870
  });
869
- return { ...readmeTopic, subTopics: renderedSubTopics, commands: renderedCommands, rendered };
871
+ return { ...readmeTopic, commands: renderedCommands, rendered, subTopics: renderedSubTopics };
870
872
  }
871
873
  function renderCommand(readmeCommand, config) {
872
874
  const columns = Number.parseInt(process.env.COLUMNS, 10) || 120;
@@ -911,15 +913,15 @@ class InternalReadme extends BaseCommand {
911
913
  static description = "Generate the readme files for the commands";
912
914
  static examples = ["<%= config.bin %> <%= command.id %>"];
913
915
  static flags = {
916
+ depth: Flags.integer({ char: "d", description: "The depth of the topic tree to render as separate files" }),
914
917
  // By default do nothing
915
918
  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" })
919
+ only: Flags.string({ char: "l", description: "Glob pattern - will only write the files which match" }),
920
+ overWrite: Flags.boolean({ char: "o", description: "Overwrite existing files" })
919
921
  };
920
922
  async run() {
921
923
  const { outputDir } = this.args;
922
- const { notDryRun, overWrite, depth, only } = this.flags;
924
+ const { depth, notDryRun, only, overWrite } = this.flags;
923
925
  const dryRun = !notDryRun;
924
926
  const { commands, topics } = this.config;
925
927
  const topicTree = getTopicTree(topics, commands, depth || 0);
@@ -928,10 +930,10 @@ class InternalReadme extends BaseCommand {
928
930
  const writeOutput = writeTopic(renderedTopicTree, outputDir, dryRun, overWrite, only);
929
931
  if (writeOutput.created.length > 0)
930
932
  console.log(dryRun ? "Would create the following files:" : "Created the following files:");
931
- writeOutput.created.forEach((file) => console.log(`- ${file}`));
933
+ for (const file of writeOutput.created) console.log(`- ${file}`);
932
934
  if (writeOutput.overwritten.length > 0)
933
935
  console.log(notDryRun && overWrite ? "Overwritten the following files:" : "Would overwrite the following files:");
934
- writeOutput.overwritten.forEach((file) => console.log(`- ${file}`));
936
+ for (const file of writeOutput.overwritten) console.log(`- ${file}`);
935
937
  }
936
938
  }
937
939
 
@@ -1,26 +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-pj8JVg5X.js';
4
+ import { a as getInput } from '../index-B27WJDxn.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';
23
+ import 'fullscreen-ink';
24
24
  import 'ink';
25
25
 
26
26
  const TERMS_URL = new URL("/terms", WEB_URL).href;
@@ -33,11 +33,11 @@ class Login extends BaseCommand {
33
33
  "<%= config.bin %> <%= command.id %> --force --email me@email.nowhere"
34
34
  ];
35
35
  static flags = {
36
- force: Flags.boolean({ char: "f" }),
37
36
  email: Flags.string({
38
37
  char: "e",
39
38
  description: "Your email address"
40
- })
39
+ }),
40
+ force: Flags.boolean({ char: "f" })
41
41
  };
42
42
  async run() {
43
43
  const { flags } = this;
@@ -75,7 +75,7 @@ ${[
75
75
  `
76
76
  );
77
77
  const accepted = await getInput("Do you accept the terms of these documents? (yes/no): ");
78
- const answer = accepted.toLowerCase().trim().substring(0, 1);
78
+ const answer = accepted.toLowerCase().trim().slice(0, 1);
79
79
  return answer === "y";
80
80
  };
81
81
  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-pj8JVg5X.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-DfUg5j06.js';
33
+ import { C as Command } from '../Command-BDIkuv2g.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-B27WJDxn.js';
40
+ import '../useAndroidServiceAccountTestResult-D4e5AKAZ.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-pj8JVg5X.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-pj8JVg5X.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;
@@ -1,21 +1,22 @@
1
- import crypto from 'crypto';
2
- import fs__default from 'fs';
3
- import readlineSync from 'readline-sync';
4
- import { promises } from 'node:readline';
1
+ import crypto from 'node:crypto';
2
+ import fs__default from 'node:fs';
5
3
  import path from 'node:path';
4
+ import { promises } from 'node:readline';
6
5
  import { fileURLToPath } from 'node:url';
7
- import { K as JobStage, P as Platform, L as LogLevel, J as JobStatus } from './index-w3lHxk5O.js';
6
+ import readlineSync from 'readline-sync';
7
+ import { L as JobStage, P as Platform, M as LogLevel, J as JobStatus } from './index-pj8JVg5X.js';
8
8
  import 'luxon';
9
9
  import 'axios';
10
10
  import 'isomorphic-git';
11
11
  import '@oclif/core';
12
- import 'react';
13
12
  import '@tanstack/react-query';
13
+ import 'react';
14
14
  import 'crypto-js';
15
15
  import 'uuid';
16
16
  import 'fast-glob';
17
17
  import 'yazl';
18
18
  import 'socket.io-client';
19
+ import 'fullscreen-ink';
19
20
  import 'ink';
20
21
 
21
22
  function getShortUUID(originalUuid) {
@@ -23,42 +24,54 @@ function getShortUUID(originalUuid) {
23
24
  }
24
25
  function getStageColor(stage) {
25
26
  switch (stage) {
26
- case JobStage.SETUP:
27
+ case JobStage.SETUP: {
27
28
  return "#FFB3B3";
29
+ }
28
30
  // pastel red
29
- case JobStage.CONFIGURE:
31
+ case JobStage.CONFIGURE: {
30
32
  return "#FFD9B3";
33
+ }
31
34
  // pastel orange
32
- case JobStage.EXPORT:
35
+ case JobStage.EXPORT: {
33
36
  return "#FFFACD";
37
+ }
34
38
  // pastel yellow
35
- case JobStage.BUILD:
39
+ case JobStage.BUILD: {
36
40
  return "#B3FFB3";
41
+ }
37
42
  // pastel green
38
- case JobStage.PUBLISH:
43
+ case JobStage.PUBLISH: {
39
44
  return "#B3D9FF";
45
+ }
40
46
  }
41
47
  }
42
48
  function getMessageColor(level) {
43
49
  switch (level) {
44
- case LogLevel.INFO:
50
+ case LogLevel.INFO: {
45
51
  return "white";
46
- case LogLevel.WARN:
52
+ }
53
+ case LogLevel.WARN: {
47
54
  return "yellow";
48
- case LogLevel.ERROR:
55
+ }
56
+ case LogLevel.ERROR: {
49
57
  return "red";
58
+ }
50
59
  }
51
60
  }
52
61
  function getJobStatusColor(status) {
53
62
  switch (status) {
54
- case JobStatus.PENDING:
63
+ case JobStatus.PENDING: {
55
64
  return "yellow";
56
- case JobStatus.PROCESSING:
65
+ }
66
+ case JobStatus.PROCESSING: {
57
67
  return "blue";
58
- case JobStatus.COMPLETED:
68
+ }
69
+ case JobStatus.COMPLETED: {
59
70
  return "green";
60
- case JobStatus.FAILED:
71
+ }
72
+ case JobStatus.FAILED: {
61
73
  return "red";
74
+ }
62
75
  }
63
76
  }
64
77
  async function getFileHash(filename) {
@@ -72,9 +85,9 @@ async function getFileHash(filename) {
72
85
  }
73
86
  function isValidSemVer(versionString) {
74
87
  const [semVer, major, minor, patch, prerelease, buildmetadata] = versionString.match(
75
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
88
+ /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*))?(?:\+([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?$/
76
89
  ) ?? [];
77
- return !!semVer;
90
+ return Boolean(semVer);
78
91
  }
79
92
  function makeHumanReadable(rawObject) {
80
93
  const getLabel = (key) => {
@@ -89,12 +102,15 @@ function makeHumanReadable(rawObject) {
89
102
  }
90
103
  function getPlatformName(platform) {
91
104
  switch (platform) {
92
- case Platform.IOS:
105
+ case Platform.IOS: {
93
106
  return "iOS";
94
- case Platform.ANDROID:
107
+ }
108
+ case Platform.ANDROID: {
95
109
  return "Android";
96
- default:
110
+ }
111
+ default: {
97
112
  throw new Error(`Unknown platform: ${platform}`);
113
+ }
98
114
  }
99
115
  }
100
116
  async function getMaskedInput(message) {
@@ -115,11 +131,11 @@ async function getInput(message) {
115
131
  }
116
132
  function generatePackageName(gameName) {
117
133
  let normalizedGameName = gameName.trim().toLowerCase();
118
- normalizedGameName = normalizedGameName.replace(/[\s\-_]+/g, ".");
119
- normalizedGameName = normalizedGameName.replace(/[^a-z0-9\.]/g, "");
120
- normalizedGameName = normalizedGameName.replace(/\.+/g, ".");
134
+ normalizedGameName = normalizedGameName.replaceAll(/[\s_\-]+/g, ".");
135
+ normalizedGameName = normalizedGameName.replaceAll(/[^\d.a-z]/g, "");
136
+ normalizedGameName = normalizedGameName.replaceAll(/\.+/g, ".");
121
137
  normalizedGameName = normalizedGameName.replace(/^\./, "").replace(/\.$/, "");
122
- if (/^[0-9]/.test(normalizedGameName)) {
138
+ if (/^\d/.test(normalizedGameName)) {
123
139
  normalizedGameName = "app." + normalizedGameName;
124
140
  }
125
141
  const prefix = "com.";