shipthis 0.1.31 → 0.1.33
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-BhHPCvRm.js} +17 -19
- package/dist/Command-BDIkuv2g.js +29 -0
- package/dist/CommandGame-CvBIjPZp.js +7 -0
- package/dist/{Create-ISdroJ3G.js → Create-Lpe0B8nT.js} +20 -20
- package/dist/GameStatus-5XpufIY_.js +137 -0
- package/dist/{Import-CfThJF6k.js → Import-DFzrAG04.js} +34 -36
- package/dist/{JobLogTail-BWzbQBZz.js → JobLogTail-BYcJgPcL.js} +53 -52
- package/dist/{JobProgress-DjIkuk5U.js → JobProgress-BcrE7CUK.js} +40 -38
- package/dist/{JobStatusTable-CEqWU73q.js → JobStatusTable-Bi-y8ZZT.js} +14 -13
- package/dist/{NextSteps-CK9zHOCt.js → NextSteps-DbJHmscQ.js} +1 -3
- package/dist/{ProgressSpinner-6pw1T8Iw.js → ProgressSpinner-Um6ARKlk.js} +2 -2
- package/dist/{ProjectCredentialsTable-u9ruZ9mN.js → ProjectCredentialsTable-B4vDJl4l.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-CwkZTFBD.js} +18 -19
- package/dist/{baseAppleCommand-zhkGlKq0.js → baseAppleCommand-BKXweb-U.js} +1 -1
- package/dist/{baseGameAndroidCommand-DJ-cMLa_.js → baseGameAndroidCommand-CAi-BSsH.js} +23 -23
- package/dist/commands/apple/apiKey/create.js +36 -36
- package/dist/commands/apple/apiKey/export.js +27 -27
- package/dist/commands/apple/apiKey/import.js +28 -28
- package/dist/commands/apple/apiKey/status.js +32 -32
- package/dist/commands/apple/certificate/create.js +40 -40
- package/dist/commands/apple/certificate/export.js +27 -27
- package/dist/commands/apple/certificate/import.js +28 -28
- package/dist/commands/apple/certificate/status.js +33 -33
- package/dist/commands/apple/login.js +15 -15
- package/dist/commands/apple/status.js +27 -27
- 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 +29 -29
- package/dist/commands/game/android/apiKey/export.js +30 -30
- package/dist/commands/game/android/apiKey/import.js +32 -32
- package/dist/commands/game/android/apiKey/invite.js +14 -14
- package/dist/commands/game/android/apiKey/status.js +30 -30
- package/dist/commands/game/android/keyStore/create.js +25 -25
- package/dist/commands/game/android/keyStore/export.js +29 -29
- package/dist/commands/game/android/keyStore/import.js +36 -36
- package/dist/commands/game/android/keyStore/status.js +26 -26
- package/dist/commands/game/android/status.js +15 -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 +37 -32
- 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 +32 -32
- package/dist/commands/game/ios/profile/export.js +29 -29
- package/dist/commands/game/ios/profile/import.js +33 -33
- 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 +39 -34
- package/dist/commands/game/job/list.js +34 -34
- package/dist/commands/game/job/status.js +32 -32
- package/dist/commands/game/list.js +38 -40
- package/dist/commands/game/ship.js +81 -77
- package/dist/commands/game/status.js +38 -85
- package/dist/commands/game/wizard.js +253 -242
- 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 +32 -30
- package/dist/{export-DZxo2_e_.js → export-DLQrUEBK.js} +5 -5
- package/dist/{git-DREGq-jc.js → git-BpsfNFZ_.js} +8 -8
- package/dist/{import-8pL1AF47.js → import-BoY5e0uJ.js} +14 -14
- package/dist/{index-DJ078v-U.js → index-B27WJDxn.js} +43 -27
- package/dist/{index-DKQjnJrC.js → index-CisLwc7e.js} +42 -44
- package/dist/{index-C6aAyrXW.js → index-Crv7S0bl.js} +6 -6
- package/dist/{index-BHh0BZvD.js → index-DC0GJtAy.js} +50 -60
- package/dist/{index-CyvGh-kt.js → index-DfUg5j06.js} +93 -92
- package/dist/{index-w3lHxk5O.js → index-pj8JVg5X.js} +242 -225
- package/dist/{upload-BTpxj3QP.js → upload-C8S17EU_.js} +22 -22
- package/dist/{useAndroidServiceAccountTestResult-Dy3Ag7_r.js → useAndroidServiceAccountTestResult-D4e5AKAZ.js} +11 -13
- package/dist/{useAppleApp-h1Ogi_qc.js → useAppleApp-Dr6URQvC.js} +4 -4
- package/dist/{useAppleBundleId-B3TTNap0.js → useAppleBundleId-DELAwSQp.js} +6 -6
- package/dist/{useProjectCredentials-DpeXZcHP.js → useProjectCredentials-BjvdJdQg.js} +10 -12
- package/dist/{useWebSocket-gyuCsore.js → useWebSocket-CRV7V69Q.js} +1 -1
- package/dist/utils/help.js +4 -4
- package/package.json +5 -4
- 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,29 @@
|
|
|
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-pj8JVg5X.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
|
import 'ink';
|
|
24
24
|
|
|
25
25
|
function generateFastlaneSession(cookieData) {
|
|
26
|
-
return cookieData.cookies.map((cookie) =>
|
|
27
|
-
return `- !ruby/object:HTTP::Cookie
|
|
26
|
+
return cookieData.cookies.map((cookie) => `- !ruby/object:HTTP::Cookie
|
|
28
27
|
name: ${cookie.key}
|
|
29
28
|
value: ${cookie.value}
|
|
30
29
|
domain: ${cookie.domain}
|
|
@@ -35,13 +34,12 @@ function generateFastlaneSession(cookieData) {
|
|
|
35
34
|
expires: ${cookie.expires ? `"${cookie.expires}"` : ""}
|
|
36
35
|
max_age: ${cookie.maxAge || ""}
|
|
37
36
|
created_at: ${cookie.creation}
|
|
38
|
-
accessed_at: ${cookie.lastAccessed}
|
|
39
|
-
}).join("\n");
|
|
37
|
+
accessed_at: ${cookie.lastAccessed}`).join("\n");
|
|
40
38
|
}
|
|
41
39
|
class AppleFastlane extends BaseCommand {
|
|
42
40
|
static args = {
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
file: Args.string({ description: "Path where the fastlane session will be written", required: true }),
|
|
42
|
+
username: Args.string({ description: "Your Apple email address", required: true })
|
|
45
43
|
};
|
|
46
44
|
static description = "Output a fastlane session file which can be used with xcodes";
|
|
47
45
|
static examples = [
|
|
@@ -53,7 +51,7 @@ class AppleFastlane extends BaseCommand {
|
|
|
53
51
|
};
|
|
54
52
|
async run() {
|
|
55
53
|
const { args } = this;
|
|
56
|
-
const {
|
|
54
|
+
const { file, username } = args;
|
|
57
55
|
const homeDirectory = this.config.home;
|
|
58
56
|
const inputFilePath = path.join(homeDirectory, ".app-store", "auth", username, "cookie");
|
|
59
57
|
if (!fs__default.existsSync(inputFilePath)) {
|
|
@@ -63,7 +61,7 @@ class AppleFastlane extends BaseCommand {
|
|
|
63
61
|
throw new Error(`The file ${file} already exists. Use --force to overwrite it.`);
|
|
64
62
|
}
|
|
65
63
|
const outputFilePath = file;
|
|
66
|
-
const fileContent = await promises.readFile(inputFilePath, "
|
|
64
|
+
const fileContent = await promises.readFile(inputFilePath, "utf8");
|
|
67
65
|
const cookieData = JSON.parse(fileContent);
|
|
68
66
|
const yamlContent = generateFastlaneSession(cookieData);
|
|
69
67
|
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 {
|
|
4
|
+
import require$$0 from 'fs';
|
|
5
|
+
import require$$1 from 'path';
|
|
6
|
+
import { V as BaseCommand } from '../../index-pj8JVg5X.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
|
import 'ink';
|
|
25
27
|
|
|
26
28
|
function getDefaultExportFromCjs (x) {
|
|
@@ -185,8 +187,8 @@ function requireEjs () {
|
|
|
185
187
|
* @project EJS
|
|
186
188
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
187
189
|
*/
|
|
188
|
-
var fs =
|
|
189
|
-
var path
|
|
190
|
+
var fs = require$$0;
|
|
191
|
+
var path = require$$1;
|
|
190
192
|
var utils = requireUtils();
|
|
191
193
|
var scopeOptionWarned = false;
|
|
192
194
|
var _VERSION_STRING = require$$3.version;
|
|
@@ -217,9 +219,9 @@ function requireEjs () {
|
|
|
217
219
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
218
220
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
219
221
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
220
|
-
var dirname = path
|
|
221
|
-
var extname = path
|
|
222
|
-
var resolve = path
|
|
222
|
+
var dirname = path.dirname;
|
|
223
|
+
var extname = path.extname;
|
|
224
|
+
var resolve = path.resolve;
|
|
223
225
|
var includePath = resolve(isDir ? filename : dirname(filename), name);
|
|
224
226
|
var ext = extname(name);
|
|
225
227
|
if (!ext) {
|
|
@@ -571,7 +573,7 @@ function requireEjs () {
|
|
|
571
573
|
};
|
|
572
574
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
573
575
|
var filename = opts.filename;
|
|
574
|
-
var basename = path
|
|
576
|
+
var basename = path.basename(filename, path.extname(filename));
|
|
575
577
|
try {
|
|
576
578
|
Object.defineProperty(returnedFn, "name", {
|
|
577
579
|
value: basename,
|
|
@@ -807,16 +809,16 @@ const COMMAND_TEMPLATE_INCLUDE = `
|
|
|
807
809
|
\`\`\`
|
|
808
810
|
`.trim();
|
|
809
811
|
function getTopicTree(topics, commands, separateFileDepth) {
|
|
810
|
-
const commandIds = commands.map((command) => command.id);
|
|
812
|
+
const commandIds = new Set(commands.map((command) => command.id));
|
|
811
813
|
const nonInternalTopics = topics.filter((topic) => topic.name !== "internal");
|
|
812
|
-
const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.
|
|
813
|
-
|
|
814
|
+
const nonCommandTopics = nonInternalTopics.filter((topic) => !commandIds.has(topic.name));
|
|
815
|
+
const topicTree = {
|
|
814
816
|
[ROOT_TOPIC_NAME]: {
|
|
817
|
+
commands: [],
|
|
815
818
|
filePath: ROOT_TOPIC_FILENAME,
|
|
816
|
-
|
|
819
|
+
includeTopicsAndCommands: separateFileDepth === 0,
|
|
817
820
|
subTopics: [],
|
|
818
|
-
|
|
819
|
-
includeTopicsAndCommands: separateFileDepth === 0
|
|
821
|
+
topic: { description: ROOT_TOPIC_DESCRIPTION, name: ROOT_TOPIC_NAME }
|
|
820
822
|
}
|
|
821
823
|
};
|
|
822
824
|
const topicsByName = Object.fromEntries(topics.map((topic) => [topic.name, topic]));
|
|
@@ -826,20 +828,20 @@ function getTopicTree(topics, commands, separateFileDepth) {
|
|
|
826
828
|
for (let i = 0; i < topicPath.length; i++) {
|
|
827
829
|
const name = topicPath.slice(0, i + 1).join(":");
|
|
828
830
|
const subTopic = currentParent.subTopics.find((subTopic2) => subTopic2.topic.name === name);
|
|
829
|
-
if (
|
|
831
|
+
if (subTopic) {
|
|
832
|
+
currentParent = subTopic;
|
|
833
|
+
} else {
|
|
830
834
|
const currentDepth = i + 1;
|
|
831
835
|
const includeTopicsAndCommands = currentParent.includeTopicsAndCommands || currentDepth >= separateFileDepth;
|
|
832
836
|
const newSubTopic = {
|
|
833
|
-
topic: topicsByName[name],
|
|
834
|
-
subTopics: [],
|
|
835
837
|
commands: [],
|
|
836
838
|
filePath: `${path.join(...name.split(":"))}.md`,
|
|
837
|
-
includeTopicsAndCommands
|
|
839
|
+
includeTopicsAndCommands,
|
|
840
|
+
subTopics: [],
|
|
841
|
+
topic: topicsByName[name]
|
|
838
842
|
};
|
|
839
843
|
currentParent.subTopics.push(newSubTopic);
|
|
840
844
|
currentParent = newSubTopic;
|
|
841
|
-
} else {
|
|
842
|
-
currentParent = subTopic;
|
|
843
845
|
}
|
|
844
846
|
}
|
|
845
847
|
}
|
|
@@ -862,11 +864,11 @@ function renderTopic(readmeTopic, config) {
|
|
|
862
864
|
const renderedCommands = readmeTopic.commands.map((readmeCommand) => renderCommand(readmeCommand, config));
|
|
863
865
|
const topicTemplate = readmeTopic.includeTopicsAndCommands ? TOPIC_TEMPLATE_INCLUDE : TOPIC_TEMPLATE;
|
|
864
866
|
const rendered = ejs.render(topicTemplate, {
|
|
865
|
-
|
|
867
|
+
commands: renderedCommands,
|
|
866
868
|
subTopics: renderedSubTopics,
|
|
867
|
-
|
|
869
|
+
topic: readmeTopic.topic
|
|
868
870
|
});
|
|
869
|
-
return { ...readmeTopic,
|
|
871
|
+
return { ...readmeTopic, commands: renderedCommands, rendered, subTopics: renderedSubTopics };
|
|
870
872
|
}
|
|
871
873
|
function renderCommand(readmeCommand, config) {
|
|
872
874
|
const columns = Number.parseInt(process.env.COLUMNS, 10) || 120;
|
|
@@ -911,15 +913,15 @@ class InternalReadme extends BaseCommand {
|
|
|
911
913
|
static description = "Generate the readme files for the commands";
|
|
912
914
|
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
913
915
|
static flags = {
|
|
916
|
+
depth: Flags.integer({ char: "d", description: "The depth of the topic tree to render as separate files" }),
|
|
914
917
|
// By default do nothing
|
|
915
918
|
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" })
|
|
919
|
+
only: Flags.string({ char: "l", description: "Glob pattern - will only write the files which match" }),
|
|
920
|
+
overWrite: Flags.boolean({ char: "o", description: "Overwrite existing files" })
|
|
919
921
|
};
|
|
920
922
|
async run() {
|
|
921
923
|
const { outputDir } = this.args;
|
|
922
|
-
const {
|
|
924
|
+
const { depth, notDryRun, only, overWrite } = this.flags;
|
|
923
925
|
const dryRun = !notDryRun;
|
|
924
926
|
const { commands, topics } = this.config;
|
|
925
927
|
const topicTree = getTopicTree(topics, commands, depth || 0);
|
|
@@ -928,10 +930,10 @@ class InternalReadme extends BaseCommand {
|
|
|
928
930
|
const writeOutput = writeTopic(renderedTopicTree, outputDir, dryRun, overWrite, only);
|
|
929
931
|
if (writeOutput.created.length > 0)
|
|
930
932
|
console.log(dryRun ? "Would create the following files:" : "Created the following files:");
|
|
931
|
-
writeOutput.created
|
|
933
|
+
for (const file of writeOutput.created) console.log(`- ${file}`);
|
|
932
934
|
if (writeOutput.overwritten.length > 0)
|
|
933
935
|
console.log(notDryRun && overWrite ? "Overwritten the following files:" : "Would overwrite the following files:");
|
|
934
|
-
writeOutput.overwritten
|
|
936
|
+
for (const file of writeOutput.overwritten) console.log(`- ${file}`);
|
|
935
937
|
}
|
|
936
938
|
}
|
|
937
939
|
|
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-pj8JVg5X.js';
|
|
4
|
+
import { a as getInput } from '../index-B27WJDxn.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
|
import 'ink';
|
|
25
25
|
|
|
26
26
|
const TERMS_URL = new URL("/terms", WEB_URL).href;
|
|
@@ -33,11 +33,11 @@ class Login extends BaseCommand {
|
|
|
33
33
|
"<%= config.bin %> <%= command.id %> --force --email me@email.nowhere"
|
|
34
34
|
];
|
|
35
35
|
static flags = {
|
|
36
|
-
force: Flags.boolean({ char: "f" }),
|
|
37
36
|
email: Flags.string({
|
|
38
37
|
char: "e",
|
|
39
38
|
description: "Your email address"
|
|
40
|
-
})
|
|
39
|
+
}),
|
|
40
|
+
force: Flags.boolean({ char: "f" })
|
|
41
41
|
};
|
|
42
42
|
async run() {
|
|
43
43
|
const { flags } = this;
|
|
@@ -75,7 +75,7 @@ ${[
|
|
|
75
75
|
`
|
|
76
76
|
);
|
|
77
77
|
const accepted = await getInput("Do you accept the terms of these documents? (yes/no): ");
|
|
78
|
-
const answer = accepted.toLowerCase().trim().
|
|
78
|
+
const answer = accepted.toLowerCase().trim().slice(0, 1);
|
|
79
79
|
return answer === "y";
|
|
80
80
|
};
|
|
81
81
|
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-pj8JVg5X.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-DfUg5j06.js';
|
|
33
|
+
import { C as Command } from '../Command-BDIkuv2g.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-B27WJDxn.js';
|
|
40
|
+
import '../useAndroidServiceAccountTestResult-D4e5AKAZ.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-pj8JVg5X.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-pj8JVg5X.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;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import crypto from 'crypto';
|
|
2
|
-
import fs__default from 'fs';
|
|
3
|
-
import readlineSync from 'readline-sync';
|
|
4
|
-
import { promises } from 'node:readline';
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import fs__default from 'node:fs';
|
|
5
3
|
import path from 'node:path';
|
|
4
|
+
import { promises } from 'node:readline';
|
|
6
5
|
import { fileURLToPath } from 'node:url';
|
|
7
|
-
import
|
|
6
|
+
import readlineSync from 'readline-sync';
|
|
7
|
+
import { L as JobStage, P as Platform, M as LogLevel, J as JobStatus } from './index-pj8JVg5X.js';
|
|
8
8
|
import 'luxon';
|
|
9
9
|
import 'axios';
|
|
10
10
|
import 'isomorphic-git';
|
|
11
11
|
import '@oclif/core';
|
|
12
|
-
import 'react';
|
|
13
12
|
import '@tanstack/react-query';
|
|
13
|
+
import 'react';
|
|
14
14
|
import 'crypto-js';
|
|
15
15
|
import 'uuid';
|
|
16
16
|
import 'fast-glob';
|
|
17
17
|
import 'yazl';
|
|
18
18
|
import 'socket.io-client';
|
|
19
|
+
import 'fullscreen-ink';
|
|
19
20
|
import 'ink';
|
|
20
21
|
|
|
21
22
|
function getShortUUID(originalUuid) {
|
|
@@ -23,42 +24,54 @@ function getShortUUID(originalUuid) {
|
|
|
23
24
|
}
|
|
24
25
|
function getStageColor(stage) {
|
|
25
26
|
switch (stage) {
|
|
26
|
-
case JobStage.SETUP:
|
|
27
|
+
case JobStage.SETUP: {
|
|
27
28
|
return "#FFB3B3";
|
|
29
|
+
}
|
|
28
30
|
// pastel red
|
|
29
|
-
case JobStage.CONFIGURE:
|
|
31
|
+
case JobStage.CONFIGURE: {
|
|
30
32
|
return "#FFD9B3";
|
|
33
|
+
}
|
|
31
34
|
// pastel orange
|
|
32
|
-
case JobStage.EXPORT:
|
|
35
|
+
case JobStage.EXPORT: {
|
|
33
36
|
return "#FFFACD";
|
|
37
|
+
}
|
|
34
38
|
// pastel yellow
|
|
35
|
-
case JobStage.BUILD:
|
|
39
|
+
case JobStage.BUILD: {
|
|
36
40
|
return "#B3FFB3";
|
|
41
|
+
}
|
|
37
42
|
// pastel green
|
|
38
|
-
case JobStage.PUBLISH:
|
|
43
|
+
case JobStage.PUBLISH: {
|
|
39
44
|
return "#B3D9FF";
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
function getMessageColor(level) {
|
|
43
49
|
switch (level) {
|
|
44
|
-
case LogLevel.INFO:
|
|
50
|
+
case LogLevel.INFO: {
|
|
45
51
|
return "white";
|
|
46
|
-
|
|
52
|
+
}
|
|
53
|
+
case LogLevel.WARN: {
|
|
47
54
|
return "yellow";
|
|
48
|
-
|
|
55
|
+
}
|
|
56
|
+
case LogLevel.ERROR: {
|
|
49
57
|
return "red";
|
|
58
|
+
}
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
function getJobStatusColor(status) {
|
|
53
62
|
switch (status) {
|
|
54
|
-
case JobStatus.PENDING:
|
|
63
|
+
case JobStatus.PENDING: {
|
|
55
64
|
return "yellow";
|
|
56
|
-
|
|
65
|
+
}
|
|
66
|
+
case JobStatus.PROCESSING: {
|
|
57
67
|
return "blue";
|
|
58
|
-
|
|
68
|
+
}
|
|
69
|
+
case JobStatus.COMPLETED: {
|
|
59
70
|
return "green";
|
|
60
|
-
|
|
71
|
+
}
|
|
72
|
+
case JobStatus.FAILED: {
|
|
61
73
|
return "red";
|
|
74
|
+
}
|
|
62
75
|
}
|
|
63
76
|
}
|
|
64
77
|
async function getFileHash(filename) {
|
|
@@ -72,9 +85,9 @@ async function getFileHash(filename) {
|
|
|
72
85
|
}
|
|
73
86
|
function isValidSemVer(versionString) {
|
|
74
87
|
const [semVer, major, minor, patch, prerelease, buildmetadata] = versionString.match(
|
|
75
|
-
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[
|
|
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-]+)*))?$/
|
|
76
89
|
) ?? [];
|
|
77
|
-
return
|
|
90
|
+
return Boolean(semVer);
|
|
78
91
|
}
|
|
79
92
|
function makeHumanReadable(rawObject) {
|
|
80
93
|
const getLabel = (key) => {
|
|
@@ -89,12 +102,15 @@ function makeHumanReadable(rawObject) {
|
|
|
89
102
|
}
|
|
90
103
|
function getPlatformName(platform) {
|
|
91
104
|
switch (platform) {
|
|
92
|
-
case Platform.IOS:
|
|
105
|
+
case Platform.IOS: {
|
|
93
106
|
return "iOS";
|
|
94
|
-
|
|
107
|
+
}
|
|
108
|
+
case Platform.ANDROID: {
|
|
95
109
|
return "Android";
|
|
96
|
-
|
|
110
|
+
}
|
|
111
|
+
default: {
|
|
97
112
|
throw new Error(`Unknown platform: ${platform}`);
|
|
113
|
+
}
|
|
98
114
|
}
|
|
99
115
|
}
|
|
100
116
|
async function getMaskedInput(message) {
|
|
@@ -115,11 +131,11 @@ async function getInput(message) {
|
|
|
115
131
|
}
|
|
116
132
|
function generatePackageName(gameName) {
|
|
117
133
|
let normalizedGameName = gameName.trim().toLowerCase();
|
|
118
|
-
normalizedGameName = normalizedGameName.
|
|
119
|
-
normalizedGameName = normalizedGameName.
|
|
120
|
-
normalizedGameName = normalizedGameName.
|
|
134
|
+
normalizedGameName = normalizedGameName.replaceAll(/[\s_\-]+/g, ".");
|
|
135
|
+
normalizedGameName = normalizedGameName.replaceAll(/[^\d.a-z]/g, "");
|
|
136
|
+
normalizedGameName = normalizedGameName.replaceAll(/\.+/g, ".");
|
|
121
137
|
normalizedGameName = normalizedGameName.replace(/^\./, "").replace(/\.$/, "");
|
|
122
|
-
if (
|
|
138
|
+
if (/^\d/.test(normalizedGameName)) {
|
|
123
139
|
normalizedGameName = "app." + normalizedGameName;
|
|
124
140
|
}
|
|
125
141
|
const prefix = "com.";
|