shipthis 0.1.25 → 0.1.27

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-mPUG2R4N.js +76 -0
  2. package/dist/Command-B3AmRt2w.js +28 -0
  3. package/dist/CommandGame-BCMzP9pc.js +9 -0
  4. package/dist/Create-CsJxpzUs.js +59 -0
  5. package/dist/Import-v0M_ygyF.js +110 -0
  6. package/dist/JobProgress-9uvq8IBn.js +121 -0
  7. package/dist/JobStatusTable-Bf7J9WXe.js +191 -0
  8. package/dist/NextSteps-CK9zHOCt.js +18 -0
  9. package/dist/ProgressSpinner-6pw1T8Iw.js +16 -0
  10. package/dist/ProjectCredentialsTable-CTkP1mvy.js +37 -0
  11. package/dist/RunWithSpinner-BVXNWGD3.js +27 -0
  12. package/dist/StatusTable-Dm5St4g-.js +33 -0
  13. package/dist/Table-CvM6pccN.js +101 -0
  14. package/dist/Title-BCQtayg6.js +6 -0
  15. package/dist/UserCredentialsTable-DhtM_iTG.js +82 -0
  16. package/dist/baseAppleCommand-IGl6KTvv.js +10 -0
  17. package/dist/baseGameAndroidCommand-DFn4zMvq.js +43 -0
  18. package/dist/commands/apple/apiKey/create.js +103 -0
  19. package/dist/commands/apple/apiKey/export.js +81 -0
  20. package/dist/commands/apple/apiKey/import.js +85 -0
  21. package/dist/commands/apple/apiKey/status.js +122 -0
  22. package/dist/commands/apple/certificate/create.js +133 -0
  23. package/dist/commands/apple/certificate/export.js +81 -0
  24. package/dist/commands/apple/certificate/import.js +85 -0
  25. package/dist/commands/apple/certificate/status.js +130 -0
  26. package/dist/commands/apple/login.js +76 -0
  27. package/dist/commands/apple/status.js +79 -0
  28. package/dist/commands/dashboard.js +38 -0
  29. package/dist/commands/game/android/apiKey/connect.js +74 -0
  30. package/dist/commands/game/android/apiKey/create.js +74 -0
  31. package/dist/commands/game/android/apiKey/export.js +84 -0
  32. package/dist/commands/game/android/apiKey/import.js +93 -0
  33. package/dist/commands/game/android/apiKey/invite.js +81 -0
  34. package/dist/commands/game/android/apiKey/status.js +87 -0
  35. package/dist/commands/game/android/keyStore/create.js +69 -0
  36. package/dist/commands/game/android/keyStore/export.js +83 -0
  37. package/dist/commands/game/android/keyStore/import.js +112 -0
  38. package/dist/commands/game/android/keyStore/status.js +70 -0
  39. package/dist/commands/game/android/status.js +84 -0
  40. package/dist/commands/game/build/download.js +80 -0
  41. package/dist/commands/game/build/list.js +96 -0
  42. package/dist/commands/game/create.js +67 -0
  43. package/dist/commands/game/details.js +113 -0
  44. package/dist/commands/game/export.js +58 -0
  45. package/dist/commands/game/ios/app/addTester.js +124 -0
  46. package/dist/commands/game/ios/app/create.js +117 -0
  47. package/dist/commands/game/ios/app/status.js +66 -0
  48. package/dist/commands/game/ios/app/sync.js +95 -0
  49. package/dist/commands/game/ios/profile/create.js +129 -0
  50. package/dist/commands/game/ios/profile/export.js +83 -0
  51. package/dist/commands/game/ios/profile/import.js +92 -0
  52. package/dist/commands/game/ios/profile/status.js +139 -0
  53. package/dist/commands/game/ios/status.js +92 -0
  54. package/dist/commands/game/ios/wizard.js +153 -0
  55. package/dist/commands/game/job/list.js +95 -0
  56. package/dist/commands/game/job/status.js +91 -0
  57. package/dist/commands/game/list.js +83 -0
  58. package/dist/commands/game/ship.js +216 -0
  59. package/dist/commands/game/status.js +114 -0
  60. package/dist/commands/game/wizard.js +686 -0
  61. package/dist/commands/internal/fastlane.js +74 -0
  62. package/dist/commands/internal/readme.js +937 -0
  63. package/dist/commands/login.js +92 -0
  64. package/dist/commands/status.js +76 -0
  65. package/dist/export-CVs_xoDN.js +36 -0
  66. package/dist/git-DREGq-jc.js +32 -0
  67. package/dist/import-Ch5O7xfN.js +47 -0
  68. package/dist/index-BB00V5oF.js +136 -0
  69. package/dist/index-BD1WLuFJ.js +125 -0
  70. package/dist/index-CIa2EDQ6.js +24 -0
  71. package/dist/index-CboPN9aq.js +138 -0
  72. package/dist/index-DkNQs11R.js +711 -0
  73. package/dist/index-nnzhQ3nY.js +209 -0
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.js +1 -0
  76. package/dist/upload-CRE2nVdd.js +60 -0
  77. package/dist/useAndroidServiceAccountTestResult-DcYDam-p.js +52 -0
  78. package/dist/useAppleApp-B16WbUxJ.js +32 -0
  79. package/dist/useAppleBundleId-DobPATan.js +64 -0
  80. package/dist/useJobWatching--BvVn7xS.js +45 -0
  81. package/dist/useProjectCredentials-Btnr7WK3.js +54 -0
  82. package/dist/useWebSocket-ByuNoqRw.js +36 -0
  83. package/dist/utils/help.js +14 -0
  84. package/package.json +1 -1
@@ -0,0 +1,83 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Args, Flags } from '@oclif/core';
3
+ import { render } from 'ink';
4
+ import * as fs from 'fs';
5
+ import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-DkNQs11R.js';
6
+ import { a as getProjectCredentials } from '../../../../index-CIa2EDQ6.js';
7
+ import 'react';
8
+ import '../../../../index-nnzhQ3nY.js';
9
+ import 'ink-spinner';
10
+ import 'axios';
11
+ import 'crypto-js';
12
+ import 'uuid';
13
+ import 'luxon';
14
+ import '@inkjs/ui';
15
+ import '@tanstack/react-query';
16
+ import 'yazl';
17
+ import 'crypto';
18
+ import 'readline-sync';
19
+ import 'node:readline';
20
+ import 'node:path';
21
+ import 'node:url';
22
+ import 'isomorphic-git';
23
+ import 'fast-glob';
24
+ import 'socket.io-client';
25
+ import 'open';
26
+ import 'marked';
27
+ import 'marked-terminal';
28
+ import 'path';
29
+ import 'qrcode';
30
+ import { R as RunWithSpinner } from '../../../../RunWithSpinner-BVXNWGD3.js';
31
+ import 'string-length';
32
+ import 'strip-ansi';
33
+ import { C as Command } from '../../../../Command-B3AmRt2w.js';
34
+ import { e as exportCredential } from '../../../../export-CVs_xoDN.js';
35
+ import '@expo/apple-utils/build/index.js';
36
+ import 'ini';
37
+ import 'deepmerge';
38
+ import '../../../../index-BB00V5oF.js';
39
+ import '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
40
+
41
+ class GameAndroidKeyStoreExport extends BaseGameCommand {
42
+ static args = {
43
+ file: Args.string({ description: "Name of the ZIP file to create", required: true })
44
+ };
45
+ static description = "Saves the current Android Keystore to a ZIP file";
46
+ static examples = ["<%= config.bin %> <%= command.id %> keyStore.zip"];
47
+ static flags = {
48
+ gameId: Flags.string({ char: "g", description: "The ID of the game" }),
49
+ force: Flags.boolean({ char: "f", description: "Overwrite the file if it already exists" })
50
+ };
51
+ async run() {
52
+ const { args, flags } = this;
53
+ const { file } = args;
54
+ const { force } = flags;
55
+ const game = await this.getGame();
56
+ const zipAlreadyExists = fs.existsSync(file);
57
+ if (zipAlreadyExists && !force) {
58
+ this.error(`The file ${file} already exists. Use --force to overwrite it.`);
59
+ }
60
+ const projectCredentials = await getProjectCredentials(game.id);
61
+ const projectAndroidKeyStoreCreds = projectCredentials.filter(
62
+ (cred) => cred.platform == Platform.ANDROID && cred.type == CredentialsType.CERTIFICATE && cred.isActive
63
+ );
64
+ if (projectAndroidKeyStoreCreds.length === 0) {
65
+ this.error("No Android Keystore found which can be exported.");
66
+ }
67
+ const [keyStore] = projectAndroidKeyStoreCreds;
68
+ const handleComplete = async () => process.exit(0);
69
+ render(
70
+ /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
71
+ RunWithSpinner,
72
+ {
73
+ msgInProgress: `Exporting Android Keystore to ${file}...`,
74
+ msgComplete: `Android Keystore exported to ${file}`,
75
+ executeMethod: () => exportCredential({ zipPath: file, credentialId: keyStore.id, projectId: game.id }),
76
+ onComplete: handleComplete
77
+ }
78
+ ) })
79
+ );
80
+ }
81
+ }
82
+
83
+ export { GameAndroidKeyStoreExport as default };
@@ -0,0 +1,112 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Args, Flags } from '@oclif/core';
3
+ import { render } from 'ink';
4
+ import * as fs from 'fs';
5
+ import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-DkNQs11R.js';
6
+ import { a as getProjectCredentials } from '../../../../index-CIa2EDQ6.js';
7
+ import 'react';
8
+ import '../../../../index-nnzhQ3nY.js';
9
+ import 'ink-spinner';
10
+ import 'axios';
11
+ import 'crypto-js';
12
+ import 'uuid';
13
+ import 'luxon';
14
+ import '@inkjs/ui';
15
+ import '@tanstack/react-query';
16
+ import { I as ImportKeystore } from '../../../../Import-v0M_ygyF.js';
17
+ import 'open';
18
+ import 'crypto';
19
+ import 'readline-sync';
20
+ import 'node:readline';
21
+ import 'node:path';
22
+ import 'node:url';
23
+ import 'isomorphic-git';
24
+ import 'fast-glob';
25
+ import 'yazl';
26
+ import 'socket.io-client';
27
+ import 'marked';
28
+ import 'marked-terminal';
29
+ import 'path';
30
+ import 'qrcode';
31
+ import 'string-length';
32
+ import 'strip-ansi';
33
+ import { C as CommandGame } from '../../../../CommandGame-BCMzP9pc.js';
34
+ import { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-DFn4zMvq.js';
35
+ import '@expo/apple-utils/build/index.js';
36
+ import 'ini';
37
+ import 'deepmerge';
38
+ import '../../../../index-BB00V5oF.js';
39
+ import '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
40
+ import '../../../../import-Ch5O7xfN.js';
41
+ import '../../../../Command-B3AmRt2w.js';
42
+
43
+ class GameAndroidKeyStoreImport extends BaseGameCommand {
44
+ static args = {
45
+ file: Args.string({
46
+ description: "Path to the ZIP file to import (must be in the same format as the export)",
47
+ required: false
48
+ })
49
+ };
50
+ static description = "Imports an Android Keystore to your ShipThis account for the specified game.";
51
+ static examples = [
52
+ "<%= config.bin %> <%= command.id %> path/to/import.zip -g abfd5b00",
53
+ "<%= config.bin %> <%= command.id %> --jksFile path/to/file.jks --keystorePassword yourpass --keyPassword yourkeypass"
54
+ ];
55
+ static flags = {
56
+ ...BaseGameAndroidCommand.flags,
57
+ jksFile: Flags.string({ description: "Path to the JKS file to import (requires passwords)" }),
58
+ keystorePassword: Flags.string({
59
+ description: "Keystore password (required when using --jksFile)"
60
+ }),
61
+ keyPassword: Flags.string({
62
+ description: "Key alias password (required when using --jksFile)"
63
+ }),
64
+ force: Flags.boolean({
65
+ char: "f",
66
+ description: "Overwrite any existing keystore without confirmation"
67
+ })
68
+ };
69
+ async run() {
70
+ const game = await this.getGame();
71
+ const { args, flags } = this;
72
+ const zipFilePath = args.file;
73
+ const jksFilePath = flags.jksFile;
74
+ const { keystorePassword, keyPassword } = flags;
75
+ if (!zipFilePath && !jksFilePath) {
76
+ this.error("You must provide either a ZIP file or a JKS file to import.");
77
+ }
78
+ if (zipFilePath && jksFilePath) {
79
+ this.error("You cannot provide both a ZIP file and a JKS file.");
80
+ }
81
+ if (jksFilePath && (!keystorePassword || !keyPassword)) {
82
+ this.error("Both --keystorePassword and --keyPassword are required when importing a JKS file.");
83
+ }
84
+ const toTest = `${zipFilePath || jksFilePath}`;
85
+ const isFound = fs.existsSync(toTest);
86
+ if (!isFound) {
87
+ this.error(`The file ${toTest} does not exist.`);
88
+ }
89
+ const projectCredentials = await getProjectCredentials(game.id);
90
+ const hasKeystore = projectCredentials.some(
91
+ (cred) => cred.platform == Platform.ANDROID && cred.isActive && cred.type == CredentialsType.CERTIFICATE
92
+ );
93
+ if (hasKeystore && !flags.force) {
94
+ this.error("A Keystore is already set on this game. Use --force to overwrite it.");
95
+ }
96
+ const handleComplete = async () => {
97
+ await this.config.runCommand(`game:android:keyStore:status`, ["--gameId", game.id]);
98
+ };
99
+ render(
100
+ /* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(
101
+ ImportKeystore,
102
+ {
103
+ onComplete: handleComplete,
104
+ onError: (e) => this.error(e),
105
+ importKeystoreProps: { zipFilePath, jksFilePath, keystorePassword, keyPassword }
106
+ }
107
+ ) })
108
+ );
109
+ }
110
+ }
111
+
112
+ export { GameAndroidKeyStoreImport as default };
@@ -0,0 +1,70 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { render } from 'ink';
3
+ import 'react';
4
+ import '../../../../index-nnzhQ3nY.js';
5
+ import { c as BaseGameCommand, P as Platform, C as CredentialsType } from '../../../../index-DkNQs11R.js';
6
+ 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';
18
+ import 'node:path';
19
+ import 'node:url';
20
+ import 'isomorphic-git';
21
+ import '@oclif/core';
22
+ import 'fast-glob';
23
+ import 'socket.io-client';
24
+ import 'open';
25
+ import 'marked';
26
+ import 'marked-terminal';
27
+ import 'path';
28
+ import 'qrcode';
29
+ import 'string-length';
30
+ import 'strip-ansi';
31
+ import { C as Command } from '../../../../Command-B3AmRt2w.js';
32
+ import { P as ProjectCredentialsTable } from '../../../../ProjectCredentialsTable-CTkP1mvy.js';
33
+ import '../../../../index-BB00V5oF.js';
34
+ import '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
35
+ import '@expo/apple-utils/build/index.js';
36
+ import 'ini';
37
+ import 'deepmerge';
38
+ import '../../../../useProjectCredentials-Btnr7WK3.js';
39
+ import '../../../../Table-CvM6pccN.js';
40
+ import '../../../../Title-BCQtayg6.js';
41
+
42
+ class GameAndroidKeyStoreStatus extends BaseGameCommand {
43
+ static args = {};
44
+ static description = "Displays the status of the Android Keystore for a specific game.";
45
+ static examples = [
46
+ "<%= config.bin %> <%= command.id %>",
47
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
48
+ ];
49
+ static flags = {
50
+ ...BaseGameCommand.flags
51
+ };
52
+ async run() {
53
+ const game = await this.getGame();
54
+ render(
55
+ /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
56
+ ProjectCredentialsTable,
57
+ {
58
+ credentialTypeName: "Android Keystore",
59
+ queryProps: {
60
+ projectId: game.id,
61
+ type: CredentialsType.CERTIFICATE,
62
+ platform: Platform.ANDROID
63
+ }
64
+ }
65
+ ) })
66
+ );
67
+ }
68
+ }
69
+
70
+ export { GameAndroidKeyStoreStatus as default };
@@ -0,0 +1,84 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { render } from 'ink';
3
+ import { Flags } from '@oclif/core';
4
+ import 'react';
5
+ import '../../../index-nnzhQ3nY.js';
6
+ import { c as BaseGameCommand, k as getProjectPlatformProgress, P as Platform, b as getShortDate } from '../../../index-DkNQs11R.js';
7
+ import 'ink-spinner';
8
+ import '@inkjs/ui';
9
+ import 'axios';
10
+ import '@tanstack/react-query';
11
+ import 'fs';
12
+ import 'uuid';
13
+ import 'yazl';
14
+ import { g as getShortUUID, m as makeHumanReadable } from '../../../index-BB00V5oF.js';
15
+ import 'open';
16
+ import 'marked';
17
+ import 'marked-terminal';
18
+ import 'path';
19
+ import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
20
+ import 'qrcode';
21
+ import { S as StatusTable } from '../../../StatusTable-Dm5St4g-.js';
22
+ import 'string-length';
23
+ import 'strip-ansi';
24
+ import 'luxon';
25
+ import 'fast-glob';
26
+ import { C as Command } from '../../../Command-B3AmRt2w.js';
27
+ import 'socket.io-client';
28
+ import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
29
+ import '@expo/apple-utils/build/index.js';
30
+ import 'crypto-js';
31
+ import 'crypto';
32
+ import 'readline-sync';
33
+ import 'node:readline';
34
+ import 'node:path';
35
+ import 'node:url';
36
+ import 'isomorphic-git';
37
+ import 'ini';
38
+ import 'deepmerge';
39
+ import '../../../Title-BCQtayg6.js';
40
+
41
+ class GameAndroidStatus extends BaseGameCommand {
42
+ static args = {};
43
+ static description = "Shows the status of the setup for the Android platform for a specific game.";
44
+ static examples = [
45
+ "<%= config.bin %> <%= command.id %>",
46
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
47
+ ];
48
+ static flags = {
49
+ gameId: Flags.string({ char: "g", description: "The ID of the game" })
50
+ };
51
+ async run() {
52
+ const game = await this.getGame();
53
+ const platformStatus = await getProjectPlatformProgress(game.id, Platform.ANDROID);
54
+ const gameStatuses = {
55
+ name: game.name,
56
+ id: getShortUUID(game.id),
57
+ createdAt: getShortDate(game.createdAt),
58
+ engine: "Godot"
59
+ };
60
+ const steps = [
61
+ (platformStatus.hasBundleSet == false || platformStatus.hasApiKeyForPlatform == false || platformStatus.hasCredentialsForPlatform == false) && "$ shipthis game android setup"
62
+ ].filter(Boolean);
63
+ const progressToStatuses = (progress) => {
64
+ const { platform, ...rest } = progress;
65
+ return makeHumanReadable(rest);
66
+ };
67
+ render(
68
+ /* @__PURE__ */ jsxs(Command, { command: this, children: [
69
+ /* @__PURE__ */ jsx(StatusTable, { marginBottom: 1, title: "ShipThis game status", statuses: gameStatuses }),
70
+ /* @__PURE__ */ jsx(
71
+ StatusTable,
72
+ {
73
+ marginBottom: 1,
74
+ title: "Overall Android status for game",
75
+ statuses: progressToStatuses(platformStatus)
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx(NextSteps, { steps })
79
+ ] })
80
+ );
81
+ }
82
+ }
83
+
84
+ export { GameAndroidStatus as default };
@@ -0,0 +1,80 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Args, Flags } from '@oclif/core';
3
+ import { render } from 'ink';
4
+ import * as fs from 'fs';
5
+ import { c as BaseGameCommand, K as downloadBuildById } from '../../../index-DkNQs11R.js';
6
+ import 'react';
7
+ import '../../../index-nnzhQ3nY.js';
8
+ import 'ink-spinner';
9
+ import '@inkjs/ui';
10
+ import 'axios';
11
+ import '@tanstack/react-query';
12
+ import 'uuid';
13
+ import 'yazl';
14
+ import 'crypto';
15
+ import 'readline-sync';
16
+ import 'node:readline';
17
+ import 'node:path';
18
+ import 'node:url';
19
+ import 'luxon';
20
+ import 'isomorphic-git';
21
+ import 'fast-glob';
22
+ import 'socket.io-client';
23
+ import 'open';
24
+ import 'marked';
25
+ import 'marked-terminal';
26
+ import 'path';
27
+ import 'qrcode';
28
+ import { R as RunWithSpinner } from '../../../RunWithSpinner-BVXNWGD3.js';
29
+ import 'string-length';
30
+ import 'strip-ansi';
31
+ import { C as Command } from '../../../Command-B3AmRt2w.js';
32
+ import '@expo/apple-utils/build/index.js';
33
+ import 'crypto-js';
34
+ import 'ini';
35
+ import 'deepmerge';
36
+ import '../../../index-BB00V5oF.js';
37
+ import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
38
+
39
+ class GameBuildDownload extends BaseGameCommand {
40
+ static args = {
41
+ build_id: Args.string({ description: "The ID of the build to download", required: true }),
42
+ file: Args.string({ description: "Name of the file to output", required: true })
43
+ };
44
+ static description = "Downloads the given build artifact to the specified file";
45
+ static examples = [
46
+ "<%= config.bin %> <%= command.id %> 7a3f5c92 output.ipa",
47
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4 e4b9a3d7 output.apk"
48
+ ];
49
+ static flags = {
50
+ ...BaseGameCommand.flags,
51
+ force: Flags.boolean({ char: "f", description: "Overwrite the file if it already exists" })
52
+ };
53
+ async run() {
54
+ const { args, flags } = this;
55
+ const { file, build_id } = args;
56
+ const { force } = flags;
57
+ const alreadyExists = fs.existsSync(file);
58
+ if (alreadyExists && !force) {
59
+ this.error(`The file ${file} already exists. Use --force to overwrite it.`);
60
+ }
61
+ const executeMethod = async () => {
62
+ const game = await this.getGame();
63
+ await downloadBuildById(game.id, build_id, file);
64
+ };
65
+ const handleComplete = async () => process.exit(0);
66
+ render(
67
+ /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
68
+ RunWithSpinner,
69
+ {
70
+ msgInProgress: `Downloading to ${file}...`,
71
+ msgComplete: `Downloaded build artifact to ${file}`,
72
+ executeMethod,
73
+ onComplete: handleComplete
74
+ }
75
+ ) })
76
+ );
77
+ }
78
+ }
79
+
80
+ export { GameBuildDownload as default };
@@ -0,0 +1,96 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Box, Text, render } from 'ink';
3
+ import { Flags } from '@oclif/core';
4
+ import { c as BaseGameCommand } from '../../../index-DkNQs11R.js';
5
+ import 'react';
6
+ import { c as useBuilds, d as getBuildSummary } from '../../../index-nnzhQ3nY.js';
7
+ import Spinner from 'ink-spinner';
8
+ import 'axios';
9
+ import 'crypto-js';
10
+ import 'uuid';
11
+ import 'fs';
12
+ import 'luxon';
13
+ import '@inkjs/ui';
14
+ import '@tanstack/react-query';
15
+ import 'yazl';
16
+ import 'crypto';
17
+ import 'readline-sync';
18
+ import 'node:readline';
19
+ import 'node:path';
20
+ import 'node:url';
21
+ import 'isomorphic-git';
22
+ import 'fast-glob';
23
+ import 'socket.io-client';
24
+ import 'open';
25
+ import 'marked';
26
+ import 'marked-terminal';
27
+ import 'path';
28
+ import 'qrcode';
29
+ import 'string-length';
30
+ import 'strip-ansi';
31
+ import { C as CommandGame } from '../../../CommandGame-BCMzP9pc.js';
32
+ import { T as Table } from '../../../Table-CvM6pccN.js';
33
+ import { T as Title } from '../../../Title-BCQtayg6.js';
34
+ import '@expo/apple-utils/build/index.js';
35
+ import 'ini';
36
+ import 'deepmerge';
37
+ import '../../../index-BB00V5oF.js';
38
+ import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
39
+ import '../../../Command-B3AmRt2w.js';
40
+
41
+ const BuildsTable = ({ queryProps, ...boxProps }) => {
42
+ const { isLoading, data } = useBuilds(queryProps);
43
+ const hasBuilds = (data?.data?.length ?? 0) > 0;
44
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
45
+ /* @__PURE__ */ jsx(Title, { children: `Builds uploaded to ShipThis from completed jobs for this game.` }),
46
+ !isLoading && !hasBuilds && /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(Text, { children: "You DO NOT have any builds uploaded to ShipThis from completed jobs for this game." }) }),
47
+ isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
48
+ data && hasBuilds && /* @__PURE__ */ jsx(Table, { data: data.data.map(getBuildSummary) }),
49
+ data && data.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
50
+ /* @__PURE__ */ jsx(Text, { children: `Showing page ${(queryProps.pageNumber || 0) + 1} of ${data.pageCount}.` }),
51
+ /* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
52
+ ] })
53
+ ] });
54
+ };
55
+
56
+ class GameBuildList extends BaseGameCommand {
57
+ static args = {};
58
+ static description = "Lists the builds for successful jobs of a game.";
59
+ static examples = [
60
+ "<%= config.bin %> <%= command.id %>",
61
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4",
62
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4 --pageSize 20 --pageNumber 1"
63
+ ];
64
+ static flags = {
65
+ ...super.flags,
66
+ pageNumber: Flags.integer({ char: "p", description: "The page number to show (starts at 0)", default: 0 }),
67
+ pageSize: Flags.integer({ char: "s", description: "The number of items to show per page", default: 10 }),
68
+ orderBy: Flags.string({
69
+ char: "o",
70
+ description: "The field to order by",
71
+ default: "createdAt",
72
+ options: ["createdAt", "updatedAt"]
73
+ }),
74
+ order: Flags.string({
75
+ char: "r",
76
+ description: "The order to sort by",
77
+ default: "desc",
78
+ options: ["asc", "desc"]
79
+ })
80
+ };
81
+ async run() {
82
+ const game = await this.getGame();
83
+ const { flags } = this;
84
+ const { gameId, ...otherFlags } = flags;
85
+ const params = otherFlags;
86
+ const queryProps = {
87
+ projectId: game.id,
88
+ ...params
89
+ };
90
+ render(
91
+ /* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(BuildsTable, { queryProps }) })
92
+ );
93
+ }
94
+ }
95
+
96
+ export { GameBuildList as default };
@@ -0,0 +1,67 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { B as BaseAuthenticatedCommand, D as DetailsFlags, j as isCWDGodotGame, t as GameEngine, u as getGodotVersion, v as createProject, w as DEFAULT_IGNORED_FILES_GLOBS, x as DEFAULT_SHIPPED_FILES_GLOBS, y as getGodotProjectName } from '../../index-DkNQs11R.js';
3
+ import { a as getInput } from '../../index-BB00V5oF.js';
4
+ import 'path';
5
+ import 'fs';
6
+ import '@expo/apple-utils/build/index.js';
7
+ import 'axios';
8
+ import 'crypto-js';
9
+ import 'uuid';
10
+ import 'luxon';
11
+ import 'crypto';
12
+ import 'readline-sync';
13
+ import 'node:readline';
14
+ import 'node:path';
15
+ import 'node:url';
16
+ import 'isomorphic-git';
17
+ import 'ini';
18
+ import 'deepmerge';
19
+ import 'react';
20
+ import '@tanstack/react-query';
21
+ import 'fast-glob';
22
+ import 'yazl';
23
+ import 'socket.io-client';
24
+
25
+ class GameCreate extends BaseAuthenticatedCommand {
26
+ static args = {};
27
+ static description = "Create a new game in ShipThis.";
28
+ static examples = ["<%= config.bin %> <%= command.id %>"];
29
+ static flags = {
30
+ quiet: Flags.boolean({ char: "q", description: "Avoid output except for interactions and errors" }),
31
+ force: Flags.boolean({ char: "f" }),
32
+ ...DetailsFlags
33
+ };
34
+ async run() {
35
+ const { flags } = this;
36
+ const { quiet, force, name: flagName, ...details } = flags;
37
+ if (this.hasProjectConfig() && !force) {
38
+ throw new Error("This directory already has a ShipThis project. Use --force to overwrite.");
39
+ }
40
+ if (!isCWDGodotGame()) {
41
+ this.error("No Godot project detected. Please run this from a godot project directory.", { exit: 1 });
42
+ }
43
+ const getName = async () => {
44
+ if (flagName) return flagName;
45
+ const suggested = getGodotProjectName() || "My Awesome Game";
46
+ const entered = await getInput(`Please enter the name of the game, or press enter to use ${suggested}: `);
47
+ return entered || suggested;
48
+ };
49
+ const name = await getName();
50
+ const gameEngine = GameEngine.GODOT;
51
+ const gameEngineVersion = getGodotVersion();
52
+ const projectDetails = {
53
+ ...details,
54
+ gameEngine,
55
+ gameEngineVersion
56
+ };
57
+ const project = await createProject({ name, details: projectDetails });
58
+ await this.setProjectConfig({
59
+ project,
60
+ shippedFilesGlobs: DEFAULT_SHIPPED_FILES_GLOBS,
61
+ ignoredFilesGlobs: DEFAULT_IGNORED_FILES_GLOBS
62
+ });
63
+ if (!flags.quiet) await this.config.runCommand("game:status");
64
+ }
65
+ }
66
+
67
+ export { GameCreate as default };