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.
Files changed (105) hide show
  1. package/README.md +223 -80
  2. package/assets/markdown/agreement-update.md.ejs +12 -0
  3. package/assets/markdown/{android-success.md → android-success.md.ejs} +2 -2
  4. package/assets/markdown/{apikey-create.md → apikey-create.md.ejs} +4 -4
  5. package/assets/markdown/{create-google-play-game.md → create-google-play-game.md.ejs} +2 -2
  6. package/assets/markdown/{invite-service-account.md → invite-service-account.md.ejs} +1 -1
  7. package/assets/markdown/{ios-success.md → ios-success.md.ejs} +2 -2
  8. package/assets/markdown/{privacy-notification.md → privacy-notification.md.ejs} +1 -1
  9. package/assets/markdown/service-account-policy-wizard.md.ejs +26 -0
  10. package/assets/markdown/service-account-policy.md.ejs +30 -0
  11. package/assets/markdown/{ship-failure.md → ship-failure.md.ejs} +1 -1
  12. package/assets/markdown/{ship-success.md → ship-success.md.ejs} +2 -2
  13. package/dist/{AppleBundleIdDetails-By-sSGNl.js → AppleBundleIdDetails-pEVOUXTQ.js} +3 -4
  14. package/dist/{Command-VWMnGslo.js → Command-DhAVAdiI.js} +1 -2
  15. package/dist/{CommandGame-BSVPZzNl.js → CommandGame-C-oV-hb4.js} +2 -2
  16. package/dist/{Create-SR1Mq7BY.js → Create-Dg9ZlwEd.js} +1 -3
  17. package/dist/{GameStatus-1ntFyxEx.js → GameStatus-Dm9TqFfW.js} +9 -17
  18. package/dist/{Import-cedOWPDz.js → Import-BFNNkN-I.js} +2 -4
  19. package/dist/{JobLogTail-C_W8UAMg.js → JobLogTail-RTNIiAUk.js} +2 -5
  20. package/dist/{JobProgress-CI385G53.js → JobProgress-dFWcT0CQ.js} +16 -17
  21. package/dist/{JobStatusTable-CdbKtwJE.js → JobStatusTable-BlvMuWF7.js} +2 -4
  22. package/dist/{ProjectCredentialsTable-ZnuIfcDB.js → ProjectCredentialsTable-CMBnYLou.js} +2 -2
  23. package/dist/{UserCredentialsTable-DRkAYgEA.js → UserCredentialsTable-oxE3mDmE.js} +8 -10
  24. package/dist/{baseAppleCommand-CsO-_Yzn.js → baseAppleCommand-cnLvBz95.js} +1 -1
  25. package/dist/{baseGameAndroidCommand-CdjaAbNX.js → baseGameAndroidCommand-DUDYisYm.js} +1 -2
  26. package/dist/commands/apiKey/create.js +15 -16
  27. package/dist/commands/apiKey/list.js +6 -7
  28. package/dist/commands/apiKey/revoke.js +7 -8
  29. package/dist/commands/apple/apiKey/create.js +7 -8
  30. package/dist/commands/apple/apiKey/export.js +6 -7
  31. package/dist/commands/apple/apiKey/import.js +6 -7
  32. package/dist/commands/apple/apiKey/status.js +12 -13
  33. package/dist/commands/apple/certificate/create.js +7 -8
  34. package/dist/commands/apple/certificate/export.js +6 -7
  35. package/dist/commands/apple/certificate/import.js +6 -7
  36. package/dist/commands/apple/certificate/status.js +12 -13
  37. package/dist/commands/apple/login.js +12 -2
  38. package/dist/commands/apple/status.js +4 -5
  39. package/dist/commands/dashboard.js +11 -1
  40. package/dist/commands/game/android/apiKey/connect.js +9 -9
  41. package/dist/commands/game/android/apiKey/create.js +11 -11
  42. package/dist/commands/game/android/apiKey/export.js +7 -8
  43. package/dist/commands/game/android/apiKey/import.js +7 -8
  44. package/dist/commands/game/android/apiKey/invite.js +13 -4
  45. package/dist/commands/game/android/apiKey/policy.js +83 -0
  46. package/dist/commands/game/android/apiKey/status.js +7 -8
  47. package/dist/commands/game/android/keyStore/create.js +8 -9
  48. package/dist/commands/game/android/keyStore/export.js +6 -7
  49. package/dist/commands/game/android/keyStore/import.js +9 -10
  50. package/dist/commands/game/android/keyStore/status.js +6 -7
  51. package/dist/commands/game/android/status.js +12 -1
  52. package/dist/commands/game/build/download.js +4 -5
  53. package/dist/commands/game/build/list.js +5 -6
  54. package/dist/commands/game/create.js +12 -2
  55. package/dist/commands/game/details.js +4 -5
  56. package/dist/commands/game/export.js +12 -1
  57. package/dist/commands/game/ios/app/addTester.js +11 -12
  58. package/dist/commands/game/ios/app/create.js +4 -5
  59. package/dist/commands/game/ios/app/status.js +7 -8
  60. package/dist/commands/game/ios/app/sync.js +5 -6
  61. package/dist/commands/game/ios/profile/create.js +7 -8
  62. package/dist/commands/game/ios/profile/export.js +6 -7
  63. package/dist/commands/game/ios/profile/import.js +6 -7
  64. package/dist/commands/game/ios/profile/status.js +6 -7
  65. package/dist/commands/game/ios/status.js +9 -10
  66. package/dist/commands/game/ios/wizard.js +5 -6
  67. package/dist/commands/game/job/list.js +4 -5
  68. package/dist/commands/game/job/status.js +7 -8
  69. package/dist/commands/game/list.js +11 -10
  70. package/dist/commands/game/ship.js +18 -13
  71. package/dist/commands/game/status.js +6 -7
  72. package/dist/commands/game/wizard.js +19 -19
  73. package/dist/commands/internal/fastlane.js +12 -1
  74. package/dist/commands/internal/readme.js +12 -715
  75. package/dist/commands/login.js +26 -4
  76. package/dist/commands/status.js +12 -14
  77. package/dist/{export-B5Yfd9vw.js → export-Bd552LBe.js} +1 -1
  78. package/dist/{import-A2WcStHl.js → import-D-EL9sQJ.js} +1 -1
  79. package/dist/{index-CgzANgJt.js → index-1H48f5j2.js} +1 -1
  80. package/dist/index-BtPf4vzY.js +1903 -0
  81. package/dist/{index-Bz1qt_8T.js → index-DCN43FhY.js} +5 -11
  82. package/dist/{index-BBLtvl1Y.js → index-DwATmUTQ.js} +57 -16
  83. package/dist/{upload-BIsFZzBO.js → upload-Dm38PqhN.js} +1 -1
  84. package/dist/{useAppleApp-BZR94exU.js → useAppleApp-BKPntZPm.js} +1 -1
  85. package/dist/{useAppleBundleId-Dg5DsItN.js → useAppleBundleId-DvQKEEy4.js} +1 -1
  86. package/dist/useGoogleStatus-D9jjGa--.js +9 -0
  87. package/dist/{useProjectCredentials-jQYGcDhT.js → useProjectCredentials-BjsS28hP.js} +12 -11
  88. package/dist/{useWebSocket-CIxkPaYi.js → useWebSocket-CIeyHqxG.js} +1 -1
  89. package/docs/README.md +3 -2
  90. package/docs/apiKey.md +12 -2
  91. package/docs/assets/st.png +0 -0
  92. package/docs/game/android/apiKey/policy.md +28 -0
  93. package/docs/game/android/keyStore.md +14 -4
  94. package/docs/game/android/status.md +4 -0
  95. package/docs/game/android.md +9 -305
  96. package/docs/game/ship.md +43 -11
  97. package/docs/game.md +7 -1
  98. package/docs/login.md +6 -2
  99. package/docs/status.md +1 -1
  100. package/package.json +10 -2
  101. package/dist/index-CA6-uLMn.js +0 -221
  102. package/dist/index-CO_ssVFA.js +0 -772
  103. package/dist/index-CYjZ26If.js +0 -153
  104. package/dist/useAndroidServiceAccountTestResult-DueKynFy.js +0 -50
  105. /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, E as getProject, F as getProjectPlatformProgress } from './index-CO_ssVFA.js';
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 { K as queryClient, P as Platform, C as CredentialsType } from './index-CO_ssVFA.js';
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 { G as GameContext } from './index-CA6-uLMn.js';
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 { p as getAuthedHeaders, o as API_URL, I as castArrayObjectDates, J as JobStatus, a7 as castJobDates, a4 as castObjectDates, a8 as getShortTime } from './index-CO_ssVFA.js';
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 { f as useJob } from './index-CA6-uLMn.js';
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 { K as queryClient, v as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a2 as getNewUploadTicket, a3 as startJobsFromUpload } from './index-CO_ssVFA.js';
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-C_W8UAMg.js';
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
- log("Fetching game config...");
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 { J as JobStatus } from './index-CO_ssVFA.js';
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-C_W8UAMg.js';
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-CO_ssVFA.js';
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-jQYGcDhT.js';
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, p as getAuthedHeaders, o as API_URL, I as castArrayObjectDates } from './index-CO_ssVFA.js';
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
- return {
44
- createdAt: getShortDate(credential.createdAt),
45
- id: getShortUUID(credential.id),
46
- isActive: credential.isActive,
47
- serial: credential.serialNumber,
48
- type: credential.type
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,4 +1,4 @@
1
- import { B as BaseAuthenticatedCommand } from './index-CO_ssVFA.js';
1
+ import { B as BaseAuthenticatedCommand } from './index-BtPf4vzY.js';
2
2
 
3
3
  class BaseAppleCommand extends BaseAuthenticatedCommand {
4
4
  async init() {
@@ -1,5 +1,4 @@
1
- import { c as BaseGameCommand, Q as getGoogleStatus, R as getGodotAndroidPackageName } from './index-CO_ssVFA.js';
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 { g as getShortUUID } from '../../index-CYjZ26If.js';
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-VWMnGslo.js';
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 '../../useAndroidServiceAccountTestResult-DueKynFy.js';
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
- description: "Outputs just the secret value",
60
- default: false
58
+ default: false,
59
+ description: "Outputs just the secret value"
61
60
  })
62
61
  };
63
62
  async run() {
64
- const { name, durationDays } = this.flags;
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, durationDays });
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 { g as getShortUUID } from '../../index-CYjZ26If.js';
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 '../../index-CA6-uLMn.js';
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 '../../useAndroidServiceAccountTestResult-DueKynFy.js';
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, Z as revokeAPIKey } from '../../index-CO_ssVFA.js';
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 '../../index-CA6-uLMn.js';
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 '../../useAndroidServiceAccountTestResult-DueKynFy.js';
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
- description: "Suppress output except for errors",
55
- default: false
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.apiKeyId;
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-CgzANgJt.js';
5
- import { P as Platform, C as CredentialsType, A as ApiKey, U as UserRole, a as ApiKeyType } from '../../../index-CO_ssVFA.js';
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 '../../../index-CA6-uLMn.js';
33
- import { C as Command } from '../../../Command-VWMnGslo.js';
34
- import { B as BaseAppleCommand } from '../../../baseAppleCommand-CsO-_Yzn.js';
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 '../../../index-CYjZ26If.js';
40
- import '../../../useAndroidServiceAccountTestResult-DueKynFy.js';
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-CgzANgJt.js';
6
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-CO_ssVFA.js';
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 '../../../index-CA6-uLMn.js';
33
- import { C as Command } from '../../../Command-VWMnGslo.js';
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 '../../../index-CYjZ26If.js';
39
- import '../../../useAndroidServiceAccountTestResult-DueKynFy.js';
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-CgzANgJt.js';
6
- import { B as BaseAuthenticatedCommand, P as Platform, C as CredentialsType } from '../../../index-CO_ssVFA.js';
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 '../../../index-CA6-uLMn.js';
33
- import { C as Command } from '../../../Command-VWMnGslo.js';
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 '../../../index-CYjZ26If.js';
39
- import '../../../useAndroidServiceAccountTestResult-DueKynFy.js';
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 { b as getShortDate, A as ApiKey, C as CredentialsType, P as Platform, B as BaseAuthenticatedCommand } from '../../../index-CO_ssVFA.js';
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-DRkAYgEA.js';
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-VWMnGslo.js';
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 '../../../useAndroidServiceAccountTestResult-DueKynFy.js';
40
- import '../../../index-CYjZ26If.js';
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
- return {
53
- canBeUsed: canAppleApiKeyBeUsed(key, userCredentials),
54
- keyID: key.id,
55
- lastUsed: getShortDate(DateTime.fromISO(key.attributes.lastUsed)),
56
- name: key.attributes.nickname,
57
- roles: key.attributes.roles?.join(", ")
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-CgzANgJt.js';
4
+ import { g as getUserCredentials } from '../../../index-1H48f5j2.js';
5
5
  import forge from 'node-forge';
6
- import { l as CertificateType, k as Certificate, P as Platform, C as CredentialsType } from '../../../index-CO_ssVFA.js';
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 '../../../index-CA6-uLMn.js';
34
- import { C as Command } from '../../../Command-VWMnGslo.js';
35
- import { B as BaseAppleCommand } from '../../../baseAppleCommand-CsO-_Yzn.js';
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 '../../../index-CYjZ26If.js';
41
- import '../../../useAndroidServiceAccountTestResult-DueKynFy.js';
39
+ import 'fs';
40
+ import 'path';
42
41
 
43
42
  function decodeCertificate(certificateContent) {
44
43
  const decodedContent = forge.util.decode64(certificateContent);