shipthis 0.1.34 → 0.1.36
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 +223 -80
- package/assets/markdown/agreement-update.md.ejs +12 -0
- package/assets/markdown/{android-success.md → android-success.md.ejs} +2 -2
- package/assets/markdown/{apikey-create.md → apikey-create.md.ejs} +4 -4
- package/assets/markdown/{create-google-play-game.md → create-google-play-game.md.ejs} +2 -2
- package/assets/markdown/{invite-service-account.md → invite-service-account.md.ejs} +1 -1
- package/assets/markdown/{ios-success.md → ios-success.md.ejs} +2 -2
- package/assets/markdown/{privacy-notification.md → privacy-notification.md.ejs} +1 -1
- package/assets/markdown/service-account-policy-wizard.md.ejs +26 -0
- package/assets/markdown/service-account-policy.md.ejs +30 -0
- package/assets/markdown/{ship-failure.md → ship-failure.md.ejs} +1 -1
- package/assets/markdown/{ship-success.md → ship-success.md.ejs} +2 -2
- package/dist/{AppleBundleIdDetails-By-sSGNl.js → AppleBundleIdDetails-pEVOUXTQ.js} +3 -4
- package/dist/{Command-VWMnGslo.js → Command-DhAVAdiI.js} +1 -2
- package/dist/{CommandGame-BSVPZzNl.js → CommandGame-C-oV-hb4.js} +2 -2
- package/dist/{Create-SR1Mq7BY.js → Create-Dg9ZlwEd.js} +1 -3
- package/dist/{GameStatus-1ntFyxEx.js → GameStatus-Dm9TqFfW.js} +9 -17
- package/dist/{Import-cedOWPDz.js → Import-BFNNkN-I.js} +2 -4
- package/dist/{JobLogTail-C_W8UAMg.js → JobLogTail-RTNIiAUk.js} +2 -5
- package/dist/{JobProgress-CI385G53.js → JobProgress-dFWcT0CQ.js} +16 -17
- package/dist/{JobStatusTable-CdbKtwJE.js → JobStatusTable-BlvMuWF7.js} +2 -4
- package/dist/{ProjectCredentialsTable-ZnuIfcDB.js → ProjectCredentialsTable-CMBnYLou.js} +2 -2
- package/dist/{UserCredentialsTable-DRkAYgEA.js → UserCredentialsTable-oxE3mDmE.js} +8 -10
- package/dist/{baseAppleCommand-CsO-_Yzn.js → baseAppleCommand-cnLvBz95.js} +1 -1
- package/dist/{baseGameAndroidCommand-CdjaAbNX.js → baseGameAndroidCommand-DUDYisYm.js} +1 -2
- package/dist/commands/apiKey/create.js +15 -16
- package/dist/commands/apiKey/list.js +6 -7
- package/dist/commands/apiKey/revoke.js +7 -8
- package/dist/commands/apple/apiKey/create.js +7 -8
- package/dist/commands/apple/apiKey/export.js +6 -7
- package/dist/commands/apple/apiKey/import.js +6 -7
- package/dist/commands/apple/apiKey/status.js +12 -13
- package/dist/commands/apple/certificate/create.js +7 -8
- package/dist/commands/apple/certificate/export.js +6 -7
- package/dist/commands/apple/certificate/import.js +6 -7
- package/dist/commands/apple/certificate/status.js +12 -13
- package/dist/commands/apple/login.js +12 -2
- package/dist/commands/apple/status.js +4 -5
- package/dist/commands/dashboard.js +11 -1
- package/dist/commands/game/android/apiKey/connect.js +9 -9
- package/dist/commands/game/android/apiKey/create.js +11 -11
- package/dist/commands/game/android/apiKey/export.js +7 -8
- package/dist/commands/game/android/apiKey/import.js +7 -8
- package/dist/commands/game/android/apiKey/invite.js +13 -4
- package/dist/commands/game/android/apiKey/policy.js +83 -0
- package/dist/commands/game/android/apiKey/status.js +7 -8
- package/dist/commands/game/android/keyStore/create.js +8 -9
- package/dist/commands/game/android/keyStore/export.js +6 -7
- package/dist/commands/game/android/keyStore/import.js +9 -10
- package/dist/commands/game/android/keyStore/status.js +6 -7
- package/dist/commands/game/android/status.js +12 -1
- package/dist/commands/game/build/download.js +4 -5
- package/dist/commands/game/build/list.js +5 -6
- package/dist/commands/game/create.js +12 -2
- package/dist/commands/game/details.js +4 -5
- package/dist/commands/game/export.js +12 -1
- package/dist/commands/game/ios/app/addTester.js +11 -12
- package/dist/commands/game/ios/app/create.js +4 -5
- package/dist/commands/game/ios/app/status.js +7 -8
- package/dist/commands/game/ios/app/sync.js +5 -6
- package/dist/commands/game/ios/profile/create.js +7 -8
- package/dist/commands/game/ios/profile/export.js +6 -7
- package/dist/commands/game/ios/profile/import.js +6 -7
- package/dist/commands/game/ios/profile/status.js +6 -7
- package/dist/commands/game/ios/status.js +9 -10
- package/dist/commands/game/ios/wizard.js +5 -6
- package/dist/commands/game/job/list.js +4 -5
- package/dist/commands/game/job/status.js +7 -8
- package/dist/commands/game/list.js +11 -10
- package/dist/commands/game/ship.js +18 -13
- package/dist/commands/game/status.js +6 -7
- package/dist/commands/game/wizard.js +19 -19
- package/dist/commands/internal/fastlane.js +12 -1
- package/dist/commands/internal/readme.js +12 -715
- package/dist/commands/login.js +26 -4
- package/dist/commands/status.js +12 -14
- package/dist/{export-B5Yfd9vw.js → export-Bd552LBe.js} +1 -1
- package/dist/{import-A2WcStHl.js → import-D-EL9sQJ.js} +1 -1
- package/dist/{index-CgzANgJt.js → index-1H48f5j2.js} +1 -1
- package/dist/index-BtPf4vzY.js +1903 -0
- package/dist/{index-Bz1qt_8T.js → index-DCN43FhY.js} +5 -11
- package/dist/{index-BBLtvl1Y.js → index-DwATmUTQ.js} +57 -16
- package/dist/{upload-BIsFZzBO.js → upload-Dm38PqhN.js} +1 -1
- package/dist/{useAppleApp-BZR94exU.js → useAppleApp-BKPntZPm.js} +1 -1
- package/dist/{useAppleBundleId-Dg5DsItN.js → useAppleBundleId-DvQKEEy4.js} +1 -1
- package/dist/useGoogleStatus-D9jjGa--.js +9 -0
- package/dist/{useProjectCredentials-jQYGcDhT.js → useProjectCredentials-BjsS28hP.js} +12 -11
- package/dist/{useWebSocket-CIxkPaYi.js → useWebSocket-CIeyHqxG.js} +1 -1
- package/docs/README.md +3 -2
- package/docs/apiKey.md +12 -2
- package/docs/assets/st.png +0 -0
- package/docs/game/android/apiKey/policy.md +28 -0
- package/docs/game/android/keyStore.md +14 -4
- package/docs/game/android/status.md +4 -0
- package/docs/game/android.md +9 -305
- package/docs/game/ship.md +43 -11
- package/docs/game.md +7 -1
- package/docs/login.md +6 -2
- package/docs/status.md +1 -1
- package/package.json +10 -2
- package/dist/index-CA6-uLMn.js +0 -221
- package/dist/index-CO_ssVFA.js +0 -772
- package/dist/index-CYjZ26If.js +0 -153
- package/dist/useAndroidServiceAccountTestResult-DueKynFy.js +0 -50
- /package/assets/markdown/{create-or-import-keystore.md → create-or-import-keystore.md.ejs} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Text, Box } from 'ink';
|
|
3
3
|
import { useState, useEffect, useContext } from 'react';
|
|
4
|
-
import { b as getShortDate, P as Platform,
|
|
4
|
+
import { b as getShortUUID, c as getShortDate, P as Platform, N as makeHumanReadable, O as getProject, Q as getProjectPlatformProgress, R as GameContext, S as CommandContext } from './index-BtPf4vzY.js';
|
|
5
5
|
import 'ink-spinner';
|
|
6
|
-
import { g as getShortUUID, m as makeHumanReadable } from './index-CYjZ26If.js';
|
|
7
6
|
import '@tanstack/react-query';
|
|
8
7
|
import 'axios';
|
|
9
8
|
import 'luxon';
|
|
@@ -23,7 +22,6 @@ import 'marked';
|
|
|
23
22
|
import 'marked-terminal';
|
|
24
23
|
import { N as NextSteps } from './NextSteps-DbJHmscQ.js';
|
|
25
24
|
import 'qrcode';
|
|
26
|
-
import { G as GameContext, C as CommandContext } from './index-CA6-uLMn.js';
|
|
27
25
|
|
|
28
26
|
function isPlatformConfigured(platform, progress) {
|
|
29
27
|
if (!progress) return false;
|
|
@@ -95,21 +93,15 @@ const GameStatusDetails = ({ children, gameId, onComplete, onError, platforms })
|
|
|
95
93
|
}, []);
|
|
96
94
|
if (!state) return /* @__PURE__ */ jsx(Text, {});
|
|
97
95
|
const { game, statuses, steps } = state;
|
|
96
|
+
const gameDetails = {};
|
|
97
|
+
gameDetails["Game ID"] = getShortUUID(game.id);
|
|
98
|
+
gameDetails.Name = game.name;
|
|
99
|
+
gameDetails.Version = game.details?.semanticVersion || "0.0.1";
|
|
100
|
+
gameDetails["Build Number"] = `${game.details?.buildNumber || 1}`;
|
|
101
|
+
gameDetails["Created At"] = getShortDate(game.createdAt);
|
|
102
|
+
gameDetails["Game Engine"] = `${game.details?.gameEngine || "godot"} ${game.details?.gameEngineVersion || "4.3"}`;
|
|
98
103
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
99
|
-
/* @__PURE__ */ jsx(
|
|
100
|
-
StatusTable,
|
|
101
|
-
{
|
|
102
|
-
statuses: {
|
|
103
|
-
"Build Number": `${game.details?.buildNumber || 1}`,
|
|
104
|
-
"Created At": getShortDate(game.createdAt),
|
|
105
|
-
"Game Engine": `${game.details?.gameEngine || "godot"} ${game.details?.gameEngineVersion || "4.3"}`,
|
|
106
|
-
"Game ID": getShortUUID(game.id),
|
|
107
|
-
Name: game.name,
|
|
108
|
-
Version: game.details?.semanticVersion || "0.0.1"
|
|
109
|
-
},
|
|
110
|
-
title: "Game Details"
|
|
111
|
-
}
|
|
112
|
-
),
|
|
104
|
+
/* @__PURE__ */ jsx(StatusTable, { statuses: gameDetails, title: "Game Details" }),
|
|
113
105
|
platforms.map((platform) => {
|
|
114
106
|
const status = statuses[platform];
|
|
115
107
|
const label = platform === Platform.IOS ? "iOS" : "Android";
|
|
@@ -11,7 +11,7 @@ import 'readline-sync';
|
|
|
11
11
|
import 'luxon';
|
|
12
12
|
import 'axios';
|
|
13
13
|
import 'isomorphic-git';
|
|
14
|
-
import {
|
|
14
|
+
import { Y as queryClient, a1 as cacheKeys, P as Platform, C as CredentialsType, R as GameContext } from './index-BtPf4vzY.js';
|
|
15
15
|
import '@oclif/core';
|
|
16
16
|
import { useMutation } from '@tanstack/react-query';
|
|
17
17
|
import 'crypto-js';
|
|
@@ -27,9 +27,7 @@ import '@inkjs/ui';
|
|
|
27
27
|
import 'marked';
|
|
28
28
|
import 'marked-terminal';
|
|
29
29
|
import 'qrcode';
|
|
30
|
-
import {
|
|
31
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
|
|
32
|
-
import { i as importCredential } from './import-A2WcStHl.js';
|
|
30
|
+
import { i as importCredential } from './import-D-EL9sQJ.js';
|
|
33
31
|
|
|
34
32
|
async function importKeystore({ log = () => {
|
|
35
33
|
}, ...opt }) {
|
|
@@ -7,13 +7,11 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'crypto-js';
|
|
9
9
|
import 'uuid';
|
|
10
|
-
import {
|
|
11
|
-
import { d as getStageColor, j as getMessageColor } from './index-CYjZ26If.js';
|
|
10
|
+
import { a1 as cacheKeys, t as getAuthedHeaders, s as API_URL, X as castArrayObjectDates, L as JobStatus, ay as useJob, az as castJobDates, aw as castObjectDates, M as getStageColor, aA as getMessageColor, aB as getShortTime } from './index-BtPf4vzY.js';
|
|
12
11
|
import 'luxon';
|
|
13
12
|
import 'fast-glob';
|
|
14
13
|
import 'yazl';
|
|
15
14
|
import 'socket.io-client';
|
|
16
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
|
|
17
15
|
import 'node:crypto';
|
|
18
16
|
import 'node:path';
|
|
19
17
|
import 'node:readline';
|
|
@@ -22,8 +20,7 @@ import 'readline-sync';
|
|
|
22
20
|
import 'isomorphic-git';
|
|
23
21
|
import '@oclif/core';
|
|
24
22
|
import 'fullscreen-ink';
|
|
25
|
-
import {
|
|
26
|
-
import { u as useWebSocket } from './useWebSocket-CIxkPaYi.js';
|
|
23
|
+
import { u as useWebSocket } from './useWebSocket-CIeyHqxG.js';
|
|
27
24
|
import { T as Title } from './Title-BCQtayg6.js';
|
|
28
25
|
import stringLength from 'string-length';
|
|
29
26
|
import stripAnsi from 'strip-ansi';
|
|
@@ -4,9 +4,7 @@ import axios from 'axios';
|
|
|
4
4
|
import fg from 'fast-glob';
|
|
5
5
|
import { v4 } from 'uuid';
|
|
6
6
|
import { ZipFile } from 'yazl';
|
|
7
|
-
import {
|
|
8
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
|
|
9
|
-
import { f as getFileHash, h as getPlatformName } from './index-CYjZ26If.js';
|
|
7
|
+
import { Y as queryClient, a1 as cacheKeys, z as DEFAULT_SHIPPED_FILES_GLOBS, E as DEFAULT_IGNORED_FILES_GLOBS, ao as getNewUploadTicket, ap as getFileHash, aq as startJobsFromUpload, ar as getPlatformName } from './index-BtPf4vzY.js';
|
|
10
8
|
import { g as getCWDGitInfo } from './git-BpsfNFZ_.js';
|
|
11
9
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
12
10
|
import 'ink';
|
|
@@ -15,7 +13,7 @@ import 'react';
|
|
|
15
13
|
import 'crypto-js';
|
|
16
14
|
import 'luxon';
|
|
17
15
|
import 'socket.io-client';
|
|
18
|
-
import { u as useJobWatching } from './JobLogTail-
|
|
16
|
+
import { u as useJobWatching } from './JobLogTail-RTNIiAUk.js';
|
|
19
17
|
import 'fullscreen-ink';
|
|
20
18
|
import 'string-length';
|
|
21
19
|
import 'strip-ansi';
|
|
@@ -26,11 +24,11 @@ import 'marked';
|
|
|
26
24
|
import 'marked-terminal';
|
|
27
25
|
import { P as ProgressSpinner } from './ProgressSpinner-Um6ARKlk.js';
|
|
28
26
|
import 'qrcode';
|
|
29
|
-
import './index-CA6-uLMn.js';
|
|
30
27
|
|
|
31
28
|
async function ship({ command, log = () => {
|
|
32
29
|
}, shipFlags }) {
|
|
33
|
-
|
|
30
|
+
const verbose = Boolean(shipFlags?.verbose || command.getFlags().verbose);
|
|
31
|
+
verbose && log("Fetching game config...");
|
|
34
32
|
const projectConfig = await command.getProjectConfig();
|
|
35
33
|
if (!projectConfig.project) throw new Error("No project found in project config");
|
|
36
34
|
const hasConfiguredIos = Boolean(projectConfig.project.details?.iosBundleId);
|
|
@@ -40,12 +38,12 @@ async function ship({ command, log = () => {
|
|
|
40
38
|
"No Android or iOS configuration found. Please run `shipthis game wizard android` or `shipthis game wizard ios` to configure your game."
|
|
41
39
|
);
|
|
42
40
|
}
|
|
43
|
-
log("Retrieving file globs...");
|
|
41
|
+
verbose && log("Retrieving file globs...");
|
|
44
42
|
const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
|
|
45
43
|
const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
|
|
46
|
-
log("Finding files to include in zip...");
|
|
44
|
+
verbose && log("Finding files to include in zip...");
|
|
47
45
|
const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
|
|
48
|
-
log(`Found ${files.length} files, adding to zip...`);
|
|
46
|
+
verbose && log(`Found ${files.length} files, adding to zip...`);
|
|
49
47
|
const zipFile = new ZipFile();
|
|
50
48
|
for (const file of files) {
|
|
51
49
|
zipFile.addFile(file, file);
|
|
@@ -58,10 +56,10 @@ async function ship({ command, log = () => {
|
|
|
58
56
|
const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
|
|
59
57
|
log(`Creating zip file: ${tmpZipFile}`);
|
|
60
58
|
await outputZipToFile(zipFile, tmpZipFile);
|
|
61
|
-
log("Reading zip file buffer...");
|
|
59
|
+
verbose && log("Reading zip file buffer...");
|
|
62
60
|
const zipBuffer = fs__default.readFileSync(tmpZipFile);
|
|
63
61
|
const { size } = fs__default.statSync(tmpZipFile);
|
|
64
|
-
log("Requesting upload ticket...");
|
|
62
|
+
verbose && log("Requesting upload ticket...");
|
|
65
63
|
const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
|
|
66
64
|
log("Uploading zip file...");
|
|
67
65
|
await axios.put(uploadTicket.url, zipBuffer, {
|
|
@@ -70,25 +68,26 @@ async function ship({ command, log = () => {
|
|
|
70
68
|
"Content-length": size
|
|
71
69
|
}
|
|
72
70
|
});
|
|
73
|
-
log("Fetching Git info...");
|
|
71
|
+
verbose && log("Fetching Git info...");
|
|
74
72
|
const gitInfo = await getCWDGitInfo();
|
|
75
|
-
log("Computing file hash...");
|
|
73
|
+
verbose && log("Computing file hash...");
|
|
76
74
|
const zipFileMd5 = await getFileHash(tmpZipFile);
|
|
77
75
|
const uploadDetails = {
|
|
78
76
|
...gitInfo,
|
|
79
77
|
zipFileMd5
|
|
80
78
|
};
|
|
81
|
-
log("Starting jobs from upload...");
|
|
79
|
+
verbose && log("Starting jobs from upload...");
|
|
82
80
|
const finalFlags = shipFlags || command.getFlags();
|
|
83
81
|
const startJobsOptions = {
|
|
84
82
|
...uploadDetails,
|
|
85
83
|
platform: finalFlags.platform?.toUpperCase(),
|
|
86
|
-
skipPublish: finalFlags.skipPublish
|
|
84
|
+
skipPublish: finalFlags.skipPublish,
|
|
85
|
+
verbose: finalFlags.verbose
|
|
87
86
|
};
|
|
88
87
|
const jobs = await startJobsFromUpload(uploadTicket.id, startJobsOptions);
|
|
89
|
-
log("Cleaning up temporary zip file...");
|
|
88
|
+
verbose && log("Cleaning up temporary zip file...");
|
|
90
89
|
fs__default.unlinkSync(tmpZipFile);
|
|
91
|
-
log("Job submission complete.");
|
|
90
|
+
verbose && log("Job submission complete.");
|
|
92
91
|
if (jobs.length === 0) {
|
|
93
92
|
throw new Error("No jobs were created. Please check your game configuration and try again.");
|
|
94
93
|
}
|
|
@@ -3,18 +3,16 @@ import { Box, Text } from 'ink';
|
|
|
3
3
|
import Spinner from 'ink-spinner';
|
|
4
4
|
import { DateTime } from 'luxon';
|
|
5
5
|
import { useState, useEffect } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { L as JobStatus, I as getJobSummary, M as getStageColor, J as getJobStatusColor } from './index-BtPf4vzY.js';
|
|
7
7
|
import '@tanstack/react-query';
|
|
8
8
|
import 'axios';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'crypto-js';
|
|
11
11
|
import 'uuid';
|
|
12
|
-
import { d as getStageColor, c as getJobStatusColor } from './index-CYjZ26If.js';
|
|
13
|
-
import { a as getJobSummary } from './index-CA6-uLMn.js';
|
|
14
12
|
import 'fast-glob';
|
|
15
13
|
import 'yazl';
|
|
16
14
|
import 'socket.io-client';
|
|
17
|
-
import { u as useJobWatching } from './JobLogTail-
|
|
15
|
+
import { u as useJobWatching } from './JobLogTail-RTNIiAUk.js';
|
|
18
16
|
import 'fullscreen-ink';
|
|
19
17
|
import { a as StatusRow, b as StatusRowLabel } from './StatusTable-DzRWcMr4.js';
|
|
20
18
|
import { T as Title } from './Title-BCQtayg6.js';
|
|
@@ -10,13 +10,13 @@ import 'readline-sync';
|
|
|
10
10
|
import 'luxon';
|
|
11
11
|
import 'axios';
|
|
12
12
|
import 'isomorphic-git';
|
|
13
|
-
import './index-
|
|
13
|
+
import './index-BtPf4vzY.js';
|
|
14
14
|
import '@oclif/core';
|
|
15
15
|
import '@tanstack/react-query';
|
|
16
16
|
import 'react';
|
|
17
17
|
import 'crypto-js';
|
|
18
18
|
import 'uuid';
|
|
19
|
-
import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-
|
|
19
|
+
import { u as useProjectCredentials, g as getProjectCredentialSummary } from './useProjectCredentials-BjsS28hP.js';
|
|
20
20
|
import 'fast-glob';
|
|
21
21
|
import 'yazl';
|
|
22
22
|
import 'socket.io-client';
|
|
@@ -10,7 +10,7 @@ import 'readline-sync';
|
|
|
10
10
|
import 'luxon';
|
|
11
11
|
import axios from 'axios';
|
|
12
12
|
import 'isomorphic-git';
|
|
13
|
-
import { b as getShortDate,
|
|
13
|
+
import { a1 as cacheKeys, b as getShortUUID, c as getShortDate, t as getAuthedHeaders, s as API_URL, X as castArrayObjectDates } from './index-BtPf4vzY.js';
|
|
14
14
|
import '@oclif/core';
|
|
15
15
|
import { useQuery } from '@tanstack/react-query';
|
|
16
16
|
import 'react';
|
|
@@ -18,8 +18,6 @@ import 'crypto-js';
|
|
|
18
18
|
import 'uuid';
|
|
19
19
|
import 'fast-glob';
|
|
20
20
|
import 'yazl';
|
|
21
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-DueKynFy.js';
|
|
22
|
-
import { g as getShortUUID } from './index-CYjZ26If.js';
|
|
23
21
|
import 'socket.io-client';
|
|
24
22
|
import 'fullscreen-ink';
|
|
25
23
|
import { T as Table } from './Table-FaNgpyeq.js';
|
|
@@ -40,13 +38,13 @@ async function queryUserCredentials(params) {
|
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
function getUserCredentialSummary(credential) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
const summary = {};
|
|
42
|
+
summary.id = getShortUUID(credential.id);
|
|
43
|
+
summary.type = credential.type;
|
|
44
|
+
summary.serial = credential.serialNumber;
|
|
45
|
+
summary.isActive = credential.isActive;
|
|
46
|
+
summary.createdAt = getShortDate(credential.createdAt);
|
|
47
|
+
return summary;
|
|
50
48
|
}
|
|
51
49
|
const useUserCredentials = ({
|
|
52
50
|
platform,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as generatePackageName, a as getInput } from './index-CYjZ26If.js';
|
|
1
|
+
import { d as BaseGameCommand, a2 as getGoogleStatus, f as generatePackageName, a3 as getGodotAndroidPackageName, e as getInput } from './index-BtPf4vzY.js';
|
|
3
2
|
|
|
4
3
|
class BaseGameAndroidCommand extends BaseGameCommand {
|
|
5
4
|
async checkGoogleAuth(waitForAuth = false) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { B as BaseAuthenticatedCommand, Y as createAPIKey, b as getShortDate } from '../../index-CO_ssVFA.js';
|
|
3
2
|
import { Flags } from '@oclif/core';
|
|
4
3
|
import { render } from 'ink';
|
|
5
4
|
import { v4 } from 'uuid';
|
|
6
|
-
import {
|
|
5
|
+
import { B as BaseAuthenticatedCommand, b as getShortUUID, af as createAPIKey, n as getRenderedMarkdown, c as getShortDate } from '../../index-BtPf4vzY.js';
|
|
7
6
|
import 'ink-spinner';
|
|
8
7
|
import 'react';
|
|
9
8
|
import '@tanstack/react-query';
|
|
@@ -18,10 +17,9 @@ import 'string-length';
|
|
|
18
17
|
import 'strip-ansi';
|
|
19
18
|
import 'open';
|
|
20
19
|
import '@inkjs/ui';
|
|
21
|
-
import { g as getRenderedMarkdown } from '../../index-CA6-uLMn.js';
|
|
22
20
|
import 'qrcode';
|
|
23
21
|
import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js';
|
|
24
|
-
import { C as Command } from '../../Command-
|
|
22
|
+
import { C as Command } from '../../Command-DhAVAdiI.js';
|
|
25
23
|
import 'crypto-js';
|
|
26
24
|
import 'node:path';
|
|
27
25
|
import '@expo/apple-utils/build/index.js';
|
|
@@ -32,7 +30,8 @@ import 'readline-sync';
|
|
|
32
30
|
import 'isomorphic-git';
|
|
33
31
|
import 'deepmerge';
|
|
34
32
|
import 'ini';
|
|
35
|
-
import '
|
|
33
|
+
import 'fs';
|
|
34
|
+
import 'path';
|
|
36
35
|
import 'marked';
|
|
37
36
|
import 'marked-terminal';
|
|
38
37
|
|
|
@@ -45,32 +44,32 @@ class ApiKeyCreate extends BaseAuthenticatedCommand {
|
|
|
45
44
|
"<%= config.bin %> <%= command.id %> --name ci-key-headless --durationDays 365 --quiet"
|
|
46
45
|
];
|
|
47
46
|
static flags = {
|
|
47
|
+
durationDays: Flags.integer({
|
|
48
|
+
char: "d",
|
|
49
|
+
default: 365,
|
|
50
|
+
description: "duration of the API key in days"
|
|
51
|
+
}),
|
|
48
52
|
name: Flags.string({
|
|
49
53
|
char: "n",
|
|
50
54
|
description: "name to apply to the API key (if not provided, a random name will be generated)"
|
|
51
55
|
}),
|
|
52
|
-
durationDays: Flags.integer({
|
|
53
|
-
char: "d",
|
|
54
|
-
description: "duration of the API key in days",
|
|
55
|
-
default: 365
|
|
56
|
-
}),
|
|
57
56
|
quiet: Flags.boolean({
|
|
58
57
|
char: "q",
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
default: false,
|
|
59
|
+
description: "Outputs just the secret value"
|
|
61
60
|
})
|
|
62
61
|
};
|
|
63
62
|
async run() {
|
|
64
|
-
const {
|
|
63
|
+
const { durationDays, name } = this.flags;
|
|
65
64
|
const createKey = async () => {
|
|
66
65
|
const apiKeyName = name ? name : `api-key-${getShortUUID(v4())}`;
|
|
67
|
-
const apiKeyWithSecret = await createAPIKey({ name: apiKeyName
|
|
66
|
+
const apiKeyWithSecret = await createAPIKey({ durationDays, name: apiKeyName });
|
|
68
67
|
const successMessage = getRenderedMarkdown({
|
|
69
|
-
filename: "apikey-create.md",
|
|
68
|
+
filename: "apikey-create.md.ejs",
|
|
70
69
|
templateVars: {
|
|
70
|
+
keyExpiry: getShortDate(apiKeyWithSecret.expiresAt),
|
|
71
71
|
keyId: getShortUUID(apiKeyWithSecret.id),
|
|
72
72
|
keyName: apiKeyWithSecret.name,
|
|
73
|
-
keyExpiry: getShortDate(apiKeyWithSecret.expiresAt),
|
|
74
73
|
keySecret: apiKeyWithSecret.secret
|
|
75
74
|
}
|
|
76
75
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { B as BaseAuthenticatedCommand, X as getAPIKeys, b as getShortDate } from '../../index-CO_ssVFA.js';
|
|
3
2
|
import { Flags } from '@oclif/core';
|
|
4
3
|
import { render, Box, Text } from 'ink';
|
|
5
|
-
import {
|
|
4
|
+
import { B as BaseAuthenticatedCommand, ae as getAPIKeys, c as getShortDate, b as getShortUUID } from '../../index-BtPf4vzY.js';
|
|
6
5
|
import 'ink-spinner';
|
|
7
6
|
import { T as Table } from '../../Table-FaNgpyeq.js';
|
|
8
7
|
import 'react';
|
|
@@ -23,8 +22,7 @@ import 'node:path';
|
|
|
23
22
|
import 'marked';
|
|
24
23
|
import 'marked-terminal';
|
|
25
24
|
import 'qrcode';
|
|
26
|
-
import '../../
|
|
27
|
-
import { C as Command } from '../../Command-VWMnGslo.js';
|
|
25
|
+
import { C as Command } from '../../Command-DhAVAdiI.js';
|
|
28
26
|
import 'crypto-js';
|
|
29
27
|
import '@expo/apple-utils/build/index.js';
|
|
30
28
|
import 'node:crypto';
|
|
@@ -34,7 +32,8 @@ import 'readline-sync';
|
|
|
34
32
|
import 'isomorphic-git';
|
|
35
33
|
import 'deepmerge';
|
|
36
34
|
import 'ini';
|
|
37
|
-
import '
|
|
35
|
+
import 'fs';
|
|
36
|
+
import 'path';
|
|
38
37
|
|
|
39
38
|
class ApiKeyList extends BaseAuthenticatedCommand {
|
|
40
39
|
static args = {};
|
|
@@ -65,10 +64,10 @@ class ApiKeyList extends BaseAuthenticatedCommand {
|
|
|
65
64
|
const params = flags;
|
|
66
65
|
const apiKeysListResponse = await getAPIKeys(params);
|
|
67
66
|
const data = apiKeysListResponse.data.map((apiKey) => ({
|
|
68
|
-
id: getShortUUID(apiKey.id),
|
|
69
|
-
name: apiKey.name,
|
|
70
67
|
expiresAt: getShortDate(apiKey.expiresAt),
|
|
68
|
+
id: getShortUUID(apiKey.id),
|
|
71
69
|
lastUsedAt: apiKey.lastUsedAt ? getShortDate(apiKey.lastUsedAt) : "Never",
|
|
70
|
+
name: apiKey.name,
|
|
72
71
|
revokedAt: apiKey.revokedAt ? getShortDate(apiKey.revokedAt) : "Active"
|
|
73
72
|
}));
|
|
74
73
|
const emptyState = /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Args, Flags } from '@oclif/core';
|
|
3
3
|
import { render } from 'ink';
|
|
4
|
-
import { B as BaseAuthenticatedCommand,
|
|
5
|
-
import { g as getShortUUID } from '../../index-CYjZ26If.js';
|
|
4
|
+
import { B as BaseAuthenticatedCommand, ag as revokeAPIKey, b as getShortUUID } from '../../index-BtPf4vzY.js';
|
|
6
5
|
import 'ink-spinner';
|
|
7
6
|
import 'react';
|
|
8
7
|
import '@tanstack/react-query';
|
|
@@ -23,8 +22,7 @@ import 'marked';
|
|
|
23
22
|
import 'marked-terminal';
|
|
24
23
|
import 'qrcode';
|
|
25
24
|
import { R as RunWithSpinner } from '../../RunWithSpinner-DucRnFp6.js';
|
|
26
|
-
import '../../
|
|
27
|
-
import { C as Command } from '../../Command-VWMnGslo.js';
|
|
25
|
+
import { C as Command } from '../../Command-DhAVAdiI.js';
|
|
28
26
|
import 'crypto-js';
|
|
29
27
|
import '@expo/apple-utils/build/index.js';
|
|
30
28
|
import 'node:crypto';
|
|
@@ -34,7 +32,8 @@ import 'readline-sync';
|
|
|
34
32
|
import 'isomorphic-git';
|
|
35
33
|
import 'deepmerge';
|
|
36
34
|
import 'ini';
|
|
37
|
-
import '
|
|
35
|
+
import 'fs';
|
|
36
|
+
import 'path';
|
|
38
37
|
|
|
39
38
|
class ApiKeyRevoke extends BaseAuthenticatedCommand {
|
|
40
39
|
static args = {
|
|
@@ -51,13 +50,13 @@ class ApiKeyRevoke extends BaseAuthenticatedCommand {
|
|
|
51
50
|
static flags = {
|
|
52
51
|
quiet: Flags.boolean({
|
|
53
52
|
char: "q",
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
default: false,
|
|
54
|
+
description: "Suppress output except for errors"
|
|
56
55
|
})
|
|
57
56
|
};
|
|
58
57
|
async run() {
|
|
59
58
|
const revokeKey = async () => {
|
|
60
|
-
const apiKeyId = this.args
|
|
59
|
+
const { apiKeyId } = this.args;
|
|
61
60
|
await revokeAPIKey(apiKeyId);
|
|
62
61
|
console.log(`Revoked API key with ID: ${getShortUUID(apiKeyId)}`);
|
|
63
62
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Flags } from '@oclif/core';
|
|
3
3
|
import { render } from 'ink';
|
|
4
|
-
import { g as getUserCredentials } from '../../../index-
|
|
5
|
-
import { P as Platform, C as CredentialsType, A as ApiKey, U as UserRole, a as ApiKeyType } from '../../../index-
|
|
4
|
+
import { g as getUserCredentials } from '../../../index-1H48f5j2.js';
|
|
5
|
+
import { P as Platform, C as CredentialsType, A as ApiKey, U as UserRole, a as ApiKeyType } from '../../../index-BtPf4vzY.js';
|
|
6
6
|
import 'ink-spinner';
|
|
7
7
|
import 'node:crypto';
|
|
8
8
|
import 'node:fs';
|
|
@@ -29,15 +29,14 @@ import 'marked';
|
|
|
29
29
|
import 'marked-terminal';
|
|
30
30
|
import 'qrcode';
|
|
31
31
|
import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
|
|
32
|
-
import '../../../
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { u as uploadUserCredentials } from '../../../upload-BIsFZzBO.js';
|
|
32
|
+
import { C as Command } from '../../../Command-DhAVAdiI.js';
|
|
33
|
+
import { B as BaseAppleCommand } from '../../../baseAppleCommand-cnLvBz95.js';
|
|
34
|
+
import { u as uploadUserCredentials } from '../../../upload-Dm38PqhN.js';
|
|
36
35
|
import '@expo/apple-utils/build/index.js';
|
|
37
36
|
import 'deepmerge';
|
|
38
37
|
import 'ini';
|
|
39
|
-
import '
|
|
40
|
-
import '
|
|
38
|
+
import 'fs';
|
|
39
|
+
import 'path';
|
|
41
40
|
|
|
42
41
|
class AppleApiKeyCreate extends BaseAppleCommand {
|
|
43
42
|
static args = {};
|
|
@@ -2,8 +2,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import { Args, Flags } from '@oclif/core';
|
|
4
4
|
import { render } from 'ink';
|
|
5
|
-
import { g as getUserCredentials } from '../../../index-
|
|
6
|
-
import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-
|
|
5
|
+
import { g as getUserCredentials } from '../../../index-1H48f5j2.js';
|
|
6
|
+
import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BtPf4vzY.js';
|
|
7
7
|
import 'ink-spinner';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import 'node:path';
|
|
@@ -29,14 +29,13 @@ import 'marked';
|
|
|
29
29
|
import 'marked-terminal';
|
|
30
30
|
import 'qrcode';
|
|
31
31
|
import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
|
|
32
|
-
import '../../../
|
|
33
|
-
import {
|
|
34
|
-
import { e as exportCredential } from '../../../export-B5Yfd9vw.js';
|
|
32
|
+
import { C as Command } from '../../../Command-DhAVAdiI.js';
|
|
33
|
+
import { e as exportCredential } from '../../../export-Bd552LBe.js';
|
|
35
34
|
import '@expo/apple-utils/build/index.js';
|
|
36
35
|
import 'deepmerge';
|
|
37
36
|
import 'ini';
|
|
38
|
-
import '
|
|
39
|
-
import '
|
|
37
|
+
import 'fs';
|
|
38
|
+
import 'path';
|
|
40
39
|
|
|
41
40
|
class AppleApiKeyExport extends BaseAuthenticatedCommand {
|
|
42
41
|
static args = {
|
|
@@ -2,8 +2,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import { Args, Flags } from '@oclif/core';
|
|
4
4
|
import { render } from 'ink';
|
|
5
|
-
import { g as getUserCredentials } from '../../../index-
|
|
6
|
-
import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-
|
|
5
|
+
import { g as getUserCredentials } from '../../../index-1H48f5j2.js';
|
|
6
|
+
import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-BtPf4vzY.js';
|
|
7
7
|
import 'ink-spinner';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import 'node:path';
|
|
@@ -29,14 +29,13 @@ import 'marked';
|
|
|
29
29
|
import 'marked-terminal';
|
|
30
30
|
import 'qrcode';
|
|
31
31
|
import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
|
|
32
|
-
import '../../../
|
|
33
|
-
import {
|
|
34
|
-
import { i as importCredential } from '../../../import-A2WcStHl.js';
|
|
32
|
+
import { C as Command } from '../../../Command-DhAVAdiI.js';
|
|
33
|
+
import { i as importCredential } from '../../../import-D-EL9sQJ.js';
|
|
35
34
|
import '@expo/apple-utils/build/index.js';
|
|
36
35
|
import 'deepmerge';
|
|
37
36
|
import 'ini';
|
|
38
|
-
import '
|
|
39
|
-
import '
|
|
37
|
+
import 'fs';
|
|
38
|
+
import 'path';
|
|
40
39
|
|
|
41
40
|
class AppleApiKeyImport extends BaseAuthenticatedCommand {
|
|
42
41
|
static args = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Flags } from '@oclif/core';
|
|
3
3
|
import { Box, Text, render } from 'ink';
|
|
4
|
-
import {
|
|
4
|
+
import { c as getShortDate, A as ApiKey, C as CredentialsType, P as Platform, B as BaseAuthenticatedCommand } from '../../../index-BtPf4vzY.js';
|
|
5
5
|
import Spinner from 'ink-spinner';
|
|
6
6
|
import 'node:crypto';
|
|
7
7
|
import 'node:fs';
|
|
@@ -23,21 +23,20 @@ import 'fullscreen-ink';
|
|
|
23
23
|
import 'string-length';
|
|
24
24
|
import 'strip-ansi';
|
|
25
25
|
import 'open';
|
|
26
|
-
import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-
|
|
26
|
+
import { u as useUserCredentials, U as UserCredentialsTable } from '../../../UserCredentialsTable-oxE3mDmE.js';
|
|
27
27
|
import '@inkjs/ui';
|
|
28
28
|
import 'marked';
|
|
29
29
|
import 'marked-terminal';
|
|
30
30
|
import 'qrcode';
|
|
31
|
-
import '../../../index-CA6-uLMn.js';
|
|
32
31
|
import { T as Table } from '../../../Table-FaNgpyeq.js';
|
|
33
32
|
import { T as Title } from '../../../Title-BCQtayg6.js';
|
|
34
33
|
import { N as NextSteps } from '../../../NextSteps-DbJHmscQ.js';
|
|
35
|
-
import { C as Command } from '../../../Command-
|
|
34
|
+
import { C as Command } from '../../../Command-DhAVAdiI.js';
|
|
36
35
|
import '@expo/apple-utils/build/index.js';
|
|
37
36
|
import 'deepmerge';
|
|
38
37
|
import 'ini';
|
|
39
|
-
import '
|
|
40
|
-
import '
|
|
38
|
+
import 'fs';
|
|
39
|
+
import 'path';
|
|
41
40
|
|
|
42
41
|
async function queryAppleApiKeys({ ctx }) {
|
|
43
42
|
const keys = await ApiKey.getAsync(ctx);
|
|
@@ -49,13 +48,13 @@ const canAppleApiKeyBeUsed = (key, userCredentials) => {
|
|
|
49
48
|
return userCredentials.some((cred) => cred.isActive && cred.serialNumber === key.id);
|
|
50
49
|
};
|
|
51
50
|
function getAppleApiKeySummary(key, userCredentials) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
const summary = {};
|
|
52
|
+
summary.keyID = key.id;
|
|
53
|
+
summary.name = key.attributes.nickname;
|
|
54
|
+
summary.roles = key.attributes.roles?.join(", ");
|
|
55
|
+
summary.lastUsed = getShortDate(DateTime.fromISO(key.attributes.lastUsed));
|
|
56
|
+
summary.canBeUsed = canAppleApiKeyBeUsed(key, userCredentials);
|
|
57
|
+
return summary;
|
|
59
58
|
}
|
|
60
59
|
const useAppleApiKeys = (props) => {
|
|
61
60
|
const queryResult = useQuery({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Flags } from '@oclif/core';
|
|
3
3
|
import { render } from 'ink';
|
|
4
|
-
import { g as getUserCredentials } from '../../../index-
|
|
4
|
+
import { g as getUserCredentials } from '../../../index-1H48f5j2.js';
|
|
5
5
|
import forge from 'node-forge';
|
|
6
|
-
import {
|
|
6
|
+
import { p as CertificateType, o as Certificate, P as Platform, C as CredentialsType } from '../../../index-BtPf4vzY.js';
|
|
7
7
|
import 'ink-spinner';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import 'node:fs';
|
|
@@ -30,15 +30,14 @@ import 'marked';
|
|
|
30
30
|
import 'marked-terminal';
|
|
31
31
|
import 'qrcode';
|
|
32
32
|
import { R as RunWithSpinner } from '../../../RunWithSpinner-DucRnFp6.js';
|
|
33
|
-
import '../../../
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { u as uploadUserCredentials } from '../../../upload-BIsFZzBO.js';
|
|
33
|
+
import { C as Command } from '../../../Command-DhAVAdiI.js';
|
|
34
|
+
import { B as BaseAppleCommand } from '../../../baseAppleCommand-cnLvBz95.js';
|
|
35
|
+
import { u as uploadUserCredentials } from '../../../upload-Dm38PqhN.js';
|
|
37
36
|
import '@expo/apple-utils/build/index.js';
|
|
38
37
|
import 'deepmerge';
|
|
39
38
|
import 'ini';
|
|
40
|
-
import '
|
|
41
|
-
import '
|
|
39
|
+
import 'fs';
|
|
40
|
+
import 'path';
|
|
42
41
|
|
|
43
42
|
function decodeCertificate(certificateContent) {
|
|
44
43
|
const decodedContent = forge.util.decode64(certificateContent);
|