@todesktop/cli 1.12.3 → 1.12.5
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/README.md +4 -0
- package/dist/cli.js +58 -75
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1201,6 +1201,10 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
1201
1201
|
|
|
1202
1202
|
## Changelog
|
|
1203
1203
|
|
|
1204
|
+
### v1.12.5
|
|
1205
|
+
|
|
1206
|
+
- Fix: Removed invalid React Hook call in `BuildCommand` that caused errors.
|
|
1207
|
+
|
|
1204
1208
|
### v1.12.3
|
|
1205
1209
|
|
|
1206
1210
|
- Allow `catalog:` protocol (used by PNPM) for electron dependency version in `package.json`.
|
package/dist/cli.js
CHANGED
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var import_commander = require("commander");
|
|
23
23
|
var import_ink39 = require("ink");
|
|
24
|
-
var
|
|
24
|
+
var import_react24 = require("react");
|
|
25
25
|
var import_register = require("source-map-support/register");
|
|
26
26
|
|
|
27
27
|
// src/commands/build/components/Build.tsx
|
|
@@ -2904,35 +2904,24 @@ function Build({
|
|
|
2904
2904
|
}
|
|
2905
2905
|
}
|
|
2906
2906
|
|
|
2907
|
-
// src/utilities/checkIfReactIsUsable.ts
|
|
2908
|
-
var import_react7 = require("react");
|
|
2909
|
-
var checkIfReactIsUsable_default = ({ cons = console, proc = process } = {}) => {
|
|
2910
|
-
try {
|
|
2911
|
-
(0, import_react7.useState)(null);
|
|
2912
|
-
} catch (e) {
|
|
2913
|
-
cons.error(e);
|
|
2914
|
-
proc.exit(1);
|
|
2915
|
-
}
|
|
2916
|
-
};
|
|
2917
|
-
|
|
2918
2907
|
// src/components/LoginHOC.tsx
|
|
2919
2908
|
var import_ink16 = require("ink");
|
|
2920
|
-
var
|
|
2909
|
+
var import_react9 = require("react");
|
|
2921
2910
|
var import_prop_types9 = __toESM(require("prop-types"));
|
|
2922
2911
|
var import_is_ci4 = __toESM(require("is-ci"));
|
|
2923
2912
|
|
|
2924
2913
|
// src/components/Login.tsx
|
|
2925
2914
|
var import_ink14 = require("ink");
|
|
2926
2915
|
var import_prop_types8 = __toESM(require("prop-types"));
|
|
2927
|
-
var
|
|
2916
|
+
var import_react8 = require("react");
|
|
2928
2917
|
var import_react_final_form = require("react-final-form");
|
|
2929
2918
|
|
|
2930
2919
|
// src/components/TextInput.tsx
|
|
2931
2920
|
var import_ink_text_input = __toESM(require("ink-text-input"));
|
|
2932
|
-
var
|
|
2921
|
+
var import_react7 = __toESM(require("react"));
|
|
2933
2922
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2934
2923
|
var TextInput = ({ onBlur, onFocus, ...props }) => {
|
|
2935
|
-
|
|
2924
|
+
import_react7.default.useEffect(() => {
|
|
2936
2925
|
onFocus();
|
|
2937
2926
|
return onBlur;
|
|
2938
2927
|
}, [onFocus, onBlur]);
|
|
@@ -2966,10 +2955,10 @@ var loginFields = [
|
|
|
2966
2955
|
}
|
|
2967
2956
|
];
|
|
2968
2957
|
var Login = ({ setIsLoggedIn }) => {
|
|
2969
|
-
const [activeField, setActiveField] = (0,
|
|
2970
|
-
const [error, setError] = (0,
|
|
2971
|
-
const [failureMessage, setFailureMessage] = (0,
|
|
2972
|
-
const [isSubmittingForm, setIsSubmittingForm] = (0,
|
|
2958
|
+
const [activeField, setActiveField] = (0, import_react8.useState)(0);
|
|
2959
|
+
const [error, setError] = (0, import_react8.useState)(null);
|
|
2960
|
+
const [failureMessage, setFailureMessage] = (0, import_react8.useState)(null);
|
|
2961
|
+
const [isSubmittingForm, setIsSubmittingForm] = (0, import_react8.useState)(false);
|
|
2973
2962
|
const onFailure = (message2) => {
|
|
2974
2963
|
setIsSubmittingForm(false);
|
|
2975
2964
|
setFailureMessage(message2);
|
|
@@ -3068,11 +3057,11 @@ var LoadingText_default = LoadingText;
|
|
|
3068
3057
|
// src/components/LoginHOC.tsx
|
|
3069
3058
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3070
3059
|
var LoginHOC = ({ children, isInteractive = true }) => {
|
|
3071
|
-
const [isLoggedIn, setIsLoggedIn] = (0,
|
|
3072
|
-
const [isEffectDone, setEffectDone] = (0,
|
|
3073
|
-
const [error, setError] = (0,
|
|
3060
|
+
const [isLoggedIn, setIsLoggedIn] = (0, import_react9.useState)(false);
|
|
3061
|
+
const [isEffectDone, setEffectDone] = (0, import_react9.useState)(false);
|
|
3062
|
+
const [error, setError] = (0, import_react9.useState)(null);
|
|
3074
3063
|
const { isRawModeSupported } = (0, import_ink16.useStdin)();
|
|
3075
|
-
(0,
|
|
3064
|
+
(0, import_react9.useEffect)(() => {
|
|
3076
3065
|
async function isAccessTokenValid() {
|
|
3077
3066
|
const { accessToken, email, jwtToken } = getAuthConfig();
|
|
3078
3067
|
let userCreds = null;
|
|
@@ -3149,9 +3138,9 @@ LoginHOC.propTypes = {
|
|
|
3149
3138
|
var LoginHOC_default = LoginHOC;
|
|
3150
3139
|
|
|
3151
3140
|
// src/components/ErrorBoundary.tsx
|
|
3152
|
-
var
|
|
3141
|
+
var import_react10 = __toESM(require("react"));
|
|
3153
3142
|
var Sentry2 = __toESM(require("@sentry/node"));
|
|
3154
|
-
var ErrorBoundary = class extends
|
|
3143
|
+
var ErrorBoundary = class extends import_react10.default.Component {
|
|
3155
3144
|
constructor(props) {
|
|
3156
3145
|
super(props);
|
|
3157
3146
|
this.state = { eventId: null, error: null };
|
|
@@ -3179,7 +3168,7 @@ var ErrorBoundary_default = ErrorBoundary;
|
|
|
3179
3168
|
var import_ink20 = require("ink");
|
|
3180
3169
|
var import_ink_select_input = __toESM(require("ink-select-input"));
|
|
3181
3170
|
var import_prop_types11 = __toESM(require("prop-types"));
|
|
3182
|
-
var
|
|
3171
|
+
var import_react12 = require("react");
|
|
3183
3172
|
|
|
3184
3173
|
// src/components/CustomSelectInputIndicator.tsx
|
|
3185
3174
|
var import_ink17 = require("ink");
|
|
@@ -3206,7 +3195,7 @@ function CustomSelectInputItem({
|
|
|
3206
3195
|
// src/components/ViewBuild.tsx
|
|
3207
3196
|
var import_ink19 = require("ink");
|
|
3208
3197
|
var import_prop_types10 = __toESM(require("prop-types"));
|
|
3209
|
-
var
|
|
3198
|
+
var import_react11 = require("react");
|
|
3210
3199
|
|
|
3211
3200
|
// src/utilities/getLatestBuildId.ts
|
|
3212
3201
|
async function getLatestBuildId({
|
|
@@ -3301,7 +3290,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3301
3290
|
isLoading
|
|
3302
3291
|
},
|
|
3303
3292
|
setState
|
|
3304
|
-
] = (0,
|
|
3293
|
+
] = (0, import_react11.useState)({
|
|
3305
3294
|
appId: null,
|
|
3306
3295
|
arbitraryMessageComponent: null,
|
|
3307
3296
|
build: null,
|
|
@@ -3317,7 +3306,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3317
3306
|
error: error2
|
|
3318
3307
|
}));
|
|
3319
3308
|
};
|
|
3320
|
-
(0,
|
|
3309
|
+
(0, import_react11.useEffect)(() => {
|
|
3321
3310
|
let firebaseUnsubscribe;
|
|
3322
3311
|
async function viewBuild() {
|
|
3323
3312
|
let config2;
|
|
@@ -3374,12 +3363,12 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3374
3363
|
}
|
|
3375
3364
|
};
|
|
3376
3365
|
}, [id, configPath]);
|
|
3377
|
-
(0,
|
|
3366
|
+
(0, import_react11.useEffect)(() => {
|
|
3378
3367
|
if (hasBuildEverFailed && shouldExitOnBuildFailure_default(build)) {
|
|
3379
3368
|
setTimeout(() => exit(new Error("Build has failed")), 10);
|
|
3380
3369
|
}
|
|
3381
3370
|
}, [build, exit, hasBuildEverFailed]);
|
|
3382
|
-
(0,
|
|
3371
|
+
(0, import_react11.useEffect)(() => {
|
|
3383
3372
|
if (arbitraryMessageComponent) {
|
|
3384
3373
|
setTimeout(() => exit(new Error("Validation failed")), 10);
|
|
3385
3374
|
}
|
|
@@ -3458,14 +3447,14 @@ var OngoingBuildGuard = ({
|
|
|
3458
3447
|
const { isRawModeSupported } = (0, import_ink20.useStdin)();
|
|
3459
3448
|
const onInput = useInput_default();
|
|
3460
3449
|
const exit = useExit_default();
|
|
3461
|
-
const [{ appId, builds, error, isLoading, itemChosen }, setState] = (0,
|
|
3450
|
+
const [{ appId, builds, error, isLoading, itemChosen }, setState] = (0, import_react12.useState)({
|
|
3462
3451
|
appId: null,
|
|
3463
3452
|
builds: [],
|
|
3464
3453
|
error: null,
|
|
3465
3454
|
isLoading: true,
|
|
3466
3455
|
itemChosen: null
|
|
3467
3456
|
});
|
|
3468
|
-
(0,
|
|
3457
|
+
(0, import_react12.useEffect)(() => {
|
|
3469
3458
|
if (!isLoading) {
|
|
3470
3459
|
return;
|
|
3471
3460
|
}
|
|
@@ -3588,9 +3577,9 @@ OngoingBuildGuard.propTypes = {
|
|
|
3588
3577
|
var OngoingBuildGuard_default = OngoingBuildGuard;
|
|
3589
3578
|
|
|
3590
3579
|
// src/utilities/useAnalytics.ts
|
|
3591
|
-
var
|
|
3580
|
+
var import_react13 = require("react");
|
|
3592
3581
|
var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
|
|
3593
|
-
const [hasAttemptedTracking, setTrackingAttempt] = (0,
|
|
3582
|
+
const [hasAttemptedTracking, setTrackingAttempt] = (0, import_react13.useState)(false);
|
|
3594
3583
|
logger_default.info({ command, flags, properties }, "useAnalyticsCommand");
|
|
3595
3584
|
try {
|
|
3596
3585
|
if (flags.projectPath) {
|
|
@@ -3601,7 +3590,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
|
|
|
3601
3590
|
}
|
|
3602
3591
|
} catch (err) {
|
|
3603
3592
|
}
|
|
3604
|
-
(0,
|
|
3593
|
+
(0, import_react13.useEffect)(() => {
|
|
3605
3594
|
const authUnsubscribe = onUserAuth(async (user) => {
|
|
3606
3595
|
if (user.uid) {
|
|
3607
3596
|
identify(
|
|
@@ -3636,7 +3625,6 @@ function BuildCommand({
|
|
|
3636
3625
|
configPath,
|
|
3637
3626
|
flags
|
|
3638
3627
|
}) {
|
|
3639
|
-
checkIfReactIsUsable_default();
|
|
3640
3628
|
useAnalyticsCommand("build", {
|
|
3641
3629
|
async: flags.exitAfterUploading,
|
|
3642
3630
|
codeSign: flags.shouldCodeSign,
|
|
@@ -3657,7 +3645,7 @@ function BuildCommand({
|
|
|
3657
3645
|
// src/components/ViewBuilds.tsx
|
|
3658
3646
|
var import_ink26 = require("ink");
|
|
3659
3647
|
var import_prop_types17 = __toESM(require("prop-types"));
|
|
3660
|
-
var
|
|
3648
|
+
var import_react15 = require("react");
|
|
3661
3649
|
|
|
3662
3650
|
// src/components/Table.tsx
|
|
3663
3651
|
var import_ink24 = require("ink");
|
|
@@ -3681,7 +3669,7 @@ var TableEnd_default = TableEnd;
|
|
|
3681
3669
|
// src/components/TableHead.tsx
|
|
3682
3670
|
var import_ink22 = require("ink");
|
|
3683
3671
|
var import_prop_types13 = __toESM(require("prop-types"));
|
|
3684
|
-
var
|
|
3672
|
+
var import_react14 = require("react");
|
|
3685
3673
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3686
3674
|
var TableHead = ({ keyDetails, ...props }) => {
|
|
3687
3675
|
let topLine = "\u250C";
|
|
@@ -3689,7 +3677,7 @@ var TableHead = ({ keyDetails, ...props }) => {
|
|
|
3689
3677
|
topLine += "\u2510";
|
|
3690
3678
|
const contentLineElements = Object.values(keyDetails).map(
|
|
3691
3679
|
({ key, width }, index) => {
|
|
3692
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react14.Fragment, { children: [
|
|
3693
3681
|
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink22.Text, { children: " \u2502 " }) : null,
|
|
3694
3682
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink22.Box, { width, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink22.Text, { bold: true, children: key }) })
|
|
3695
3683
|
] }, key);
|
|
@@ -3923,7 +3911,7 @@ var ViewBuilds = ({
|
|
|
3923
3911
|
user
|
|
3924
3912
|
},
|
|
3925
3913
|
setState
|
|
3926
|
-
] = (0,
|
|
3914
|
+
] = (0, import_react15.useState)({
|
|
3927
3915
|
builds: [],
|
|
3928
3916
|
error: null,
|
|
3929
3917
|
hasMoreToLoad: true,
|
|
@@ -3948,7 +3936,7 @@ var ViewBuilds = ({
|
|
|
3948
3936
|
}));
|
|
3949
3937
|
}
|
|
3950
3938
|
});
|
|
3951
|
-
(0,
|
|
3939
|
+
(0, import_react15.useEffect)(() => {
|
|
3952
3940
|
async function viewBuilds() {
|
|
3953
3941
|
if (error || isLoading || isInitialLoadComplete && (!hasMoreToLoad || !startAfter)) {
|
|
3954
3942
|
return;
|
|
@@ -4023,12 +4011,12 @@ var ViewBuilds = ({
|
|
|
4023
4011
|
format,
|
|
4024
4012
|
count
|
|
4025
4013
|
]);
|
|
4026
|
-
(0,
|
|
4014
|
+
(0, import_react15.useEffect)(() => {
|
|
4027
4015
|
if (!hasMoreToLoad) {
|
|
4028
4016
|
setTimeout(exit, 10);
|
|
4029
4017
|
}
|
|
4030
4018
|
}, [exit, hasMoreToLoad]);
|
|
4031
|
-
(0,
|
|
4019
|
+
(0, import_react15.useEffect)(() => {
|
|
4032
4020
|
if (!isLoading && isInitialLoadComplete && shouldExitAfterViewingBuilds) {
|
|
4033
4021
|
setTimeout(exit, 10);
|
|
4034
4022
|
}
|
|
@@ -4114,7 +4102,6 @@ var BuildsCommand = ({
|
|
|
4114
4102
|
format = "table",
|
|
4115
4103
|
exit
|
|
4116
4104
|
}) => {
|
|
4117
|
-
checkIfReactIsUsable_default();
|
|
4118
4105
|
useAnalyticsCommand("builds", {
|
|
4119
4106
|
id,
|
|
4120
4107
|
shouldViewLatest,
|
|
@@ -4156,15 +4143,14 @@ var BuildsCommand = ({
|
|
|
4156
4143
|
var BuildsCommand_default = BuildsCommand;
|
|
4157
4144
|
|
|
4158
4145
|
// src/commands/LogoutCommand.tsx
|
|
4159
|
-
var
|
|
4146
|
+
var import_react16 = require("react");
|
|
4160
4147
|
var import_ink27 = require("ink");
|
|
4161
4148
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4162
4149
|
var Logout = () => {
|
|
4163
4150
|
const exit = useExit_default();
|
|
4164
4151
|
const { hasAttemptedTracking } = useAnalyticsCommand("logout");
|
|
4165
|
-
checkIfReactIsUsable_default();
|
|
4166
4152
|
deleteAuthConfig();
|
|
4167
|
-
(0,
|
|
4153
|
+
(0, import_react16.useEffect)(() => {
|
|
4168
4154
|
if (hasAttemptedTracking) {
|
|
4169
4155
|
exit();
|
|
4170
4156
|
}
|
|
@@ -4178,7 +4164,7 @@ var LogoutCommand_default = LogoutWrapper;
|
|
|
4178
4164
|
|
|
4179
4165
|
// src/components/BuildPicker.tsx
|
|
4180
4166
|
var import_ink29 = require("ink");
|
|
4181
|
-
var
|
|
4167
|
+
var import_react17 = require("react");
|
|
4182
4168
|
|
|
4183
4169
|
// src/components/SelectTable.tsx
|
|
4184
4170
|
var import_ink28 = require("ink");
|
|
@@ -4296,11 +4282,11 @@ function BuildPicker({
|
|
|
4296
4282
|
const exit = useExit_default();
|
|
4297
4283
|
const onInput = useInput_default();
|
|
4298
4284
|
const isRealIdPassed = buildId && buildId !== "latest";
|
|
4299
|
-
const [state, setState] = (0,
|
|
4285
|
+
const [state, setState] = (0, import_react17.useState)({
|
|
4300
4286
|
selectedBuildId: isRealIdPassed ? buildId : void 0,
|
|
4301
4287
|
state: isRealIdPassed ? "selected" : "loading"
|
|
4302
4288
|
});
|
|
4303
|
-
(0,
|
|
4289
|
+
(0, import_react17.useEffect)(() => {
|
|
4304
4290
|
loadData({
|
|
4305
4291
|
buildFilter,
|
|
4306
4292
|
buildId,
|
|
@@ -4415,7 +4401,7 @@ async function getBuildItems({
|
|
|
4415
4401
|
}
|
|
4416
4402
|
|
|
4417
4403
|
// src/commands/release/components/ReleaseBuildLogic.tsx
|
|
4418
|
-
var
|
|
4404
|
+
var import_react18 = require("react");
|
|
4419
4405
|
|
|
4420
4406
|
// src/utilities/getBuildAttributes.ts
|
|
4421
4407
|
async function getBuildAttributes({
|
|
@@ -4552,8 +4538,8 @@ function ReleaseBuildLogic({
|
|
|
4552
4538
|
configPath
|
|
4553
4539
|
}) {
|
|
4554
4540
|
const exit = useExit_default();
|
|
4555
|
-
const [state, setState] = (0,
|
|
4556
|
-
(0,
|
|
4541
|
+
const [state, setState] = (0, import_react18.useState)({ state: "loading" });
|
|
4542
|
+
(0, import_react18.useEffect)(() => {
|
|
4557
4543
|
releaseBuildWorkflow({ configPath, buildId, updateState }).catch(
|
|
4558
4544
|
logger_default.error
|
|
4559
4545
|
);
|
|
@@ -4591,7 +4577,7 @@ async function releaseBuildWorkflow({
|
|
|
4591
4577
|
|
|
4592
4578
|
// src/commands/release/components/ReleaseConfirmation.tsx
|
|
4593
4579
|
var import_ink34 = require("ink");
|
|
4594
|
-
var
|
|
4580
|
+
var import_react20 = require("react");
|
|
4595
4581
|
|
|
4596
4582
|
// src/commands/smoke-test/utilities/build.ts
|
|
4597
4583
|
var import_semver = __toESM(require("semver"));
|
|
@@ -4750,15 +4736,15 @@ function analyzeRelease({
|
|
|
4750
4736
|
// src/commands/release/components/DowngradeConfirmation.tsx
|
|
4751
4737
|
var import_ink32 = require("ink");
|
|
4752
4738
|
var import_ink_text_input2 = __toESM(require("ink-text-input"));
|
|
4753
|
-
var
|
|
4739
|
+
var import_react19 = require("react");
|
|
4754
4740
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4755
4741
|
function DowngradeConfirmation({
|
|
4756
4742
|
build,
|
|
4757
4743
|
latestReleasedBuild,
|
|
4758
4744
|
confirmDowngrade: confirmDowngrade2
|
|
4759
4745
|
}) {
|
|
4760
|
-
const [confirmText, setConfirmText] = (0,
|
|
4761
|
-
const [showError, setShowError] = (0,
|
|
4746
|
+
const [confirmText, setConfirmText] = (0, import_react19.useState)("");
|
|
4747
|
+
const [showError, setShowError] = (0, import_react19.useState)(false);
|
|
4762
4748
|
const buildVersion = build.appVersion;
|
|
4763
4749
|
const latestVersion2 = latestReleasedBuild.appVersion;
|
|
4764
4750
|
function onType(text) {
|
|
@@ -4843,10 +4829,10 @@ function ReleaseConfirmation({
|
|
|
4843
4829
|
loadData = loadBuildsData
|
|
4844
4830
|
}) {
|
|
4845
4831
|
var _a;
|
|
4846
|
-
const [state, setState] = (0,
|
|
4832
|
+
const [state, setState] = (0, import_react20.useState)({
|
|
4847
4833
|
state: disabled ? "bypass" : "loading"
|
|
4848
4834
|
});
|
|
4849
|
-
(0,
|
|
4835
|
+
(0, import_react20.useEffect)(() => {
|
|
4850
4836
|
confirmationWorkflow({
|
|
4851
4837
|
buildId,
|
|
4852
4838
|
configPath,
|
|
@@ -5026,7 +5012,6 @@ function ReleaseCommand({
|
|
|
5026
5012
|
configPath,
|
|
5027
5013
|
shouldConfirm
|
|
5028
5014
|
}) {
|
|
5029
|
-
checkIfReactIsUsable_default();
|
|
5030
5015
|
useAnalyticsCommand("release", {
|
|
5031
5016
|
buildId,
|
|
5032
5017
|
shouldConfirm,
|
|
@@ -5069,11 +5054,11 @@ function isBuildReleasable(opts) {
|
|
|
5069
5054
|
}
|
|
5070
5055
|
|
|
5071
5056
|
// src/commands/smoke-test/SmokeTestCommand.tsx
|
|
5072
|
-
var
|
|
5057
|
+
var import_react22 = require("react");
|
|
5073
5058
|
|
|
5074
5059
|
// src/commands/smoke-test/components/Cancellation.tsx
|
|
5075
5060
|
var import_ink35 = require("ink");
|
|
5076
|
-
var
|
|
5061
|
+
var import_react21 = require("react");
|
|
5077
5062
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5078
5063
|
function Cancellation({
|
|
5079
5064
|
children,
|
|
@@ -5093,8 +5078,8 @@ function Cancellation({
|
|
|
5093
5078
|
renderError = (e) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ErrorDisplay, { error: e }),
|
|
5094
5079
|
subject
|
|
5095
5080
|
}) {
|
|
5096
|
-
const [state, setState] = (0,
|
|
5097
|
-
const [error, setError] = (0,
|
|
5081
|
+
const [state, setState] = (0, import_react21.useState)("normal");
|
|
5082
|
+
const [error, setError] = (0, import_react21.useState)();
|
|
5098
5083
|
const onInput = useInput_default();
|
|
5099
5084
|
const exit = useExit_default();
|
|
5100
5085
|
onInput(async (input, key) => {
|
|
@@ -5331,7 +5316,6 @@ function SmokeTestCommand({
|
|
|
5331
5316
|
buildId,
|
|
5332
5317
|
configPath
|
|
5333
5318
|
}) {
|
|
5334
|
-
checkIfReactIsUsable_default();
|
|
5335
5319
|
useAnalyticsCommand("smoke-test", { buildId, configPath });
|
|
5336
5320
|
const command = `todesktop release ${buildId === "latest" ? "--latest" : "<id>"}`;
|
|
5337
5321
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(LoginHOC_default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
@@ -5359,13 +5343,13 @@ function SmokeTestContainer({
|
|
|
5359
5343
|
configPath
|
|
5360
5344
|
}) {
|
|
5361
5345
|
const exit = useExit_default();
|
|
5362
|
-
const [state, setState] = (0,
|
|
5346
|
+
const [state, setState] = (0, import_react22.useState)({
|
|
5363
5347
|
buildId,
|
|
5364
5348
|
state: "loading"
|
|
5365
5349
|
});
|
|
5366
|
-
const [abortController] = (0,
|
|
5350
|
+
const [abortController] = (0, import_react22.useState)(new AbortController());
|
|
5367
5351
|
const abortSignal = abortController.signal;
|
|
5368
|
-
(0,
|
|
5352
|
+
(0, import_react22.useEffect)(() => {
|
|
5369
5353
|
smokeTestWorkflow({ abortSignal, buildId, configPath, updateState }).catch(
|
|
5370
5354
|
logger_default.error
|
|
5371
5355
|
);
|
|
@@ -5456,15 +5440,14 @@ function isCancelable(state) {
|
|
|
5456
5440
|
}
|
|
5457
5441
|
|
|
5458
5442
|
// src/commands/WhoamiCommand.tsx
|
|
5459
|
-
var
|
|
5443
|
+
var import_react23 = require("react");
|
|
5460
5444
|
var import_ink38 = require("ink");
|
|
5461
5445
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5462
5446
|
var WhoAmI = () => {
|
|
5463
5447
|
const exit = useExit_default();
|
|
5464
|
-
checkIfReactIsUsable_default();
|
|
5465
5448
|
const auth = getAuthConfig();
|
|
5466
5449
|
const { hasAttemptedTracking } = useAnalyticsCommand("whoami", {}, {});
|
|
5467
|
-
(0,
|
|
5450
|
+
(0, import_react23.useEffect)(() => {
|
|
5468
5451
|
if (hasAttemptedTracking) {
|
|
5469
5452
|
exit();
|
|
5470
5453
|
}
|
|
@@ -5515,7 +5498,7 @@ var package_default = {
|
|
|
5515
5498
|
access: "public"
|
|
5516
5499
|
},
|
|
5517
5500
|
name: "@todesktop/cli",
|
|
5518
|
-
version: "1.12.
|
|
5501
|
+
version: "1.12.3",
|
|
5519
5502
|
license: "MIT",
|
|
5520
5503
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
5521
5504
|
homepage: "https://todesktop.com/cli",
|
|
@@ -5816,7 +5799,7 @@ import_commander.program.command("whoami").description("Prints the email of the
|
|
|
5816
5799
|
});
|
|
5817
5800
|
var runCommand = (component, props = null, { exitIfOutOfDate = true } = {}) => {
|
|
5818
5801
|
onCommand_default({ exitIfOutOfDate });
|
|
5819
|
-
const { waitUntilExit } = (0, import_ink39.render)((0,
|
|
5802
|
+
const { waitUntilExit } = (0, import_ink39.render)((0, import_react24.createElement)(component, props));
|
|
5820
5803
|
waitUntilExit().catch((error) => {
|
|
5821
5804
|
console.error(error.stack);
|
|
5822
5805
|
});
|