shipthis 0.1.8 → 0.1.10
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/dist/AppleBundleIdDetails-CjP5y0cj.js +74 -0
- package/dist/AppleBundleIdDetails-CztWY_mT.js +73 -0
- package/dist/AppleBundleIdDetails-DKeSAte9.js +73 -0
- package/dist/Command-D6rWEZRM.js +204 -0
- package/dist/Command-Dn0P_KOV.js +205 -0
- package/dist/Command-YJJp90ru.js +204 -0
- package/dist/CommandGame-cPaTk1wh.js +8 -0
- package/dist/CommandGame-k04mHiDl.js +8 -0
- package/dist/CommandGame-pI9VXKxi.js +8 -0
- package/dist/CreateKeystore-BnNdeDUa.js +57 -0
- package/dist/CreateKeystore-Cf-nsK_M.js +56 -0
- package/dist/CreateKeystore-g1z6DsU5.js +56 -0
- package/dist/JobProgress-CPkWVSlH.js +108 -0
- package/dist/JobProgress-biiLhigg.js +109 -0
- package/dist/JobProgress-jmGAzvxS.js +108 -0
- package/dist/JobStatusTable-BA_q-kgE.js +75 -0
- package/dist/JobStatusTable-ByW0bN6c.js +75 -0
- package/dist/JobStatusTable-CgaTS7jS.js +75 -0
- package/dist/ProjectCredentialsTable-8kXt7sTS.js +37 -0
- package/dist/ProjectCredentialsTable-DRMK_SNw.js +37 -0
- package/dist/ProjectCredentialsTable-DfkpvTf8.js +37 -0
- package/dist/UserCredentialsTable-DMh8Wpy7.js +82 -0
- package/dist/UserCredentialsTable-DgHZJSHG.js +82 -0
- package/dist/UserCredentialsTable-TflQvTEP.js +82 -0
- package/dist/baseAppleCommand-1isaFxCQ.js +10 -0
- package/dist/baseAppleCommand-B9wyIqdL.js +10 -0
- package/dist/baseAppleCommand-DpasCbje.js +10 -0
- package/dist/baseGameAndroidCommand-6vsMpE7a.js +43 -0
- package/dist/baseGameAndroidCommand-B3LRG701.js +43 -0
- package/dist/baseGameAndroidCommand-C9BuS2Sr.js +43 -0
- package/dist/commands/apple/apiKey/create.js +7 -7
- package/dist/commands/apple/apiKey/export.js +6 -6
- package/dist/commands/apple/apiKey/import.js +6 -6
- package/dist/commands/apple/apiKey/status.js +5 -5
- package/dist/commands/apple/certificate/create.js +7 -7
- package/dist/commands/apple/certificate/export.js +6 -6
- package/dist/commands/apple/certificate/import.js +6 -6
- package/dist/commands/apple/certificate/status.js +5 -5
- package/dist/commands/apple/login.js +2 -2
- package/dist/commands/apple/status.js +4 -4
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/game/android/apiKey/connect.js +8 -8
- package/dist/commands/game/android/apiKey/create.js +10 -10
- package/dist/commands/game/android/apiKey/export.js +7 -7
- package/dist/commands/game/android/apiKey/import.js +7 -7
- package/dist/commands/game/android/apiKey/invite.js +4 -4
- package/dist/commands/game/android/apiKey/status.js +7 -7
- package/dist/commands/game/android/keyStore/create.js +8 -8
- package/dist/commands/game/android/keyStore/export.js +6 -6
- package/dist/commands/game/android/keyStore/import.js +6 -6
- package/dist/commands/game/android/keyStore/status.js +6 -6
- package/dist/commands/game/android/status.js +4 -4
- package/dist/commands/game/build/download.js +4 -4
- package/dist/commands/game/build/list.js +5 -5
- package/dist/commands/game/create.js +2 -2
- package/dist/commands/game/details.js +21 -7
- package/dist/commands/game/export.js +1 -1
- package/dist/commands/game/ios/app/addTester.js +5 -5
- package/dist/commands/game/ios/app/create.js +4 -4
- package/dist/commands/game/ios/app/status.js +7 -7
- package/dist/commands/game/ios/app/sync.js +5 -5
- package/dist/commands/game/ios/profile/create.js +7 -7
- package/dist/commands/game/ios/profile/export.js +6 -6
- package/dist/commands/game/ios/profile/import.js +6 -6
- package/dist/commands/game/ios/profile/status.js +6 -6
- package/dist/commands/game/ios/status.js +7 -7
- package/dist/commands/game/ios/wizard.js +2 -2
- package/dist/commands/game/job/list.js +4 -4
- package/dist/commands/game/job/status.js +7 -7
- package/dist/commands/game/list.js +4 -4
- package/dist/commands/game/ship.js +9 -9
- package/dist/commands/game/status.js +4 -4
- package/dist/commands/game/wizard.js +490 -34
- package/dist/commands/internal/fastlane.js +1 -1
- package/dist/commands/internal/readme.js +255 -770
- package/dist/commands/login.js +2 -2
- package/dist/commands/status.js +4 -4
- package/dist/export-B_F6vXIK.js +36 -0
- package/dist/export-C_lu1FD9.js +36 -0
- package/dist/export-rS9o87LD.js +36 -0
- package/dist/import-7T3J63j2.js +38 -0
- package/dist/import-Brg3zYmT.js +38 -0
- package/dist/import-DPbg8WvS.js +38 -0
- package/dist/index-BB7X1Pqp.js +695 -0
- package/dist/index-BQnkBr1Q.js +136 -0
- package/dist/index-BX9h2vPV.js +123 -0
- package/dist/index-BjGSEqP5.js +135 -0
- package/dist/index-Bv3x8c78.js +693 -0
- package/dist/index-ByOvCs4O.js +122 -0
- package/dist/index-BzffuqPa.js +24 -0
- package/dist/index-C9734Cj2.js +693 -0
- package/dist/index-CKYExssR.js +136 -0
- package/dist/index-Cz_KLwWf.js +136 -0
- package/dist/index-DOgF4dFK.js +24 -0
- package/dist/index-DgbQBx6x.js +122 -0
- package/dist/index-DxHPjZav.js +136 -0
- package/dist/index-m4HTrJ5J.js +135 -0
- package/dist/upload-2naN75Zu.js +60 -0
- package/dist/upload-Cx71802W.js +60 -0
- package/dist/upload-DvAE1vDq.js +60 -0
- package/dist/useAndroidServiceAccountTestResult-BDc7XpKE.js +52 -0
- package/dist/useAndroidServiceAccountTestResult-B_ekRewZ.js +52 -0
- package/dist/useAndroidServiceAccountTestResult-Ce1x0Eh8.js +52 -0
- package/dist/useAppleApp-BEtLQa7n.js +32 -0
- package/dist/useAppleApp-CApC0-4Q.js +32 -0
- package/dist/useAppleApp-CETIcsJS.js +32 -0
- package/dist/useAppleBundleId-DXbMDRLd.js +64 -0
- package/dist/useAppleBundleId-SmzY6rkm.js +64 -0
- package/dist/useAppleBundleId-gPBzJwQg.js +64 -0
- package/dist/useJobWatching-BIG6fnTN.js +45 -0
- package/dist/useJobWatching-Cp-CYd90.js +45 -0
- package/dist/useJobWatching-D-YzSlK8.js +45 -0
- package/dist/useProjectCredentials-CKngz2rd.js +54 -0
- package/dist/useProjectCredentials-EapDge1I.js +54 -0
- package/dist/useProjectCredentials-vjedBbKl.js +54 -0
- package/dist/useWebSocket-Bep1zAVG.js +36 -0
- package/dist/useWebSocket-CBqsjHbt.js +36 -0
- package/dist/useWebSocket-rBLiZsKb.js +36 -0
- package/dist/wizard-ChPegnMW.js +133 -0
- package/npm-shrinkwrap.json +251 -223
- package/oclif.manifest.json +256 -220
- package/package.json +3 -5
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Text, useInput, Box } from 'ink';
|
|
3
|
+
import open from 'open';
|
|
4
|
+
import { useState, useEffect, useContext } from 'react';
|
|
5
|
+
import { Q as getGoogleStatus, a2 as getShortAuthRequiredUrl, a3 as getGoogleAuthUrl, X as WEB_URL } from './index-Bv3x8c78.js';
|
|
6
|
+
import 'crypto';
|
|
7
|
+
import 'fs';
|
|
8
|
+
import 'readline-sync';
|
|
9
|
+
import 'node:readline';
|
|
10
|
+
import 'node:path';
|
|
11
|
+
import 'node:url';
|
|
12
|
+
import 'axios';
|
|
13
|
+
import { useQuery } from '@tanstack/react-query';
|
|
14
|
+
import 'crypto-js';
|
|
15
|
+
import 'uuid';
|
|
16
|
+
import 'luxon';
|
|
17
|
+
import 'fast-glob';
|
|
18
|
+
import 'yazl';
|
|
19
|
+
import 'socket.io-client';
|
|
20
|
+
import { u as useWebSocket } from './useWebSocket-rBLiZsKb.js';
|
|
21
|
+
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-BDc7XpKE.js';
|
|
22
|
+
import 'isomorphic-git';
|
|
23
|
+
import '@oclif/core';
|
|
24
|
+
import { b as GameContext, M as Markdown } from './Command-YJJp90ru.js';
|
|
25
|
+
import 'ink-spinner';
|
|
26
|
+
import '@inkjs/ui';
|
|
27
|
+
import 'string-length';
|
|
28
|
+
import 'strip-ansi';
|
|
29
|
+
import qrcode from 'qrcode';
|
|
30
|
+
|
|
31
|
+
const useGoogleStatus = () => {
|
|
32
|
+
return useQuery({
|
|
33
|
+
queryKey: cacheKeys.googleStatus(),
|
|
34
|
+
queryFn: getGoogleStatus
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function useGoogleStatusWatching({
|
|
39
|
+
projectId,
|
|
40
|
+
isWatching,
|
|
41
|
+
onGoogleStatusUpdate
|
|
42
|
+
}) {
|
|
43
|
+
const [wsGoogleStatus, setWsGoogleStatus] = useState(null);
|
|
44
|
+
const listener = {
|
|
45
|
+
getPattern: () => `project.${projectId}:google-status`,
|
|
46
|
+
eventHandler: async (pattern, data2) => {
|
|
47
|
+
setWsGoogleStatus(data2);
|
|
48
|
+
if (onGoogleStatusUpdate) onGoogleStatusUpdate(data2);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
useWebSocket([listener] );
|
|
52
|
+
const { isLoading, data: googleStatus } = useGoogleStatus();
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
setWsGoogleStatus(null);
|
|
55
|
+
}, [projectId, isWatching, googleStatus]);
|
|
56
|
+
const fetchedGoogleStatus = googleStatus ? googleStatus : null;
|
|
57
|
+
const data = wsGoogleStatus ? wsGoogleStatus : fetchedGoogleStatus;
|
|
58
|
+
return {
|
|
59
|
+
isLoading,
|
|
60
|
+
data
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const QRCodeTerminal = ({ url }) => {
|
|
65
|
+
const [code, setCode] = useState(null);
|
|
66
|
+
const handleLoad = async () => {
|
|
67
|
+
const codeString = await qrcode.toString(url, { type: "terminal", errorCorrectionLevel: "L", small: true });
|
|
68
|
+
setCode(codeString);
|
|
69
|
+
};
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
handleLoad();
|
|
72
|
+
}, []);
|
|
73
|
+
return /* @__PURE__ */ jsx(Fragment, { children: code && /* @__PURE__ */ jsx(Text, { children: code }) });
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
async function getConnectUrl(gameId, helpPage) {
|
|
77
|
+
const helpPagePath = `/docs/android?gameId=${gameId}#2-connect-shipthis-with-google`;
|
|
78
|
+
const url = helpPage ? await getShortAuthRequiredUrl(helpPagePath) : await getGoogleAuthUrl(gameId);
|
|
79
|
+
return url;
|
|
80
|
+
}
|
|
81
|
+
const GoogleAuthQRCode = ({ gameId, helpPage }) => {
|
|
82
|
+
const [url, setUrl] = useState(null);
|
|
83
|
+
const handleLoad = async () => {
|
|
84
|
+
const url2 = await getConnectUrl(gameId, helpPage);
|
|
85
|
+
setUrl(url2);
|
|
86
|
+
};
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
handleLoad();
|
|
89
|
+
}, []);
|
|
90
|
+
return /* @__PURE__ */ jsx(Fragment, { children: url && /* @__PURE__ */ jsx(QRCodeTerminal, { url }) });
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const ConnectGoogle = (props) => {
|
|
94
|
+
const { gameId } = useContext(GameContext);
|
|
95
|
+
return /* @__PURE__ */ jsx(Fragment, { children: gameId && /* @__PURE__ */ jsx(ConnectForGame, { gameId, ...props }) });
|
|
96
|
+
};
|
|
97
|
+
const ConnectForGame = ({ onComplete, onError, helpPage, gameId, ...boxProps }) => {
|
|
98
|
+
useGoogleStatusWatching({
|
|
99
|
+
projectId: gameId,
|
|
100
|
+
isWatching: true,
|
|
101
|
+
onGoogleStatusUpdate: (status) => {
|
|
102
|
+
if (status.isAuthenticated) return onComplete();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
useInput(async (input) => {
|
|
106
|
+
if (!gameId) return;
|
|
107
|
+
if (input !== "d") return;
|
|
108
|
+
const url = await getConnectUrl(gameId, true);
|
|
109
|
+
await open(url);
|
|
110
|
+
});
|
|
111
|
+
const templateVars = {
|
|
112
|
+
privacyURL: new URL("/privacy", WEB_URL).toString()
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, ...boxProps, children: [
|
|
115
|
+
/* @__PURE__ */ jsx(Markdown, { filename: "privacy-notification.md", templateVars }),
|
|
116
|
+
/* @__PURE__ */ jsx(Text, { children: "Scan the QR code below to connect your Google account to ShipThis:" }),
|
|
117
|
+
gameId && /* @__PURE__ */ jsx(GoogleAuthQRCode, { gameId, helpPage: !!helpPage }),
|
|
118
|
+
/* @__PURE__ */ jsx(Text, { children: "Or press D to sign-in using your browser" })
|
|
119
|
+
] });
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export { ConnectGoogle as C };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { p as getAuthedHeaders, q as API_URL, K as castArrayObjectDates } from './index-Bv3x8c78.js';
|
|
3
|
+
import 'fs';
|
|
4
|
+
|
|
5
|
+
async function getUserCredentials(pageSize = 100) {
|
|
6
|
+
const headers = getAuthedHeaders();
|
|
7
|
+
const { data } = await axios({
|
|
8
|
+
method: "get",
|
|
9
|
+
url: `${API_URL}/credentials?pageSize=${pageSize}`,
|
|
10
|
+
headers
|
|
11
|
+
});
|
|
12
|
+
return castArrayObjectDates(data.data);
|
|
13
|
+
}
|
|
14
|
+
async function getProjectCredentials(projectId, pageSize = 100) {
|
|
15
|
+
const headers = getAuthedHeaders();
|
|
16
|
+
const { data } = await axios({
|
|
17
|
+
method: "get",
|
|
18
|
+
url: `${API_URL}/projects/${projectId}/credentials?pageSize=${pageSize}`,
|
|
19
|
+
headers
|
|
20
|
+
});
|
|
21
|
+
return castArrayObjectDates(data.data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { getProjectCredentials as a, getUserCredentials as g };
|