shipthis 0.1.30 → 0.1.32
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 +122 -41
- package/assets/markdown/create-google-play-game.md +2 -4
- package/assets/markdown/ship-success.md +1 -1
- package/dist/{AppleBundleIdDetails-Fp5COwTa.js → AppleBundleIdDetails-6H3cNWxw.js} +17 -19
- package/dist/{Command-1p5alCz3.js → Command-WPpmLPkL.js} +13 -12
- package/dist/CommandGame-cxzWG4nT.js +7 -0
- package/dist/{Create-1xAdntNl.js → Create-3Ob8sjik.js} +20 -20
- package/dist/GameStatus-BQEtVKvv.js +137 -0
- package/dist/{Import-CzC-M4ln.js → Import-CFuPDI0K.js} +33 -35
- package/dist/{JobLogTail-CZxoMSd5.js → JobLogTail-0CBLoG8N.js} +53 -52
- package/dist/{JobProgress-BjNgtIjm.js → JobProgress-lKqVT88m.js} +46 -37
- package/dist/{JobStatusTable-BB-PWlwj.js → JobStatusTable-C_ZsZJCm.js} +14 -13
- package/dist/{NextSteps-CK9zHOCt.js → NextSteps-DbJHmscQ.js} +1 -3
- package/dist/{ProgressSpinner-6pw1T8Iw.js → ProgressSpinner-DGcakQSK.js} +1 -1
- package/dist/{ProjectCredentialsTable-DyZep993.js → ProjectCredentialsTable-B5pHOnGu.js} +11 -10
- package/dist/{StatusTable-Dm5St4g-.js → StatusTable-DzRWcMr4.js} +7 -9
- package/dist/{Table-CvM6pccN.js → Table-FaNgpyeq.js} +15 -15
- package/dist/{UserCredentialsTable-BraKyDWT.js → UserCredentialsTable-3W3qesh7.js} +18 -19
- package/dist/{baseAppleCommand-BHRIBtTj.js → baseAppleCommand-BGV088--.js} +1 -1
- package/dist/{baseGameAndroidCommand-SrDRbhAG.js → baseGameAndroidCommand-CsemgVjp.js} +23 -23
- package/dist/commands/apple/apiKey/create.js +35 -35
- package/dist/commands/apple/apiKey/export.js +26 -26
- package/dist/commands/apple/apiKey/import.js +27 -27
- package/dist/commands/apple/apiKey/status.js +31 -31
- package/dist/commands/apple/certificate/create.js +39 -39
- package/dist/commands/apple/certificate/export.js +26 -26
- package/dist/commands/apple/certificate/import.js +27 -27
- package/dist/commands/apple/certificate/status.js +31 -31
- package/dist/commands/apple/login.js +15 -15
- package/dist/commands/apple/status.js +28 -28
- package/dist/commands/dashboard.js +10 -10
- package/dist/commands/game/android/apiKey/connect.js +28 -28
- package/dist/commands/game/android/apiKey/create.js +28 -28
- package/dist/commands/game/android/apiKey/export.js +29 -29
- package/dist/commands/game/android/apiKey/import.js +31 -31
- package/dist/commands/game/android/apiKey/invite.js +14 -14
- package/dist/commands/game/android/apiKey/status.js +29 -29
- package/dist/commands/game/android/keyStore/create.js +24 -24
- package/dist/commands/game/android/keyStore/export.js +28 -28
- package/dist/commands/game/android/keyStore/import.js +35 -35
- package/dist/commands/game/android/keyStore/status.js +26 -26
- package/dist/commands/game/android/status.js +14 -58
- package/dist/commands/game/build/download.js +24 -24
- package/dist/commands/game/build/list.js +37 -37
- package/dist/commands/game/create.js +15 -15
- package/dist/commands/game/details.js +35 -36
- package/dist/commands/game/export.js +12 -12
- package/dist/commands/game/ios/app/addTester.js +24 -24
- package/dist/commands/game/ios/app/create.js +24 -24
- package/dist/commands/game/ios/app/status.js +29 -29
- package/dist/commands/game/ios/app/sync.js +31 -31
- package/dist/commands/game/ios/profile/create.js +30 -30
- package/dist/commands/game/ios/profile/export.js +28 -28
- package/dist/commands/game/ios/profile/import.js +32 -32
- package/dist/commands/game/ios/profile/status.js +36 -36
- package/dist/commands/game/ios/status.js +46 -58
- package/dist/commands/game/ios/wizard.js +31 -31
- package/dist/commands/game/job/list.js +34 -34
- package/dist/commands/game/job/status.js +31 -31
- package/dist/commands/game/list.js +45 -41
- package/dist/commands/game/ship.js +73 -70
- package/dist/commands/game/status.js +38 -82
- package/dist/commands/game/wizard.js +271 -307
- package/dist/commands/internal/fastlane.js +15 -17
- package/dist/commands/internal/readme.js +38 -36
- package/dist/commands/login.js +14 -14
- package/dist/commands/status.js +35 -33
- package/dist/{export-BKn02-NH.js → export-CXsVPXA1.js} +5 -5
- package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
- package/dist/{import-CRMaNBVF.js → import-DGvG5REx.js} +14 -14
- package/dist/{index-DxzXU9Hd.js → index-BhhiXbey.js} +244 -221
- package/dist/{index-OZi8bvu8.js → index-C03TV1_J.js} +54 -38
- package/dist/{index-BTAL7EB_.js → index-C66Dd8Xc.js} +80 -79
- package/dist/{index-35Eswf6F.js → index-CGBdOm1q.js} +43 -27
- package/dist/{index--EbYyBAZ.js → index-CS9Gwcb0.js} +41 -43
- package/dist/{index-u1aj1OQW.js → index-CtTI85m-.js} +6 -6
- package/dist/{upload-Bw0zrS4M.js → upload-8y5MQEm9.js} +22 -22
- package/dist/{useAndroidServiceAccountTestResult-CJLIEYmA.js → useAndroidServiceAccountTestResult-DZk5SMxI.js} +11 -13
- package/dist/{useAppleApp-cnb8gX0x.js → useAppleApp-DWYGURwU.js} +4 -4
- package/dist/{useAppleBundleId-B0Etav8g.js → useAppleBundleId-PsTJ2g1B.js} +6 -6
- package/dist/{useProjectCredentials-DX3e_PPc.js → useProjectCredentials-BEphqa18.js} +10 -12
- package/dist/{useWebSocket-BOCa8v6o.js → useWebSocket-5PYa2QER.js} +1 -1
- package/dist/utils/help.js +4 -4
- package/package.json +4 -2
- package/dist/CommandGame-Z4eUQBjn.js +0 -9
- package/dist/{RunWithSpinner-BVXNWGD3.js → RunWithSpinner-gMVA07bZ.js} +2 -2
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import fs__default, { promises } from 'fs';
|
|
2
|
-
import path from 'path';
|
|
1
|
+
import fs__default, { promises } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
import { Args, Flags } from '@oclif/core';
|
|
4
|
-
import { V as BaseCommand } from '../../index-
|
|
5
|
-
import '@expo/apple-utils/build/index.js';
|
|
4
|
+
import { V as BaseCommand } from '../../index-BhhiXbey.js';
|
|
6
5
|
import 'axios';
|
|
7
6
|
import 'crypto-js';
|
|
8
7
|
import 'uuid';
|
|
9
8
|
import 'luxon';
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
9
|
+
import '@expo/apple-utils/build/index.js';
|
|
10
|
+
import 'node:crypto';
|
|
12
11
|
import 'node:readline';
|
|
13
|
-
import 'node:path';
|
|
14
12
|
import 'node:url';
|
|
13
|
+
import 'readline-sync';
|
|
15
14
|
import 'isomorphic-git';
|
|
16
|
-
import 'ini';
|
|
17
15
|
import 'deepmerge';
|
|
18
|
-
import '
|
|
16
|
+
import 'ini';
|
|
19
17
|
import '@tanstack/react-query';
|
|
18
|
+
import 'react';
|
|
20
19
|
import 'fast-glob';
|
|
21
20
|
import 'yazl';
|
|
22
21
|
import 'socket.io-client';
|
|
22
|
+
import 'fullscreen-ink';
|
|
23
23
|
|
|
24
24
|
function generateFastlaneSession(cookieData) {
|
|
25
|
-
return cookieData.cookies.map((cookie) =>
|
|
26
|
-
return `- !ruby/object:HTTP::Cookie
|
|
25
|
+
return cookieData.cookies.map((cookie) => `- !ruby/object:HTTP::Cookie
|
|
27
26
|
name: ${cookie.key}
|
|
28
27
|
value: ${cookie.value}
|
|
29
28
|
domain: ${cookie.domain}
|
|
@@ -34,13 +33,12 @@ function generateFastlaneSession(cookieData) {
|
|
|
34
33
|
expires: ${cookie.expires ? `"${cookie.expires}"` : ""}
|
|
35
34
|
max_age: ${cookie.maxAge || ""}
|
|
36
35
|
created_at: ${cookie.creation}
|
|
37
|
-
accessed_at: ${cookie.lastAccessed}
|
|
38
|
-
}).join("\n");
|
|
36
|
+
accessed_at: ${cookie.lastAccessed}`).join("\n");
|
|
39
37
|
}
|
|
40
38
|
class AppleFastlane extends BaseCommand {
|
|
41
39
|
static args = {
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
file: Args.string({ description: "Path where the fastlane session will be written", required: true }),
|
|
41
|
+
username: Args.string({ description: "Your Apple email address", required: true })
|
|
44
42
|
};
|
|
45
43
|
static description = "Output a fastlane session file which can be used with xcodes";
|
|
46
44
|
static examples = [
|
|
@@ -52,7 +50,7 @@ class AppleFastlane extends BaseCommand {
|
|
|
52
50
|
};
|
|
53
51
|
async run() {
|
|
54
52
|
const { args } = this;
|
|
55
|
-
const {
|
|
53
|
+
const { file, username } = args;
|
|
56
54
|
const homeDirectory = this.config.home;
|
|
57
55
|
const inputFilePath = path.join(homeDirectory, ".app-store", "auth", username, "cookie");
|
|
58
56
|
if (!fs__default.existsSync(inputFilePath)) {
|
|
@@ -62,7 +60,7 @@ class AppleFastlane extends BaseCommand {
|
|
|
62
60
|
throw new Error(`The file ${file} already exists. Use --force to overwrite it.`);
|
|
63
61
|
}
|
|
64
62
|
const outputFilePath = file;
|
|
65
|
-
const fileContent = await promises.readFile(inputFilePath, "
|
|
63
|
+
const fileContent = await promises.readFile(inputFilePath, "utf8");
|
|
66
64
|
const cookieData = JSON.parse(fileContent);
|
|
67
65
|
const yamlContent = generateFastlaneSession(cookieData);
|
|
68
66
|
await promises.mkdir(path.dirname(outputFilePath), { recursive: true });
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
+
import fs__default from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
1
3
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { V as BaseCommand } from '../../index-
|
|
4
|
+
import require$$0 from 'fs';
|
|
5
|
+
import require$$1 from 'path';
|
|
6
|
+
import { V as BaseCommand } from '../../index-BhhiXbey.js';
|
|
5
7
|
import CustomHelp from '../../utils/help.js';
|
|
6
|
-
import '@expo/apple-utils/build/index.js';
|
|
7
8
|
import 'axios';
|
|
8
9
|
import 'crypto-js';
|
|
9
10
|
import 'uuid';
|
|
10
11
|
import 'luxon';
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
12
|
+
import '@expo/apple-utils/build/index.js';
|
|
13
|
+
import 'node:crypto';
|
|
13
14
|
import 'node:readline';
|
|
14
|
-
import 'node:path';
|
|
15
15
|
import 'node:url';
|
|
16
|
+
import 'readline-sync';
|
|
16
17
|
import 'isomorphic-git';
|
|
17
|
-
import 'ini';
|
|
18
18
|
import 'deepmerge';
|
|
19
|
-
import '
|
|
19
|
+
import 'ini';
|
|
20
20
|
import '@tanstack/react-query';
|
|
21
|
+
import 'react';
|
|
21
22
|
import 'fast-glob';
|
|
22
23
|
import 'yazl';
|
|
23
24
|
import 'socket.io-client';
|
|
25
|
+
import 'fullscreen-ink';
|
|
24
26
|
|
|
25
27
|
function getDefaultExportFromCjs (x) {
|
|
26
28
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -184,8 +186,8 @@ function requireEjs () {
|
|
|
184
186
|
* @project EJS
|
|
185
187
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
186
188
|
*/
|
|
187
|
-
var fs =
|
|
188
|
-
var path
|
|
189
|
+
var fs = require$$0;
|
|
190
|
+
var path = require$$1;
|
|
189
191
|
var utils = requireUtils();
|
|
190
192
|
var scopeOptionWarned = false;
|
|
191
193
|
var _VERSION_STRING = require$$3.version;
|
|
@@ -216,9 +218,9 @@ function requireEjs () {
|
|
|
216
218
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
217
219
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
218
220
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
219
|
-
var dirname = path
|
|
220
|
-
var extname = path
|
|
221
|
-
var resolve = path
|
|
221
|
+
var dirname = path.dirname;
|
|
222
|
+
var extname = path.extname;
|
|
223
|
+
var resolve = path.resolve;
|
|
222
224
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
|
223
225
|
var ext = extname(name);
|
|
224
226
|
if (!ext) {
|
|
@@ -570,7 +572,7 @@ function requireEjs () {
|
|
|
570
572
|
};
|
|
571
573
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
572
574
|
var filename = opts.filename;
|
|
573
|
-
var basename = path
|
|
575
|
+
var basename = path.basename(filename, path.extname(filename));
|
|
574
576
|
try {
|
|
575
577
|
Object.defineProperty(returnedFn, "name", {
|
|
576
578
|
value: basename,
|
|
@@ -806,16 +808,16 @@ const COMMAND_TEMPLATE_INCLUDE = `
|
|
|
806
808
|
\`\`\`
|
|
807
809
|
`.trim();
|
|
808
810
|
function getTopicTree(topics, commands, separateFileDepth) {
|
|
809
|
-
const commandIds = commands.map((command) => command.id);
|
|
811
|
+
const commandIds = new Set(commands.map((command) => command.id));
|
|
810
812
|
const nonInternalTopics = topics.filter((topic) => topic.name !== "internal");
|
|
811
|
-
const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.
|
|
812
|
-
|
|
813
|
+
const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.has(topic.name));
|
|
814
|
+
const topicTree = {
|
|
813
815
|
[ROOT_TOPIC_NAME]: {
|
|
816
|
+
commands: [],
|
|
814
817
|
filePath: ROOT_TOPIC_FILENAME,
|
|
815
|
-
|
|
818
|
+
includeTopicsAndCommands: separateFileDepth === 0,
|
|
816
819
|
subTopics: [],
|
|
817
|
-
|
|
818
|
-
includeTopicsAndCommands: separateFileDepth === 0
|
|
820
|
+
topic: { description: ROOT_TOPIC_DESCRIPTION, name: ROOT_TOPIC_NAME }
|
|
819
821
|
}
|
|
820
822
|
};
|
|
821
823
|
const topicsByName = Object.fromEntries(topics.map((topic) => [topic.name, topic]));
|
|
@@ -825,20 +827,20 @@ function getTopicTree(topics, commands, separateFileDepth) {
|
|
|
825
827
|
for (let i = 0; i < topicPath.length; i++) {
|
|
826
828
|
const name = topicPath.slice(0, i + 1).join(":");
|
|
827
829
|
const subTopic = currentParent.subTopics.find((subTopic2) => subTopic2.topic.name === name);
|
|
828
|
-
if (
|
|
830
|
+
if (subTopic) {
|
|
831
|
+
currentParent = subTopic;
|
|
832
|
+
} else {
|
|
829
833
|
const currentDepth = i + 1;
|
|
830
834
|
const includeTopicsAndCommands = currentParent.includeTopicsAndCommands || currentDepth >= separateFileDepth;
|
|
831
835
|
const newSubTopic = {
|
|
832
|
-
topic: topicsByName[name],
|
|
833
|
-
subTopics: [],
|
|
834
836
|
commands: [],
|
|
835
837
|
filePath: `${path.join(...name.split(":"))}.md`,
|
|
836
|
-
includeTopicsAndCommands
|
|
838
|
+
includeTopicsAndCommands,
|
|
839
|
+
subTopics: [],
|
|
840
|
+
topic: topicsByName[name]
|
|
837
841
|
};
|
|
838
842
|
currentParent.subTopics.push(newSubTopic);
|
|
839
843
|
currentParent = newSubTopic;
|
|
840
|
-
} else {
|
|
841
|
-
currentParent = subTopic;
|
|
842
844
|
}
|
|
843
845
|
}
|
|
844
846
|
}
|
|
@@ -861,11 +863,11 @@ function renderTopic(readmeTopic, config) {
|
|
|
861
863
|
const renderedCommands = readmeTopic.commands.map((readmeCommand) => renderCommand(readmeCommand, config));
|
|
862
864
|
const topicTemplate = readmeTopic.includeTopicsAndCommands ? TOPIC_TEMPLATE_INCLUDE : TOPIC_TEMPLATE;
|
|
863
865
|
const rendered = ejs.render(topicTemplate, {
|
|
864
|
-
|
|
866
|
+
commands: renderedCommands,
|
|
865
867
|
subTopics: renderedSubTopics,
|
|
866
|
-
|
|
868
|
+
topic: readmeTopic.topic
|
|
867
869
|
});
|
|
868
|
-
return { ...readmeTopic,
|
|
870
|
+
return { ...readmeTopic, commands: renderedCommands, rendered, subTopics: renderedSubTopics };
|
|
869
871
|
}
|
|
870
872
|
function renderCommand(readmeCommand, config) {
|
|
871
873
|
const columns = Number.parseInt(process.env.COLUMNS, 10) || 120;
|
|
@@ -910,15 +912,15 @@ class InternalReadme extends BaseCommand {
|
|
|
910
912
|
static description = "Generate the readme files for the commands";
|
|
911
913
|
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
912
914
|
static flags = {
|
|
915
|
+
depth: Flags.integer({ char: "d", description: "The depth of the topic tree to render as separate files" }),
|
|
913
916
|
// By default do nothing
|
|
914
917
|
notDryRun: Flags.boolean({ char: "n", description: "Set to actually write the files (will not overwrite)" }),
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
only: Flags.string({ char: "l", description: "Glob pattern - will only write the files which match" })
|
|
918
|
+
only: Flags.string({ char: "l", description: "Glob pattern - will only write the files which match" }),
|
|
919
|
+
overWrite: Flags.boolean({ char: "o", description: "Overwrite existing files" })
|
|
918
920
|
};
|
|
919
921
|
async run() {
|
|
920
922
|
const { outputDir } = this.args;
|
|
921
|
-
const {
|
|
923
|
+
const { depth, notDryRun, only, overWrite } = this.flags;
|
|
922
924
|
const dryRun = !notDryRun;
|
|
923
925
|
const { commands, topics } = this.config;
|
|
924
926
|
const topicTree = getTopicTree(topics, commands, depth || 0);
|
|
@@ -927,10 +929,10 @@ class InternalReadme extends BaseCommand {
|
|
|
927
929
|
const writeOutput = writeTopic(renderedTopicTree, outputDir, dryRun, overWrite, only);
|
|
928
930
|
if (writeOutput.created.length > 0)
|
|
929
931
|
console.log(dryRun ? "Would create the following files:" : "Created the following files:");
|
|
930
|
-
writeOutput.created
|
|
932
|
+
for (const file of writeOutput.created) console.log(`- ${file}`);
|
|
931
933
|
if (writeOutput.overwritten.length > 0)
|
|
932
934
|
console.log(notDryRun && overWrite ? "Overwritten the following files:" : "Would overwrite the following files:");
|
|
933
|
-
writeOutput.overwritten
|
|
935
|
+
for (const file of writeOutput.overwritten) console.log(`- ${file}`);
|
|
934
936
|
}
|
|
935
937
|
}
|
|
936
938
|
|
package/dist/commands/login.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
1
|
import { Flags } from '@oclif/core';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
import 'fs';
|
|
7
|
-
import '@expo/apple-utils/build/index.js';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { W as WEB_URL, V as BaseCommand, o as API_URL, Y as setAuthToken, Z as acceptTerms } from '../index-BhhiXbey.js';
|
|
4
|
+
import { a as getInput } from '../index-CGBdOm1q.js';
|
|
5
|
+
import 'node:fs';
|
|
8
6
|
import 'crypto-js';
|
|
9
7
|
import 'uuid';
|
|
10
8
|
import 'luxon';
|
|
11
|
-
import 'crypto';
|
|
12
|
-
import 'readline-sync';
|
|
13
|
-
import 'node:readline';
|
|
14
9
|
import 'node:path';
|
|
10
|
+
import '@expo/apple-utils/build/index.js';
|
|
11
|
+
import 'node:crypto';
|
|
12
|
+
import 'node:readline';
|
|
15
13
|
import 'node:url';
|
|
14
|
+
import 'readline-sync';
|
|
16
15
|
import 'isomorphic-git';
|
|
17
|
-
import 'ini';
|
|
18
16
|
import 'deepmerge';
|
|
19
|
-
import '
|
|
17
|
+
import 'ini';
|
|
20
18
|
import '@tanstack/react-query';
|
|
19
|
+
import 'react';
|
|
21
20
|
import 'fast-glob';
|
|
22
21
|
import 'yazl';
|
|
23
22
|
import 'socket.io-client';
|
|
23
|
+
import 'fullscreen-ink';
|
|
24
24
|
|
|
25
25
|
const TERMS_URL = new URL("/terms", WEB_URL).href;
|
|
26
26
|
const PRIVACY_URL = new URL("/privacy", WEB_URL).href;
|
|
@@ -32,11 +32,11 @@ class Login extends BaseCommand {
|
|
|
32
32
|
"<%= config.bin %> <%= command.id %> --force --email me@email.nowhere"
|
|
33
33
|
];
|
|
34
34
|
static flags = {
|
|
35
|
-
force: Flags.boolean({ char: "f" }),
|
|
36
35
|
email: Flags.string({
|
|
37
36
|
char: "e",
|
|
38
37
|
description: "Your email address"
|
|
39
|
-
})
|
|
38
|
+
}),
|
|
39
|
+
force: Flags.boolean({ char: "f" })
|
|
40
40
|
};
|
|
41
41
|
async run() {
|
|
42
42
|
const { flags } = this;
|
|
@@ -74,7 +74,7 @@ ${[
|
|
|
74
74
|
`
|
|
75
75
|
);
|
|
76
76
|
const accepted = await getInput("Do you accept the terms of these documents? (yes/no): ");
|
|
77
|
-
const answer = accepted.toLowerCase().trim().
|
|
77
|
+
const answer = accepted.toLowerCase().trim().slice(0, 1);
|
|
78
78
|
return answer === "y";
|
|
79
79
|
};
|
|
80
80
|
await this.setAuthConfig({ shipThisUser });
|
package/dist/commands/status.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { render } from 'ink';
|
|
3
|
-
import { V as BaseCommand, j as isCWDGodotGame } from '../index-
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../index-BTAL7EB_.js';
|
|
3
|
+
import { V as BaseCommand, j as isCWDGodotGame } from '../index-BhhiXbey.js';
|
|
6
4
|
import 'ink-spinner';
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
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';
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'node:fs';
|
|
18
7
|
import 'node:path';
|
|
8
|
+
import 'node:readline';
|
|
19
9
|
import 'node:url';
|
|
20
|
-
import
|
|
10
|
+
import 'readline-sync';
|
|
11
|
+
import 'luxon';
|
|
12
|
+
import 'axios';
|
|
13
|
+
import { i as isCWDGitRepo } from '../git-BpsfNFZ_.js';
|
|
21
14
|
import '@oclif/core';
|
|
15
|
+
import '@tanstack/react-query';
|
|
16
|
+
import 'react';
|
|
17
|
+
import 'crypto-js';
|
|
18
|
+
import 'uuid';
|
|
22
19
|
import 'fast-glob';
|
|
20
|
+
import 'yazl';
|
|
23
21
|
import 'socket.io-client';
|
|
22
|
+
import 'fullscreen-ink';
|
|
23
|
+
import 'string-length';
|
|
24
|
+
import 'strip-ansi';
|
|
25
|
+
import { S as StatusTable } from '../StatusTable-DzRWcMr4.js';
|
|
24
26
|
import 'open';
|
|
27
|
+
import '@inkjs/ui';
|
|
25
28
|
import 'marked';
|
|
26
29
|
import 'marked-terminal';
|
|
27
|
-
import '
|
|
28
|
-
import { N as NextSteps } from '../NextSteps-CK9zHOCt.js';
|
|
30
|
+
import { N as NextSteps } from '../NextSteps-DbJHmscQ.js';
|
|
29
31
|
import 'qrcode';
|
|
30
|
-
import
|
|
31
|
-
import '
|
|
32
|
-
import 'strip-ansi';
|
|
33
|
-
import { C as Command } from '../Command-1p5alCz3.js';
|
|
32
|
+
import '../index-C66Dd8Xc.js';
|
|
33
|
+
import { C as Command } from '../Command-WPpmLPkL.js';
|
|
34
34
|
import '@expo/apple-utils/build/index.js';
|
|
35
35
|
import 'isomorphic-git';
|
|
36
|
-
import 'ini';
|
|
37
36
|
import 'deepmerge';
|
|
38
|
-
import '
|
|
39
|
-
import '../useAndroidServiceAccountTestResult-CJLIEYmA.js';
|
|
37
|
+
import 'ini';
|
|
40
38
|
import '../Title-BCQtayg6.js';
|
|
39
|
+
import '../index-CGBdOm1q.js';
|
|
40
|
+
import '../useAndroidServiceAccountTestResult-DZk5SMxI.js';
|
|
41
41
|
|
|
42
42
|
class Status extends BaseCommand {
|
|
43
43
|
static args = {};
|
|
@@ -46,23 +46,24 @@ class Status extends BaseCommand {
|
|
|
46
46
|
static flags = {};
|
|
47
47
|
async run() {
|
|
48
48
|
const authConfig = await this.getAuthConfig();
|
|
49
|
-
const isLoggedIn =
|
|
49
|
+
const isLoggedIn = Boolean(authConfig.shipThisUser);
|
|
50
50
|
const isGodotGame = isCWDGodotGame();
|
|
51
51
|
const isShipThisConfigured = await this.hasProjectConfig();
|
|
52
52
|
const isGitRepo = await isCWDGitRepo();
|
|
53
53
|
let steps = [];
|
|
54
|
-
if (!isLoggedIn) steps.push("
|
|
54
|
+
if (!isLoggedIn) steps.push("shipthis login --email my.email@address.nowhere");
|
|
55
55
|
if (!isGodotGame) steps.push("Run this command in a Godot project directory");
|
|
56
|
-
if (!isShipThisConfigured) steps.push("
|
|
57
|
-
|
|
56
|
+
if (!isShipThisConfigured) steps.push("shipthis game wizard");
|
|
57
|
+
const exitCode = steps.length > 0 ? 1 : 0;
|
|
58
|
+
if (steps.length === 0) steps = ["shipthis game status"];
|
|
58
59
|
const statusProps = {
|
|
59
|
-
title: "Status",
|
|
60
60
|
statuses: {
|
|
61
|
-
"
|
|
61
|
+
"Git repository detected (not required)": isGitRepo,
|
|
62
62
|
"Godot project detected": isGodotGame,
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
}
|
|
63
|
+
"Logged in": isLoggedIn,
|
|
64
|
+
"ShipThis project configured": isShipThisConfigured
|
|
65
|
+
},
|
|
66
|
+
title: "Status"
|
|
66
67
|
};
|
|
67
68
|
render(
|
|
68
69
|
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
@@ -70,6 +71,7 @@ class Status extends BaseCommand {
|
|
|
70
71
|
/* @__PURE__ */ jsx(NextSteps, { steps })
|
|
71
72
|
] })
|
|
72
73
|
);
|
|
74
|
+
return process.exit(exitCode);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
1
2
|
import axios from 'axios';
|
|
2
|
-
import
|
|
3
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-DxzXU9Hd.js';
|
|
3
|
+
import { o as API_URL, p as getAuthedHeaders } from './index-BhhiXbey.js';
|
|
4
4
|
|
|
5
|
-
async function exportCredential({
|
|
5
|
+
async function exportCredential({ credentialId, projectId, zipPath }) {
|
|
6
6
|
const headers = getAuthedHeaders();
|
|
7
7
|
const url = projectId ? `${API_URL}/projects/${projectId}/credentials/${credentialId}/export` : `${API_URL}/credentials/${credentialId}/export`;
|
|
8
8
|
const { data } = await axios.post(
|
|
@@ -16,9 +16,9 @@ async function exportCredential({ zipPath, credentialId, projectId }) {
|
|
|
16
16
|
}
|
|
17
17
|
async function downloadFile(url, destination) {
|
|
18
18
|
const response = await axios({
|
|
19
|
-
url,
|
|
20
19
|
method: "GET",
|
|
21
|
-
responseType: "stream"
|
|
20
|
+
responseType: "stream",
|
|
21
|
+
url
|
|
22
22
|
});
|
|
23
23
|
return new Promise((resolve, reject) => {
|
|
24
24
|
const file = fs.createWriteStream(destination);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { promises } from 'node:fs';
|
|
1
2
|
import git from 'isomorphic-git';
|
|
2
|
-
import { promises } from 'fs';
|
|
3
3
|
|
|
4
4
|
async function isCWDGitRepo() {
|
|
5
5
|
const dir = process.cwd();
|
|
6
6
|
try {
|
|
7
|
-
await git.log({
|
|
7
|
+
await git.log({ depth: 1, dir, fs: promises });
|
|
8
8
|
return true;
|
|
9
|
-
} catch
|
|
9
|
+
} catch {
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -14,17 +14,17 @@ async function getCWDGitInfo() {
|
|
|
14
14
|
const dir = process.cwd();
|
|
15
15
|
const empty = {};
|
|
16
16
|
try {
|
|
17
|
-
const commits = await git.log({
|
|
17
|
+
const commits = await git.log({ depth: 1, dir, fs: promises });
|
|
18
18
|
const branch = await git.currentBranch({
|
|
19
|
-
fs: promises,
|
|
20
19
|
dir,
|
|
20
|
+
fs: promises,
|
|
21
21
|
fullname: false
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
gitBranch: branch,
|
|
25
|
+
gitCommitHash: commits[0].oid
|
|
26
26
|
};
|
|
27
|
-
} catch
|
|
27
|
+
} catch {
|
|
28
28
|
return empty;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
+
import { promises } from 'node:fs';
|
|
1
2
|
import axios from 'axios';
|
|
2
|
-
import {
|
|
3
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-DxzXU9Hd.js';
|
|
3
|
+
import { o as API_URL, p as getAuthedHeaders } from './index-BhhiXbey.js';
|
|
4
4
|
|
|
5
5
|
async function getNewImportTicket(projectId) {
|
|
6
6
|
const url = projectId ? `${API_URL}/projects/${projectId}/credentials/import/url` : `${API_URL}/credentials/import/url`;
|
|
7
7
|
const headers = getAuthedHeaders();
|
|
8
8
|
const { data: importInfo } = await axios({
|
|
9
|
+
headers,
|
|
9
10
|
method: "post",
|
|
10
|
-
url
|
|
11
|
-
headers
|
|
11
|
+
url
|
|
12
12
|
});
|
|
13
13
|
return importInfo;
|
|
14
14
|
}
|
|
15
15
|
async function importCredential({
|
|
16
|
+
platform,
|
|
16
17
|
projectId,
|
|
17
|
-
zipPath,
|
|
18
18
|
type,
|
|
19
|
-
|
|
19
|
+
zipPath
|
|
20
20
|
}) {
|
|
21
21
|
const importTicket = await getNewImportTicket(projectId);
|
|
22
22
|
const zipBuffer = await promises.readFile(zipPath);
|
|
23
23
|
await axios.put(importTicket.url, zipBuffer, {
|
|
24
24
|
headers: {
|
|
25
|
-
"Content-
|
|
26
|
-
"Content-
|
|
25
|
+
"Content-Type": "application/zip",
|
|
26
|
+
"Content-length": zipBuffer.length
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
const headers = getAuthedHeaders();
|
|
30
30
|
const url = projectId ? `${API_URL}/projects/${projectId}/credentials/import` : `${API_URL}/credentials/import`;
|
|
31
31
|
const { data: publicCredential } = await axios({
|
|
32
|
-
method: "post",
|
|
33
|
-
url,
|
|
34
|
-
headers,
|
|
35
32
|
data: {
|
|
36
|
-
|
|
33
|
+
platform,
|
|
37
34
|
type,
|
|
38
|
-
|
|
39
|
-
}
|
|
35
|
+
uuid: importTicket.uuid
|
|
36
|
+
},
|
|
37
|
+
headers,
|
|
38
|
+
method: "post",
|
|
39
|
+
url
|
|
40
40
|
});
|
|
41
41
|
if (projectId) {
|
|
42
42
|
return publicCredential;
|