shipthis 0.1.2 → 0.1.3

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 (83) hide show
  1. package/assets/markdown/android-success.md +17 -0
  2. package/assets/markdown/create-google-play-game.md +20 -0
  3. package/assets/markdown/invite-service-account.md +11 -0
  4. package/assets/markdown/privacy-notification.md +10 -0
  5. package/bin/alias-built.sh +10 -0
  6. package/dist/{AppleBundleIdDetails-BF-Pm1Ia.js → AppleBundleIdDetails-C0XqjxKJ.js} +5 -6
  7. package/dist/Command-Cl-JfhTy.js +203 -0
  8. package/dist/{CommandGame-D9wl8hfX.js → CommandGame--SAa3wEL.js} +1 -1
  9. package/dist/CreateKeystore-Dm0KVh85.js +56 -0
  10. package/dist/{NextSteps-DKcjSHZ3.js → NextSteps-CK9zHOCt.js} +1 -1
  11. package/dist/{ProjectCredentialsTable-BVvkIPjN.js → ProjectCredentialsTable-Ch8022rs.js} +3 -2
  12. package/dist/RunWithSpinner-BVXNWGD3.js +27 -0
  13. package/dist/{StatusTable-BzsNF75L.js → StatusTable-Dm5St4g-.js} +1 -1
  14. package/dist/Title-BCQtayg6.js +6 -0
  15. package/dist/{UserCredentialsTable-DUFQqHVt.js → UserCredentialsTable-ysmM5dlV.js} +4 -4
  16. package/dist/{baseAppleCommand-BSJhK8GA.js → baseAppleCommand-B3WQtlx-.js} +1 -1
  17. package/dist/{baseGameAndroidCommand-CPAtReqy.js → baseGameAndroidCommand-B-CFhPnE.js} +2 -2
  18. package/dist/commands/apple/apiKey/create.js +12 -12
  19. package/dist/commands/apple/apiKey/export.js +11 -11
  20. package/dist/commands/apple/apiKey/import.js +11 -11
  21. package/dist/commands/apple/apiKey/status.js +12 -13
  22. package/dist/commands/apple/certificate/create.js +12 -12
  23. package/dist/commands/apple/certificate/export.js +11 -11
  24. package/dist/commands/apple/certificate/import.js +11 -11
  25. package/dist/commands/apple/certificate/status.js +11 -12
  26. package/dist/commands/apple/login.js +2 -2
  27. package/dist/commands/apple/status.js +12 -13
  28. package/dist/commands/dashboard.js +1 -1
  29. package/dist/commands/game/android/apiKey/connect.js +12 -12
  30. package/dist/commands/game/android/apiKey/create.js +14 -12
  31. package/dist/commands/game/android/apiKey/export.js +12 -12
  32. package/dist/commands/game/android/apiKey/import.js +12 -12
  33. package/dist/commands/game/android/apiKey/invite.js +4 -4
  34. package/dist/commands/game/android/apiKey/status.js +12 -12
  35. package/dist/commands/game/android/keyStore/create.js +12 -11
  36. package/dist/commands/game/android/keyStore/export.js +11 -11
  37. package/dist/commands/game/android/keyStore/import.js +11 -11
  38. package/dist/commands/game/android/keyStore/status.js +11 -11
  39. package/dist/commands/game/android/status.js +13 -14
  40. package/dist/commands/game/android/wizard.js +533 -20
  41. package/dist/commands/game/build/download.js +10 -11
  42. package/dist/commands/game/build/list.js +10 -11
  43. package/dist/commands/game/create.js +2 -2
  44. package/dist/commands/game/details.js +10 -11
  45. package/dist/commands/game/export.js +1 -1
  46. package/dist/commands/game/ios/app/addTester.js +10 -11
  47. package/dist/commands/game/ios/app/create.js +9 -10
  48. package/dist/commands/game/ios/app/status.js +13 -14
  49. package/dist/commands/game/ios/app/sync.js +10 -11
  50. package/dist/commands/game/ios/profile/create.js +12 -12
  51. package/dist/commands/game/ios/profile/export.js +11 -11
  52. package/dist/commands/game/ios/profile/import.js +11 -11
  53. package/dist/commands/game/ios/profile/status.js +12 -12
  54. package/dist/commands/game/ios/status.js +16 -17
  55. package/dist/commands/game/ios/wizard.js +2 -2
  56. package/dist/commands/game/job/list.js +8 -10
  57. package/dist/commands/game/job/status.js +14 -13
  58. package/dist/commands/game/list.js +8 -10
  59. package/dist/commands/game/ship.js +2 -2
  60. package/dist/commands/game/status.js +13 -14
  61. package/dist/commands/game/wizard.js +1 -1
  62. package/dist/commands/internal/fastlane.js +1 -1
  63. package/dist/commands/internal/readme.js +1 -1
  64. package/dist/commands/login.js +2 -2
  65. package/dist/commands/status.js +11 -11
  66. package/dist/{export-B0FJT0EU.js → export-BiLHgSJ9.js} +1 -1
  67. package/dist/{import-CLDJ2iPu.js → import-CxNikF1c.js} +1 -1
  68. package/dist/index-B5XHQfs2.js +122 -0
  69. package/dist/{index-Df8uXQ4s.js → index-B6V7vGOj.js} +1 -1
  70. package/dist/{index-CF0fIsx2.js → index-BQRxiyqn.js} +1 -1
  71. package/dist/{index-CFHmtzfq.js → index-BuZmCvZh.js} +1 -1
  72. package/dist/index-CgBgZUkL.js +144 -0
  73. package/dist/{upload-C5L82Yq0.js → upload-CMo3hUhl.js} +1 -1
  74. package/dist/{useAndroidServiceAccountTestResult-BnxNuoG3.js → useAndroidServiceAccountTestResult-D_30xIJA.js} +1 -1
  75. package/dist/{useAppleApp-IXRdsK5w.js → useAppleApp-DnSjUfSs.js} +1 -1
  76. package/dist/{useAppleBundleId-DYC5ISKT.js → useAppleBundleId-BNI8swhC.js} +1 -1
  77. package/dist/useJobWatching-Bz1e6xOv.js +43 -0
  78. package/dist/useProjectCredentials-B5ZmpIxL.js +54 -0
  79. package/dist/useWebSocket-DoImIdTy.js +36 -0
  80. package/npm-shrinkwrap.json +2 -2
  81. package/oclif.manifest.json +115 -115
  82. package/package.json +3 -2
  83. package/dist/Command-BrfJSeOC.js +0 -1077
@@ -0,0 +1,54 @@
1
+ import axios from 'axios';
2
+ import { useQuery } from '@tanstack/react-query';
3
+ import { c as cacheKeys } from './useAndroidServiceAccountTestResult-D_30xIJA.js';
4
+ import { b as getShortDate, p as getAuthedHeaders, q as API_URL, J as castArrayObjectDates } from './index-BQRxiyqn.js';
5
+ import { g as getShortUUID } from './index-B6V7vGOj.js';
6
+
7
+ async function queryProjectCredentials({
8
+ projectId,
9
+ ...pageAndSortParams
10
+ }) {
11
+ try {
12
+ const headers = getAuthedHeaders();
13
+ const url = `${API_URL}/projects/${projectId}/credentials`;
14
+ const response = await axios.get(url, { headers, params: pageAndSortParams });
15
+ return {
16
+ ...response.data,
17
+ data: castArrayObjectDates(response.data.data)
18
+ };
19
+ } catch (error) {
20
+ console.warn("queryProjectCredentials Error", error);
21
+ throw error;
22
+ }
23
+ }
24
+ function getProjectCredentialSummary(credential) {
25
+ return {
26
+ id: getShortUUID(credential.id),
27
+ type: credential.type,
28
+ serial: credential.serialNumber.substring(0, 30) + (credential.serialNumber.length > 30 ? "\u2026" : ""),
29
+ isActive: credential.isActive,
30
+ createdAt: getShortDate(credential.createdAt)
31
+ };
32
+ }
33
+ const useProjectCredentials = ({
34
+ platform,
35
+ type,
36
+ ...fetchProps
37
+ }) => {
38
+ const queryResult = useQuery({
39
+ queryKey: cacheKeys.projectCredentials(fetchProps),
40
+ queryFn: async () => queryProjectCredentials(fetchProps),
41
+ select: (data) => {
42
+ if (!(platform || type)) return data;
43
+ return {
44
+ ...data,
45
+ data: data.data.filter((credential) => {
46
+ return (!platform || credential.platform === platform) && (!type || credential.type === type);
47
+ })
48
+ };
49
+ }
50
+ });
51
+ return queryResult;
52
+ };
53
+
54
+ export { getProjectCredentialSummary as g, useProjectCredentials as u };
@@ -0,0 +1,36 @@
1
+ import { useEffect } from 'react';
2
+ import { io } from 'socket.io-client';
3
+ import { Q as getAuthToken, W as WS_URL } from './index-BQRxiyqn.js';
4
+
5
+ function useWebSocket(listeners = []) {
6
+ const log = () => {
7
+ };
8
+ useEffect(() => {
9
+ if (listeners.length === 0) {
10
+ return;
11
+ }
12
+ const token = getAuthToken();
13
+ const socket = io(WS_URL, {
14
+ auth: { token },
15
+ forceNew: true
16
+ });
17
+ socket.on("connect", () => log());
18
+ for (const listener of listeners) {
19
+ const pattern = listener.getPattern();
20
+ const bindSocket = (pattern2) => {
21
+ const boundListener = listener.eventHandler.bind(listener, pattern2);
22
+ socket.on(pattern2, boundListener);
23
+ };
24
+ if (Array.isArray(pattern)) {
25
+ pattern.forEach(bindSocket);
26
+ continue;
27
+ }
28
+ bindSocket(pattern);
29
+ }
30
+ return () => {
31
+ socket.disconnect();
32
+ };
33
+ }, []);
34
+ }
35
+
36
+ export { useWebSocket as u };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "shipthis",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "shipthis",
9
- "version": "0.1.2",
9
+ "version": "0.1.3",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@expo/apple-utils": "2.0.3",
@@ -957,13 +957,24 @@
957
957
  "status.js"
958
958
  ]
959
959
  },
960
- "game:android:status": {
960
+ "game:build:download": {
961
961
  "aliases": [],
962
- "args": {},
963
- "description": "Shows the status of the setup for the Android platform for a specific game.",
962
+ "args": {
963
+ "build_id": {
964
+ "description": "The ID of the build to download",
965
+ "name": "build_id",
966
+ "required": true
967
+ },
968
+ "file": {
969
+ "description": "Name of the file to output",
970
+ "name": "file",
971
+ "required": true
972
+ }
973
+ },
974
+ "description": "Downloads the given build artifact to the specified file",
964
975
  "examples": [
965
- "<%= config.bin %> <%= command.id %>",
966
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
976
+ "<%= config.bin %> <%= command.id %> 7a3f5c92 output.ipa",
977
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4 e4b9a3d7 output.apk"
967
978
  ],
968
979
  "flags": {
969
980
  "gameId": {
@@ -973,11 +984,18 @@
973
984
  "hasDynamicHelp": false,
974
985
  "multiple": false,
975
986
  "type": "option"
987
+ },
988
+ "force": {
989
+ "char": "f",
990
+ "description": "Overwrite the file if it already exists",
991
+ "name": "force",
992
+ "allowNo": false,
993
+ "type": "boolean"
976
994
  }
977
995
  },
978
996
  "hasDynamicHelp": false,
979
997
  "hiddenAliases": [],
980
- "id": "game:android:status",
998
+ "id": "game:build:download",
981
999
  "pluginAlias": "shipthis",
982
1000
  "pluginName": "shipthis",
983
1001
  "pluginType": "core",
@@ -988,78 +1006,76 @@
988
1006
  "dist",
989
1007
  "commands",
990
1008
  "game",
991
- "android",
992
- "status.js"
1009
+ "build",
1010
+ "download.js"
993
1011
  ]
994
1012
  },
995
- "game:android:wizard": {
1013
+ "game:build:list": {
996
1014
  "aliases": [],
997
1015
  "args": {},
998
- "description": "Prototype Android Wizard",
1016
+ "description": "Lists the builds for successful jobs of a game.",
999
1017
  "examples": [
1000
- "<%= config.bin %> <%= command.id %>"
1018
+ "<%= config.bin %> <%= command.id %>",
1019
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4",
1020
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4 --pageSize 20 --pageNumber 1"
1001
1021
  ],
1002
1022
  "flags": {
1003
- "name": {
1004
- "char": "n",
1005
- "description": "The name of the game",
1006
- "name": "name",
1023
+ "gameId": {
1024
+ "char": "g",
1025
+ "description": "The ID of the game",
1026
+ "name": "gameId",
1007
1027
  "hasDynamicHelp": false,
1008
1028
  "multiple": false,
1009
1029
  "type": "option"
1010
1030
  },
1011
- "buildNumber": {
1012
- "char": "b",
1013
- "description": "Set the build number",
1014
- "name": "buildNumber",
1031
+ "pageNumber": {
1032
+ "char": "p",
1033
+ "description": "The page number to show (starts at 0)",
1034
+ "name": "pageNumber",
1035
+ "default": 0,
1015
1036
  "hasDynamicHelp": false,
1016
1037
  "multiple": false,
1017
1038
  "type": "option"
1018
1039
  },
1019
- "semanticVersion": {
1040
+ "pageSize": {
1020
1041
  "char": "s",
1021
- "description": "Set the semantic version",
1022
- "name": "semanticVersion",
1023
- "hasDynamicHelp": false,
1024
- "multiple": false,
1025
- "type": "option"
1026
- },
1027
- "gameEngine": {
1028
- "char": "e",
1029
- "description": "Set the game engine",
1030
- "name": "gameEngine",
1031
- "hasDynamicHelp": false,
1032
- "multiple": false,
1033
- "type": "option"
1034
- },
1035
- "gameEngineVersion": {
1036
- "char": "v",
1037
- "description": "Set the game engine version",
1038
- "name": "gameEngineVersion",
1042
+ "description": "The number of items to show per page",
1043
+ "name": "pageSize",
1044
+ "default": 10,
1039
1045
  "hasDynamicHelp": false,
1040
1046
  "multiple": false,
1041
1047
  "type": "option"
1042
1048
  },
1043
- "iosBundleId": {
1044
- "char": "i",
1045
- "description": "Set the iOS bundle ID",
1046
- "name": "iosBundleId",
1049
+ "orderBy": {
1050
+ "char": "o",
1051
+ "description": "The field to order by",
1052
+ "name": "orderBy",
1053
+ "default": "createdAt",
1047
1054
  "hasDynamicHelp": false,
1048
1055
  "multiple": false,
1056
+ "options": [
1057
+ "createdAt",
1058
+ "updatedAt"
1059
+ ],
1049
1060
  "type": "option"
1050
1061
  },
1051
- "androidPackageName": {
1052
- "char": "a",
1053
- "description": "Set the Android package name",
1054
- "name": "androidPackageName",
1062
+ "order": {
1063
+ "char": "r",
1064
+ "description": "The order to sort by",
1065
+ "name": "order",
1066
+ "default": "desc",
1055
1067
  "hasDynamicHelp": false,
1056
1068
  "multiple": false,
1069
+ "options": [
1070
+ "asc",
1071
+ "desc"
1072
+ ],
1057
1073
  "type": "option"
1058
1074
  }
1059
1075
  },
1060
1076
  "hasDynamicHelp": false,
1061
1077
  "hiddenAliases": [],
1062
- "id": "game:android:wizard",
1078
+ "id": "game:build:list",
1063
1079
  "pluginAlias": "shipthis",
1064
1080
  "pluginName": "shipthis",
1065
1081
  "pluginType": "core",
@@ -1070,28 +1086,17 @@
1070
1086
  "dist",
1071
1087
  "commands",
1072
1088
  "game",
1073
- "android",
1074
- "wizard.js"
1089
+ "build",
1090
+ "list.js"
1075
1091
  ]
1076
1092
  },
1077
- "game:build:download": {
1093
+ "game:android:status": {
1078
1094
  "aliases": [],
1079
- "args": {
1080
- "build_id": {
1081
- "description": "The ID of the build to download",
1082
- "name": "build_id",
1083
- "required": true
1084
- },
1085
- "file": {
1086
- "description": "Name of the file to output",
1087
- "name": "file",
1088
- "required": true
1089
- }
1090
- },
1091
- "description": "Downloads the given build artifact to the specified file",
1095
+ "args": {},
1096
+ "description": "Shows the status of the setup for the Android platform for a specific game.",
1092
1097
  "examples": [
1093
- "<%= config.bin %> <%= command.id %> 7a3f5c92 output.ipa",
1094
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4 e4b9a3d7 output.apk"
1098
+ "<%= config.bin %> <%= command.id %>",
1099
+ "<%= config.bin %> <%= command.id %> --gameId 0c179fc4"
1095
1100
  ],
1096
1101
  "flags": {
1097
1102
  "gameId": {
@@ -1101,18 +1106,11 @@
1101
1106
  "hasDynamicHelp": false,
1102
1107
  "multiple": false,
1103
1108
  "type": "option"
1104
- },
1105
- "force": {
1106
- "char": "f",
1107
- "description": "Overwrite the file if it already exists",
1108
- "name": "force",
1109
- "allowNo": false,
1110
- "type": "boolean"
1111
1109
  }
1112
1110
  },
1113
1111
  "hasDynamicHelp": false,
1114
1112
  "hiddenAliases": [],
1115
- "id": "game:build:download",
1113
+ "id": "game:android:status",
1116
1114
  "pluginAlias": "shipthis",
1117
1115
  "pluginName": "shipthis",
1118
1116
  "pluginType": "core",
@@ -1123,76 +1121,78 @@
1123
1121
  "dist",
1124
1122
  "commands",
1125
1123
  "game",
1126
- "build",
1127
- "download.js"
1124
+ "android",
1125
+ "status.js"
1128
1126
  ]
1129
1127
  },
1130
- "game:build:list": {
1128
+ "game:android:wizard": {
1131
1129
  "aliases": [],
1132
1130
  "args": {},
1133
- "description": "Lists the builds for successful jobs of a game.",
1131
+ "description": "Prototype Android Wizard",
1134
1132
  "examples": [
1135
- "<%= config.bin %> <%= command.id %>",
1136
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4",
1137
- "<%= config.bin %> <%= command.id %> --gameId 0c179fc4 --pageSize 20 --pageNumber 1"
1133
+ "<%= config.bin %> <%= command.id %>"
1138
1134
  ],
1139
1135
  "flags": {
1140
- "gameId": {
1141
- "char": "g",
1142
- "description": "The ID of the game",
1143
- "name": "gameId",
1136
+ "name": {
1137
+ "char": "n",
1138
+ "description": "The name of the game",
1139
+ "name": "name",
1144
1140
  "hasDynamicHelp": false,
1145
1141
  "multiple": false,
1146
1142
  "type": "option"
1147
1143
  },
1148
- "pageNumber": {
1149
- "char": "p",
1150
- "description": "The page number to show (starts at 0)",
1151
- "name": "pageNumber",
1152
- "default": 0,
1144
+ "buildNumber": {
1145
+ "char": "b",
1146
+ "description": "Set the build number",
1147
+ "name": "buildNumber",
1153
1148
  "hasDynamicHelp": false,
1154
1149
  "multiple": false,
1155
1150
  "type": "option"
1156
1151
  },
1157
- "pageSize": {
1152
+ "semanticVersion": {
1158
1153
  "char": "s",
1159
- "description": "The number of items to show per page",
1160
- "name": "pageSize",
1161
- "default": 10,
1154
+ "description": "Set the semantic version",
1155
+ "name": "semanticVersion",
1162
1156
  "hasDynamicHelp": false,
1163
1157
  "multiple": false,
1164
1158
  "type": "option"
1165
1159
  },
1166
- "orderBy": {
1167
- "char": "o",
1168
- "description": "The field to order by",
1169
- "name": "orderBy",
1170
- "default": "createdAt",
1160
+ "gameEngine": {
1161
+ "char": "e",
1162
+ "description": "Set the game engine",
1163
+ "name": "gameEngine",
1171
1164
  "hasDynamicHelp": false,
1172
1165
  "multiple": false,
1173
- "options": [
1174
- "createdAt",
1175
- "updatedAt"
1176
- ],
1177
1166
  "type": "option"
1178
1167
  },
1179
- "order": {
1180
- "char": "r",
1181
- "description": "The order to sort by",
1182
- "name": "order",
1183
- "default": "desc",
1168
+ "gameEngineVersion": {
1169
+ "char": "v",
1170
+ "description": "Set the game engine version",
1171
+ "name": "gameEngineVersion",
1172
+ "hasDynamicHelp": false,
1173
+ "multiple": false,
1174
+ "type": "option"
1175
+ },
1176
+ "iosBundleId": {
1177
+ "char": "i",
1178
+ "description": "Set the iOS bundle ID",
1179
+ "name": "iosBundleId",
1180
+ "hasDynamicHelp": false,
1181
+ "multiple": false,
1182
+ "type": "option"
1183
+ },
1184
+ "androidPackageName": {
1185
+ "char": "a",
1186
+ "description": "Set the Android package name",
1187
+ "name": "androidPackageName",
1184
1188
  "hasDynamicHelp": false,
1185
1189
  "multiple": false,
1186
- "options": [
1187
- "asc",
1188
- "desc"
1189
- ],
1190
1190
  "type": "option"
1191
1191
  }
1192
1192
  },
1193
1193
  "hasDynamicHelp": false,
1194
1194
  "hiddenAliases": [],
1195
- "id": "game:build:list",
1195
+ "id": "game:android:wizard",
1196
1196
  "pluginAlias": "shipthis",
1197
1197
  "pluginName": "shipthis",
1198
1198
  "pluginType": "core",
@@ -1203,8 +1203,8 @@
1203
1203
  "dist",
1204
1204
  "commands",
1205
1205
  "game",
1206
- "build",
1207
- "list.js"
1206
+ "android",
1207
+ "wizard.js"
1208
1208
  ]
1209
1209
  },
1210
1210
  "game:ios:status": {
@@ -2261,5 +2261,5 @@
2261
2261
  ]
2262
2262
  }
2263
2263
  },
2264
- "version": "0.1.2"
2264
+ "version": "0.1.3"
2265
2265
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shipthis",
3
3
  "description": "ShipThis manages building and uploading your Godot games to the App Store and Google Play.",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "author": "Hello Invent Ltd",
6
6
  "bin": {
7
7
  "shipthis": "./bin/run.js"
@@ -81,6 +81,7 @@
81
81
  "node": ">=18.0.0"
82
82
  },
83
83
  "files": [
84
+ "/assets",
84
85
  "/bin",
85
86
  "/dist",
86
87
  "/docs",
@@ -206,7 +207,7 @@
206
207
  "scripts": {
207
208
  "build-original": "shx rm -rf dist && tsc -b",
208
209
  "build-tsc-alias": "shx rm -rf dist && npx tsc --build && npx tsc-alias -p tsconfig.json",
209
- "build": "pkgroll --clean-dist",
210
+ "build": "pkgroll --clean-dis",
210
211
  "lint": "eslint . --ext .ts",
211
212
  "posttest": "npm run lint",
212
213
  "prepack": "cp package-lock.json package-lock.dev.json || true && npm run readme && oclif manifest && npm shrinkwrap",