shipthis 0.1.9 → 0.1.11

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 (134) hide show
  1. package/assets/markdown/create-or-import-keystore.md +7 -0
  2. package/dist/AppleBundleIdDetails-CjP5y0cj.js +74 -0
  3. package/dist/AppleBundleIdDetails-CztWY_mT.js +73 -0
  4. package/dist/AppleBundleIdDetails-DKeSAte9.js +73 -0
  5. package/dist/AppleBundleIdDetails-DymjrhOZ.js +73 -0
  6. package/dist/Command-BiB9MqbJ.js +204 -0
  7. package/dist/Command-D6rWEZRM.js +204 -0
  8. package/dist/Command-Dn0P_KOV.js +205 -0
  9. package/dist/Command-YJJp90ru.js +204 -0
  10. package/dist/CommandGame-C1oTlfdb.js +8 -0
  11. package/dist/CommandGame-cPaTk1wh.js +8 -0
  12. package/dist/CommandGame-k04mHiDl.js +8 -0
  13. package/dist/CommandGame-pI9VXKxi.js +8 -0
  14. package/dist/Create-DIaSKUpl.js +56 -0
  15. package/dist/CreateKeystore-BnNdeDUa.js +57 -0
  16. package/dist/CreateKeystore-Cf-nsK_M.js +56 -0
  17. package/dist/CreateKeystore-g1z6DsU5.js +56 -0
  18. package/dist/Import-BIOsf8AA.js +107 -0
  19. package/dist/JobProgress-CPkWVSlH.js +108 -0
  20. package/dist/JobProgress-W0QQR49T.js +108 -0
  21. package/dist/JobProgress-biiLhigg.js +109 -0
  22. package/dist/JobProgress-jmGAzvxS.js +108 -0
  23. package/dist/JobStatusTable-BA_q-kgE.js +75 -0
  24. package/dist/JobStatusTable-ByW0bN6c.js +75 -0
  25. package/dist/JobStatusTable-CgaTS7jS.js +75 -0
  26. package/dist/JobStatusTable-DqoppRro.js +75 -0
  27. package/dist/ProjectCredentialsTable-8kXt7sTS.js +37 -0
  28. package/dist/ProjectCredentialsTable-DRMK_SNw.js +37 -0
  29. package/dist/ProjectCredentialsTable-DfkpvTf8.js +37 -0
  30. package/dist/UserCredentialsTable-DMh8Wpy7.js +82 -0
  31. package/dist/UserCredentialsTable-DgHZJSHG.js +82 -0
  32. package/dist/UserCredentialsTable-TflQvTEP.js +82 -0
  33. package/dist/baseAppleCommand-1isaFxCQ.js +10 -0
  34. package/dist/baseAppleCommand-B9wyIqdL.js +10 -0
  35. package/dist/baseAppleCommand-DpasCbje.js +10 -0
  36. package/dist/baseGameAndroidCommand-6vsMpE7a.js +43 -0
  37. package/dist/baseGameAndroidCommand-B3LRG701.js +43 -0
  38. package/dist/baseGameAndroidCommand-C9BuS2Sr.js +43 -0
  39. package/dist/commands/apple/apiKey/create.js +10 -10
  40. package/dist/commands/apple/apiKey/export.js +8 -8
  41. package/dist/commands/apple/apiKey/import.js +8 -8
  42. package/dist/commands/apple/apiKey/status.js +7 -7
  43. package/dist/commands/apple/certificate/create.js +10 -10
  44. package/dist/commands/apple/certificate/export.js +8 -8
  45. package/dist/commands/apple/certificate/import.js +8 -8
  46. package/dist/commands/apple/certificate/status.js +7 -7
  47. package/dist/commands/apple/login.js +2 -2
  48. package/dist/commands/apple/status.js +6 -6
  49. package/dist/commands/dashboard.js +1 -1
  50. package/dist/commands/game/android/apiKey/connect.js +11 -11
  51. package/dist/commands/game/android/apiKey/create.js +13 -13
  52. package/dist/commands/game/android/apiKey/export.js +9 -9
  53. package/dist/commands/game/android/apiKey/import.js +9 -9
  54. package/dist/commands/game/android/apiKey/invite.js +4 -4
  55. package/dist/commands/game/android/apiKey/status.js +9 -9
  56. package/dist/commands/game/android/keyStore/create.js +12 -12
  57. package/dist/commands/game/android/keyStore/export.js +8 -8
  58. package/dist/commands/game/android/keyStore/import.js +49 -29
  59. package/dist/commands/game/android/keyStore/status.js +8 -8
  60. package/dist/commands/game/android/status.js +7 -7
  61. package/dist/commands/game/build/download.js +7 -7
  62. package/dist/commands/game/build/list.js +7 -7
  63. package/dist/commands/game/create.js +2 -2
  64. package/dist/commands/game/details.js +22 -8
  65. package/dist/commands/game/export.js +1 -1
  66. package/dist/commands/game/ios/app/addTester.js +6 -6
  67. package/dist/commands/game/ios/app/create.js +5 -5
  68. package/dist/commands/game/ios/app/status.js +9 -9
  69. package/dist/commands/game/ios/app/sync.js +7 -7
  70. package/dist/commands/game/ios/profile/create.js +10 -10
  71. package/dist/commands/game/ios/profile/export.js +8 -8
  72. package/dist/commands/game/ios/profile/import.js +8 -8
  73. package/dist/commands/game/ios/profile/status.js +8 -8
  74. package/dist/commands/game/ios/status.js +10 -10
  75. package/dist/commands/game/ios/wizard.js +2 -2
  76. package/dist/commands/game/job/list.js +7 -7
  77. package/dist/commands/game/job/status.js +11 -11
  78. package/dist/commands/game/list.js +7 -7
  79. package/dist/commands/game/ship.js +11 -11
  80. package/dist/commands/game/status.js +7 -7
  81. package/dist/commands/game/wizard.js +590 -35
  82. package/dist/commands/internal/fastlane.js +1 -1
  83. package/dist/commands/internal/readme.js +255 -770
  84. package/dist/commands/login.js +2 -2
  85. package/dist/commands/status.js +6 -6
  86. package/dist/export-B_F6vXIK.js +36 -0
  87. package/dist/export-C_lu1FD9.js +36 -0
  88. package/dist/export-rS9o87LD.js +36 -0
  89. package/dist/import-7T3J63j2.js +38 -0
  90. package/dist/import-Brg3zYmT.js +38 -0
  91. package/dist/import-DPbg8WvS.js +38 -0
  92. package/dist/import-v54PM_Qg.js +47 -0
  93. package/dist/index-BB7X1Pqp.js +695 -0
  94. package/dist/index-BQnkBr1Q.js +136 -0
  95. package/dist/index-BX9h2vPV.js +123 -0
  96. package/dist/index-BjGSEqP5.js +135 -0
  97. package/dist/index-Bv3x8c78.js +693 -0
  98. package/dist/index-ByOvCs4O.js +122 -0
  99. package/dist/index-BzffuqPa.js +24 -0
  100. package/dist/index-C9734Cj2.js +693 -0
  101. package/dist/index-CKYExssR.js +136 -0
  102. package/dist/index-Cz_KLwWf.js +136 -0
  103. package/dist/index-D6BH5UAM.js +135 -0
  104. package/dist/index-DOgF4dFK.js +24 -0
  105. package/dist/index-DgbQBx6x.js +122 -0
  106. package/dist/index-DxHPjZav.js +136 -0
  107. package/dist/index-m4HTrJ5J.js +135 -0
  108. package/dist/index-o9Y-84Rj.js +122 -0
  109. package/dist/upload-2naN75Zu.js +60 -0
  110. package/dist/upload-Cx71802W.js +60 -0
  111. package/dist/upload-DvAE1vDq.js +60 -0
  112. package/dist/useAndroidServiceAccountTestResult-BDc7XpKE.js +52 -0
  113. package/dist/useAndroidServiceAccountTestResult-B_ekRewZ.js +52 -0
  114. package/dist/useAndroidServiceAccountTestResult-Ce1x0Eh8.js +52 -0
  115. package/dist/useAppleApp-BEtLQa7n.js +32 -0
  116. package/dist/useAppleApp-CApC0-4Q.js +32 -0
  117. package/dist/useAppleApp-CETIcsJS.js +32 -0
  118. package/dist/useAppleBundleId-DXbMDRLd.js +64 -0
  119. package/dist/useAppleBundleId-SmzY6rkm.js +64 -0
  120. package/dist/useAppleBundleId-gPBzJwQg.js +64 -0
  121. package/dist/useJobWatching-BIG6fnTN.js +45 -0
  122. package/dist/useJobWatching-Cp-CYd90.js +45 -0
  123. package/dist/useJobWatching-D-YzSlK8.js +45 -0
  124. package/dist/useJobWatching-I_A3b36f.js +45 -0
  125. package/dist/useProjectCredentials-CKngz2rd.js +54 -0
  126. package/dist/useProjectCredentials-EapDge1I.js +54 -0
  127. package/dist/useProjectCredentials-vjedBbKl.js +54 -0
  128. package/dist/useWebSocket-Bep1zAVG.js +36 -0
  129. package/dist/useWebSocket-CBqsjHbt.js +36 -0
  130. package/dist/useWebSocket-rBLiZsKb.js +36 -0
  131. package/dist/wizard-ChPegnMW.js +133 -0
  132. package/npm-shrinkwrap.json +251 -223
  133. package/oclif.manifest.json +282 -223
  134. package/package.json +2 -4
@@ -0,0 +1,133 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { o as getAuthedHeaders, p as API_URL, M as castArrayObjectDates, B as BaseAuthenticatedCommand, s as isCWDGodotGame, P as Platform, C as CredentialsType } from './index-C9734Cj2.js';
3
+ import axios from 'axios';
4
+ import 'crypto-js';
5
+ import 'uuid';
6
+ import 'luxon';
7
+ import 'fs';
8
+ import AppleLogin from './commands/apple/login.js';
9
+
10
+ async function getUserCredentials(pageSize = 100) {
11
+ const headers = getAuthedHeaders();
12
+ const { data } = await axios({
13
+ method: "get",
14
+ url: `${API_URL}/credentials?pageSize=${pageSize}`,
15
+ headers
16
+ });
17
+ return castArrayObjectDates(data.data);
18
+ }
19
+ async function getProjectCredentials(projectId, pageSize = 100) {
20
+ const headers = getAuthedHeaders();
21
+ const { data } = await axios({
22
+ method: "get",
23
+ url: `${API_URL}/projects/${projectId}/credentials?pageSize=${pageSize}`,
24
+ headers
25
+ });
26
+ return castArrayObjectDates(data.data);
27
+ }
28
+
29
+ class GameIosWizard extends BaseAuthenticatedCommand {
30
+ static args = {};
31
+ static description = "Runs all the steps for iOS";
32
+ static examples = ["<%= config.bin %> <%= command.id %>"];
33
+ static flags = {
34
+ forceStep: Flags.string({
35
+ char: "f",
36
+ description: "Force a specific step to run."
37
+ })
38
+ };
39
+ async run() {
40
+ const { flags } = this;
41
+ if (!isCWDGodotGame()) {
42
+ this.error(
43
+ "No Godot project detected. Please run this from a Godot project directory with a project.godot file.",
44
+ { exit: 1 }
45
+ );
46
+ }
47
+ const projectConfig = await this.getProjectConfigSafe();
48
+ const game = projectConfig.project;
49
+ const isStepForced = (commandName) => flags.forceStep?.includes(commandName);
50
+ const iosSteps = [
51
+ {
52
+ command: "game:create",
53
+ args: ["--quiet"],
54
+ shouldRun: async () => !game
55
+ },
56
+ {
57
+ command: "apple:login",
58
+ args: ["--quiet"],
59
+ shouldRun: async () => {
60
+ const isLoggedIn = await this.hasValidAppleAuthState();
61
+ return !isLoggedIn;
62
+ }
63
+ },
64
+ {
65
+ command: "apple:apiKey:create",
66
+ args: ["--quiet"],
67
+ shouldRun: async () => {
68
+ const userCredentials = await getUserCredentials();
69
+ const userAppleApiKeyCredentials = userCredentials.filter(
70
+ (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.KEY
71
+ );
72
+ return userAppleApiKeyCredentials.length === 0;
73
+ }
74
+ },
75
+ {
76
+ command: "apple:certificate:create",
77
+ args: ["--quiet"],
78
+ shouldRun: async () => {
79
+ const userCredentials = await getUserCredentials();
80
+ const userAppleDistCredentials = userCredentials.filter(
81
+ (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
82
+ );
83
+ return userAppleDistCredentials.length === 0;
84
+ }
85
+ },
86
+ {
87
+ command: "game:ios:app:create",
88
+ args: ["--quiet"],
89
+ shouldRun: async () => {
90
+ if (!game) return true;
91
+ const hasBundleIdSet = !!game.details?.iosBundleId;
92
+ return !hasBundleIdSet;
93
+ }
94
+ },
95
+ {
96
+ command: "game:ios:app:sync",
97
+ args: ["--quiet"],
98
+ // Can always run this
99
+ shouldRun: async () => true
100
+ },
101
+ {
102
+ command: "game:ios:profile:create",
103
+ args: ["--quiet"],
104
+ shouldRun: async () => {
105
+ if (!game) return true;
106
+ const projectCredentials = await getProjectCredentials(game.id);
107
+ const projectAppleProfileCredentials = projectCredentials.filter(
108
+ (cred) => cred.platform == Platform.IOS && cred.type == CredentialsType.CERTIFICATE
109
+ );
110
+ return projectAppleProfileCredentials.length === 0;
111
+ }
112
+ }
113
+ ];
114
+ for (const step of iosSteps) {
115
+ const command = step.command;
116
+ const willRun = isStepForced(command) || await step.shouldRun();
117
+ if (!willRun) {
118
+ this.debug(`Skipping step: ${command}`);
119
+ continue;
120
+ }
121
+ const args = [...step.args, ...isStepForced(command) ? ["--force"] : []];
122
+ this.debug(`Running step: ${command} with args: ${args.join(" ")}`);
123
+ if (command === "apple:login") {
124
+ await AppleLogin.run(args);
125
+ } else {
126
+ await this.config.runCommand(command, args);
127
+ }
128
+ }
129
+ await this.config.runCommand("game:status");
130
+ }
131
+ }
132
+
133
+ export { GameIosWizard as G, getProjectCredentials as a, getUserCredentials as g };