shipthis 0.1.11 → 0.1.13
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/assets/markdown/ship-failure.md +13 -0
- package/assets/markdown/ship-success.md +12 -0
- package/dist/{AppleBundleIdDetails-DymjrhOZ.js → AppleBundleIdDetails-DxWVnxa5.js} +4 -4
- package/dist/{Command-1YAl_0zS.js → Command-zfJ7qIJI.js} +8 -8
- package/dist/{CommandGame--SAa3wEL.js → CommandGame-DVsNreSF.js} +1 -1
- package/dist/{Create-DIaSKUpl.js → Create-DdF29mIS.js} +3 -3
- package/dist/{Import-BIOsf8AA.js → Import-D8ik724M.js} +4 -4
- package/dist/{JobProgress-biiLhigg.js → JobProgress-D1Pe4YJc.js} +10 -7
- package/dist/JobStatusTable-D-daiV-I.js +203 -0
- package/dist/{ProjectCredentialsTable-Ch8022rs.js → ProjectCredentialsTable-Ch2s5qF1.js} +2 -2
- package/dist/{UserCredentialsTable-CeJS3_hd.js → UserCredentialsTable-DzyAHhLB.js} +3 -3
- package/dist/{baseAppleCommand-1isaFxCQ.js → baseAppleCommand-BGXyWK-R.js} +1 -1
- package/dist/{baseGameAndroidCommand-6vsMpE7a.js → baseGameAndroidCommand-mdFhxanf.js} +2 -2
- package/dist/commands/apple/apiKey/create.js +7 -7
- package/dist/commands/apple/apiKey/export.js +6 -6
- package/dist/commands/apple/apiKey/import.js +6 -6
- package/dist/commands/apple/apiKey/status.js +5 -5
- package/dist/commands/apple/certificate/create.js +7 -7
- package/dist/commands/apple/certificate/export.js +6 -6
- package/dist/commands/apple/certificate/import.js +6 -6
- package/dist/commands/apple/certificate/status.js +5 -5
- package/dist/commands/apple/login.js +2 -2
- package/dist/commands/apple/status.js +4 -4
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/game/android/apiKey/connect.js +9 -9
- package/dist/commands/game/android/apiKey/create.js +10 -10
- package/dist/commands/game/android/apiKey/export.js +7 -7
- package/dist/commands/game/android/apiKey/import.js +9 -9
- package/dist/commands/game/android/apiKey/invite.js +4 -4
- package/dist/commands/game/android/apiKey/status.js +7 -7
- package/dist/commands/game/android/keyStore/create.js +8 -8
- package/dist/commands/game/android/keyStore/export.js +6 -6
- package/dist/commands/game/android/keyStore/import.js +9 -9
- package/dist/commands/game/android/keyStore/status.js +6 -6
- package/dist/commands/game/android/status.js +4 -4
- package/dist/commands/game/build/download.js +4 -4
- package/dist/commands/game/build/list.js +5 -5
- package/dist/commands/game/create.js +2 -2
- package/dist/commands/game/details.js +4 -4
- package/dist/commands/game/export.js +1 -1
- package/dist/commands/game/ios/app/addTester.js +5 -5
- package/dist/commands/game/ios/app/create.js +4 -4
- package/dist/commands/game/ios/app/status.js +7 -7
- package/dist/commands/game/ios/app/sync.js +5 -5
- package/dist/commands/game/ios/profile/create.js +7 -7
- package/dist/commands/game/ios/profile/export.js +6 -6
- package/dist/commands/game/ios/profile/import.js +6 -6
- package/dist/commands/game/ios/profile/status.js +6 -6
- package/dist/commands/game/ios/status.js +7 -7
- package/dist/commands/game/ios/wizard.js +2 -2
- package/dist/commands/game/job/list.js +4 -4
- package/dist/commands/game/job/status.js +17 -131
- package/dist/commands/game/list.js +4 -4
- package/dist/commands/game/ship.js +74 -19
- package/dist/commands/game/status.js +4 -4
- package/dist/commands/game/wizard.js +14 -14
- package/dist/commands/internal/fastlane.js +1 -1
- package/dist/commands/internal/readme.js +1 -1
- package/dist/commands/login.js +2 -2
- package/dist/commands/status.js +4 -4
- package/dist/{export-BDxGDZdh.js → export-Cin4rLWR.js} +1 -1
- package/dist/{import-v54PM_Qg.js → import-CXTv9E84.js} +1 -1
- package/dist/{index-BDFKyTPb.js → index-B4v66AKo.js} +1 -1
- package/dist/{index-ByOvCs4O.js → index-BVvcTBnj.js} +4 -4
- package/dist/{index-m4HTrJ5J.js → index-Cx_2qTdS.js} +7 -7
- package/dist/{index-BB7X1Pqp.js → index-Dhx6FAHt.js} +1 -1
- package/dist/{index-wyPoxiTc.js → index-Dj-chiHz.js} +2 -2
- package/dist/{upload-2naN75Zu.js → upload-DZCIfnwf.js} +1 -1
- package/dist/{useAndroidServiceAccountTestResult-BDc7XpKE.js → useAndroidServiceAccountTestResult-L4oozjag.js} +1 -1
- package/dist/{useAppleApp-DgE0wEaq.js → useAppleApp-DcSr-q-w.js} +1 -1
- package/dist/{useAppleBundleId-BNI8swhC.js → useAppleBundleId-BnJVPVIz.js} +1 -1
- package/dist/{useJobWatching-BIG6fnTN.js → useJobWatching-DS0qHqPA.js} +3 -3
- package/dist/{useProjectCredentials-B5ZmpIxL.js → useProjectCredentials-CI_AoXmH.js} +3 -3
- package/dist/{useWebSocket-Bep1zAVG.js → useWebSocket-ZEZvtpT_.js} +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +141 -223
- package/package.json +1 -1
- package/dist/AppleBundleIdDetails-C0XqjxKJ.js +0 -72
- package/dist/AppleBundleIdDetails-CjP5y0cj.js +0 -74
- package/dist/AppleBundleIdDetails-CztWY_mT.js +0 -73
- package/dist/AppleBundleIdDetails-DKeSAte9.js +0 -73
- package/dist/AppleBundleIdDetails-Df30MPFC.js +0 -73
- package/dist/AppleBundleIdDetails-Dxo99Sgu.js +0 -72
- package/dist/Command-BiB9MqbJ.js +0 -204
- package/dist/Command-Cl-JfhTy.js +0 -203
- package/dist/Command-D6rWEZRM.js +0 -204
- package/dist/Command-Dn0P_KOV.js +0 -205
- package/dist/Command-DxmQn3XT.js +0 -204
- package/dist/Command-YJJp90ru.js +0 -204
- package/dist/CommandGame-C1oTlfdb.js +0 -8
- package/dist/CommandGame-CZUx_VQu.js +0 -8
- package/dist/CommandGame-DspVLTPZ.js +0 -8
- package/dist/CommandGame-cPaTk1wh.js +0 -8
- package/dist/CommandGame-k04mHiDl.js +0 -8
- package/dist/CommandGame-pI9VXKxi.js +0 -8
- package/dist/CreateKeystore-BnNdeDUa.js +0 -57
- package/dist/CreateKeystore-BqJdpvsI.js +0 -56
- package/dist/CreateKeystore-Cf-nsK_M.js +0 -56
- package/dist/CreateKeystore-D8uTRamD.js +0 -56
- package/dist/CreateKeystore-Dm0KVh85.js +0 -56
- package/dist/CreateKeystore-g1z6DsU5.js +0 -56
- package/dist/JobProgress-CPkWVSlH.js +0 -108
- package/dist/JobProgress-Dk0UoNah.js +0 -108
- package/dist/JobProgress-W0QQR49T.js +0 -108
- package/dist/JobProgress-jmGAzvxS.js +0 -108
- package/dist/JobStatusTable-BA_q-kgE.js +0 -75
- package/dist/JobStatusTable-ByW0bN6c.js +0 -75
- package/dist/JobStatusTable-CgaTS7jS.js +0 -75
- package/dist/JobStatusTable-DqoppRro.js +0 -75
- package/dist/JobStatusTable-q4atKzhu.js +0 -75
- package/dist/ProjectCredentialsTable-8kXt7sTS.js +0 -37
- package/dist/ProjectCredentialsTable-BIWBAXCh.js +0 -37
- package/dist/ProjectCredentialsTable-DRMK_SNw.js +0 -37
- package/dist/ProjectCredentialsTable-DfkpvTf8.js +0 -37
- package/dist/UserCredentialsTable-DMh8Wpy7.js +0 -82
- package/dist/UserCredentialsTable-DgHZJSHG.js +0 -82
- package/dist/UserCredentialsTable-TflQvTEP.js +0 -82
- package/dist/UserCredentialsTable-ysmM5dlV.js +0 -82
- package/dist/baseAppleCommand-B3WQtlx-.js +0 -10
- package/dist/baseAppleCommand-B9wyIqdL.js +0 -10
- package/dist/baseAppleCommand-D-G4h8zQ.js +0 -10
- package/dist/baseAppleCommand-DpasCbje.js +0 -10
- package/dist/baseGameAndroidCommand-B-CFhPnE.js +0 -43
- package/dist/baseGameAndroidCommand-B3LRG701.js +0 -43
- package/dist/baseGameAndroidCommand-C9BuS2Sr.js +0 -43
- package/dist/baseGameAndroidCommand-DD0H8iy-.js +0 -43
- package/dist/commands/game/android/wizard.js +0 -509
- package/dist/export-B_F6vXIK.js +0 -36
- package/dist/export-BiLHgSJ9.js +0 -36
- package/dist/export-C_lu1FD9.js +0 -36
- package/dist/export-rS9o87LD.js +0 -36
- package/dist/import-7T3J63j2.js +0 -38
- package/dist/import-Brg3zYmT.js +0 -38
- package/dist/import-BrlJuE2Z.js +0 -38
- package/dist/import-CxNikF1c.js +0 -38
- package/dist/import-DPbg8WvS.js +0 -38
- package/dist/index-B5XHQfs2.js +0 -122
- package/dist/index-B6V7vGOj.js +0 -136
- package/dist/index-BL-1G60K.js +0 -135
- package/dist/index-BQRxiyqn.js +0 -693
- package/dist/index-BQnkBr1Q.js +0 -136
- package/dist/index-BX9h2vPV.js +0 -123
- package/dist/index-BjGSEqP5.js +0 -135
- package/dist/index-BuZmCvZh.js +0 -24
- package/dist/index-Bv3x8c78.js +0 -693
- package/dist/index-BzffuqPa.js +0 -24
- package/dist/index-C9734Cj2.js +0 -693
- package/dist/index-CKYExssR.js +0 -136
- package/dist/index-CgBgZUkL.js +0 -144
- package/dist/index-Cz_KLwWf.js +0 -136
- package/dist/index-D6BH5UAM.js +0 -135
- package/dist/index-DBrQda8r.js +0 -122
- package/dist/index-DE2Hvx2o.js +0 -122
- package/dist/index-DOgF4dFK.js +0 -24
- package/dist/index-DdABTtYO.js +0 -693
- package/dist/index-DgbQBx6x.js +0 -122
- package/dist/index-DxHPjZav.js +0 -136
- package/dist/index-X__XH_Fd.js +0 -144
- package/dist/index-o9Y-84Rj.js +0 -122
- package/dist/upload-CMo3hUhl.js +0 -60
- package/dist/upload-Cx71802W.js +0 -60
- package/dist/upload-DvAE1vDq.js +0 -60
- package/dist/upload-LXRr4pMa.js +0 -60
- package/dist/useAndroidServiceAccountTestResult-B_ekRewZ.js +0 -52
- package/dist/useAndroidServiceAccountTestResult-Ce1x0Eh8.js +0 -52
- package/dist/useAndroidServiceAccountTestResult-D_30xIJA.js +0 -52
- package/dist/useAndroidServiceAccountTestResult-InDf5WSl.js +0 -52
- package/dist/useAppleApp-BEtLQa7n.js +0 -32
- package/dist/useAppleApp-CApC0-4Q.js +0 -32
- package/dist/useAppleApp-CETIcsJS.js +0 -32
- package/dist/useAppleApp-DnSjUfSs.js +0 -32
- package/dist/useAppleBundleId-DXbMDRLd.js +0 -64
- package/dist/useAppleBundleId-DtLODy3p.js +0 -64
- package/dist/useAppleBundleId-SmzY6rkm.js +0 -64
- package/dist/useAppleBundleId-gPBzJwQg.js +0 -64
- package/dist/useJobWatching-BcBJ5dy1.js +0 -43
- package/dist/useJobWatching-Bz1e6xOv.js +0 -43
- package/dist/useJobWatching-Cp-CYd90.js +0 -45
- package/dist/useJobWatching-D-YzSlK8.js +0 -45
- package/dist/useJobWatching-I_A3b36f.js +0 -45
- package/dist/useJobWatching-P5oC7mNB.js +0 -45
- package/dist/useProjectCredentials-BRffcsO3.js +0 -54
- package/dist/useProjectCredentials-CKngz2rd.js +0 -54
- package/dist/useProjectCredentials-EapDge1I.js +0 -54
- package/dist/useProjectCredentials-vjedBbKl.js +0 -54
- package/dist/useWebSocket-CBqsjHbt.js +0 -36
- package/dist/useWebSocket-D8PojLtx.js +0 -36
- package/dist/useWebSocket-DoImIdTy.js +0 -36
- package/dist/useWebSocket-rBLiZsKb.js +0 -36
- package/dist/wizard-ChPegnMW.js +0 -133
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Box } from 'ink';
|
|
3
|
-
import axios from 'axios';
|
|
4
|
-
import { useContext } from 'react';
|
|
5
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-DdABTtYO.js';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-InDf5WSl.js';
|
|
8
|
-
import { b as GameContext } from './Command-DxmQn3XT.js';
|
|
9
|
-
import 'ink-spinner';
|
|
10
|
-
import '@inkjs/ui';
|
|
11
|
-
import 'open';
|
|
12
|
-
import 'crypto';
|
|
13
|
-
import 'fs';
|
|
14
|
-
import 'readline-sync';
|
|
15
|
-
import 'node:readline';
|
|
16
|
-
import 'node:path';
|
|
17
|
-
import 'node:url';
|
|
18
|
-
import 'luxon';
|
|
19
|
-
import 'uuid';
|
|
20
|
-
import 'fast-glob';
|
|
21
|
-
import 'yazl';
|
|
22
|
-
import 'socket.io-client';
|
|
23
|
-
import 'isomorphic-git';
|
|
24
|
-
import '@oclif/core';
|
|
25
|
-
import 'qrcode';
|
|
26
|
-
import { R as RunWithSpinner } from './RunWithSpinner-BVXNWGD3.js';
|
|
27
|
-
import 'string-length';
|
|
28
|
-
import 'strip-ansi';
|
|
29
|
-
|
|
30
|
-
const CreateKeystore = ({ onComplete, onError, ...boxProps }) => {
|
|
31
|
-
const { gameId } = useContext(GameContext);
|
|
32
|
-
const queryClient = useQueryClient();
|
|
33
|
-
const handleCreate = async () => {
|
|
34
|
-
try {
|
|
35
|
-
if (!gameId) throw new Error("No game");
|
|
36
|
-
const headers = await getAuthedHeaders();
|
|
37
|
-
await axios.post(`${API_URL}/projects/${gameId}/credentials/android/certificate`, null, {
|
|
38
|
-
headers
|
|
39
|
-
});
|
|
40
|
-
queryClient.invalidateQueries({ queryKey: cacheKeys.projectCredentials({ projectId: gameId, pageNumber: 0 }) });
|
|
41
|
-
} catch (err) {
|
|
42
|
-
onError(err);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", gap: 1, ...boxProps, children: /* @__PURE__ */ jsx(
|
|
46
|
-
RunWithSpinner,
|
|
47
|
-
{
|
|
48
|
-
executeMethod: handleCreate,
|
|
49
|
-
msgInProgress: "Creating Keystore...",
|
|
50
|
-
msgComplete: "Keystore created",
|
|
51
|
-
onComplete
|
|
52
|
-
}
|
|
53
|
-
) });
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export { CreateKeystore as C };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Box } from 'ink';
|
|
3
|
-
import axios from 'axios';
|
|
4
|
-
import { useContext } from 'react';
|
|
5
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-BQRxiyqn.js';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-D_30xIJA.js';
|
|
8
|
-
import { a as GameContext } from './Command-Cl-JfhTy.js';
|
|
9
|
-
import 'ink-spinner';
|
|
10
|
-
import '@inkjs/ui';
|
|
11
|
-
import 'open';
|
|
12
|
-
import 'crypto';
|
|
13
|
-
import 'fs';
|
|
14
|
-
import 'readline-sync';
|
|
15
|
-
import 'node:readline';
|
|
16
|
-
import 'node:path';
|
|
17
|
-
import 'node:url';
|
|
18
|
-
import 'luxon';
|
|
19
|
-
import 'uuid';
|
|
20
|
-
import 'fast-glob';
|
|
21
|
-
import 'yazl';
|
|
22
|
-
import 'socket.io-client';
|
|
23
|
-
import 'isomorphic-git';
|
|
24
|
-
import '@oclif/core';
|
|
25
|
-
import 'qrcode';
|
|
26
|
-
import { R as RunWithSpinner } from './RunWithSpinner-BVXNWGD3.js';
|
|
27
|
-
import 'string-length';
|
|
28
|
-
import 'strip-ansi';
|
|
29
|
-
|
|
30
|
-
const CreateKeystore = ({ onComplete, onError, ...boxProps }) => {
|
|
31
|
-
const { gameId } = useContext(GameContext);
|
|
32
|
-
const queryClient = useQueryClient();
|
|
33
|
-
const handleCreate = async () => {
|
|
34
|
-
try {
|
|
35
|
-
if (!gameId) throw new Error("No game");
|
|
36
|
-
const headers = await getAuthedHeaders();
|
|
37
|
-
await axios.post(`${API_URL}/projects/${gameId}/credentials/android/certificate`, null, {
|
|
38
|
-
headers
|
|
39
|
-
});
|
|
40
|
-
queryClient.invalidateQueries({ queryKey: cacheKeys.projectCredentials({ projectId: gameId, pageNumber: 0 }) });
|
|
41
|
-
} catch (err) {
|
|
42
|
-
onError(err);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", gap: 1, ...boxProps, children: /* @__PURE__ */ jsx(
|
|
46
|
-
RunWithSpinner,
|
|
47
|
-
{
|
|
48
|
-
executeMethod: handleCreate,
|
|
49
|
-
msgInProgress: "Creating Keystore...",
|
|
50
|
-
msgComplete: "Keystore created",
|
|
51
|
-
onComplete
|
|
52
|
-
}
|
|
53
|
-
) });
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export { CreateKeystore as C };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Box } from 'ink';
|
|
3
|
-
import axios from 'axios';
|
|
4
|
-
import { useContext } from 'react';
|
|
5
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { p as getAuthedHeaders, q as API_URL } from './index-BB7X1Pqp.js';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
|
|
8
|
-
import { b as GameContext } from './Command-D6rWEZRM.js';
|
|
9
|
-
import 'ink-spinner';
|
|
10
|
-
import '@inkjs/ui';
|
|
11
|
-
import 'open';
|
|
12
|
-
import 'crypto';
|
|
13
|
-
import 'fs';
|
|
14
|
-
import 'readline-sync';
|
|
15
|
-
import 'node:readline';
|
|
16
|
-
import 'node:path';
|
|
17
|
-
import 'node:url';
|
|
18
|
-
import 'luxon';
|
|
19
|
-
import 'uuid';
|
|
20
|
-
import 'fast-glob';
|
|
21
|
-
import 'yazl';
|
|
22
|
-
import 'socket.io-client';
|
|
23
|
-
import 'isomorphic-git';
|
|
24
|
-
import '@oclif/core';
|
|
25
|
-
import 'qrcode';
|
|
26
|
-
import { R as RunWithSpinner } from './RunWithSpinner-BVXNWGD3.js';
|
|
27
|
-
import 'string-length';
|
|
28
|
-
import 'strip-ansi';
|
|
29
|
-
|
|
30
|
-
const CreateKeystore = ({ onComplete, onError, ...boxProps }) => {
|
|
31
|
-
const { gameId } = useContext(GameContext);
|
|
32
|
-
const queryClient = useQueryClient();
|
|
33
|
-
const handleCreate = async () => {
|
|
34
|
-
try {
|
|
35
|
-
if (!gameId) throw new Error("No game");
|
|
36
|
-
const headers = await getAuthedHeaders();
|
|
37
|
-
await axios.post(`${API_URL}/projects/${gameId}/credentials/android/certificate`, null, {
|
|
38
|
-
headers
|
|
39
|
-
});
|
|
40
|
-
queryClient.invalidateQueries({ queryKey: cacheKeys.projectCredentials({ projectId: gameId, pageNumber: 0 }) });
|
|
41
|
-
} catch (err) {
|
|
42
|
-
onError(err);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", gap: 1, ...boxProps, children: /* @__PURE__ */ jsx(
|
|
46
|
-
RunWithSpinner,
|
|
47
|
-
{
|
|
48
|
-
executeMethod: handleCreate,
|
|
49
|
-
msgInProgress: "Creating Keystore...",
|
|
50
|
-
msgComplete: "Keystore created",
|
|
51
|
-
onComplete
|
|
52
|
-
}
|
|
53
|
-
) });
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export { CreateKeystore as C };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { v4 } from 'uuid';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import fg from 'fast-glob';
|
|
4
|
-
import fs__default from 'fs';
|
|
5
|
-
import yazl from 'yazl';
|
|
6
|
-
import { useMutation } from '@tanstack/react-query';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-BDc7XpKE.js';
|
|
8
|
-
import { $ as queryClient, x as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a0 as getNewUploadTicket, a1 as startJobsFromUpload, J as JobStatus } from './index-Bv3x8c78.js';
|
|
9
|
-
import { f as getFileHash, h as getPlatformName } from './index-BQnkBr1Q.js';
|
|
10
|
-
import { g as getCWDGitInfo } from './git-DREGq-jc.js';
|
|
11
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
12
|
-
import { useRef } from 'react';
|
|
13
|
-
import 'ink';
|
|
14
|
-
import './Command-YJJp90ru.js';
|
|
15
|
-
import 'ink-spinner';
|
|
16
|
-
import 'crypto-js';
|
|
17
|
-
import 'luxon';
|
|
18
|
-
import '@inkjs/ui';
|
|
19
|
-
import 'open';
|
|
20
|
-
import { P as ProgressSpinner } from './ProgressSpinner-6pw1T8Iw.js';
|
|
21
|
-
import 'qrcode';
|
|
22
|
-
import 'string-length';
|
|
23
|
-
import 'strip-ansi';
|
|
24
|
-
import 'socket.io-client';
|
|
25
|
-
import { u as useJobWatching } from './useJobWatching-Cp-CYd90.js';
|
|
26
|
-
|
|
27
|
-
async function ship({ command, log = () => {
|
|
28
|
-
} }) {
|
|
29
|
-
log("Fetching project config...");
|
|
30
|
-
const projectConfig = await command.getProjectConfig();
|
|
31
|
-
if (!projectConfig.project) throw new Error("No project found in project config");
|
|
32
|
-
log("Retrieving file globs...");
|
|
33
|
-
const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
|
|
34
|
-
const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
|
|
35
|
-
log("Finding files to include in zip...");
|
|
36
|
-
const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
|
|
37
|
-
log(`Found ${files.length} files, adding to zip...`);
|
|
38
|
-
const zipFile = new yazl.ZipFile();
|
|
39
|
-
for (const file of files) {
|
|
40
|
-
zipFile.addFile(file, file);
|
|
41
|
-
}
|
|
42
|
-
const outputZipToFile = (zip, fileName) => new Promise((resolve) => {
|
|
43
|
-
const outputStream = fs__default.createWriteStream(fileName);
|
|
44
|
-
zip.outputStream.pipe(outputStream).on("close", () => resolve());
|
|
45
|
-
zip.end();
|
|
46
|
-
});
|
|
47
|
-
const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
|
|
48
|
-
log(`Creating zip file: ${tmpZipFile}`);
|
|
49
|
-
await outputZipToFile(zipFile, tmpZipFile);
|
|
50
|
-
log("Reading zip file buffer...");
|
|
51
|
-
const zipBuffer = fs__default.readFileSync(tmpZipFile);
|
|
52
|
-
const { size } = fs__default.statSync(tmpZipFile);
|
|
53
|
-
log("Requesting upload ticket...");
|
|
54
|
-
const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
|
|
55
|
-
log("Uploading zip file...");
|
|
56
|
-
await axios.put(uploadTicket.url, zipBuffer, {
|
|
57
|
-
headers: {
|
|
58
|
-
"Content-length": size,
|
|
59
|
-
"Content-Type": "application/zip"
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
log("Fetching Git info...");
|
|
63
|
-
const gitInfo = await getCWDGitInfo();
|
|
64
|
-
log("Computing file hash...");
|
|
65
|
-
const zipFileMd5 = await getFileHash(tmpZipFile);
|
|
66
|
-
const uploadDetails = {
|
|
67
|
-
...gitInfo,
|
|
68
|
-
zipFileMd5
|
|
69
|
-
};
|
|
70
|
-
log("Starting jobs from upload...");
|
|
71
|
-
const jobs = await startJobsFromUpload(uploadTicket.id, uploadDetails);
|
|
72
|
-
log("Cleaning up temporary zip file...");
|
|
73
|
-
fs__default.unlinkSync(tmpZipFile);
|
|
74
|
-
log("Job submission complete.");
|
|
75
|
-
return jobs;
|
|
76
|
-
}
|
|
77
|
-
const useShip = () => {
|
|
78
|
-
return useMutation({
|
|
79
|
-
mutationFn: ship,
|
|
80
|
-
onSuccess: async (data) => {
|
|
81
|
-
queryClient.invalidateQueries({
|
|
82
|
-
queryKey: cacheKeys.jobs({ projectId: data[0].project.id, pageNumber: 0 })
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const JobProgress = (props) => {
|
|
89
|
-
const prevJobStatus = useRef(props.job.status);
|
|
90
|
-
const handleJobUpdate = (job) => {
|
|
91
|
-
const completed = [JobStatus.COMPLETED, JobStatus.FAILED];
|
|
92
|
-
const wasRunning = !completed.includes(prevJobStatus.current);
|
|
93
|
-
if (completed.includes(job.status) && wasRunning) {
|
|
94
|
-
props.onComplete();
|
|
95
|
-
}
|
|
96
|
-
prevJobStatus.current = job.status;
|
|
97
|
-
};
|
|
98
|
-
const { progress } = useJobWatching({
|
|
99
|
-
projectId: props.job.project.id,
|
|
100
|
-
jobId: props.job.id,
|
|
101
|
-
isWatching: true,
|
|
102
|
-
onJobUpdate: handleJobUpdate
|
|
103
|
-
});
|
|
104
|
-
const label = `${getPlatformName(props.job.type)} build progress...`;
|
|
105
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ProgressSpinner, { progress, label, spinnerType: "dots" }) });
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { JobProgress as J, useShip as u };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { v4 } from 'uuid';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import fg from 'fast-glob';
|
|
4
|
-
import fs__default from 'fs';
|
|
5
|
-
import yazl from 'yazl';
|
|
6
|
-
import { useMutation } from '@tanstack/react-query';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-InDf5WSl.js';
|
|
8
|
-
import { $ as queryClient, x as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a0 as getNewUploadTicket, a1 as startJobsFromUpload, J as JobStatus } from './index-DdABTtYO.js';
|
|
9
|
-
import { f as getFileHash, h as getPlatformName } from './index-wyPoxiTc.js';
|
|
10
|
-
import { g as getCWDGitInfo } from './git-DREGq-jc.js';
|
|
11
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
12
|
-
import { useRef } from 'react';
|
|
13
|
-
import 'ink';
|
|
14
|
-
import './Command-DxmQn3XT.js';
|
|
15
|
-
import 'ink-spinner';
|
|
16
|
-
import 'crypto-js';
|
|
17
|
-
import 'luxon';
|
|
18
|
-
import '@inkjs/ui';
|
|
19
|
-
import 'open';
|
|
20
|
-
import { P as ProgressSpinner } from './ProgressSpinner-6pw1T8Iw.js';
|
|
21
|
-
import 'qrcode';
|
|
22
|
-
import 'string-length';
|
|
23
|
-
import 'strip-ansi';
|
|
24
|
-
import 'socket.io-client';
|
|
25
|
-
import { u as useJobWatching } from './useJobWatching-P5oC7mNB.js';
|
|
26
|
-
|
|
27
|
-
async function ship({ command, log = () => {
|
|
28
|
-
} }) {
|
|
29
|
-
log("Fetching project config...");
|
|
30
|
-
const projectConfig = await command.getProjectConfig();
|
|
31
|
-
if (!projectConfig.project) throw new Error("No project found in project config");
|
|
32
|
-
log("Retrieving file globs...");
|
|
33
|
-
const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
|
|
34
|
-
const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
|
|
35
|
-
log("Finding files to include in zip...");
|
|
36
|
-
const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
|
|
37
|
-
log(`Found ${files.length} files, adding to zip...`);
|
|
38
|
-
const zipFile = new yazl.ZipFile();
|
|
39
|
-
for (const file of files) {
|
|
40
|
-
zipFile.addFile(file, file);
|
|
41
|
-
}
|
|
42
|
-
const outputZipToFile = (zip, fileName) => new Promise((resolve) => {
|
|
43
|
-
const outputStream = fs__default.createWriteStream(fileName);
|
|
44
|
-
zip.outputStream.pipe(outputStream).on("close", () => resolve());
|
|
45
|
-
zip.end();
|
|
46
|
-
});
|
|
47
|
-
const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
|
|
48
|
-
log(`Creating zip file: ${tmpZipFile}`);
|
|
49
|
-
await outputZipToFile(zipFile, tmpZipFile);
|
|
50
|
-
log("Reading zip file buffer...");
|
|
51
|
-
const zipBuffer = fs__default.readFileSync(tmpZipFile);
|
|
52
|
-
const { size } = fs__default.statSync(tmpZipFile);
|
|
53
|
-
log("Requesting upload ticket...");
|
|
54
|
-
const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
|
|
55
|
-
log("Uploading zip file...");
|
|
56
|
-
await axios.put(uploadTicket.url, zipBuffer, {
|
|
57
|
-
headers: {
|
|
58
|
-
"Content-length": size,
|
|
59
|
-
"Content-Type": "application/zip"
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
log("Fetching Git info...");
|
|
63
|
-
const gitInfo = await getCWDGitInfo();
|
|
64
|
-
log("Computing file hash...");
|
|
65
|
-
const zipFileMd5 = await getFileHash(tmpZipFile);
|
|
66
|
-
const uploadDetails = {
|
|
67
|
-
...gitInfo,
|
|
68
|
-
zipFileMd5
|
|
69
|
-
};
|
|
70
|
-
log("Starting jobs from upload...");
|
|
71
|
-
const jobs = await startJobsFromUpload(uploadTicket.id, uploadDetails);
|
|
72
|
-
log("Cleaning up temporary zip file...");
|
|
73
|
-
fs__default.unlinkSync(tmpZipFile);
|
|
74
|
-
log("Job submission complete.");
|
|
75
|
-
return jobs;
|
|
76
|
-
}
|
|
77
|
-
const useShip = () => {
|
|
78
|
-
return useMutation({
|
|
79
|
-
mutationFn: ship,
|
|
80
|
-
onSuccess: async (data) => {
|
|
81
|
-
queryClient.invalidateQueries({
|
|
82
|
-
queryKey: cacheKeys.jobs({ projectId: data[0].project.id, pageNumber: 0 })
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const JobProgress = (props) => {
|
|
89
|
-
const prevJobStatus = useRef(props.job.status);
|
|
90
|
-
const handleJobUpdate = (job) => {
|
|
91
|
-
const completed = [JobStatus.COMPLETED, JobStatus.FAILED];
|
|
92
|
-
const wasRunning = !completed.includes(prevJobStatus.current);
|
|
93
|
-
if (completed.includes(job.status) && wasRunning) {
|
|
94
|
-
props.onComplete();
|
|
95
|
-
}
|
|
96
|
-
prevJobStatus.current = job.status;
|
|
97
|
-
};
|
|
98
|
-
const { progress } = useJobWatching({
|
|
99
|
-
projectId: props.job.project.id,
|
|
100
|
-
jobId: props.job.id,
|
|
101
|
-
isWatching: true,
|
|
102
|
-
onJobUpdate: handleJobUpdate
|
|
103
|
-
});
|
|
104
|
-
const label = `${getPlatformName(props.job.type)} build progress...`;
|
|
105
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ProgressSpinner, { progress, label, spinnerType: "dots" }) });
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { JobProgress as J, useShip as u };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { v4 } from 'uuid';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import fg from 'fast-glob';
|
|
4
|
-
import fs__default from 'fs';
|
|
5
|
-
import yazl from 'yazl';
|
|
6
|
-
import { useMutation } from '@tanstack/react-query';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
|
|
8
|
-
import { $ as queryClient, x as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a0 as getNewUploadTicket, a1 as startJobsFromUpload, J as JobStatus } from './index-BB7X1Pqp.js';
|
|
9
|
-
import { f as getFileHash, h as getPlatformName } from './index-Cz_KLwWf.js';
|
|
10
|
-
import { g as getCWDGitInfo } from './git-DREGq-jc.js';
|
|
11
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
12
|
-
import { useRef } from 'react';
|
|
13
|
-
import 'ink';
|
|
14
|
-
import './Command-BiB9MqbJ.js';
|
|
15
|
-
import 'ink-spinner';
|
|
16
|
-
import 'crypto-js';
|
|
17
|
-
import 'luxon';
|
|
18
|
-
import '@inkjs/ui';
|
|
19
|
-
import 'open';
|
|
20
|
-
import { P as ProgressSpinner } from './ProgressSpinner-6pw1T8Iw.js';
|
|
21
|
-
import 'qrcode';
|
|
22
|
-
import 'string-length';
|
|
23
|
-
import 'strip-ansi';
|
|
24
|
-
import 'socket.io-client';
|
|
25
|
-
import { u as useJobWatching } from './useJobWatching-I_A3b36f.js';
|
|
26
|
-
|
|
27
|
-
async function ship({ command, log = () => {
|
|
28
|
-
} }) {
|
|
29
|
-
log("Fetching project config...");
|
|
30
|
-
const projectConfig = await command.getProjectConfig();
|
|
31
|
-
if (!projectConfig.project) throw new Error("No project found in project config");
|
|
32
|
-
log("Retrieving file globs...");
|
|
33
|
-
const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
|
|
34
|
-
const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
|
|
35
|
-
log("Finding files to include in zip...");
|
|
36
|
-
const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
|
|
37
|
-
log(`Found ${files.length} files, adding to zip...`);
|
|
38
|
-
const zipFile = new yazl.ZipFile();
|
|
39
|
-
for (const file of files) {
|
|
40
|
-
zipFile.addFile(file, file);
|
|
41
|
-
}
|
|
42
|
-
const outputZipToFile = (zip, fileName) => new Promise((resolve) => {
|
|
43
|
-
const outputStream = fs__default.createWriteStream(fileName);
|
|
44
|
-
zip.outputStream.pipe(outputStream).on("close", () => resolve());
|
|
45
|
-
zip.end();
|
|
46
|
-
});
|
|
47
|
-
const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
|
|
48
|
-
log(`Creating zip file: ${tmpZipFile}`);
|
|
49
|
-
await outputZipToFile(zipFile, tmpZipFile);
|
|
50
|
-
log("Reading zip file buffer...");
|
|
51
|
-
const zipBuffer = fs__default.readFileSync(tmpZipFile);
|
|
52
|
-
const { size } = fs__default.statSync(tmpZipFile);
|
|
53
|
-
log("Requesting upload ticket...");
|
|
54
|
-
const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
|
|
55
|
-
log("Uploading zip file...");
|
|
56
|
-
await axios.put(uploadTicket.url, zipBuffer, {
|
|
57
|
-
headers: {
|
|
58
|
-
"Content-length": size,
|
|
59
|
-
"Content-Type": "application/zip"
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
log("Fetching Git info...");
|
|
63
|
-
const gitInfo = await getCWDGitInfo();
|
|
64
|
-
log("Computing file hash...");
|
|
65
|
-
const zipFileMd5 = await getFileHash(tmpZipFile);
|
|
66
|
-
const uploadDetails = {
|
|
67
|
-
...gitInfo,
|
|
68
|
-
zipFileMd5
|
|
69
|
-
};
|
|
70
|
-
log("Starting jobs from upload...");
|
|
71
|
-
const jobs = await startJobsFromUpload(uploadTicket.id, uploadDetails);
|
|
72
|
-
log("Cleaning up temporary zip file...");
|
|
73
|
-
fs__default.unlinkSync(tmpZipFile);
|
|
74
|
-
log("Job submission complete.");
|
|
75
|
-
return jobs;
|
|
76
|
-
}
|
|
77
|
-
const useShip = () => {
|
|
78
|
-
return useMutation({
|
|
79
|
-
mutationFn: ship,
|
|
80
|
-
onSuccess: async (data) => {
|
|
81
|
-
queryClient.invalidateQueries({
|
|
82
|
-
queryKey: cacheKeys.jobs({ projectId: data[0].project.id, pageNumber: 0 })
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const JobProgress = (props) => {
|
|
89
|
-
const prevJobStatus = useRef(props.job.status);
|
|
90
|
-
const handleJobUpdate = (job) => {
|
|
91
|
-
const completed = [JobStatus.COMPLETED, JobStatus.FAILED];
|
|
92
|
-
const wasRunning = !completed.includes(prevJobStatus.current);
|
|
93
|
-
if (completed.includes(job.status) && wasRunning) {
|
|
94
|
-
props.onComplete();
|
|
95
|
-
}
|
|
96
|
-
prevJobStatus.current = job.status;
|
|
97
|
-
};
|
|
98
|
-
const { progress } = useJobWatching({
|
|
99
|
-
projectId: props.job.project.id,
|
|
100
|
-
jobId: props.job.id,
|
|
101
|
-
isWatching: true,
|
|
102
|
-
onJobUpdate: handleJobUpdate
|
|
103
|
-
});
|
|
104
|
-
const label = `${getPlatformName(props.job.type)} build progress...`;
|
|
105
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ProgressSpinner, { progress, label, spinnerType: "dots" }) });
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { JobProgress as J, useShip as u };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { v4 } from 'uuid';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import fg from 'fast-glob';
|
|
4
|
-
import fs__default from 'fs';
|
|
5
|
-
import yazl from 'yazl';
|
|
6
|
-
import { useMutation } from '@tanstack/react-query';
|
|
7
|
-
import { c as cacheKeys } from './useAndroidServiceAccountTestResult-Ce1x0Eh8.js';
|
|
8
|
-
import { $ as queryClient, x as DEFAULT_SHIPPED_FILES_GLOBS, w as DEFAULT_IGNORED_FILES_GLOBS, a0 as getNewUploadTicket, a1 as startJobsFromUpload, J as JobStatus } from './index-BB7X1Pqp.js';
|
|
9
|
-
import { f as getFileHash, h as getPlatformName } from './index-Cz_KLwWf.js';
|
|
10
|
-
import { g as getCWDGitInfo } from './git-DREGq-jc.js';
|
|
11
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
12
|
-
import { useRef } from 'react';
|
|
13
|
-
import 'ink';
|
|
14
|
-
import './Command-D6rWEZRM.js';
|
|
15
|
-
import 'ink-spinner';
|
|
16
|
-
import 'crypto-js';
|
|
17
|
-
import 'luxon';
|
|
18
|
-
import '@inkjs/ui';
|
|
19
|
-
import 'open';
|
|
20
|
-
import { P as ProgressSpinner } from './ProgressSpinner-6pw1T8Iw.js';
|
|
21
|
-
import 'qrcode';
|
|
22
|
-
import 'string-length';
|
|
23
|
-
import 'strip-ansi';
|
|
24
|
-
import 'socket.io-client';
|
|
25
|
-
import { u as useJobWatching } from './useJobWatching-D-YzSlK8.js';
|
|
26
|
-
|
|
27
|
-
async function ship({ command, log = () => {
|
|
28
|
-
} }) {
|
|
29
|
-
log("Fetching project config...");
|
|
30
|
-
const projectConfig = await command.getProjectConfig();
|
|
31
|
-
if (!projectConfig.project) throw new Error("No project found in project config");
|
|
32
|
-
log("Retrieving file globs...");
|
|
33
|
-
const shippedFilesGlobs = projectConfig.shippedFilesGlobs || DEFAULT_SHIPPED_FILES_GLOBS;
|
|
34
|
-
const ignoredFilesGlobs = projectConfig.ignoredFilesGlobs || DEFAULT_IGNORED_FILES_GLOBS;
|
|
35
|
-
log("Finding files to include in zip...");
|
|
36
|
-
const files = await fg(shippedFilesGlobs, { dot: true, ignore: ignoredFilesGlobs });
|
|
37
|
-
log(`Found ${files.length} files, adding to zip...`);
|
|
38
|
-
const zipFile = new yazl.ZipFile();
|
|
39
|
-
for (const file of files) {
|
|
40
|
-
zipFile.addFile(file, file);
|
|
41
|
-
}
|
|
42
|
-
const outputZipToFile = (zip, fileName) => new Promise((resolve) => {
|
|
43
|
-
const outputStream = fs__default.createWriteStream(fileName);
|
|
44
|
-
zip.outputStream.pipe(outputStream).on("close", () => resolve());
|
|
45
|
-
zip.end();
|
|
46
|
-
});
|
|
47
|
-
const tmpZipFile = `${process.cwd()}/shipthis-${v4()}.zip`;
|
|
48
|
-
log(`Creating zip file: ${tmpZipFile}`);
|
|
49
|
-
await outputZipToFile(zipFile, tmpZipFile);
|
|
50
|
-
log("Reading zip file buffer...");
|
|
51
|
-
const zipBuffer = fs__default.readFileSync(tmpZipFile);
|
|
52
|
-
const { size } = fs__default.statSync(tmpZipFile);
|
|
53
|
-
log("Requesting upload ticket...");
|
|
54
|
-
const uploadTicket = await getNewUploadTicket(projectConfig.project.id);
|
|
55
|
-
log("Uploading zip file...");
|
|
56
|
-
await axios.put(uploadTicket.url, zipBuffer, {
|
|
57
|
-
headers: {
|
|
58
|
-
"Content-length": size,
|
|
59
|
-
"Content-Type": "application/zip"
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
log("Fetching Git info...");
|
|
63
|
-
const gitInfo = await getCWDGitInfo();
|
|
64
|
-
log("Computing file hash...");
|
|
65
|
-
const zipFileMd5 = await getFileHash(tmpZipFile);
|
|
66
|
-
const uploadDetails = {
|
|
67
|
-
...gitInfo,
|
|
68
|
-
zipFileMd5
|
|
69
|
-
};
|
|
70
|
-
log("Starting jobs from upload...");
|
|
71
|
-
const jobs = await startJobsFromUpload(uploadTicket.id, uploadDetails);
|
|
72
|
-
log("Cleaning up temporary zip file...");
|
|
73
|
-
fs__default.unlinkSync(tmpZipFile);
|
|
74
|
-
log("Job submission complete.");
|
|
75
|
-
return jobs;
|
|
76
|
-
}
|
|
77
|
-
const useShip = () => {
|
|
78
|
-
return useMutation({
|
|
79
|
-
mutationFn: ship,
|
|
80
|
-
onSuccess: async (data) => {
|
|
81
|
-
queryClient.invalidateQueries({
|
|
82
|
-
queryKey: cacheKeys.jobs({ projectId: data[0].project.id, pageNumber: 0 })
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const JobProgress = (props) => {
|
|
89
|
-
const prevJobStatus = useRef(props.job.status);
|
|
90
|
-
const handleJobUpdate = (job) => {
|
|
91
|
-
const completed = [JobStatus.COMPLETED, JobStatus.FAILED];
|
|
92
|
-
const wasRunning = !completed.includes(prevJobStatus.current);
|
|
93
|
-
if (completed.includes(job.status) && wasRunning) {
|
|
94
|
-
props.onComplete();
|
|
95
|
-
}
|
|
96
|
-
prevJobStatus.current = job.status;
|
|
97
|
-
};
|
|
98
|
-
const { progress } = useJobWatching({
|
|
99
|
-
projectId: props.job.project.id,
|
|
100
|
-
jobId: props.job.id,
|
|
101
|
-
isWatching: true,
|
|
102
|
-
onJobUpdate: handleJobUpdate
|
|
103
|
-
});
|
|
104
|
-
const label = `${getPlatformName(props.job.type)} build progress...`;
|
|
105
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ProgressSpinner, { progress, label, spinnerType: "dots" }) });
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { JobProgress as J, useShip as u };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
import { Box, Text } from 'ink';
|
|
4
|
-
import { DateTime } from 'luxon';
|
|
5
|
-
import Spinner from 'ink-spinner';
|
|
6
|
-
import { d as getStageColor, c as getJobStatusColor } from './index-BQnkBr1Q.js';
|
|
7
|
-
import { J as JobStatus } from './index-Bv3x8c78.js';
|
|
8
|
-
import 'axios';
|
|
9
|
-
import '@tanstack/react-query';
|
|
10
|
-
import 'crypto-js';
|
|
11
|
-
import 'uuid';
|
|
12
|
-
import 'fs';
|
|
13
|
-
import { g as getJobSummary, a as getBuildSummary } from './Command-YJJp90ru.js';
|
|
14
|
-
import 'fast-glob';
|
|
15
|
-
import 'yazl';
|
|
16
|
-
import 'socket.io-client';
|
|
17
|
-
import { u as useJobWatching } from './useJobWatching-Cp-CYd90.js';
|
|
18
|
-
import { T as Title } from './Title-BCQtayg6.js';
|
|
19
|
-
import { a as StatusRow, b as StatusRowLabel } from './StatusTable-Dm5St4g-.js';
|
|
20
|
-
|
|
21
|
-
const JobStatusSpinner = ({ status, showSpinner }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
-
/* @__PURE__ */ jsx(Text, { color: getJobStatusColor(status), children: `${status}` }),
|
|
23
|
-
showSpinner && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
25
|
-
/* @__PURE__ */ jsx(Spinner, { type: "dots" })
|
|
26
|
-
] })
|
|
27
|
-
] });
|
|
28
|
-
const JobStatusTable = ({ jobId, projectId, isWatching, onJobUpdate }) => {
|
|
29
|
-
const { data: job, stage, isLoading } = useJobWatching({ projectId, jobId, isWatching, onJobUpdate });
|
|
30
|
-
const [time, setTime] = useState(DateTime.now());
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (!isWatching) return;
|
|
33
|
-
const interval = setInterval(() => setTime(DateTime.now()), 1e3);
|
|
34
|
-
return () => {
|
|
35
|
-
clearInterval(interval);
|
|
36
|
-
};
|
|
37
|
-
}, []);
|
|
38
|
-
const isJobInProgress = job && ![JobStatus.COMPLETED, JobStatus.FAILED].includes(job.status);
|
|
39
|
-
const summary = job ? getJobSummary(job, time) : null;
|
|
40
|
-
const buildSummary = job && job.build ? getBuildSummary(job.build) : null;
|
|
41
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
42
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
43
|
-
/* @__PURE__ */ jsx(Title, { children: "Job Details" }),
|
|
44
|
-
isLoading && /* @__PURE__ */ jsx(Spinner, { type: "dots" }),
|
|
45
|
-
summary && job && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
|
|
46
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "ID", value: summary.id }),
|
|
47
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Name", value: job.project.name }),
|
|
48
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
49
|
-
/* @__PURE__ */ jsx(StatusRowLabel, { label: "Status" }),
|
|
50
|
-
/* @__PURE__ */ jsx(JobStatusSpinner, { status: job.status, showSpinner: isWatching && !!isJobInProgress })
|
|
51
|
-
] }),
|
|
52
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
53
|
-
/* @__PURE__ */ jsx(StatusRowLabel, { label: "Stage" }),
|
|
54
|
-
stage && /* @__PURE__ */ jsx(Text, { color: getStageColor(stage), children: `${stage}` })
|
|
55
|
-
] }),
|
|
56
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Version", value: summary.version }),
|
|
57
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Git Info", value: summary.gitInfo }),
|
|
58
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: summary.platform }),
|
|
59
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Started At", value: summary.createdAt }),
|
|
60
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Runtime", value: summary.runtime })
|
|
61
|
-
] })
|
|
62
|
-
] }),
|
|
63
|
-
buildSummary && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, marginLeft: 3, borderStyle: "single", padding: 1, children: [
|
|
64
|
-
/* @__PURE__ */ jsx(Title, { children: "Build Details" }),
|
|
65
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [
|
|
66
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "ID", value: buildSummary.id }),
|
|
67
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Platform", value: buildSummary.platform }),
|
|
68
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "Type", value: buildSummary.type }),
|
|
69
|
-
/* @__PURE__ */ jsx(StatusRow, { label: "CMD", value: buildSummary.cmd })
|
|
70
|
-
] })
|
|
71
|
-
] })
|
|
72
|
-
] });
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { JobStatusTable as J };
|