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.
- package/README.md +25 -16
- package/docs/assets/ship-outputx0.8.gif +0 -0
- package/package.json +1 -1
- package/bin/readme.sh +0 -15
- package/dist/AppleBundleIdDetails-mPUG2R4N.js +0 -76
- package/dist/Command-B3AmRt2w.js +0 -28
- package/dist/CommandGame-BCMzP9pc.js +0 -9
- package/dist/Create-CsJxpzUs.js +0 -59
- package/dist/Import-v0M_ygyF.js +0 -110
- package/dist/JobProgress-9uvq8IBn.js +0 -121
- package/dist/JobStatusTable-Bf7J9WXe.js +0 -191
- package/dist/NextSteps-CK9zHOCt.js +0 -18
- package/dist/ProgressSpinner-6pw1T8Iw.js +0 -16
- package/dist/ProjectCredentialsTable-CTkP1mvy.js +0 -37
- package/dist/RunWithSpinner-BVXNWGD3.js +0 -27
- package/dist/StatusTable-Dm5St4g-.js +0 -33
- package/dist/Table-CvM6pccN.js +0 -101
- package/dist/Title-BCQtayg6.js +0 -6
- package/dist/UserCredentialsTable-DhtM_iTG.js +0 -82
- package/dist/baseAppleCommand-IGl6KTvv.js +0 -10
- package/dist/baseGameAndroidCommand-DFn4zMvq.js +0 -43
- package/dist/commands/apple/apiKey/create.js +0 -103
- package/dist/commands/apple/apiKey/export.js +0 -81
- package/dist/commands/apple/apiKey/import.js +0 -85
- package/dist/commands/apple/apiKey/status.js +0 -122
- package/dist/commands/apple/certificate/create.js +0 -133
- package/dist/commands/apple/certificate/export.js +0 -81
- package/dist/commands/apple/certificate/import.js +0 -85
- package/dist/commands/apple/certificate/status.js +0 -130
- package/dist/commands/apple/login.js +0 -76
- package/dist/commands/apple/status.js +0 -79
- package/dist/commands/dashboard.js +0 -38
- package/dist/commands/game/android/apiKey/connect.js +0 -74
- package/dist/commands/game/android/apiKey/create.js +0 -74
- package/dist/commands/game/android/apiKey/export.js +0 -84
- package/dist/commands/game/android/apiKey/import.js +0 -93
- package/dist/commands/game/android/apiKey/invite.js +0 -81
- package/dist/commands/game/android/apiKey/status.js +0 -87
- package/dist/commands/game/android/keyStore/create.js +0 -69
- package/dist/commands/game/android/keyStore/export.js +0 -83
- package/dist/commands/game/android/keyStore/import.js +0 -112
- package/dist/commands/game/android/keyStore/status.js +0 -70
- package/dist/commands/game/android/status.js +0 -84
- package/dist/commands/game/build/download.js +0 -80
- package/dist/commands/game/build/list.js +0 -94
- package/dist/commands/game/create.js +0 -67
- package/dist/commands/game/details.js +0 -113
- package/dist/commands/game/export.js +0 -58
- package/dist/commands/game/ios/app/addTester.js +0 -124
- package/dist/commands/game/ios/app/create.js +0 -117
- package/dist/commands/game/ios/app/status.js +0 -66
- package/dist/commands/game/ios/app/sync.js +0 -95
- package/dist/commands/game/ios/profile/create.js +0 -129
- package/dist/commands/game/ios/profile/export.js +0 -83
- package/dist/commands/game/ios/profile/import.js +0 -92
- package/dist/commands/game/ios/profile/status.js +0 -139
- package/dist/commands/game/ios/status.js +0 -92
- package/dist/commands/game/ios/wizard.js +0 -153
- package/dist/commands/game/job/list.js +0 -91
- package/dist/commands/game/job/status.js +0 -91
- package/dist/commands/game/list.js +0 -83
- package/dist/commands/game/ship.js +0 -216
- package/dist/commands/game/status.js +0 -114
- package/dist/commands/game/wizard.js +0 -686
- package/dist/commands/internal/fastlane.js +0 -74
- package/dist/commands/internal/readme.js +0 -937
- package/dist/commands/login.js +0 -92
- package/dist/commands/status.js +0 -76
- package/dist/export-CVs_xoDN.js +0 -36
- package/dist/git-DREGq-jc.js +0 -32
- package/dist/import-Ch5O7xfN.js +0 -47
- package/dist/index-BB00V5oF.js +0 -136
- package/dist/index-BD1WLuFJ.js +0 -125
- package/dist/index-CIa2EDQ6.js +0 -24
- package/dist/index-CboPN9aq.js +0 -138
- package/dist/index-DkNQs11R.js +0 -711
- package/dist/index-nnzhQ3nY.js +0 -209
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/upload-CRE2nVdd.js +0 -60
- package/dist/useAndroidServiceAccountTestResult-DcYDam-p.js +0 -52
- package/dist/useAppleApp-B16WbUxJ.js +0 -32
- package/dist/useAppleBundleId-DobPATan.js +0 -64
- package/dist/useJobWatching--BvVn7xS.js +0 -45
- package/dist/useProjectCredentials-Btnr7WK3.js +0 -54
- package/dist/useWebSocket-ByuNoqRw.js +0 -36
- package/dist/utils/help.js +0 -14
- package/npm-shrinkwrap.json +0 -14011
- package/oclif.manifest.json +0 -2286
|
@@ -1,85 +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 { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-DkNQs11R.js';
|
|
6
|
-
import { g as getUserCredentials } 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 { i as importCredential } from '../../../import-Ch5O7xfN.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 AppleCertificateImport extends BaseAuthenticatedCommand {
|
|
42
|
-
static args = {
|
|
43
|
-
file: Args.string({
|
|
44
|
-
description: "Name of the ZIP file to import (must be in the same format as the export)",
|
|
45
|
-
required: true
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
static description = "Imports an iOS Distribution Certificate to your ShipThis account";
|
|
49
|
-
static examples = ["<%= config.bin %> <%= command.id %> userCert.zip"];
|
|
50
|
-
static flags = {
|
|
51
|
-
force: Flags.boolean({ char: "f" })
|
|
52
|
-
};
|
|
53
|
-
async run() {
|
|
54
|
-
const { args, flags } = this;
|
|
55
|
-
const { file } = args;
|
|
56
|
-
const { force } = flags;
|
|
57
|
-
const zipFound = fs.existsSync(file);
|
|
58
|
-
if (!zipFound) {
|
|
59
|
-
this.error(`The file ${file} does not exist.`);
|
|
60
|
-
}
|
|
61
|
-
const userCredentials = await getUserCredentials();
|
|
62
|
-
const userAppleDistCredentials = userCredentials.filter(
|
|
63
|
-
(cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
|
|
64
|
-
);
|
|
65
|
-
if (userAppleDistCredentials.length !== 0 && !force) {
|
|
66
|
-
this.error("An Apple Distribution Certificate already exists. Use --force to overwrite it.");
|
|
67
|
-
}
|
|
68
|
-
const handleComplete = async () => {
|
|
69
|
-
await this.config.runCommand(`apple:certificate:status`, ["--noAppleAuth"]);
|
|
70
|
-
};
|
|
71
|
-
render(
|
|
72
|
-
/* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
|
|
73
|
-
RunWithSpinner,
|
|
74
|
-
{
|
|
75
|
-
msgInProgress: `Importing certificate from ${file}...`,
|
|
76
|
-
msgComplete: `Certificate imported from ${file}`,
|
|
77
|
-
executeMethod: () => importCredential({ zipPath: file, type: CredentialsType.CERTIFICATE, platform: Platform.IOS }),
|
|
78
|
-
onComplete: handleComplete
|
|
79
|
-
}
|
|
80
|
-
) })
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { AppleCertificateImport as default };
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Flags } from '@oclif/core';
|
|
3
|
-
import { Box, Text, render } from 'ink';
|
|
4
|
-
import { b as getShortDate, l as Certificate, m as CertificateType, P as Platform, C as CredentialsType, B as BaseAuthenticatedCommand } from '../../../index-DkNQs11R.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../../../index-nnzhQ3nY.js';
|
|
7
|
-
import Spinner from 'ink-spinner';
|
|
8
|
-
import 'axios';
|
|
9
|
-
import 'crypto-js';
|
|
10
|
-
import 'uuid';
|
|
11
|
-
import 'fs';
|
|
12
|
-
import { DateTime } from 'luxon';
|
|
13
|
-
import '@inkjs/ui';
|
|
14
|
-
import { useQuery } from '@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 { g as getShortUUID } from '../../../index-BB00V5oF.js';
|
|
32
|
-
import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-DhtM_iTG.js';
|
|
33
|
-
import { T as Table } from '../../../Table-CvM6pccN.js';
|
|
34
|
-
import { T as Title } from '../../../Title-BCQtayg6.js';
|
|
35
|
-
import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
|
|
36
|
-
import { C as Command } from '../../../Command-B3AmRt2w.js';
|
|
37
|
-
import '@expo/apple-utils/build/index.js';
|
|
38
|
-
import 'ini';
|
|
39
|
-
import 'deepmerge';
|
|
40
|
-
import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
41
|
-
|
|
42
|
-
async function queryAppleCertificates({ ctx }) {
|
|
43
|
-
const appleCerts = await Certificate.getAsync(ctx, {
|
|
44
|
-
query: {
|
|
45
|
-
filter: {
|
|
46
|
-
certificateType: [CertificateType.DISTRIBUTION, CertificateType.IOS_DISTRIBUTION]
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return appleCerts;
|
|
51
|
-
}
|
|
52
|
-
const canAppleCertificateBeUsed = (cert, userCredentials) => {
|
|
53
|
-
if (cert.attributes.status != "Issued") return false;
|
|
54
|
-
return userCredentials.some((cred) => cred.isActive && cred.serialNumber == cert.attributes.serialNumber);
|
|
55
|
-
};
|
|
56
|
-
function getAppleCertificateSummary(cert, userCredentials) {
|
|
57
|
-
return {
|
|
58
|
-
id: getShortUUID(cert.id),
|
|
59
|
-
name: cert.attributes.name,
|
|
60
|
-
serial: cert.attributes.serialNumber,
|
|
61
|
-
expires: getShortDate(DateTime.fromISO(cert.attributes.expirationDate)),
|
|
62
|
-
canBeUsed: canAppleCertificateBeUsed(cert, userCredentials)
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
const useAppleCertificates = (props) => {
|
|
66
|
-
const queryResult = useQuery({
|
|
67
|
-
queryKey: ["appleCertificates"],
|
|
68
|
-
queryFn: () => queryAppleCertificates(props)
|
|
69
|
-
});
|
|
70
|
-
return queryResult;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const AppleCertificatesTable = ({ ctx, ...boxProps }) => {
|
|
74
|
-
const { data: userCredentialsResponse } = useUserCredentials({
|
|
75
|
-
platform: Platform.IOS,
|
|
76
|
-
type: CredentialsType.CERTIFICATE
|
|
77
|
-
});
|
|
78
|
-
const { data: certs, isLoading } = useAppleCertificates({ ctx });
|
|
79
|
-
const hasUsable = certs && userCredentialsResponse && certs.some((cert) => canAppleCertificateBeUsed(cert, userCredentialsResponse.data));
|
|
80
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
81
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, ...boxProps, children: [
|
|
82
|
-
/* @__PURE__ */ jsx(Title, { children: "Distribution Certificates in your Apple account" }),
|
|
83
|
-
isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
|
|
84
|
-
certs && userCredentialsResponse && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
85
|
-
/* @__PURE__ */ jsxs(Box, { marginLeft: 2, marginBottom: 1, flexDirection: "column", children: [
|
|
86
|
-
/* @__PURE__ */ jsx(Text, { children: `You have ${certs.length} Distribution Certificates in your Apple account` }),
|
|
87
|
-
/* @__PURE__ */ jsx(Text, { children: `${hasUsable ? "One" : "None"} of these can be used by ShipThis` })
|
|
88
|
-
] }),
|
|
89
|
-
certs.length > 0 && /* @__PURE__ */ jsx(Table, { data: certs.map((cert) => getAppleCertificateSummary(cert, userCredentialsResponse.data)) }),
|
|
90
|
-
!hasUsable && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { bold: true, children: "You do not have a usable Distribution Certificate. To ship an iOS game, you will need a usable Distribution Certificate." }) })
|
|
91
|
-
] })
|
|
92
|
-
] }),
|
|
93
|
-
certs && !hasUsable && /* @__PURE__ */ jsx(NextSteps, { steps: ["shipthis apple certificate create"] })
|
|
94
|
-
] });
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
class AppleCertificateStatus extends BaseAuthenticatedCommand {
|
|
98
|
-
static args = {};
|
|
99
|
-
static description = "Displays the status of the iOS Distribution certificates in your Apple and ShipThis accounts.\nThese are used to sign all of your iOS apps.";
|
|
100
|
-
static examples = [
|
|
101
|
-
"<%= config.bin %> <%= command.id %>",
|
|
102
|
-
"<%= config.bin %> <%= command.id %> --noAppleAuth"
|
|
103
|
-
];
|
|
104
|
-
static flags = {
|
|
105
|
-
noAppleAuth: Flags.boolean({ char: "f" })
|
|
106
|
-
};
|
|
107
|
-
async run() {
|
|
108
|
-
const { flags } = this;
|
|
109
|
-
const showApple = !flags.noAppleAuth;
|
|
110
|
-
let ctx = null;
|
|
111
|
-
if (showApple) {
|
|
112
|
-
const authState = await this.refreshAppleAuthState();
|
|
113
|
-
ctx = authState.context;
|
|
114
|
-
}
|
|
115
|
-
render(
|
|
116
|
-
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
117
|
-
/* @__PURE__ */ jsx(
|
|
118
|
-
UserCredentialsTable,
|
|
119
|
-
{
|
|
120
|
-
credentialTypeName: "Apple iOS Distribution Certificate",
|
|
121
|
-
queryProps: { type: CredentialsType.CERTIFICATE, platform: Platform.IOS }
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
showApple && /* @__PURE__ */ jsx(AppleCertificatesTable, { ctx })
|
|
125
|
-
] })
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export { AppleCertificateStatus as default };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
import { a0 as Auth, B as BaseAuthenticatedCommand } from '../../index-DkNQs11R.js';
|
|
3
|
-
import { a as getInput, d as getMaskedInput } 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
|
-
async function getNewAuthState(username, password) {
|
|
26
|
-
const authState = await Auth.loginAsync({
|
|
27
|
-
username,
|
|
28
|
-
password
|
|
29
|
-
});
|
|
30
|
-
return authState;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
class AppleLogin extends BaseAuthenticatedCommand {
|
|
34
|
-
static args = {};
|
|
35
|
-
static description = "Authenticate with Apple - saves the session to the auth file";
|
|
36
|
-
static examples = [
|
|
37
|
-
"<%= config.bin %> <%= command.id %>",
|
|
38
|
-
"<%= config.bin %> <%= command.id %> --force --appleEmail me@email.nowhere"
|
|
39
|
-
];
|
|
40
|
-
static flags = {
|
|
41
|
-
quiet: Flags.boolean({ char: "q", description: "Avoid output except for interactions and errors" }),
|
|
42
|
-
force: Flags.boolean({ char: "f" }),
|
|
43
|
-
appleEmail: Flags.string({
|
|
44
|
-
char: "e",
|
|
45
|
-
description: "Your Apple Developer email address"
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
async run() {
|
|
49
|
-
const { flags } = this;
|
|
50
|
-
const isLoggedIn = await this.hasValidAppleAuthState();
|
|
51
|
-
if (isLoggedIn && !flags.force) {
|
|
52
|
-
throw new Error("You are already logged in to Apple. Use --force to re-authenticate.");
|
|
53
|
-
}
|
|
54
|
-
const getAppleEmail = async () => {
|
|
55
|
-
if (flags.appleEmail) return flags.appleEmail;
|
|
56
|
-
const appleEmail2 = await getInput("Please enter your Apple Developer account email address: ");
|
|
57
|
-
if (!appleEmail2) throw new Error("Email address is required");
|
|
58
|
-
return appleEmail2;
|
|
59
|
-
};
|
|
60
|
-
const getApplePassword = async () => {
|
|
61
|
-
const applePassword2 = await getMaskedInput("Please enter your Apple Developer password: ");
|
|
62
|
-
if (!applePassword2) throw new Error("Password is required");
|
|
63
|
-
return applePassword2;
|
|
64
|
-
};
|
|
65
|
-
const appleEmail = await getAppleEmail();
|
|
66
|
-
const applePassword = await getApplePassword();
|
|
67
|
-
const authState = await getNewAuthState(appleEmail, applePassword);
|
|
68
|
-
if (!authState) {
|
|
69
|
-
throw new Error("Failed to authenticate with Apple");
|
|
70
|
-
}
|
|
71
|
-
await this.setAppleCookies(authState.cookies);
|
|
72
|
-
if (!this.flags.quiet) await this.config.runCommand(`apple:status`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { AppleLogin as default };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { B as BaseAuthenticatedCommand } from '../../index-DkNQs11R.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import { render } from 'ink';
|
|
5
|
-
import '../../index-nnzhQ3nY.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 { N as NextSteps } from '../../NextSteps-CK9zHOCt.js';
|
|
29
|
-
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-B3AmRt2w.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 '../../Title-BCQtayg6.js';
|
|
40
|
-
|
|
41
|
-
class AppleStatus extends BaseAuthenticatedCommand {
|
|
42
|
-
static args = {};
|
|
43
|
-
static description = "Shows the status of the Apple authentication and integration.";
|
|
44
|
-
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
45
|
-
static flags = {};
|
|
46
|
-
async run() {
|
|
47
|
-
const checkAuth = async () => {
|
|
48
|
-
try {
|
|
49
|
-
const authState = await this.refreshAppleAuthState();
|
|
50
|
-
const { session: session2 } = authState;
|
|
51
|
-
return {
|
|
52
|
-
isAuthenticatedOnApple: true,
|
|
53
|
-
session: session2
|
|
54
|
-
};
|
|
55
|
-
} catch {
|
|
56
|
-
return {
|
|
57
|
-
isAuthenticatedOnApple: false,
|
|
58
|
-
session: null
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const { isAuthenticatedOnApple, session } = await checkAuth();
|
|
63
|
-
const statuses = {
|
|
64
|
-
"Authenticated on Apple Developer Portal": isAuthenticatedOnApple,
|
|
65
|
-
"Apple Full Name": session?.user?.fullName || "Please authenticate",
|
|
66
|
-
"Apple Provider Name": session?.provider?.name || "Please authenticate"
|
|
67
|
-
};
|
|
68
|
-
let steps = [];
|
|
69
|
-
if (!isAuthenticatedOnApple) steps.push("$ shipthis apple login");
|
|
70
|
-
render(
|
|
71
|
-
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
72
|
-
/* @__PURE__ */ jsx(StatusTable, { marginBottom: 1, title: "Apple Status", statuses }),
|
|
73
|
-
/* @__PURE__ */ jsx(NextSteps, { steps })
|
|
74
|
-
] })
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export { AppleStatus as default };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import open from 'open';
|
|
2
|
-
import { B as BaseAuthenticatedCommand, Z as getSingleUseUrl } from '../index-DkNQs11R.js';
|
|
3
|
-
import 'path';
|
|
4
|
-
import 'fs';
|
|
5
|
-
import '@oclif/core';
|
|
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 Dashboard extends BaseAuthenticatedCommand {
|
|
26
|
-
static args = {};
|
|
27
|
-
static description = "Opens the web-browser to your ShipThis dashboard";
|
|
28
|
-
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
29
|
-
static flags = {};
|
|
30
|
-
async run() {
|
|
31
|
-
const dashboardUrl = await getSingleUseUrl("/dashboard");
|
|
32
|
-
console.log(`Opening ${dashboardUrl}...`);
|
|
33
|
-
await open(dashboardUrl);
|
|
34
|
-
process.exit(0);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { Dashboard as default };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { render } from 'ink';
|
|
3
|
-
import { Flags } from '@oclif/core';
|
|
4
|
-
import { T as getGoogleStatus, X as disconnectGoogle } from '../../../../index-DkNQs11R.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../../../../index-nnzhQ3nY.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 '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 { C as ConnectGoogle } from '../../../../index-BD1WLuFJ.js';
|
|
24
|
-
import 'marked';
|
|
25
|
-
import 'marked-terminal';
|
|
26
|
-
import 'path';
|
|
27
|
-
import 'qrcode';
|
|
28
|
-
import 'string-length';
|
|
29
|
-
import 'strip-ansi';
|
|
30
|
-
import { C as CommandGame } from '../../../../CommandGame-BCMzP9pc.js';
|
|
31
|
-
import 'open';
|
|
32
|
-
import { B as BaseGameAndroidCommand } from '../../../../baseGameAndroidCommand-DFn4zMvq.js';
|
|
33
|
-
import '@expo/apple-utils/build/index.js';
|
|
34
|
-
import 'crypto-js';
|
|
35
|
-
import 'ini';
|
|
36
|
-
import 'deepmerge';
|
|
37
|
-
import '../../../../index-BB00V5oF.js';
|
|
38
|
-
import '../../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
39
|
-
import '../../../../useWebSocket-ByuNoqRw.js';
|
|
40
|
-
import '../../../../Command-B3AmRt2w.js';
|
|
41
|
-
|
|
42
|
-
class GameAndroidApiKeyConnect extends BaseGameAndroidCommand {
|
|
43
|
-
static args = {};
|
|
44
|
-
static description = "Connects ShipThis with Google for managing Service Account API Keys for an Android game";
|
|
45
|
-
static examples = [
|
|
46
|
-
"<%= config.bin %> <%= command.id %>",
|
|
47
|
-
"<%= config.bin %> <%= command.id %> --force",
|
|
48
|
-
"<%= config.bin %> <%= command.id %> --disconnect"
|
|
49
|
-
];
|
|
50
|
-
static flags = {
|
|
51
|
-
...BaseGameAndroidCommand.flags,
|
|
52
|
-
force: Flags.boolean({ char: "f" }),
|
|
53
|
-
disconnect: Flags.boolean({ char: "d" })
|
|
54
|
-
};
|
|
55
|
-
async run() {
|
|
56
|
-
const googleStatus = await getGoogleStatus();
|
|
57
|
-
if (this.flags.disconnect) {
|
|
58
|
-
if (!googleStatus.isAuthenticated && !this.flags.force) {
|
|
59
|
-
throw new Error("You are not authenticated with Google. Use --force to disconnect anyway.");
|
|
60
|
-
}
|
|
61
|
-
await disconnectGoogle();
|
|
62
|
-
this.log("Disconnected from Google.");
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (googleStatus.isAuthenticated && !this.flags.force) {
|
|
66
|
-
throw new Error("You are already authenticated with Google. Use --force to re-authenticate.");
|
|
67
|
-
}
|
|
68
|
-
render(
|
|
69
|
-
/* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(ConnectGoogle, { helpPage: !this.flags.force, onComplete: () => process.exit(0), onError: (e) => this.error(e) }) })
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { GameAndroidApiKeyConnect as default };
|
|
@@ -1,74 +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 '@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 'string-length';
|
|
31
|
-
import 'strip-ansi';
|
|
32
|
-
import { C as CreateServiceAccountKey } from '../../../../index-CboPN9aq.js';
|
|
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 '../../../../useWebSocket-ByuNoqRw.js';
|
|
41
|
-
import '../../../../useProjectCredentials-Btnr7WK3.js';
|
|
42
|
-
import '../../../../ProgressSpinner-6pw1T8Iw.js';
|
|
43
|
-
import '../../../../Command-B3AmRt2w.js';
|
|
44
|
-
|
|
45
|
-
class GameAndroidApiKeyCreate extends BaseGameAndroidCommand {
|
|
46
|
-
static args = {};
|
|
47
|
-
static description = "Creates a new Android Service Account API Key for a game";
|
|
48
|
-
static examples = [
|
|
49
|
-
"<%= config.bin %> <%= command.id %>",
|
|
50
|
-
"<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
|
|
51
|
-
];
|
|
52
|
-
static flags = {
|
|
53
|
-
...BaseGameAndroidCommand.flags,
|
|
54
|
-
waitForAuth: Flags.boolean({ char: "w", description: "Wait for Google Authentication (10 mins)." }),
|
|
55
|
-
force: Flags.boolean({ char: "f" })
|
|
56
|
-
};
|
|
57
|
-
async run() {
|
|
58
|
-
const game = await this.getGame();
|
|
59
|
-
const { force, waitForAuth } = this.flags;
|
|
60
|
-
this.checkGoogleAuth(waitForAuth);
|
|
61
|
-
const projectCredentials = await getProjectCredentials(game.id);
|
|
62
|
-
const hasApiKey = projectCredentials.some(
|
|
63
|
-
(cred) => cred.platform == Platform.ANDROID && cred.isActive && cred.type == CredentialsType.KEY
|
|
64
|
-
);
|
|
65
|
-
if (hasApiKey && !force) {
|
|
66
|
-
this.error("An API Key is already set on this game. Use --force to overwrite it.");
|
|
67
|
-
}
|
|
68
|
-
render(
|
|
69
|
-
/* @__PURE__ */ jsx(CommandGame, { command: this, children: /* @__PURE__ */ jsx(CreateServiceAccountKey, { onComplete: () => process.exit(0), onError: (e) => this.error(e) }) })
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { GameAndroidApiKeyCreate as default };
|
|
@@ -1,84 +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 { e as exportCredential } from '../../../../export-CVs_xoDN.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 GameAndroidApiKeyExport extends BaseGameAndroidCommand {
|
|
43
|
-
static args = {
|
|
44
|
-
file: Args.string({ description: "Name of the ZIP file to create", required: true })
|
|
45
|
-
};
|
|
46
|
-
static description = "Saves the current Android Service Account API Key to a ZIP file";
|
|
47
|
-
static examples = ["<%= config.bin %> <%= command.id %> keyStore.zip"];
|
|
48
|
-
static flags = {
|
|
49
|
-
gameId: Flags.string({ char: "g", description: "The ID of the game" }),
|
|
50
|
-
force: Flags.boolean({ char: "f", description: "Overwrite the file if it already exists" })
|
|
51
|
-
};
|
|
52
|
-
async run() {
|
|
53
|
-
const { args, flags } = this;
|
|
54
|
-
const { file } = args;
|
|
55
|
-
const { force } = flags;
|
|
56
|
-
const game = await this.getGame();
|
|
57
|
-
const zipAlreadyExists = fs.existsSync(file);
|
|
58
|
-
if (zipAlreadyExists && !force) {
|
|
59
|
-
this.error(`The file ${file} already exists. Use --force to overwrite it.`);
|
|
60
|
-
}
|
|
61
|
-
const projectCredentials = await getProjectCredentials(game.id);
|
|
62
|
-
const projectAndroidApiKeyCreds = projectCredentials.filter(
|
|
63
|
-
(cred) => cred.platform == Platform.ANDROID && cred.type == CredentialsType.KEY && cred.isActive
|
|
64
|
-
);
|
|
65
|
-
if (projectAndroidApiKeyCreds.length === 0) {
|
|
66
|
-
this.error("No Android Service Account API Key found which can be exported.");
|
|
67
|
-
}
|
|
68
|
-
const [apiKey] = projectAndroidApiKeyCreds;
|
|
69
|
-
const handleComplete = async () => process.exit(0);
|
|
70
|
-
render(
|
|
71
|
-
/* @__PURE__ */ jsx(Command, { command: this, children: /* @__PURE__ */ jsx(
|
|
72
|
-
RunWithSpinner,
|
|
73
|
-
{
|
|
74
|
-
msgInProgress: `Exporting Android Service Account API Key to ${file}...`,
|
|
75
|
-
msgComplete: `Android Service Account API Key exported to ${file}`,
|
|
76
|
-
executeMethod: () => exportCredential({ zipPath: file, credentialId: apiKey.id, projectId: game.id }),
|
|
77
|
-
onComplete: handleComplete
|
|
78
|
-
}
|
|
79
|
-
) })
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export { GameAndroidApiKeyExport as default };
|