shipthis 0.1.24 → 0.1.25

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 (89) hide show
  1. package/README.md +25 -16
  2. package/docs/assets/ship-outputx0.8.gif +0 -0
  3. package/package.json +1 -1
  4. package/bin/readme.sh +0 -15
  5. package/dist/AppleBundleIdDetails-mPUG2R4N.js +0 -76
  6. package/dist/Command-B3AmRt2w.js +0 -28
  7. package/dist/CommandGame-BCMzP9pc.js +0 -9
  8. package/dist/Create-CsJxpzUs.js +0 -59
  9. package/dist/Import-v0M_ygyF.js +0 -110
  10. package/dist/JobProgress-9uvq8IBn.js +0 -121
  11. package/dist/JobStatusTable-Bf7J9WXe.js +0 -191
  12. package/dist/NextSteps-CK9zHOCt.js +0 -18
  13. package/dist/ProgressSpinner-6pw1T8Iw.js +0 -16
  14. package/dist/ProjectCredentialsTable-CTkP1mvy.js +0 -37
  15. package/dist/RunWithSpinner-BVXNWGD3.js +0 -27
  16. package/dist/StatusTable-Dm5St4g-.js +0 -33
  17. package/dist/Table-CvM6pccN.js +0 -101
  18. package/dist/Title-BCQtayg6.js +0 -6
  19. package/dist/UserCredentialsTable-DhtM_iTG.js +0 -82
  20. package/dist/baseAppleCommand-IGl6KTvv.js +0 -10
  21. package/dist/baseGameAndroidCommand-DFn4zMvq.js +0 -43
  22. package/dist/commands/apple/apiKey/create.js +0 -103
  23. package/dist/commands/apple/apiKey/export.js +0 -81
  24. package/dist/commands/apple/apiKey/import.js +0 -85
  25. package/dist/commands/apple/apiKey/status.js +0 -122
  26. package/dist/commands/apple/certificate/create.js +0 -133
  27. package/dist/commands/apple/certificate/export.js +0 -81
  28. package/dist/commands/apple/certificate/import.js +0 -85
  29. package/dist/commands/apple/certificate/status.js +0 -130
  30. package/dist/commands/apple/login.js +0 -76
  31. package/dist/commands/apple/status.js +0 -79
  32. package/dist/commands/dashboard.js +0 -38
  33. package/dist/commands/game/android/apiKey/connect.js +0 -74
  34. package/dist/commands/game/android/apiKey/create.js +0 -74
  35. package/dist/commands/game/android/apiKey/export.js +0 -84
  36. package/dist/commands/game/android/apiKey/import.js +0 -93
  37. package/dist/commands/game/android/apiKey/invite.js +0 -81
  38. package/dist/commands/game/android/apiKey/status.js +0 -87
  39. package/dist/commands/game/android/keyStore/create.js +0 -69
  40. package/dist/commands/game/android/keyStore/export.js +0 -83
  41. package/dist/commands/game/android/keyStore/import.js +0 -112
  42. package/dist/commands/game/android/keyStore/status.js +0 -70
  43. package/dist/commands/game/android/status.js +0 -84
  44. package/dist/commands/game/build/download.js +0 -80
  45. package/dist/commands/game/build/list.js +0 -94
  46. package/dist/commands/game/create.js +0 -67
  47. package/dist/commands/game/details.js +0 -113
  48. package/dist/commands/game/export.js +0 -58
  49. package/dist/commands/game/ios/app/addTester.js +0 -124
  50. package/dist/commands/game/ios/app/create.js +0 -117
  51. package/dist/commands/game/ios/app/status.js +0 -66
  52. package/dist/commands/game/ios/app/sync.js +0 -95
  53. package/dist/commands/game/ios/profile/create.js +0 -129
  54. package/dist/commands/game/ios/profile/export.js +0 -83
  55. package/dist/commands/game/ios/profile/import.js +0 -92
  56. package/dist/commands/game/ios/profile/status.js +0 -139
  57. package/dist/commands/game/ios/status.js +0 -92
  58. package/dist/commands/game/ios/wizard.js +0 -153
  59. package/dist/commands/game/job/list.js +0 -91
  60. package/dist/commands/game/job/status.js +0 -91
  61. package/dist/commands/game/list.js +0 -83
  62. package/dist/commands/game/ship.js +0 -216
  63. package/dist/commands/game/status.js +0 -114
  64. package/dist/commands/game/wizard.js +0 -686
  65. package/dist/commands/internal/fastlane.js +0 -74
  66. package/dist/commands/internal/readme.js +0 -937
  67. package/dist/commands/login.js +0 -92
  68. package/dist/commands/status.js +0 -76
  69. package/dist/export-CVs_xoDN.js +0 -36
  70. package/dist/git-DREGq-jc.js +0 -32
  71. package/dist/import-Ch5O7xfN.js +0 -47
  72. package/dist/index-BB00V5oF.js +0 -136
  73. package/dist/index-BD1WLuFJ.js +0 -125
  74. package/dist/index-CIa2EDQ6.js +0 -24
  75. package/dist/index-CboPN9aq.js +0 -138
  76. package/dist/index-DkNQs11R.js +0 -711
  77. package/dist/index-nnzhQ3nY.js +0 -209
  78. package/dist/index.d.ts +0 -1
  79. package/dist/index.js +0 -1
  80. package/dist/upload-CRE2nVdd.js +0 -60
  81. package/dist/useAndroidServiceAccountTestResult-DcYDam-p.js +0 -52
  82. package/dist/useAppleApp-B16WbUxJ.js +0 -32
  83. package/dist/useAppleBundleId-DobPATan.js +0 -64
  84. package/dist/useJobWatching--BvVn7xS.js +0 -45
  85. package/dist/useProjectCredentials-Btnr7WK3.js +0 -54
  86. package/dist/useWebSocket-ByuNoqRw.js +0 -36
  87. package/dist/utils/help.js +0 -14
  88. package/npm-shrinkwrap.json +0 -14011
  89. package/oclif.manifest.json +0 -2286
@@ -1,93 +0,0 @@
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 { 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 { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-DFn4zMvq.js';
35
- import { i as importCredential } from '../../../../import-Ch5O7xfN.js';
36
- import '@expo/apple-utils/build/index.js';
37
- import 'ini';
38
- import 'deepmerge';
39
- import '../../../../index-BB00V5oF.js';
40
- import '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
41
-
42
- class GameAndroidApiKeyImport extends BaseGameAndroidCommand {
43
- static args = {
44
- file: Args.string({
45
- description: "Name of the ZIP file to import (must be in the same format as the export)",
46
- required: true
47
- })
48
- };
49
- static description = "Imports an Android Service Account API Key to your ShipThis account for the specified game.";
50
- static examples = ["<%= config.bin %> <%= command.id %>"];
51
- static flags = {
52
- gameId: Flags.string({ char: "g", description: "The ID of the game" }),
53
- force: Flags.boolean({ char: "f" })
54
- };
55
- async run() {
56
- const game = await this.getGame();
57
- const { args, flags } = this;
58
- const { file } = args;
59
- const { force } = flags;
60
- const zipFound = fs.existsSync(file);
61
- if (!zipFound) {
62
- this.error(`The file ${file} does not exist.`);
63
- }
64
- const projectCredentials = await getProjectCredentials(game.id);
65
- const hasAndroidApiKey = projectCredentials.some(
66
- (cred) => cred.platform == Platform.ANDROID && cred.isActive && cred.type == CredentialsType.KEY
67
- );
68
- if (hasAndroidApiKey && !force) {
69
- this.error("An Android Service Account API Key is already set on this game. Use --force to overwrite it.");
70
- }
71
- const handleComplete = async () => {
72
- await this.config.runCommand(`game:android:apiKey:status`, ["--gameId", game.id]);
73
- };
74
- render(
75
- /* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
76
- RunWithSpinner,
77
- {
78
- msgInProgress: `Importing Android Service Account API Key from ${file}...`,
79
- msgComplete: `Android Service Account API Key imported from ${file}`,
80
- executeMethod: () => importCredential({
81
- projectId: game.id,
82
- zipPath: file,
83
- type: CredentialsType.KEY,
84
- platform: Platform.ANDROID
85
- }),
86
- onComplete: handleComplete
87
- }
88
- ) })
89
- );
90
- }
91
- }
92
-
93
- export { GameAndroidApiKeyImport as default };
@@ -1,81 +0,0 @@
1
- import { Args, Flags } from '@oclif/core';
2
- import { V as inviteServiceAccount } from '../../../../index-DkNQs11R.js';
3
- import { f as fetchKeyTestResult, K as KeyTestStatus, a as KeyTestError, n as niceError } from '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
4
- import { a as getInput } from '../../../../index-BB00V5oF.js';
5
- import { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-DFn4zMvq.js';
6
- import 'path';
7
- import 'fs';
8
- import '@expo/apple-utils/build/index.js';
9
- import 'axios';
10
- import 'crypto-js';
11
- import 'uuid';
12
- import 'luxon';
13
- import 'crypto';
14
- import 'readline-sync';
15
- import 'node:readline';
16
- import 'node:path';
17
- import 'node:url';
18
- import 'isomorphic-git';
19
- import 'ini';
20
- import 'deepmerge';
21
- import 'react';
22
- import '@tanstack/react-query';
23
- import 'fast-glob';
24
- import 'yazl';
25
- import 'socket.io-client';
26
-
27
- class GameAndroidApiKeyInvite extends BaseGameAndroidCommand {
28
- static args = {
29
- accountId: Args.string({ description: "The Google Play Account ID", required: false })
30
- };
31
- static description = "Invites the Service Account to your Google Play Account.";
32
- static examples = ["<%= config.bin %> <%= command.id %>"];
33
- static flags = {
34
- ...BaseGameAndroidCommand.flags,
35
- prompt: Flags.boolean({ char: "p", description: "Prompt for the Google Play Account ID" }),
36
- waitForGoogleApp: Flags.boolean({ char: "p", description: "Waits for the Google Play app to be created (10 mins)." }),
37
- waitForAuth: Flags.boolean({ char: "w", description: "Wait for Google Authentication (10 mins)." })
38
- };
39
- async run() {
40
- const game = await this.getGame();
41
- const { prompt, waitForAuth, waitForGoogleApp } = this.flags;
42
- this.checkGoogleAuth(waitForAuth);
43
- const getAccountId = async () => {
44
- if (!prompt) return this.args.accountId;
45
- const entered = await getInput(`Please enter the Google Play Account ID: `);
46
- return entered;
47
- };
48
- const waitForApp = async () => {
49
- console.log("Waiting for Google Play app to be created...");
50
- const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
51
- let testResult2 = await fetchKeyTestResult({ projectId: game.id });
52
- while (testResult2.error === KeyTestError.APP_NOT_FOUND) {
53
- process.stdout.write(".");
54
- await sleep(1e3 * 30);
55
- testResult2 = await fetchKeyTestResult({ projectId: game.id });
56
- }
57
- return testResult2;
58
- };
59
- const accountId = await getAccountId();
60
- if (!accountId) {
61
- this.error("You must provide a Google Play Account ID.", { exit: 1 });
62
- }
63
- let testResult = await fetchKeyTestResult({ projectId: game.id });
64
- if (testResult.status === KeyTestStatus.SUCCESS) {
65
- this.error("The Service Account API Key is working and does not need to be invited.", {
66
- exit: 1
67
- });
68
- }
69
- if (testResult.error === KeyTestError.APP_NOT_FOUND && waitForGoogleApp) {
70
- this.log("Waiting for Google Play app to be created...");
71
- testResult = await waitForApp();
72
- }
73
- if (testResult.error !== KeyTestError.NOT_INVITED) {
74
- this.error(`${niceError(testResult.error)}`);
75
- }
76
- await inviteServiceAccount(game.id, accountId);
77
- await this.config.runCommand(`game:android:apiKey:status`, ["--gameId", game.id]);
78
- }
79
- }
80
-
81
- export { GameAndroidApiKeyInvite as default };
@@ -1,87 +0,0 @@
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 { P as Platform, C as CredentialsType } from '../../../../index-DkNQs11R.js';
7
- import '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 { f as fetchKeyTestResult, n as niceError, K as KeyTestStatus } from '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
23
- import 'fast-glob';
24
- import 'socket.io-client';
25
- import 'open';
26
- import { T as Title } from '../../../../Title-BCQtayg6.js';
27
- import 'marked';
28
- import 'marked-terminal';
29
- import 'path';
30
- import 'qrcode';
31
- import { T as Table } from '../../../../Table-CvM6pccN.js';
32
- import 'string-length';
33
- import 'strip-ansi';
34
- import { C as Command } from '../../../../Command-B3AmRt2w.js';
35
- import { P as ProjectCredentialsTable } from '../../../../ProjectCredentialsTable-CTkP1mvy.js';
36
- import { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-DFn4zMvq.js';
37
- import '../../../../index-BB00V5oF.js';
38
- import '@expo/apple-utils/build/index.js';
39
- import 'ini';
40
- import 'deepmerge';
41
- import '../../../../useProjectCredentials-Btnr7WK3.js';
42
-
43
- class GameAndroidApiKeyStatus extends BaseGameAndroidCommand {
44
- static args = {};
45
- static description = "Displays the status of the Android Service Account API Key for a specific game.";
46
- static examples = [
47
- "<%= config.bin %> <%= command.id %>",
48
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
49
- ];
50
- static flags = {
51
- gameId: Flags.string({ char: "g", description: "The ID of the game" })
52
- };
53
- async run() {
54
- const game = await this.getGame();
55
- const testResult = await fetchKeyTestResult({ projectId: game.id });
56
- render(
57
- /* @__PURE__ */ jsxs(Command, { command: this, children: [
58
- /* @__PURE__ */ jsx(
59
- ProjectCredentialsTable,
60
- {
61
- credentialTypeName: "Android Service Account API Key",
62
- queryProps: {
63
- projectId: game.id,
64
- type: CredentialsType.KEY,
65
- platform: Platform.ANDROID
66
- }
67
- }
68
- ),
69
- /* @__PURE__ */ jsx(Title, { children: "Android Service Account API Key Test Result" }),
70
- /* @__PURE__ */ jsx(
71
- Table,
72
- {
73
- data: [
74
- {
75
- "Key Works?": testResult.status == KeyTestStatus.SUCCESS,
76
- ...testResult,
77
- error: niceError(testResult.error)
78
- }
79
- ]
80
- }
81
- )
82
- ] })
83
- );
84
- }
85
- }
86
-
87
- export { GameAndroidApiKeyStatus as default };
@@ -1,69 +0,0 @@
1
- import { 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 { P as Platform, C as CredentialsType } from '../../../../index-DkNQs11R.js';
7
- import 'ink-spinner';
8
- import 'axios';
9
- import 'crypto-js';
10
- import 'uuid';
11
- import 'fs';
12
- import 'luxon';
13
- import { a as getProjectCredentials } from '../../../../index-CIa2EDQ6.js';
14
- import '@inkjs/ui';
15
- import { C as CreateKeystore } from '../../../../Create-CsJxpzUs.js';
16
- import 'yazl';
17
- import '@tanstack/react-query';
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 'socket.io-client';
26
- import 'open';
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 '../../../../index-BB00V5oF.js';
36
- import '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
37
- import '@expo/apple-utils/build/index.js';
38
- import 'ini';
39
- import 'deepmerge';
40
- import '../../../../RunWithSpinner-BVXNWGD3.js';
41
- import '../../../../Command-B3AmRt2w.js';
42
-
43
- class GameAndroidKeyStoreCreate extends BaseGameAndroidCommand {
44
- static args = {};
45
- static description = "Creates a new Android Keystore for a game";
46
- static examples = [
47
- "<%= config.bin %> <%= command.id %>",
48
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
49
- ];
50
- static flags = {
51
- ...BaseGameAndroidCommand.flags,
52
- force: Flags.boolean({ char: "f" })
53
- };
54
- async run() {
55
- const game = await this.getGame();
56
- const projectCredentials = await getProjectCredentials(game.id);
57
- const hasKeystore = projectCredentials.some(
58
- (cred) => cred.platform == Platform.ANDROID && cred.isActive && cred.type == CredentialsType.CERTIFICATE
59
- );
60
- if (hasKeystore && !this.flags.force) {
61
- this.error("A Keystore is already set on this game. Use --force to overwrite it.");
62
- }
63
- render(
64
- /* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(CreateKeystore, { onComplete: () => process.exit(0), onError: (e) => this.error(e) }) })
65
- );
66
- }
67
- }
68
-
69
- export { GameAndroidKeyStoreCreate as default };
@@ -1,83 +0,0 @@
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 };
@@ -1,112 +0,0 @@
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 };
@@ -1,70 +0,0 @@
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 };
@@ -1,84 +0,0 @@
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 };