shipthis 0.1.34 → 0.1.36
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 +223 -80
- package/assets/markdown/agreement-update.md.ejs +12 -0
- package/assets/markdown/{android-success.md → android-success.md.ejs} +2 -2
- package/assets/markdown/{apikey-create.md → apikey-create.md.ejs} +4 -4
- package/assets/markdown/{create-google-play-game.md → create-google-play-game.md.ejs} +2 -2
- package/assets/markdown/{invite-service-account.md → invite-service-account.md.ejs} +1 -1
- package/assets/markdown/{ios-success.md → ios-success.md.ejs} +2 -2
- package/assets/markdown/{privacy-notification.md → privacy-notification.md.ejs} +1 -1
- package/assets/markdown/service-account-policy-wizard.md.ejs +26 -0
- package/assets/markdown/service-account-policy.md.ejs +30 -0
- package/assets/markdown/{ship-failure.md → ship-failure.md.ejs} +1 -1
- package/assets/markdown/{ship-success.md → ship-success.md.ejs} +2 -2
- package/dist/{AppleBundleIdDetails-By-sSGNl.js → AppleBundleIdDetails-pEVOUXTQ.js} +3 -4
- package/dist/{Command-VWMnGslo.js → Command-DhAVAdiI.js} +1 -2
- package/dist/{CommandGame-BSVPZzNl.js → CommandGame-C-oV-hb4.js} +2 -2
- package/dist/{Create-SR1Mq7BY.js → Create-Dg9ZlwEd.js} +1 -3
- package/dist/{GameStatus-1ntFyxEx.js → GameStatus-Dm9TqFfW.js} +9 -17
- package/dist/{Import-cedOWPDz.js → Import-BFNNkN-I.js} +2 -4
- package/dist/{JobLogTail-C_W8UAMg.js → JobLogTail-RTNIiAUk.js} +2 -5
- package/dist/{JobProgress-CI385G53.js → JobProgress-dFWcT0CQ.js} +16 -17
- package/dist/{JobStatusTable-CdbKtwJE.js → JobStatusTable-BlvMuWF7.js} +2 -4
- package/dist/{ProjectCredentialsTable-ZnuIfcDB.js → ProjectCredentialsTable-CMBnYLou.js} +2 -2
- package/dist/{UserCredentialsTable-DRkAYgEA.js → UserCredentialsTable-oxE3mDmE.js} +8 -10
- package/dist/{baseAppleCommand-CsO-_Yzn.js → baseAppleCommand-cnLvBz95.js} +1 -1
- package/dist/{baseGameAndroidCommand-CdjaAbNX.js → baseGameAndroidCommand-DUDYisYm.js} +1 -2
- package/dist/commands/apiKey/create.js +15 -16
- package/dist/commands/apiKey/list.js +6 -7
- package/dist/commands/apiKey/revoke.js +7 -8
- package/dist/commands/apple/apiKey/create.js +7 -8
- package/dist/commands/apple/apiKey/export.js +6 -7
- package/dist/commands/apple/apiKey/import.js +6 -7
- package/dist/commands/apple/apiKey/status.js +12 -13
- package/dist/commands/apple/certificate/create.js +7 -8
- package/dist/commands/apple/certificate/export.js +6 -7
- package/dist/commands/apple/certificate/import.js +6 -7
- package/dist/commands/apple/certificate/status.js +12 -13
- package/dist/commands/apple/login.js +12 -2
- package/dist/commands/apple/status.js +4 -5
- package/dist/commands/dashboard.js +11 -1
- package/dist/commands/game/android/apiKey/connect.js +9 -9
- package/dist/commands/game/android/apiKey/create.js +11 -11
- package/dist/commands/game/android/apiKey/export.js +7 -8
- package/dist/commands/game/android/apiKey/import.js +7 -8
- package/dist/commands/game/android/apiKey/invite.js +13 -4
- package/dist/commands/game/android/apiKey/policy.js +83 -0
- package/dist/commands/game/android/apiKey/status.js +7 -8
- package/dist/commands/game/android/keyStore/create.js +8 -9
- package/dist/commands/game/android/keyStore/export.js +6 -7
- package/dist/commands/game/android/keyStore/import.js +9 -10
- package/dist/commands/game/android/keyStore/status.js +6 -7
- package/dist/commands/game/android/status.js +12 -1
- package/dist/commands/game/build/download.js +4 -5
- package/dist/commands/game/build/list.js +5 -6
- package/dist/commands/game/create.js +12 -2
- package/dist/commands/game/details.js +4 -5
- package/dist/commands/game/export.js +12 -1
- package/dist/commands/game/ios/app/addTester.js +11 -12
- package/dist/commands/game/ios/app/create.js +4 -5
- package/dist/commands/game/ios/app/status.js +7 -8
- package/dist/commands/game/ios/app/sync.js +5 -6
- package/dist/commands/game/ios/profile/create.js +7 -8
- package/dist/commands/game/ios/profile/export.js +6 -7
- package/dist/commands/game/ios/profile/import.js +6 -7
- package/dist/commands/game/ios/profile/status.js +6 -7
- package/dist/commands/game/ios/status.js +9 -10
- package/dist/commands/game/ios/wizard.js +5 -6
- package/dist/commands/game/job/list.js +4 -5
- package/dist/commands/game/job/status.js +7 -8
- package/dist/commands/game/list.js +11 -10
- package/dist/commands/game/ship.js +18 -13
- package/dist/commands/game/status.js +6 -7
- package/dist/commands/game/wizard.js +19 -19
- package/dist/commands/internal/fastlane.js +12 -1
- package/dist/commands/internal/readme.js +12 -715
- package/dist/commands/login.js +26 -4
- package/dist/commands/status.js +12 -14
- package/dist/{export-B5Yfd9vw.js → export-Bd552LBe.js} +1 -1
- package/dist/{import-A2WcStHl.js → import-D-EL9sQJ.js} +1 -1
- package/dist/{index-CgzANgJt.js → index-1H48f5j2.js} +1 -1
- package/dist/index-BtPf4vzY.js +1903 -0
- package/dist/{index-Bz1qt_8T.js → index-DCN43FhY.js} +5 -11
- package/dist/{index-BBLtvl1Y.js → index-DwATmUTQ.js} +57 -16
- package/dist/{upload-BIsFZzBO.js → upload-Dm38PqhN.js} +1 -1
- package/dist/{useAppleApp-BZR94exU.js → useAppleApp-BKPntZPm.js} +1 -1
- package/dist/{useAppleBundleId-Dg5DsItN.js → useAppleBundleId-DvQKEEy4.js} +1 -1
- package/dist/useGoogleStatus-D9jjGa--.js +9 -0
- package/dist/{useProjectCredentials-jQYGcDhT.js → useProjectCredentials-BjsS28hP.js} +12 -11
- package/dist/{useWebSocket-CIxkPaYi.js → useWebSocket-CIeyHqxG.js} +1 -1
- package/docs/README.md +3 -2
- package/docs/apiKey.md +12 -2
- package/docs/assets/st.png +0 -0
- package/docs/game/android/apiKey/policy.md +28 -0
- package/docs/game/android/keyStore.md +14 -4
- package/docs/game/android/status.md +4 -0
- package/docs/game/android.md +9 -305
- package/docs/game/ship.md +43 -11
- package/docs/game.md +7 -1
- package/docs/login.md +6 -2
- package/docs/status.md +1 -1
- package/package.json +10 -2
- package/dist/index-CA6-uLMn.js +0 -221
- package/dist/index-CO_ssVFA.js +0 -772
- package/dist/index-CYjZ26If.js +0 -153
- package/dist/useAndroidServiceAccountTestResult-DueKynFy.js +0 -50
- /package/assets/markdown/{create-or-import-keystore.md → create-or-import-keystore.md.ejs} +0 -0
package/dist/index-CYjZ26If.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import crypto from 'node:crypto';
|
|
2
|
-
import fs__default from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { promises } from 'node:readline';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import readlineSync from 'readline-sync';
|
|
7
|
-
import { L as JobStage, P as Platform, M as LogLevel, J as JobStatus } from './index-CO_ssVFA.js';
|
|
8
|
-
import 'luxon';
|
|
9
|
-
import 'axios';
|
|
10
|
-
import 'isomorphic-git';
|
|
11
|
-
import '@oclif/core';
|
|
12
|
-
import '@tanstack/react-query';
|
|
13
|
-
import 'react';
|
|
14
|
-
import 'crypto-js';
|
|
15
|
-
import 'uuid';
|
|
16
|
-
import 'fast-glob';
|
|
17
|
-
import 'yazl';
|
|
18
|
-
import 'socket.io-client';
|
|
19
|
-
import 'fullscreen-ink';
|
|
20
|
-
import 'ink';
|
|
21
|
-
|
|
22
|
-
function getShortUUID(originalUuid) {
|
|
23
|
-
return originalUuid.slice(0, 8);
|
|
24
|
-
}
|
|
25
|
-
function getStageColor(stage) {
|
|
26
|
-
switch (stage) {
|
|
27
|
-
case JobStage.SETUP: {
|
|
28
|
-
return "#FFB3B3";
|
|
29
|
-
}
|
|
30
|
-
// pastel red
|
|
31
|
-
case JobStage.CONFIGURE: {
|
|
32
|
-
return "#FFD9B3";
|
|
33
|
-
}
|
|
34
|
-
// pastel orange
|
|
35
|
-
case JobStage.EXPORT: {
|
|
36
|
-
return "#FFFACD";
|
|
37
|
-
}
|
|
38
|
-
// pastel yellow
|
|
39
|
-
case JobStage.BUILD: {
|
|
40
|
-
return "#B3FFB3";
|
|
41
|
-
}
|
|
42
|
-
// pastel green
|
|
43
|
-
case JobStage.PUBLISH: {
|
|
44
|
-
return "#B3D9FF";
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function getMessageColor(level) {
|
|
49
|
-
switch (level) {
|
|
50
|
-
case LogLevel.INFO: {
|
|
51
|
-
return "white";
|
|
52
|
-
}
|
|
53
|
-
case LogLevel.WARN: {
|
|
54
|
-
return "yellow";
|
|
55
|
-
}
|
|
56
|
-
case LogLevel.ERROR: {
|
|
57
|
-
return "red";
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function getJobStatusColor(status) {
|
|
62
|
-
switch (status) {
|
|
63
|
-
case JobStatus.PENDING: {
|
|
64
|
-
return "yellow";
|
|
65
|
-
}
|
|
66
|
-
case JobStatus.PROCESSING: {
|
|
67
|
-
return "blue";
|
|
68
|
-
}
|
|
69
|
-
case JobStatus.COMPLETED: {
|
|
70
|
-
return "green";
|
|
71
|
-
}
|
|
72
|
-
case JobStatus.FAILED: {
|
|
73
|
-
return "red";
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
async function getFileHash(filename) {
|
|
78
|
-
return new Promise((resolve, reject) => {
|
|
79
|
-
const hash = crypto.createHash("sha256");
|
|
80
|
-
const rs = fs__default.createReadStream(filename);
|
|
81
|
-
rs.on("error", reject);
|
|
82
|
-
rs.on("data", (chunk) => hash.update(chunk));
|
|
83
|
-
rs.on("end", () => resolve(hash.digest("hex")));
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function isValidSemVer(versionString) {
|
|
87
|
-
const [semVer, major, minor, patch, prerelease, buildmetadata] = versionString.match(
|
|
88
|
-
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*))?(?:\+([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?$/
|
|
89
|
-
) ?? [];
|
|
90
|
-
return Boolean(semVer);
|
|
91
|
-
}
|
|
92
|
-
function makeHumanReadable(rawObject) {
|
|
93
|
-
const getLabel = (key) => {
|
|
94
|
-
const words = key.split(/(?=[A-Z])/);
|
|
95
|
-
return words.map((word) => word[0].toUpperCase() + word.slice(1)).join(" ").replaceAll(" ", " ");
|
|
96
|
-
};
|
|
97
|
-
const withLabels = Object.entries(rawObject).reduce((acc, [key, value]) => {
|
|
98
|
-
acc[getLabel(key)] = value;
|
|
99
|
-
return acc;
|
|
100
|
-
}, {});
|
|
101
|
-
return withLabels;
|
|
102
|
-
}
|
|
103
|
-
function getPlatformName(platform) {
|
|
104
|
-
switch (platform) {
|
|
105
|
-
case Platform.IOS: {
|
|
106
|
-
return "iOS";
|
|
107
|
-
}
|
|
108
|
-
case Platform.ANDROID: {
|
|
109
|
-
return "Android";
|
|
110
|
-
}
|
|
111
|
-
default: {
|
|
112
|
-
throw new Error(`Unknown platform: ${platform}`);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
async function getMaskedInput(message) {
|
|
117
|
-
const password = readlineSync.question(message, {
|
|
118
|
-
hideEchoBack: true
|
|
119
|
-
// This will hide the input as the user types
|
|
120
|
-
});
|
|
121
|
-
return password;
|
|
122
|
-
}
|
|
123
|
-
async function getInput(message) {
|
|
124
|
-
const rl = promises.createInterface({
|
|
125
|
-
input: process.stdin,
|
|
126
|
-
output: process.stdout
|
|
127
|
-
});
|
|
128
|
-
const answer = await rl.question(message);
|
|
129
|
-
rl.close();
|
|
130
|
-
return answer;
|
|
131
|
-
}
|
|
132
|
-
function generatePackageName(gameName) {
|
|
133
|
-
let normalizedGameName = gameName.trim().toLowerCase();
|
|
134
|
-
normalizedGameName = normalizedGameName.replaceAll(/[\s_\-]+/g, ".");
|
|
135
|
-
normalizedGameName = normalizedGameName.replaceAll(/[^\d.a-z]/g, "");
|
|
136
|
-
normalizedGameName = normalizedGameName.replaceAll(/\.+/g, ".");
|
|
137
|
-
normalizedGameName = normalizedGameName.replace(/^\./, "").replace(/\.$/, "");
|
|
138
|
-
if (/^\d/.test(normalizedGameName)) {
|
|
139
|
-
normalizedGameName = "app." + normalizedGameName;
|
|
140
|
-
}
|
|
141
|
-
const prefix = "com.";
|
|
142
|
-
if (normalizedGameName === "") {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
return prefix + normalizedGameName;
|
|
146
|
-
}
|
|
147
|
-
function scriptDir(importMeta) {
|
|
148
|
-
const filename = fileURLToPath(importMeta.url);
|
|
149
|
-
const dirname = path.dirname(filename);
|
|
150
|
-
return dirname;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export { getInput as a, generatePackageName as b, getJobStatusColor as c, getStageColor as d, getMaskedInput as e, getFileHash as f, getShortUUID as g, getPlatformName as h, isValidSemVer as i, getMessageColor as j, makeHumanReadable as m, scriptDir as s };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import { o as API_URL, p as getAuthedHeaders } from './index-CO_ssVFA.js';
|
|
4
|
-
|
|
5
|
-
const cacheKeys = {
|
|
6
|
-
androidKeyTestResult: (props) => ["androidKeyTestResult", ...Object.values(props)],
|
|
7
|
-
androidSetupStatus: (props) => ["androidSetupStatus", ...Object.values(props)],
|
|
8
|
-
builds: (props) => ["builds", ...Object.values(props)],
|
|
9
|
-
googleStatus: () => ["googleStatus"],
|
|
10
|
-
job: (props) => ["job", ...Object.values(props)],
|
|
11
|
-
jobLogs: (props) => ["jobLogs", ...Object.values(props)],
|
|
12
|
-
jobs: (props) => ["jobs", ...Object.values(props)],
|
|
13
|
-
projectCredentials: (props) => ["projectCredentials", ...Object.values(props)],
|
|
14
|
-
userCredentials: (props) => ["userCredentials", ...Object.values(props)]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var KeyTestStatus = /* @__PURE__ */ ((KeyTestStatus2) => {
|
|
18
|
-
KeyTestStatus2["ERROR"] = "error";
|
|
19
|
-
KeyTestStatus2["SUCCESS"] = "success";
|
|
20
|
-
return KeyTestStatus2;
|
|
21
|
-
})(KeyTestStatus || {});
|
|
22
|
-
var KeyTestError = /* @__PURE__ */ ((KeyTestError2) => {
|
|
23
|
-
KeyTestError2["APP_NOT_FOUND"] = "app_not_found";
|
|
24
|
-
KeyTestError2["NO_PACKAGE_NAME"] = "no_package_name";
|
|
25
|
-
KeyTestError2["NO_SERVICE_ACCOUNT_KEY"] = "no_service_account_key";
|
|
26
|
-
KeyTestError2["NOT_INVITED"] = "not_invited";
|
|
27
|
-
return KeyTestError2;
|
|
28
|
-
})(KeyTestError || {});
|
|
29
|
-
const KeyTestErrorMessage = {
|
|
30
|
-
["app_not_found" /* APP_NOT_FOUND */]: "Application not found in Google Play Console",
|
|
31
|
-
["no_package_name" /* NO_PACKAGE_NAME */]: "Android Package Name has not been set",
|
|
32
|
-
["no_service_account_key" /* NO_SERVICE_ACCOUNT_KEY */]: "Service Account API Key not found in your account",
|
|
33
|
-
["not_invited" /* NOT_INVITED */]: "Service Account has not been invited to Google Play"
|
|
34
|
-
};
|
|
35
|
-
function niceError(keyError) {
|
|
36
|
-
return keyError ? KeyTestErrorMessage[keyError] : void 0;
|
|
37
|
-
}
|
|
38
|
-
const fetchKeyTestResult = async ({ projectId }, config) => {
|
|
39
|
-
if (!projectId) throw new Error("projectId is required");
|
|
40
|
-
const url = `${API_URL}/projects/${projectId}/credentials/android/key/test`;
|
|
41
|
-
const headers = getAuthedHeaders();
|
|
42
|
-
const { data } = await axios.post(url, {}, { headers, ...config });
|
|
43
|
-
return data;
|
|
44
|
-
};
|
|
45
|
-
const useAndroidServiceAccountTestResult = (props) => useQuery({
|
|
46
|
-
queryFn: () => fetchKeyTestResult(props),
|
|
47
|
-
queryKey: cacheKeys.androidKeyTestResult(props)
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export { KeyTestStatus as K, KeyTestError as a, cacheKeys as c, fetchKeyTestResult as f, niceError as n, useAndroidServiceAccountTestResult as u };
|
|
File without changes
|