shipthis 0.1.23 → 0.1.25
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 +25 -16
- package/docs/assets/ship-outputx0.8.gif +0 -0
- package/package.json +1 -1
- package/bin/readme.sh +0 -15
- package/dist/AppleBundleIdDetails-C9C5WSPR.js +0 -76
- package/dist/Command-BQCJ9Wf-.js +0 -28
- package/dist/CommandGame-CkGqTno0.js +0 -9
- package/dist/Create-t_E231OA.js +0 -59
- package/dist/Import-Ljz1gxXd.js +0 -110
- package/dist/JobProgress-D9tHgBvi.js +0 -121
- package/dist/JobStatusTable-DmI7qCHc.js +0 -203
- package/dist/NextSteps-CK9zHOCt.js +0 -18
- package/dist/ProgressSpinner-6pw1T8Iw.js +0 -16
- package/dist/ProjectCredentialsTable-CTkP1mvy.js +0 -37
- package/dist/RunWithSpinner-BVXNWGD3.js +0 -27
- package/dist/StatusTable-Dm5St4g-.js +0 -33
- package/dist/Table-CvM6pccN.js +0 -101
- package/dist/Title-BCQtayg6.js +0 -6
- package/dist/UserCredentialsTable-DhtM_iTG.js +0 -82
- package/dist/baseAppleCommand-IGl6KTvv.js +0 -10
- package/dist/baseGameAndroidCommand-DFn4zMvq.js +0 -43
- package/dist/commands/apple/apiKey/create.js +0 -103
- package/dist/commands/apple/apiKey/export.js +0 -81
- package/dist/commands/apple/apiKey/import.js +0 -85
- package/dist/commands/apple/apiKey/status.js +0 -122
- package/dist/commands/apple/certificate/create.js +0 -133
- package/dist/commands/apple/certificate/export.js +0 -81
- package/dist/commands/apple/certificate/import.js +0 -85
- package/dist/commands/apple/certificate/status.js +0 -130
- package/dist/commands/apple/login.js +0 -76
- package/dist/commands/apple/status.js +0 -79
- package/dist/commands/dashboard.js +0 -38
- package/dist/commands/game/android/apiKey/connect.js +0 -74
- package/dist/commands/game/android/apiKey/create.js +0 -74
- package/dist/commands/game/android/apiKey/export.js +0 -84
- package/dist/commands/game/android/apiKey/import.js +0 -93
- package/dist/commands/game/android/apiKey/invite.js +0 -81
- package/dist/commands/game/android/apiKey/status.js +0 -87
- package/dist/commands/game/android/keyStore/create.js +0 -69
- package/dist/commands/game/android/keyStore/export.js +0 -83
- package/dist/commands/game/android/keyStore/import.js +0 -112
- package/dist/commands/game/android/keyStore/status.js +0 -70
- package/dist/commands/game/android/status.js +0 -84
- package/dist/commands/game/build/download.js +0 -80
- package/dist/commands/game/build/list.js +0 -94
- package/dist/commands/game/create.js +0 -67
- package/dist/commands/game/details.js +0 -113
- package/dist/commands/game/export.js +0 -58
- package/dist/commands/game/ios/app/addTester.js +0 -124
- package/dist/commands/game/ios/app/create.js +0 -117
- package/dist/commands/game/ios/app/status.js +0 -66
- package/dist/commands/game/ios/app/sync.js +0 -95
- package/dist/commands/game/ios/profile/create.js +0 -129
- package/dist/commands/game/ios/profile/export.js +0 -83
- package/dist/commands/game/ios/profile/import.js +0 -92
- package/dist/commands/game/ios/profile/status.js +0 -139
- package/dist/commands/game/ios/status.js +0 -92
- package/dist/commands/game/ios/wizard.js +0 -153
- package/dist/commands/game/job/list.js +0 -91
- package/dist/commands/game/job/status.js +0 -91
- package/dist/commands/game/list.js +0 -83
- package/dist/commands/game/ship.js +0 -205
- package/dist/commands/game/status.js +0 -114
- package/dist/commands/game/wizard.js +0 -686
- package/dist/commands/internal/fastlane.js +0 -74
- package/dist/commands/internal/readme.js +0 -937
- package/dist/commands/login.js +0 -92
- package/dist/commands/status.js +0 -76
- package/dist/export-CVs_xoDN.js +0 -36
- package/dist/git-DREGq-jc.js +0 -32
- package/dist/import-Ch5O7xfN.js +0 -47
- package/dist/index-BB00V5oF.js +0 -136
- package/dist/index-CIa2EDQ6.js +0 -24
- package/dist/index-DkNQs11R.js +0 -711
- package/dist/index-DrcGhlrc.js +0 -138
- package/dist/index-DyOv-ge5.js +0 -125
- package/dist/index-vMXsdSCy.js +0 -208
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/upload-CRE2nVdd.js +0 -60
- package/dist/useAndroidServiceAccountTestResult-DcYDam-p.js +0 -52
- package/dist/useAppleApp-B16WbUxJ.js +0 -32
- package/dist/useAppleBundleId-DobPATan.js +0 -64
- package/dist/useJobWatching-BZSUa8E-.js +0 -45
- package/dist/useProjectCredentials-Btnr7WK3.js +0 -54
- package/dist/useWebSocket-ByuNoqRw.js +0 -36
- package/dist/utils/help.js +0 -14
- package/npm-shrinkwrap.json +0 -14011
- package/oclif.manifest.json +0 -2275
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { render } from 'ink';
|
|
3
|
-
import { Flags } from '@oclif/core';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../../../index-vMXsdSCy.js';
|
|
6
|
-
import { c as BaseGameCommand, k as getProjectPlatformProgress, P as Platform, b as getShortDate } from '../../../index-DkNQs11R.js';
|
|
7
|
-
import 'ink-spinner';
|
|
8
|
-
import '@inkjs/ui';
|
|
9
|
-
import 'axios';
|
|
10
|
-
import '@tanstack/react-query';
|
|
11
|
-
import 'fs';
|
|
12
|
-
import 'uuid';
|
|
13
|
-
import 'yazl';
|
|
14
|
-
import { g as getShortUUID, m as makeHumanReadable } from '../../../index-BB00V5oF.js';
|
|
15
|
-
import 'open';
|
|
16
|
-
import 'marked';
|
|
17
|
-
import 'marked-terminal';
|
|
18
|
-
import 'path';
|
|
19
|
-
import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
|
|
20
|
-
import 'qrcode';
|
|
21
|
-
import { S as StatusTable } from '../../../StatusTable-Dm5St4g-.js';
|
|
22
|
-
import 'string-length';
|
|
23
|
-
import 'strip-ansi';
|
|
24
|
-
import { A as AppleAppDetails, a as AppleBundleIdDetails } from '../../../AppleBundleIdDetails-C9C5WSPR.js';
|
|
25
|
-
import { C as Command } from '../../../Command-BQCJ9Wf-.js';
|
|
26
|
-
import 'luxon';
|
|
27
|
-
import 'fast-glob';
|
|
28
|
-
import 'socket.io-client';
|
|
29
|
-
import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
30
|
-
import '@expo/apple-utils/build/index.js';
|
|
31
|
-
import 'crypto-js';
|
|
32
|
-
import 'crypto';
|
|
33
|
-
import 'readline-sync';
|
|
34
|
-
import 'node:readline';
|
|
35
|
-
import 'node:path';
|
|
36
|
-
import 'node:url';
|
|
37
|
-
import 'isomorphic-git';
|
|
38
|
-
import 'ini';
|
|
39
|
-
import 'deepmerge';
|
|
40
|
-
import '../../../Title-BCQtayg6.js';
|
|
41
|
-
import '../../../useAppleApp-B16WbUxJ.js';
|
|
42
|
-
import '../../../Table-CvM6pccN.js';
|
|
43
|
-
import '../../../useAppleBundleId-DobPATan.js';
|
|
44
|
-
|
|
45
|
-
class GameIosStatus extends BaseGameCommand {
|
|
46
|
-
static args = {};
|
|
47
|
-
static description = "Shows the Game iOS Platform status. If --gameId is not provided it will look in the current directory.";
|
|
48
|
-
static examples = [
|
|
49
|
-
"<%= config.bin %> <%= command.id %>",
|
|
50
|
-
"<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
|
|
51
|
-
];
|
|
52
|
-
static flags = {
|
|
53
|
-
gameId: Flags.string({ char: "g", description: "The ID of the game" })
|
|
54
|
-
};
|
|
55
|
-
async run() {
|
|
56
|
-
const game = await this.getGame();
|
|
57
|
-
const iosPlatformStatus = await getProjectPlatformProgress(game.id, Platform.IOS);
|
|
58
|
-
const gameStatuses = {
|
|
59
|
-
name: game.name,
|
|
60
|
-
id: getShortUUID(game.id),
|
|
61
|
-
createdAt: getShortDate(game.createdAt),
|
|
62
|
-
engine: "Godot"
|
|
63
|
-
};
|
|
64
|
-
const steps = [iosPlatformStatus.hasBundleSet == false && "$ shipthis game ios app create"].filter(
|
|
65
|
-
Boolean
|
|
66
|
-
);
|
|
67
|
-
const progressToStatuses = (progress) => {
|
|
68
|
-
const { platform, ...rest } = progress;
|
|
69
|
-
return makeHumanReadable(rest);
|
|
70
|
-
};
|
|
71
|
-
const authState = await this.refreshAppleAuthState();
|
|
72
|
-
const ctx = authState.context;
|
|
73
|
-
render(
|
|
74
|
-
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
75
|
-
/* @__PURE__ */ jsx(StatusTable, { marginBottom: 1, title: "ShipThis game status", statuses: gameStatuses }),
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
77
|
-
StatusTable,
|
|
78
|
-
{
|
|
79
|
-
marginBottom: 1,
|
|
80
|
-
title: "Overall iOS status for game",
|
|
81
|
-
statuses: progressToStatuses(iosPlatformStatus)
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
/* @__PURE__ */ jsx(AppleAppDetails, { iosBundleId: game.details?.iosBundleId, ctx }),
|
|
85
|
-
/* @__PURE__ */ jsx(AppleBundleIdDetails, { iosBundleId: game.details?.iosBundleId, ctx }),
|
|
86
|
-
/* @__PURE__ */ jsx(NextSteps, { steps })
|
|
87
|
-
] })
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export { GameIosStatus as default };
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { B as BaseAuthenticatedCommand, j as isCWDGodotGame, W as WEB_URL, P as Platform, C as CredentialsType } from '../../../index-DkNQs11R.js';
|
|
4
|
-
import 'axios';
|
|
5
|
-
import 'crypto-js';
|
|
6
|
-
import 'uuid';
|
|
7
|
-
import 'fs';
|
|
8
|
-
import 'luxon';
|
|
9
|
-
import { g as getUserCredentials, a as getProjectCredentials } from '../../../index-CIa2EDQ6.js';
|
|
10
|
-
import 'react/jsx-runtime';
|
|
11
|
-
import 'react';
|
|
12
|
-
import 'ink';
|
|
13
|
-
import { g as getRenderedMarkdown } from '../../../index-vMXsdSCy.js';
|
|
14
|
-
import 'ink-spinner';
|
|
15
|
-
import '@inkjs/ui';
|
|
16
|
-
import '@tanstack/react-query';
|
|
17
|
-
import 'yazl';
|
|
18
|
-
import 'crypto';
|
|
19
|
-
import 'readline-sync';
|
|
20
|
-
import 'node:readline';
|
|
21
|
-
import 'node:path';
|
|
22
|
-
import 'node:url';
|
|
23
|
-
import 'isomorphic-git';
|
|
24
|
-
import 'fast-glob';
|
|
25
|
-
import 'socket.io-client';
|
|
26
|
-
import 'open';
|
|
27
|
-
import 'qrcode';
|
|
28
|
-
import 'string-length';
|
|
29
|
-
import 'strip-ansi';
|
|
30
|
-
import 'path';
|
|
31
|
-
import '@expo/apple-utils/build/index.js';
|
|
32
|
-
import 'ini';
|
|
33
|
-
import 'deepmerge';
|
|
34
|
-
import '../../../index-BB00V5oF.js';
|
|
35
|
-
import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
36
|
-
import 'marked';
|
|
37
|
-
import 'marked-terminal';
|
|
38
|
-
|
|
39
|
-
class GameIosWizard extends BaseAuthenticatedCommand {
|
|
40
|
-
static args = {};
|
|
41
|
-
static description = "Runs all the steps for iOS";
|
|
42
|
-
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
43
|
-
static flags = {
|
|
44
|
-
forceStep: Flags.string({
|
|
45
|
-
char: "f",
|
|
46
|
-
description: "Force a specific step to run."
|
|
47
|
-
})
|
|
48
|
-
};
|
|
49
|
-
async run() {
|
|
50
|
-
const { flags } = this;
|
|
51
|
-
if (!isCWDGodotGame()) {
|
|
52
|
-
this.error(
|
|
53
|
-
"No Godot project detected. Please run this from a Godot project directory with a project.godot file.",
|
|
54
|
-
{ exit: 1 }
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
const projectConfig = await this.getProjectConfigSafe();
|
|
58
|
-
const game = projectConfig.project;
|
|
59
|
-
const isStepForced = (cmdName) => flags.forceStep?.includes(cmdName);
|
|
60
|
-
const logSkip = (cmdName) => this.log(chalk.blue(`[skip] shipthis ${cmdName.replaceAll(":", " ")}`));
|
|
61
|
-
const logRun = (cmdName, args) => this.log(chalk.green(`[run] shipthis ${cmdName.replaceAll(":", " ")} ${args.join(" ")}`));
|
|
62
|
-
const iosSteps = [
|
|
63
|
-
{
|
|
64
|
-
command: "game:create",
|
|
65
|
-
args: ["--quiet"],
|
|
66
|
-
shouldRun: async () => !game
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
command: "apple:login",
|
|
70
|
-
args: ["--quiet"],
|
|
71
|
-
shouldRun: async () => {
|
|
72
|
-
const isLoggedIn = await this.hasValidAppleAuthState();
|
|
73
|
-
return !isLoggedIn;
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
command: "apple:apiKey:create",
|
|
78
|
-
args: ["--quiet"],
|
|
79
|
-
shouldRun: async () => {
|
|
80
|
-
const userCredentials = await getUserCredentials();
|
|
81
|
-
const userAppleApiKeyCredentials = userCredentials.filter(
|
|
82
|
-
(cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.KEY
|
|
83
|
-
);
|
|
84
|
-
const hasKey = userAppleApiKeyCredentials.length > 0;
|
|
85
|
-
return !hasKey;
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
command: "apple:certificate:create",
|
|
90
|
-
args: ["--quiet"],
|
|
91
|
-
shouldRun: async () => {
|
|
92
|
-
const userCredentials = await getUserCredentials();
|
|
93
|
-
const userAppleDistCredentials = userCredentials.filter(
|
|
94
|
-
(cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
|
|
95
|
-
);
|
|
96
|
-
const hasDistCert = userAppleDistCredentials.length > 0;
|
|
97
|
-
return !hasDistCert;
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
command: "game:ios:app:create",
|
|
102
|
-
args: ["--quiet"],
|
|
103
|
-
shouldRun: async () => {
|
|
104
|
-
if (!game) return true;
|
|
105
|
-
const hasBundleIdSet = !!game.details?.iosBundleId;
|
|
106
|
-
return !hasBundleIdSet;
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
command: "game:ios:app:sync",
|
|
111
|
-
args: ["--quiet"],
|
|
112
|
-
// Can always run this
|
|
113
|
-
shouldRun: async () => true
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
command: "game:ios:profile:create",
|
|
117
|
-
args: ["--quiet"],
|
|
118
|
-
shouldRun: async () => {
|
|
119
|
-
if (!game) return true;
|
|
120
|
-
const projectCredentials = await getProjectCredentials(game.id);
|
|
121
|
-
const projectAppleProfileCredentials = projectCredentials.filter(
|
|
122
|
-
(cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
|
|
123
|
-
);
|
|
124
|
-
const hasProfile = projectAppleProfileCredentials.length > 0;
|
|
125
|
-
return !hasProfile;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
];
|
|
129
|
-
for (const step of iosSteps) {
|
|
130
|
-
const command = step.command;
|
|
131
|
-
const willRun = isStepForced(command) || await step.shouldRun();
|
|
132
|
-
if (!willRun) {
|
|
133
|
-
logSkip(command);
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
const args = [...step.args, ...isStepForced(command) ? ["--force"] : []];
|
|
137
|
-
logRun(command, args);
|
|
138
|
-
await this.config.runCommand(command, args);
|
|
139
|
-
}
|
|
140
|
-
const successMessage = getRenderedMarkdown({
|
|
141
|
-
filename: "ios-success.md",
|
|
142
|
-
templateVars: {
|
|
143
|
-
androidSetupURL: new URL("/docs/android", WEB_URL).toString(),
|
|
144
|
-
docsURL: new URL("/docs", WEB_URL).toString()
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
this.log(`
|
|
148
|
-
${successMessage}
|
|
149
|
-
`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export { GameIosWizard as default };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { render, Box, Text } from 'ink';
|
|
3
|
-
import { Flags } from '@oclif/core';
|
|
4
|
-
import { c as BaseGameCommand, z as getProjectJobs } from '../../../index-DkNQs11R.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import { a as getJobSummary } from '../../../index-vMXsdSCy.js';
|
|
7
|
-
import 'ink-spinner';
|
|
8
|
-
import '@inkjs/ui';
|
|
9
|
-
import 'axios';
|
|
10
|
-
import '@tanstack/react-query';
|
|
11
|
-
import 'fs';
|
|
12
|
-
import 'uuid';
|
|
13
|
-
import 'yazl';
|
|
14
|
-
import { c as getJobStatusColor } from '../../../index-BB00V5oF.js';
|
|
15
|
-
import 'open';
|
|
16
|
-
import 'marked';
|
|
17
|
-
import 'marked-terminal';
|
|
18
|
-
import 'path';
|
|
19
|
-
import 'qrcode';
|
|
20
|
-
import { T as Table } from '../../../Table-CvM6pccN.js';
|
|
21
|
-
import 'string-length';
|
|
22
|
-
import 'strip-ansi';
|
|
23
|
-
import { DateTime } from 'luxon';
|
|
24
|
-
import 'fast-glob';
|
|
25
|
-
import { C as Command } from '../../../Command-BQCJ9Wf-.js';
|
|
26
|
-
import 'socket.io-client';
|
|
27
|
-
import '@expo/apple-utils/build/index.js';
|
|
28
|
-
import 'crypto-js';
|
|
29
|
-
import 'crypto';
|
|
30
|
-
import 'readline-sync';
|
|
31
|
-
import 'node:readline';
|
|
32
|
-
import 'node:path';
|
|
33
|
-
import 'node:url';
|
|
34
|
-
import 'isomorphic-git';
|
|
35
|
-
import 'ini';
|
|
36
|
-
import 'deepmerge';
|
|
37
|
-
import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
38
|
-
|
|
39
|
-
class GameJobList extends BaseGameCommand {
|
|
40
|
-
static args = {};
|
|
41
|
-
static description = "Lists the jobs for a game.";
|
|
42
|
-
static examples = [
|
|
43
|
-
"<%= config.bin %> <%= command.id %>",
|
|
44
|
-
"<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
|
|
45
|
-
];
|
|
46
|
-
static flags = {
|
|
47
|
-
...super.flags,
|
|
48
|
-
pageNumber: Flags.integer({ char: "p", description: "The page number to show (starts at 0)", default: 0 }),
|
|
49
|
-
pageSize: Flags.integer({ char: "s", description: "The number of items to show per page", default: 10 }),
|
|
50
|
-
orderBy: Flags.string({
|
|
51
|
-
char: "o",
|
|
52
|
-
description: "The field to order by",
|
|
53
|
-
default: "createdAt",
|
|
54
|
-
options: ["createdAt", "updatedAt"]
|
|
55
|
-
}),
|
|
56
|
-
order: Flags.string({
|
|
57
|
-
char: "r",
|
|
58
|
-
description: "The order to sort by",
|
|
59
|
-
default: "desc",
|
|
60
|
-
options: ["asc", "desc"]
|
|
61
|
-
})
|
|
62
|
-
};
|
|
63
|
-
async run() {
|
|
64
|
-
const game = await this.getGame();
|
|
65
|
-
const { flags } = this;
|
|
66
|
-
const { gameId, ...otherFlags } = flags;
|
|
67
|
-
const params = otherFlags;
|
|
68
|
-
const jobListResponse = await getProjectJobs(game.id, params);
|
|
69
|
-
const data = jobListResponse.data.map((j) => getJobSummary(j, DateTime.now()));
|
|
70
|
-
render(
|
|
71
|
-
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
72
|
-
/* @__PURE__ */ jsx(
|
|
73
|
-
Table,
|
|
74
|
-
{
|
|
75
|
-
data,
|
|
76
|
-
getTextProps: (col, val) => {
|
|
77
|
-
if (col.key !== "status") return {};
|
|
78
|
-
return { color: getJobStatusColor(val) };
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
jobListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
83
|
-
/* @__PURE__ */ jsx(Text, { children: `Showing page ${flags.pageNumber + 1} of ${jobListResponse.pageCount}.` }),
|
|
84
|
-
/* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
|
|
85
|
-
] })
|
|
86
|
-
] })
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export { GameJobList as default };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Args, Flags } from '@oclif/core';
|
|
3
|
-
import { render } from 'ink';
|
|
4
|
-
import { c as BaseGameCommand, E as getJob, J as JobStatus } from '../../../index-DkNQs11R.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../../../index-vMXsdSCy.js';
|
|
7
|
-
import 'ink-spinner';
|
|
8
|
-
import '@inkjs/ui';
|
|
9
|
-
import 'axios';
|
|
10
|
-
import '@tanstack/react-query';
|
|
11
|
-
import 'fs';
|
|
12
|
-
import 'uuid';
|
|
13
|
-
import 'yazl';
|
|
14
|
-
import 'crypto';
|
|
15
|
-
import 'readline-sync';
|
|
16
|
-
import 'node:readline';
|
|
17
|
-
import 'node:path';
|
|
18
|
-
import 'node:url';
|
|
19
|
-
import 'luxon';
|
|
20
|
-
import 'isomorphic-git';
|
|
21
|
-
import 'fast-glob';
|
|
22
|
-
import 'socket.io-client';
|
|
23
|
-
import 'open';
|
|
24
|
-
import 'marked';
|
|
25
|
-
import 'marked-terminal';
|
|
26
|
-
import 'path';
|
|
27
|
-
import { N as NextSteps } from '../../../NextSteps-CK9zHOCt.js';
|
|
28
|
-
import 'qrcode';
|
|
29
|
-
import 'string-length';
|
|
30
|
-
import 'strip-ansi';
|
|
31
|
-
import { C as Command } from '../../../Command-BQCJ9Wf-.js';
|
|
32
|
-
import { J as JobStatusTable, a as JobLogTail } from '../../../JobStatusTable-DmI7qCHc.js';
|
|
33
|
-
import '@expo/apple-utils/build/index.js';
|
|
34
|
-
import 'crypto-js';
|
|
35
|
-
import 'ini';
|
|
36
|
-
import 'deepmerge';
|
|
37
|
-
import '../../../index-BB00V5oF.js';
|
|
38
|
-
import '../../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
39
|
-
import '../../../Title-BCQtayg6.js';
|
|
40
|
-
import '../../../useWebSocket-ByuNoqRw.js';
|
|
41
|
-
import '../../../useJobWatching-BZSUa8E-.js';
|
|
42
|
-
import '../../../StatusTable-Dm5St4g-.js';
|
|
43
|
-
|
|
44
|
-
class GameJobStatus extends BaseGameCommand {
|
|
45
|
-
static args = {
|
|
46
|
-
job_id: Args.string({ description: "The id of the job to get the status of", required: true })
|
|
47
|
-
};
|
|
48
|
-
static description = "Shows the real-time status of a job.";
|
|
49
|
-
static examples = [
|
|
50
|
-
"<%= config.bin %> <%= command.id %> 4d32239e",
|
|
51
|
-
"<%= config.bin %> <%= command.id %> --gameId 0c179fc4 4d32239e",
|
|
52
|
-
"<%= config.bin %> <%= command.id %> --gameId 0c179fc4 --lines 20 --follow 4d32239e"
|
|
53
|
-
];
|
|
54
|
-
static flags = {
|
|
55
|
-
...super.flags,
|
|
56
|
-
lines: Flags.integer({ char: "n", description: "The number of lines to show", default: 10 }),
|
|
57
|
-
follow: Flags.boolean({ char: "f", description: "Follow the log in real-time", default: false })
|
|
58
|
-
};
|
|
59
|
-
async getJob() {
|
|
60
|
-
try {
|
|
61
|
-
const game = await this.getGame();
|
|
62
|
-
const job = await getJob(this.args.job_id, game.id);
|
|
63
|
-
return job;
|
|
64
|
-
} catch (e) {
|
|
65
|
-
if (e?.response?.status === 404) {
|
|
66
|
-
this.error("Job not found - please check you have access", { exit: 1 });
|
|
67
|
-
}
|
|
68
|
-
throw e;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
async run() {
|
|
72
|
-
const job = await this.getJob();
|
|
73
|
-
const { lines, follow } = this.flags;
|
|
74
|
-
const handleJobUpdate = (job2) => {
|
|
75
|
-
if (!follow) return;
|
|
76
|
-
if ([JobStatus.COMPLETED, JobStatus.FAILED].includes(job2.status)) {
|
|
77
|
-
const exitCode = job2.status == JobStatus.FAILED ? 1 : 0;
|
|
78
|
-
setTimeout(() => process.exit(exitCode), 5e3);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
render(
|
|
82
|
-
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
83
|
-
/* @__PURE__ */ jsx(JobStatusTable, { jobId: job.id, projectId: job.project.id, isWatching: follow, onJobUpdate: handleJobUpdate }),
|
|
84
|
-
/* @__PURE__ */ jsx(JobLogTail, { jobId: job.id, projectId: job.project.id, isWatching: follow, length: lines }),
|
|
85
|
-
/* @__PURE__ */ jsx(NextSteps, { steps: [] })
|
|
86
|
-
] })
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export { GameJobStatus as default };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { render, Text, Box } from 'ink';
|
|
3
|
-
import { Flags } from '@oclif/core';
|
|
4
|
-
import { B as BaseAuthenticatedCommand, g as getProjects, b as getShortDate } from '../../index-DkNQs11R.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../../index-vMXsdSCy.js';
|
|
7
|
-
import 'ink-spinner';
|
|
8
|
-
import '@inkjs/ui';
|
|
9
|
-
import 'axios';
|
|
10
|
-
import '@tanstack/react-query';
|
|
11
|
-
import 'fs';
|
|
12
|
-
import 'uuid';
|
|
13
|
-
import 'yazl';
|
|
14
|
-
import { g as getShortUUID } from '../../index-BB00V5oF.js';
|
|
15
|
-
import 'open';
|
|
16
|
-
import 'marked';
|
|
17
|
-
import 'marked-terminal';
|
|
18
|
-
import 'path';
|
|
19
|
-
import 'qrcode';
|
|
20
|
-
import { T as Table } from '../../Table-CvM6pccN.js';
|
|
21
|
-
import 'string-length';
|
|
22
|
-
import 'strip-ansi';
|
|
23
|
-
import 'luxon';
|
|
24
|
-
import 'fast-glob';
|
|
25
|
-
import { C as Command } from '../../Command-BQCJ9Wf-.js';
|
|
26
|
-
import 'socket.io-client';
|
|
27
|
-
import '@expo/apple-utils/build/index.js';
|
|
28
|
-
import 'crypto-js';
|
|
29
|
-
import 'crypto';
|
|
30
|
-
import 'readline-sync';
|
|
31
|
-
import 'node:readline';
|
|
32
|
-
import 'node:path';
|
|
33
|
-
import 'node:url';
|
|
34
|
-
import 'isomorphic-git';
|
|
35
|
-
import 'ini';
|
|
36
|
-
import 'deepmerge';
|
|
37
|
-
import '../../useAndroidServiceAccountTestResult-DcYDam-p.js';
|
|
38
|
-
|
|
39
|
-
class GameList extends BaseAuthenticatedCommand {
|
|
40
|
-
static args = {};
|
|
41
|
-
static description = "Shows a list of all your games.";
|
|
42
|
-
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
43
|
-
static flags = {
|
|
44
|
-
pageNumber: Flags.integer({ char: "p", description: "The page number to show (starts at 0)", default: 0 }),
|
|
45
|
-
pageSize: Flags.integer({ char: "s", description: "The number of items to show per page", default: 10 }),
|
|
46
|
-
orderBy: Flags.string({
|
|
47
|
-
char: "o",
|
|
48
|
-
description: "The field to order by",
|
|
49
|
-
default: "createdAt",
|
|
50
|
-
options: ["createdAt", "updatedAt", "name"]
|
|
51
|
-
}),
|
|
52
|
-
order: Flags.string({
|
|
53
|
-
char: "r",
|
|
54
|
-
description: "The order to sort by",
|
|
55
|
-
default: "desc",
|
|
56
|
-
options: ["asc", "desc"]
|
|
57
|
-
})
|
|
58
|
-
};
|
|
59
|
-
async run() {
|
|
60
|
-
const { flags } = this;
|
|
61
|
-
const params = flags;
|
|
62
|
-
const gameListResponse = await getProjects(params);
|
|
63
|
-
const data = gameListResponse.data.map((game) => {
|
|
64
|
-
return {
|
|
65
|
-
id: getShortUUID(game.id),
|
|
66
|
-
name: game.name,
|
|
67
|
-
createdAt: getShortDate(game.createdAt)
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
render(
|
|
71
|
-
/* @__PURE__ */ jsxs(Command, { command: this, children: [
|
|
72
|
-
gameListResponse.data.length === 0 && params.pageNumber == 0 && /* @__PURE__ */ jsx(Text, { children: "No games found. Create one now with $ shipthis game wizard" }),
|
|
73
|
-
gameListResponse.data.length > 0 && /* @__PURE__ */ jsx(Table, { data }),
|
|
74
|
-
gameListResponse.pageCount > 1 && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
75
|
-
/* @__PURE__ */ jsx(Text, { children: `Showing page ${flags.pageNumber + 1} of ${gameListResponse.pageCount}.` }),
|
|
76
|
-
/* @__PURE__ */ jsx(Text, { children: "Use the --pageNumber parameter to see other pages." })
|
|
77
|
-
] })
|
|
78
|
-
] })
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export { GameList as default };
|