shipthis 0.1.41 → 0.1.43
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 +9 -7
- package/assets/markdown/confirm-change-android-build-method.md.ejs +13 -0
- package/dist/{AppleBundleIdDetails-BJC7GCx_.js → AppleBundleIdDetails-bMqPqmP0.js} +9 -7
- package/dist/{Command-Cj6F5B5a.js → Command-cqn3WLlP.js} +4 -3
- package/dist/{CommandGame-CuvuH-z6.js → CommandGame-DMQT0sL_.js} +2 -2
- package/dist/{Create-pfGYcKu4.js → Create-Cs9HG9xO.js} +5 -3
- package/dist/{GameStatus-ZSe-qG3y.js → GameStatus-lv2SW-6H.js} +4 -3
- package/dist/{Import-D046HBaF.js → Import-DOQrR8wW.js} +6 -4
- package/dist/{JobLogTail-Da8GuReK.js → JobLogTail-CWYxQTq4.js} +31 -17
- package/dist/JobProgress-B07Y2FLb.js +253 -0
- package/dist/{JobStatusTable-DVJjHw97.js → JobStatusTable-B0A1z1zq.js} +3 -4
- package/dist/{ProjectCredentialsTable-BJJz7W1P.js → ProjectCredentialsTable-CyJ7o8yD.js} +4 -3
- package/dist/{UserCredentialsTable-CSynIVHU.js → UserCredentialsTable-C8_skPFY.js} +4 -3
- package/dist/{baseAppleCommand-Aq-Eaw_K.js → baseAppleCommand-Cfoy8Tx_.js} +1 -1
- package/dist/{baseCommand-CTn3KGH3.js → baseCommand-B23l0hCp.js} +82 -111
- package/dist/{baseGameAndroidCommand-DRzVMKuG.js → baseGameAndroidCommand-Dh4xXVW1.js} +4 -3
- package/dist/{baseGameCommand-8VL7xe-O.js → baseGameCommand-P7Vyz2vZ.js} +5 -3
- package/dist/commands/apiKey/create.js +6 -6
- package/dist/commands/apiKey/list.js +6 -6
- package/dist/commands/apiKey/revoke.js +6 -6
- package/dist/commands/apple/apiKey/create.js +9 -9
- package/dist/commands/apple/apiKey/delete.js +7 -7
- package/dist/commands/apple/apiKey/export.js +8 -8
- package/dist/commands/apple/apiKey/import.js +8 -8
- package/dist/commands/apple/apiKey/status.js +7 -7
- package/dist/commands/apple/certificate/create.js +9 -9
- package/dist/commands/apple/certificate/delete.js +7 -7
- package/dist/commands/apple/certificate/export.js +8 -8
- package/dist/commands/apple/certificate/import.js +8 -8
- package/dist/commands/apple/certificate/status.js +7 -7
- package/dist/commands/apple/login.js +5 -5
- package/dist/commands/apple/status.js +6 -6
- package/dist/commands/dashboard.js +5 -5
- package/dist/commands/game/android/apiKey/connect.js +11 -11
- package/dist/commands/game/android/apiKey/create.js +13 -13
- package/dist/commands/game/android/apiKey/delete.js +7 -7
- package/dist/commands/game/android/apiKey/export.js +9 -9
- package/dist/commands/game/android/apiKey/import.js +9 -9
- package/dist/commands/game/android/apiKey/invite.js +6 -6
- package/dist/commands/game/android/apiKey/policy.js +6 -6
- package/dist/commands/game/android/apiKey/status.js +9 -9
- package/dist/commands/game/android/keyStore/create.js +10 -10
- package/dist/commands/game/android/keyStore/delete.js +7 -7
- package/dist/commands/game/android/keyStore/export.js +8 -8
- package/dist/commands/game/android/keyStore/import.js +11 -11
- package/dist/commands/game/android/keyStore/status.js +8 -8
- package/dist/commands/game/android/status.js +5 -5
- package/dist/commands/game/build/download.js +6 -6
- package/dist/commands/game/build/list.js +7 -7
- package/dist/commands/game/create.js +5 -5
- package/dist/commands/game/details.js +6 -6
- package/dist/commands/game/export.js +5 -5
- package/dist/commands/game/ios/app/addTester.js +7 -7
- package/dist/commands/game/ios/app/create.js +8 -7
- package/dist/commands/game/ios/app/status.js +9 -9
- package/dist/commands/game/ios/app/sync.js +7 -7
- package/dist/commands/game/ios/profile/create.js +9 -9
- package/dist/commands/game/ios/profile/delete.js +7 -7
- package/dist/commands/game/ios/profile/export.js +8 -8
- package/dist/commands/game/ios/profile/import.js +8 -8
- package/dist/commands/game/ios/profile/status.js +9 -9
- package/dist/commands/game/ios/status.js +11 -11
- package/dist/commands/game/ios/wizard.js +6 -6
- package/dist/commands/game/job/list.js +6 -6
- package/dist/commands/game/job/status.js +11 -11
- package/dist/commands/game/list.js +6 -6
- package/dist/commands/game/ship.js +32 -15
- package/dist/commands/game/status.js +8 -8
- package/dist/commands/game/wizard.js +80 -30
- package/dist/commands/internal/fastlane.js +5 -5
- package/dist/commands/internal/readme.js +5 -5
- package/dist/commands/login.js +5 -5
- package/dist/commands/status.js +6 -6
- package/dist/commands/util/android-build-method.js +67 -0
- package/dist/commands/util/glass.js +4 -4
- package/dist/{export-DtATljiz.js → export-BOuZFMT3.js} +1 -1
- package/dist/{import-Dk2ywOVU.js → import-P4KcAuAO.js} +1 -1
- package/dist/{index-cRnjcGxV.js → index-AUjBYrSG.js} +8 -6
- package/dist/{index-CuyVBHWc.js → index-BmRSqi8U.js} +7 -5
- package/dist/{index-BW7z-5sB.js → index-DMosmqi2.js} +1 -1
- package/dist/{upload-CHaDSvvi.js → upload-BvNeNQXc.js} +1 -1
- package/dist/{useAppleApp-CR847GWc.js → useAppleApp-fD92orhh.js} +1 -1
- package/dist/{useAppleBundleId-BnwPmVEu.js → useAppleBundleId-oONHtYgg.js} +2 -2
- package/dist/{useAppleProfiles-DY-H0420.js → useAppleProfiles-aMy844nZ.js} +3 -2
- package/dist/{useGoogleStatus-WqPgHteE.js → useGoogleStatus-rBDZt9tw.js} +2 -2
- package/dist/{useProjectCredentials-TvlolkId.js → useProjectCredentials-DLYLMlJh.js} +2 -2
- package/dist/{useWebSocket-MXDbQHcu.js → useWebSocket-Bvq2Wf7I.js} +1 -1
- package/docs/util/android-build-method.md +26 -0
- package/docs/util.md +2 -1
- package/npm-shrinkwrap.json +14182 -0
- package/oclif.manifest.json +2966 -0
- package/package.json +9 -6
- package/dist/JobProgress-DltCQpzA.js +0 -127
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shipthis",
|
|
3
3
|
"description": "ShipThis manages building and uploading your Godot games to the App Store and Google Play.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.43",
|
|
5
5
|
"author": "Hello Invent Ltd",
|
|
6
6
|
"bin": {
|
|
7
7
|
"shipthis": "./bin/run.js"
|
|
@@ -20,11 +20,10 @@
|
|
|
20
20
|
"axios": "^1.7.7",
|
|
21
21
|
"chalk": "^5.4.1",
|
|
22
22
|
"crypto-js": "^4.2.0",
|
|
23
|
-
"deepmerge": "^4.3.1",
|
|
24
23
|
"fast-glob": "^3.3.2",
|
|
25
24
|
"fs-extra": "^11.2.0",
|
|
26
25
|
"fullscreen-ink": "^0.1.0",
|
|
27
|
-
"
|
|
26
|
+
"godot-export-presets": "^0.1.6",
|
|
28
27
|
"ink": "^5.0.1",
|
|
29
28
|
"ink-spinner": "^5.0.0",
|
|
30
29
|
"isomorphic-git": "^1.27.1",
|
|
@@ -54,7 +53,6 @@
|
|
|
54
53
|
"@types/crypto-js": "^4.2.2",
|
|
55
54
|
"@types/ejs": "^3.1.5",
|
|
56
55
|
"@types/fs-extra": "^11.0.4",
|
|
57
|
-
"@types/ini": "^4.1.1",
|
|
58
56
|
"@types/jsonwebtoken": "^9.0.6",
|
|
59
57
|
"@types/luxon": "^3.4.2",
|
|
60
58
|
"@types/mocha": "^10",
|
|
@@ -108,6 +106,7 @@
|
|
|
108
106
|
"exports": [
|
|
109
107
|
"./dist/utils/help.js",
|
|
110
108
|
"./dist/commands/util/glass.js",
|
|
109
|
+
"./dist/commands/util/android-build-method.js",
|
|
111
110
|
"./dist/commands/apple/apiKey/export.js",
|
|
112
111
|
"./dist/commands/apple/apiKey/create.js",
|
|
113
112
|
"./dist/commands/apple/apiKey/status.js",
|
|
@@ -224,7 +223,10 @@
|
|
|
224
223
|
"frequencyUnit": "days"
|
|
225
224
|
}
|
|
226
225
|
},
|
|
227
|
-
"repository":
|
|
226
|
+
"repository": {
|
|
227
|
+
"type": "git",
|
|
228
|
+
"url": "git+https://github.com/shipth-is/cli.git"
|
|
229
|
+
},
|
|
228
230
|
"scripts": {
|
|
229
231
|
"build-original": "shx rm -rf dist && tsc -b",
|
|
230
232
|
"build-tsc-alias": "shx rm -rf dist && npx tsc --build && npx tsc-alias -p tsconfig.json",
|
|
@@ -239,6 +241,7 @@
|
|
|
239
241
|
},
|
|
240
242
|
"types": "dist/index.d.ts",
|
|
241
243
|
"overrides": {
|
|
242
|
-
"cli-spinners": "2.9.2"
|
|
244
|
+
"cli-spinners": "2.9.2",
|
|
245
|
+
"@alcalzone/ansi-tokenize": "^0.2.2"
|
|
243
246
|
}
|
|
244
247
|
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import fs__default from 'node:fs';
|
|
2
|
-
import { useMutation } from '@tanstack/react-query';
|
|
3
|
-
import axios from 'axios';
|
|
4
|
-
import fg from 'fast-glob';
|
|
5
|
-
import { v4 } from 'uuid';
|
|
6
|
-
import { ZipFile } from 'yazl';
|
|
7
|
-
import { H as queryClient, k as getProject, v as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a0 as getNewUploadTicket, a1 as startJobsFromUpload } from './baseCommand-CTn3KGH3.js';
|
|
8
|
-
import { k as cacheKeys, s as getFileHash, t as getPlatformName } from './baseGameCommand-8VL7xe-O.js';
|
|
9
|
-
import { g as getCWDGitInfo } from './git-BpsfNFZ_.js';
|
|
10
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
11
|
-
import 'ink';
|
|
12
|
-
import 'ink-spinner';
|
|
13
|
-
import 'react';
|
|
14
|
-
import 'crypto-js';
|
|
15
|
-
import 'luxon';
|
|
16
|
-
import 'socket.io-client';
|
|
17
|
-
import { u as useJobWatching } from './JobLogTail-Da8GuReK.js';
|
|
18
|
-
import 'fullscreen-ink';
|
|
19
|
-
import 'string-length';
|
|
20
|
-
import 'strip-ansi';
|
|
21
|
-
import 'open';
|
|
22
|
-
import '@inkjs/ui';
|
|
23
|
-
import 'node:path';
|
|
24
|
-
import 'marked';
|
|
25
|
-
import 'marked-terminal';
|
|
26
|
-
import { P as ProgressSpinner } from './ProgressSpinner-Um6ARKlk.js';
|
|
27
|
-
import 'qrcode';
|
|
28
|
-
|
|
29
|
-
async function ship({ command, log = () => {
|
|
30
|
-
}, shipFlags }) {
|
|
31
|
-
const commandFlags = command.getFlags();
|
|
32
|
-
const finalFlags = shipFlags || commandFlags;
|
|
33
|
-
const { verbose, useDemoCredentials } = finalFlags;
|
|
34
|
-
verbose && log("Fetching game config...");
|
|
35
|
-
const projectConfig = await command.getProjectConfig();
|
|
36
|
-
if (!projectConfig.project) throw new Error("No project found in project config");
|
|
37
|
-
const project = await getProject(projectConfig.project.id);
|
|
38
|
-
const projectUsesDemoCredentials = Boolean(project.details?.useDemoCredentials);
|
|
39
|
-
const isUsingDemoCredentials = useDemoCredentials ?? projectUsesDemoCredentials ?? false;
|
|
40
|
-
const hasConfiguredIos = Boolean(project.details?.iosBundleId);
|
|
41
|
-
const hasConfiguredAndroid = Boolean(project.details?.androidPackageName);
|
|
42
|
-
if (!isUsingDemoCredentials && !hasConfiguredAndroid && !hasConfiguredIos) {
|
|
43
|
-
throw new Error(
|
|
44
|
-
"No Android or iOS configuration found. Please run `shipthis game wizard android` or `shipthis game wizard ios` to configure your game."
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
verbose && log("Retrieving file globs...");
|
|
48
|
-
const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
|
|
49
|
-
const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
|
|
50
|
-
verbose && log("Finding files to include in zip...");
|
|
51
|
-
const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
|
|
52
|
-
verbose && log(`Found ${files.length} files, adding to zip...`);
|
|
53
|
-
const zipFile = new ZipFile();
|
|
54
|
-
for (const file of files) {
|
|
55
|
-
zipFile.addFile(file, file);
|
|
56
|
-
}
|
|
57
|
-
const outputZipToFile = (zip, fileName) => new Promise((resolve) => {
|
|
58
|
-
const outputStream = fs__default.createWriteStream(fileName);
|
|
59
|
-
zip.outputStream.pipe(outputStream).on("close", () => resolve());
|
|
60
|
-
zip.end();
|
|
61
|
-
});
|
|
62
|
-
const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
|
|
63
|
-
log(`Creating zip file: ${tmpZipFile}`);
|
|
64
|
-
await outputZipToFile(zipFile, tmpZipFile);
|
|
65
|
-
verbose && log("Reading zip file buffer...");
|
|
66
|
-
const zipBuffer = fs__default.readFileSync(tmpZipFile);
|
|
67
|
-
const { size } = fs__default.statSync(tmpZipFile);
|
|
68
|
-
verbose && log("Requesting upload ticket...");
|
|
69
|
-
const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
|
|
70
|
-
log("Uploading zip file...");
|
|
71
|
-
await axios.put(uploadTicket.url, zipBuffer, {
|
|
72
|
-
headers: {
|
|
73
|
-
"Content-Type": "application/zip",
|
|
74
|
-
"Content-length": size
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
verbose && log("Fetching Git info...");
|
|
78
|
-
const gitInfo = await getCWDGitInfo();
|
|
79
|
-
verbose && log("Computing file hash...");
|
|
80
|
-
const zipFileMd5 = await getFileHash(tmpZipFile);
|
|
81
|
-
const uploadDetails = {
|
|
82
|
-
...gitInfo,
|
|
83
|
-
zipFileMd5
|
|
84
|
-
};
|
|
85
|
-
verbose && log("Starting jobs from upload...");
|
|
86
|
-
const startJobsOptions = {
|
|
87
|
-
...uploadDetails,
|
|
88
|
-
platform: finalFlags.platform?.toUpperCase(),
|
|
89
|
-
skipPublish: finalFlags.skipPublish,
|
|
90
|
-
verbose: finalFlags.verbose,
|
|
91
|
-
useDemoCredentials: isUsingDemoCredentials,
|
|
92
|
-
gameEngineVersion: finalFlags.gameEngineVersion
|
|
93
|
-
};
|
|
94
|
-
const jobs = await startJobsFromUpload(uploadTicket.id, startJobsOptions);
|
|
95
|
-
verbose && log("Cleaning up temporary zip file...");
|
|
96
|
-
fs__default.unlinkSync(tmpZipFile);
|
|
97
|
-
verbose && log("Job submission complete.");
|
|
98
|
-
if (jobs.length === 0) {
|
|
99
|
-
throw new Error("No jobs were created. Please check your game configuration and try again.");
|
|
100
|
-
}
|
|
101
|
-
if (finalFlags?.follow) {
|
|
102
|
-
log("Waiting for job to start...");
|
|
103
|
-
}
|
|
104
|
-
return jobs;
|
|
105
|
-
}
|
|
106
|
-
const useShip = () => useMutation({
|
|
107
|
-
mutationFn: ship,
|
|
108
|
-
async onSuccess(data) {
|
|
109
|
-
queryClient.invalidateQueries({
|
|
110
|
-
queryKey: cacheKeys.jobs({ pageNumber: 0, projectId: data[0].project.id })
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
const JobProgress = (props) => {
|
|
116
|
-
const { progress } = useJobWatching({
|
|
117
|
-
isWatching: true,
|
|
118
|
-
jobId: props.job.id,
|
|
119
|
-
onComplete: props.onComplete,
|
|
120
|
-
onFailure: props.onFailure,
|
|
121
|
-
projectId: props.job.project.id
|
|
122
|
-
});
|
|
123
|
-
const label = `${getPlatformName(props.job.type)} build progress...`;
|
|
124
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ProgressSpinner, { label, progress, spinnerType: "dots" }) });
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export { JobProgress as J, useShip as u };
|