shipthis 0.1.31 → 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/dist/{AppleBundleIdDetails-eoK5F8Qn.js → AppleBundleIdDetails-6H3cNWxw.js} +17 -19
- package/dist/Command-WPpmLPkL.js +29 -0
- package/dist/CommandGame-cxzWG4nT.js +7 -0
- package/dist/{Create-ISdroJ3G.js → Create-3Ob8sjik.js} +20 -20
- package/dist/GameStatus-BQEtVKvv.js +137 -0
- package/dist/{Import-CfThJF6k.js → Import-CFuPDI0K.js} +33 -35
- package/dist/{JobLogTail-BWzbQBZz.js → JobLogTail-0CBLoG8N.js} +53 -52
- package/dist/{JobProgress-DjIkuk5U.js → JobProgress-lKqVT88m.js} +35 -36
- package/dist/{JobStatusTable-CEqWU73q.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-u9ruZ9mN.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-Q7u9M-ap.js → UserCredentialsTable-3W3qesh7.js} +18 -19
- package/dist/{baseAppleCommand-zhkGlKq0.js → baseAppleCommand-BGV088--.js} +1 -1
- package/dist/{baseGameAndroidCommand-DJ-cMLa_.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 -16
- package/dist/commands/apple/status.js +27 -27
- package/dist/commands/dashboard.js +10 -11
- 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 -15
- 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 -16
- package/dist/commands/game/details.js +35 -36
- package/dist/commands/game/export.js +12 -13
- 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 +37 -39
- package/dist/commands/game/ship.js +73 -71
- package/dist/commands/game/status.js +38 -85
- package/dist/commands/game/wizard.js +250 -239
- package/dist/commands/internal/fastlane.js +15 -18
- package/dist/commands/internal/readme.js +38 -37
- package/dist/commands/login.js +14 -15
- package/dist/commands/status.js +32 -30
- package/dist/{export-DZxo2_e_.js → export-CXsVPXA1.js} +5 -5
- package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
- package/dist/{import-8pL1AF47.js → import-DGvG5REx.js} +14 -14
- package/dist/{index-w3lHxk5O.js → index-BhhiXbey.js} +240 -224
- package/dist/{index-BHh0BZvD.js → index-C03TV1_J.js} +37 -55
- package/dist/{index-CyvGh-kt.js → index-C66Dd8Xc.js} +77 -87
- package/dist/{index-DJ078v-U.js → index-CGBdOm1q.js} +43 -28
- package/dist/{index-DKQjnJrC.js → index-CS9Gwcb0.js} +41 -43
- package/dist/{index-C6aAyrXW.js → index-CtTI85m-.js} +6 -6
- package/dist/{upload-BTpxj3QP.js → upload-8y5MQEm9.js} +22 -22
- package/dist/{useAndroidServiceAccountTestResult-Dy3Ag7_r.js → useAndroidServiceAccountTestResult-DZk5SMxI.js} +11 -13
- package/dist/{useAppleApp-h1Ogi_qc.js → useAppleApp-DWYGURwU.js} +4 -4
- package/dist/{useAppleBundleId-B3TTNap0.js → useAppleBundleId-PsTJ2g1B.js} +6 -6
- package/dist/{useProjectCredentials-DpeXZcHP.js → useProjectCredentials-BEphqa18.js} +10 -12
- package/dist/{useWebSocket-gyuCsore.js → useWebSocket-5PYa2QER.js} +1 -1
- package/dist/utils/help.js +4 -4
- package/package.json +4 -3
- package/dist/Command-DFdHXDiU.js +0 -44
- package/dist/CommandGame-Dif-oSky.js +0 -9
- package/dist/{RunWithSpinner-BVXNWGD3.js → RunWithSpinner-gMVA07bZ.js} +2 -2
|
@@ -1,30 +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 {
|
|
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';
|
|
23
|
-
import 'ink';
|
|
22
|
+
import 'fullscreen-ink';
|
|
24
23
|
|
|
25
24
|
function generateFastlaneSession(cookieData) {
|
|
26
|
-
return cookieData.cookies.map((cookie) =>
|
|
27
|
-
return `- !ruby/object:HTTP::Cookie
|
|
25
|
+
return cookieData.cookies.map((cookie) => `- !ruby/object:HTTP::Cookie
|
|
28
26
|
name: ${cookie.key}
|
|
29
27
|
value: ${cookie.value}
|
|
30
28
|
domain: ${cookie.domain}
|
|
@@ -35,13 +33,12 @@ function generateFastlaneSession(cookieData) {
|
|
|
35
33
|
expires: ${cookie.expires ? `"${cookie.expires}"` : ""}
|
|
36
34
|
max_age: ${cookie.maxAge || ""}
|
|
37
35
|
created_at: ${cookie.creation}
|
|
38
|
-
accessed_at: ${cookie.lastAccessed}
|
|
39
|
-
}).join("\n");
|
|
36
|
+
accessed_at: ${cookie.lastAccessed}`).join("\n");
|
|
40
37
|
}
|
|
41
38
|
class AppleFastlane extends BaseCommand {
|
|
42
39
|
static args = {
|
|
43
|
-
|
|
44
|
-
|
|
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 })
|
|
45
42
|
};
|
|
46
43
|
static description = "Output a fastlane session file which can be used with xcodes";
|
|
47
44
|
static examples = [
|
|
@@ -53,7 +50,7 @@ class AppleFastlane extends BaseCommand {
|
|
|
53
50
|
};
|
|
54
51
|
async run() {
|
|
55
52
|
const { args } = this;
|
|
56
|
-
const {
|
|
53
|
+
const { file, username } = args;
|
|
57
54
|
const homeDirectory = this.config.home;
|
|
58
55
|
const inputFilePath = path.join(homeDirectory, ".app-store", "auth", username, "cookie");
|
|
59
56
|
if (!fs__default.existsSync(inputFilePath)) {
|
|
@@ -63,7 +60,7 @@ class AppleFastlane extends BaseCommand {
|
|
|
63
60
|
throw new Error(`The file ${file} already exists. Use --force to overwrite it.`);
|
|
64
61
|
}
|
|
65
62
|
const outputFilePath = file;
|
|
66
|
-
const fileContent = await promises.readFile(inputFilePath, "
|
|
63
|
+
const fileContent = await promises.readFile(inputFilePath, "utf8");
|
|
67
64
|
const cookieData = JSON.parse(fileContent);
|
|
68
65
|
const yamlContent = generateFastlaneSession(cookieData);
|
|
69
66
|
await promises.mkdir(path.dirname(outputFilePath), { recursive: true });
|
|
@@ -1,27 +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 {
|
|
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';
|
|
24
|
-
import 'ink';
|
|
25
|
+
import 'fullscreen-ink';
|
|
25
26
|
|
|
26
27
|
function getDefaultExportFromCjs (x) {
|
|
27
28
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -185,8 +186,8 @@ function requireEjs () {
|
|
|
185
186
|
* @project EJS
|
|
186
187
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
187
188
|
*/
|
|
188
|
-
var fs =
|
|
189
|
-
var path
|
|
189
|
+
var fs = require$$0;
|
|
190
|
+
var path = require$$1;
|
|
190
191
|
var utils = requireUtils();
|
|
191
192
|
var scopeOptionWarned = false;
|
|
192
193
|
var _VERSION_STRING = require$$3.version;
|
|
@@ -217,9 +218,9 @@ function requireEjs () {
|
|
|
217
218
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
218
219
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
219
220
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
220
|
-
var dirname = path
|
|
221
|
-
var extname = path
|
|
222
|
-
var resolve = path
|
|
221
|
+
var dirname = path.dirname;
|
|
222
|
+
var extname = path.extname;
|
|
223
|
+
var resolve = path.resolve;
|
|
223
224
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
|
224
225
|
var ext = extname(name);
|
|
225
226
|
if (!ext) {
|
|
@@ -571,7 +572,7 @@ function requireEjs () {
|
|
|
571
572
|
};
|
|
572
573
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
573
574
|
var filename = opts.filename;
|
|
574
|
-
var basename = path
|
|
575
|
+
var basename = path.basename(filename, path.extname(filename));
|
|
575
576
|
try {
|
|
576
577
|
Object.defineProperty(returnedFn, "name", {
|
|
577
578
|
value: basename,
|
|
@@ -807,16 +808,16 @@ const COMMAND_TEMPLATE_INCLUDE = `
|
|
|
807
808
|
\`\`\`
|
|
808
809
|
`.trim();
|
|
809
810
|
function getTopicTree(topics, commands, separateFileDepth) {
|
|
810
|
-
const commandIds = commands.map((command) => command.id);
|
|
811
|
+
const commandIds = new Set(commands.map((command) => command.id));
|
|
811
812
|
const nonInternalTopics = topics.filter((topic) => topic.name !== "internal");
|
|
812
|
-
const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.
|
|
813
|
-
|
|
813
|
+
const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.has(topic.name));
|
|
814
|
+
const topicTree = {
|
|
814
815
|
[ROOT_TOPIC_NAME]: {
|
|
816
|
+
commands: [],
|
|
815
817
|
filePath: ROOT_TOPIC_FILENAME,
|
|
816
|
-
|
|
818
|
+
includeTopicsAndCommands: separateFileDepth === 0,
|
|
817
819
|
subTopics: [],
|
|
818
|
-
|
|
819
|
-
includeTopicsAndCommands: separateFileDepth === 0
|
|
820
|
+
topic: { description: ROOT_TOPIC_DESCRIPTION, name: ROOT_TOPIC_NAME }
|
|
820
821
|
}
|
|
821
822
|
};
|
|
822
823
|
const topicsByName = Object.fromEntries(topics.map((topic) => [topic.name, topic]));
|
|
@@ -826,20 +827,20 @@ function getTopicTree(topics, commands, separateFileDepth) {
|
|
|
826
827
|
for (let i = 0; i < topicPath.length; i++) {
|
|
827
828
|
const name = topicPath.slice(0, i + 1).join(":");
|
|
828
829
|
const subTopic = currentParent.subTopics.find((subTopic2) => subTopic2.topic.name === name);
|
|
829
|
-
if (
|
|
830
|
+
if (subTopic) {
|
|
831
|
+
currentParent = subTopic;
|
|
832
|
+
} else {
|
|
830
833
|
const currentDepth = i + 1;
|
|
831
834
|
const includeTopicsAndCommands = currentParent.includeTopicsAndCommands || currentDepth >= separateFileDepth;
|
|
832
835
|
const newSubTopic = {
|
|
833
|
-
topic: topicsByName[name],
|
|
834
|
-
subTopics: [],
|
|
835
836
|
commands: [],
|
|
836
837
|
filePath: `${path.join(...name.split(":"))}.md`,
|
|
837
|
-
includeTopicsAndCommands
|
|
838
|
+
includeTopicsAndCommands,
|
|
839
|
+
subTopics: [],
|
|
840
|
+
topic: topicsByName[name]
|
|
838
841
|
};
|
|
839
842
|
currentParent.subTopics.push(newSubTopic);
|
|
840
843
|
currentParent = newSubTopic;
|
|
841
|
-
} else {
|
|
842
|
-
currentParent = subTopic;
|
|
843
844
|
}
|
|
844
845
|
}
|
|
845
846
|
}
|
|
@@ -862,11 +863,11 @@ function renderTopic(readmeTopic, config) {
|
|
|
862
863
|
const renderedCommands = readmeTopic.commands.map((readmeCommand) => renderCommand(readmeCommand, config));
|
|
863
864
|
const topicTemplate = readmeTopic.includeTopicsAndCommands ? TOPIC_TEMPLATE_INCLUDE : TOPIC_TEMPLATE;
|
|
864
865
|
const rendered = ejs.render(topicTemplate, {
|
|
865
|
-
|
|
866
|
+
commands: renderedCommands,
|
|
866
867
|
subTopics: renderedSubTopics,
|
|
867
|
-
|
|
868
|
+
topic: readmeTopic.topic
|
|
868
869
|
});
|
|
869
|
-
return { ...readmeTopic,
|
|
870
|
+
return { ...readmeTopic, commands: renderedCommands, rendered, subTopics: renderedSubTopics };
|
|
870
871
|
}
|
|
871
872
|
function renderCommand(readmeCommand, config) {
|
|
872
873
|
const columns = Number.parseInt(process.env.COLUMNS, 10) || 120;
|
|
@@ -911,15 +912,15 @@ class InternalReadme extends BaseCommand {
|
|
|
911
912
|
static description = "Generate the readme files for the commands";
|
|
912
913
|
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
913
914
|
static flags = {
|
|
915
|
+
depth: Flags.integer({ char: "d", description: "The depth of the topic tree to render as separate files" }),
|
|
914
916
|
// By default do nothing
|
|
915
917
|
notDryRun: Flags.boolean({ char: "n", description: "Set to actually write the files (will not overwrite)" }),
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
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" })
|
|
919
920
|
};
|
|
920
921
|
async run() {
|
|
921
922
|
const { outputDir } = this.args;
|
|
922
|
-
const {
|
|
923
|
+
const { depth, notDryRun, only, overWrite } = this.flags;
|
|
923
924
|
const dryRun = !notDryRun;
|
|
924
925
|
const { commands, topics } = this.config;
|
|
925
926
|
const topicTree = getTopicTree(topics, commands, depth || 0);
|
|
@@ -928,10 +929,10 @@ class InternalReadme extends BaseCommand {
|
|
|
928
929
|
const writeOutput = writeTopic(renderedTopicTree, outputDir, dryRun, overWrite, only);
|
|
929
930
|
if (writeOutput.created.length > 0)
|
|
930
931
|
console.log(dryRun ? "Would create the following files:" : "Created the following files:");
|
|
931
|
-
writeOutput.created
|
|
932
|
+
for (const file of writeOutput.created) console.log(`- ${file}`);
|
|
932
933
|
if (writeOutput.overwritten.length > 0)
|
|
933
934
|
console.log(notDryRun && overWrite ? "Overwritten the following files:" : "Would overwrite the following files:");
|
|
934
|
-
writeOutput.overwritten
|
|
935
|
+
for (const file of writeOutput.overwritten) console.log(`- ${file}`);
|
|
935
936
|
}
|
|
936
937
|
}
|
|
937
938
|
|
package/dist/commands/login.js
CHANGED
|
@@ -1,27 +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';
|
|
24
|
-
import 'ink';
|
|
23
|
+
import 'fullscreen-ink';
|
|
25
24
|
|
|
26
25
|
const TERMS_URL = new URL("/terms", WEB_URL).href;
|
|
27
26
|
const PRIVACY_URL = new URL("/privacy", WEB_URL).href;
|
|
@@ -33,11 +32,11 @@ class Login extends BaseCommand {
|
|
|
33
32
|
"<%= config.bin %> <%= command.id %> --force --email me@email.nowhere"
|
|
34
33
|
];
|
|
35
34
|
static flags = {
|
|
36
|
-
force: Flags.boolean({ char: "f" }),
|
|
37
35
|
email: Flags.string({
|
|
38
36
|
char: "e",
|
|
39
37
|
description: "Your email address"
|
|
40
|
-
})
|
|
38
|
+
}),
|
|
39
|
+
force: Flags.boolean({ char: "f" })
|
|
41
40
|
};
|
|
42
41
|
async run() {
|
|
43
42
|
const { flags } = this;
|
|
@@ -75,7 +74,7 @@ ${[
|
|
|
75
74
|
`
|
|
76
75
|
);
|
|
77
76
|
const accepted = await getInput("Do you accept the terms of these documents? (yes/no): ");
|
|
78
|
-
const answer = accepted.toLowerCase().trim().
|
|
77
|
+
const answer = accepted.toLowerCase().trim().slice(0, 1);
|
|
79
78
|
return answer === "y";
|
|
80
79
|
};
|
|
81
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 {
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../index-CyvGh-kt.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-DFdHXDiU.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-Dy3Ag7_r.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,7 +46,7 @@ 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();
|
|
@@ -54,15 +54,16 @@ class Status extends BaseCommand {
|
|
|
54
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
56
|
if (!isShipThisConfigured) steps.push("shipthis game wizard");
|
|
57
|
+
const exitCode = steps.length > 0 ? 1 : 0;
|
|
57
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-w3lHxk5O.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-w3lHxk5O.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;
|