shipthis 0.0.1

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 (67) hide show
  1. package/README.md +894 -0
  2. package/bin/alias.sh +10 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/dev.js +7 -0
  5. package/bin/dev.tsc.js +15 -0
  6. package/bin/loader.js +20 -0
  7. package/bin/run.cmd +3 -0
  8. package/bin/run.js +5 -0
  9. package/bin/run.tsc.js +15 -0
  10. package/dist/App-DFPMSEZF.js +21 -0
  11. package/dist/AppleBundleIdDetails-CuhAbVEp.js +61 -0
  12. package/dist/NextSteps-CK9zHOCt.js +18 -0
  13. package/dist/RunWithSpinner-BVXNWGD3.js +27 -0
  14. package/dist/StatusTable-CxuX_R1D.js +38 -0
  15. package/dist/Table-CvM6pccN.js +101 -0
  16. package/dist/Title-BCQtayg6.js +6 -0
  17. package/dist/UserCredentialsTable-DHeRI4h6.js +76 -0
  18. package/dist/baseAppleCommand-BXUu-026.js +10 -0
  19. package/dist/baseGameCommand-xrD2WDDN.js +599 -0
  20. package/dist/cacheKeys-CShA-ZjE.js +9 -0
  21. package/dist/commands/apple/apiKey/create.js +88 -0
  22. package/dist/commands/apple/apiKey/export.js +66 -0
  23. package/dist/commands/apple/apiKey/import.js +70 -0
  24. package/dist/commands/apple/apiKey/status.js +108 -0
  25. package/dist/commands/apple/certificate/create.js +118 -0
  26. package/dist/commands/apple/certificate/export.js +66 -0
  27. package/dist/commands/apple/certificate/import.js +70 -0
  28. package/dist/commands/apple/certificate/status.js +116 -0
  29. package/dist/commands/apple/login.js +74 -0
  30. package/dist/commands/apple/status.js +50 -0
  31. package/dist/commands/dashboard.js +32 -0
  32. package/dist/commands/game/build/download.js +78 -0
  33. package/dist/commands/game/build/list.js +83 -0
  34. package/dist/commands/game/create.js +59 -0
  35. package/dist/commands/game/details.js +89 -0
  36. package/dist/commands/game/export.js +52 -0
  37. package/dist/commands/game/ios/app/addTester.js +111 -0
  38. package/dist/commands/game/ios/app/create.js +104 -0
  39. package/dist/commands/game/ios/app/status.js +52 -0
  40. package/dist/commands/game/ios/app/sync.js +81 -0
  41. package/dist/commands/game/ios/profile/create.js +110 -0
  42. package/dist/commands/game/ios/profile/export.js +68 -0
  43. package/dist/commands/game/ios/profile/import.js +77 -0
  44. package/dist/commands/game/ios/profile/status.js +183 -0
  45. package/dist/commands/game/ios/status.js +79 -0
  46. package/dist/commands/game/job/list.js +80 -0
  47. package/dist/commands/game/job/status.js +297 -0
  48. package/dist/commands/game/list.js +69 -0
  49. package/dist/commands/game/ship.js +67 -0
  50. package/dist/commands/game/status.js +76 -0
  51. package/dist/commands/game/wizard.js +124 -0
  52. package/dist/commands/login.js +63 -0
  53. package/dist/commands/status.js +80 -0
  54. package/dist/export-CujqsTR_.js +36 -0
  55. package/dist/git-DREGq-jc.js +32 -0
  56. package/dist/import-Q-KO61ll.js +38 -0
  57. package/dist/index-DKsVctbw.js +125 -0
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.js +1 -0
  60. package/dist/run.js +3 -0
  61. package/dist/upload-CUlWmNbS.js +60 -0
  62. package/dist/useAppleApp-BmwYu7qG.js +32 -0
  63. package/dist/useAppleBundleId-DCJnfNWr.js +64 -0
  64. package/dist/useBuilds-Dh_PWwCf.js +41 -0
  65. package/dist/useJob-CCkqCMvF.js +34 -0
  66. package/oclif.manifest.json +1510 -0
  67. package/package.json +167 -0
@@ -0,0 +1,41 @@
1
+ import axios from 'axios';
2
+ import { useQuery } from '@tanstack/react-query';
3
+ import { P as Platform, H as getShortDateTime, o as getAuthedHeaders, p as API_URL, I as castArrayObjectDates } from './baseGameCommand-xrD2WDDN.js';
4
+ import { c as cacheKeys } from './cacheKeys-CShA-ZjE.js';
5
+ import { g as getShortUUID, c as getPlatformName } from './index-DKsVctbw.js';
6
+ import { g as getJobDetailsSummary } from './useJob-CCkqCMvF.js';
7
+
8
+ async function queryBuilds({ projectId, ...pageAndSortParams }) {
9
+ try {
10
+ const headers = getAuthedHeaders();
11
+ const url = `${API_URL}/projects/${projectId}/builds`;
12
+ const response = await axios.get(url, { headers, params: pageAndSortParams });
13
+ return {
14
+ ...response.data,
15
+ data: castArrayObjectDates(response.data.data)
16
+ };
17
+ } catch (error) {
18
+ console.warn("queryBuilds Error", error);
19
+ throw error;
20
+ }
21
+ }
22
+ function getBuildSummary(build) {
23
+ const filename = build.platform == Platform.IOS ? "output.ipa" : "output.apk";
24
+ return {
25
+ id: getShortUUID(build.id),
26
+ ...getJobDetailsSummary(build.jobDetails),
27
+ platform: getPlatformName(build.platform),
28
+ jobId: getShortUUID(build.jobId),
29
+ createdAt: getShortDateTime(build.createdAt),
30
+ cmd: `$ shipthis game build download ${getShortUUID(build.id)} ${filename}`
31
+ };
32
+ }
33
+ const useBuilds = (props) => {
34
+ const queryResult = useQuery({
35
+ queryKey: cacheKeys.builds(props),
36
+ queryFn: async () => queryBuilds(props)
37
+ });
38
+ return queryResult;
39
+ };
40
+
41
+ export { getBuildSummary as g, useBuilds as u };
@@ -0,0 +1,34 @@
1
+ import { useQuery } from '@tanstack/react-query';
2
+ import { c as cacheKeys } from './cacheKeys-CShA-ZjE.js';
3
+ import { K as JobStatus, H as getShortDateTime, L as getShortTimeDelta, M as getJob } from './baseGameCommand-xrD2WDDN.js';
4
+ import { g as getShortUUID, c as getPlatformName } from './index-DKsVctbw.js';
5
+
6
+ function getJobDetailsSummary(jobDetails) {
7
+ const semanticVersion = jobDetails?.semanticVersion || "N/A";
8
+ const buildNumber = jobDetails?.buildNumber || "N/A";
9
+ const gitCommit = jobDetails?.gitCommitHash ? getShortUUID(jobDetails?.gitCommitHash) : "N/A";
10
+ const gitBranch = jobDetails?.gitBranch || "N/A";
11
+ return {
12
+ version: `${semanticVersion} (${buildNumber})`,
13
+ gitInfo: `${gitCommit} (${gitBranch})`
14
+ };
15
+ }
16
+ function getJobSummary(job, timeNow) {
17
+ const inProgress = ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
18
+ return {
19
+ id: getShortUUID(job.id),
20
+ ...getJobDetailsSummary(job.details),
21
+ platform: getPlatformName(job.type),
22
+ status: job.status,
23
+ createdAt: getShortDateTime(job.createdAt),
24
+ runtime: getShortTimeDelta(job.createdAt, inProgress ? timeNow : job.updatedAt)
25
+ };
26
+ }
27
+ const useJob = (props) => {
28
+ return useQuery({
29
+ queryKey: cacheKeys.job(props),
30
+ queryFn: () => getJob(props.jobId, props.projectId)
31
+ });
32
+ };
33
+
34
+ export { getJobSummary as a, getJobDetailsSummary as g, useJob as u };