@todesktop/cli 1.12.2 → 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 +8 -0
- package/dist/cli.js +71 -80
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1201,6 +1201,14 @@ 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
|
+
|
|
1208
|
+
### v1.12.3
|
|
1209
|
+
|
|
1210
|
+
- Allow `catalog:` protocol (used by PNPM) for electron dependency version in `package.json`.
|
|
1211
|
+
|
|
1204
1212
|
### v1.12.2
|
|
1205
1213
|
|
|
1206
1214
|
- Fix: Update `appFiles` to not error when no `*.js` files are found (but `*.ts` files are present)
|
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
|
|
@@ -1155,11 +1155,19 @@ var packageJSON_default = (context) => {
|
|
|
1155
1155
|
required: ["electron"],
|
|
1156
1156
|
properties: {
|
|
1157
1157
|
electron: {
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1158
|
+
oneOf: [
|
|
1159
|
+
{
|
|
1160
|
+
type: "string",
|
|
1161
|
+
semanticVersion: {
|
|
1162
|
+
packageName: "electron",
|
|
1163
|
+
mustBeExact: true
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
type: "string",
|
|
1168
|
+
pattern: "^catalog:"
|
|
1169
|
+
}
|
|
1170
|
+
]
|
|
1163
1171
|
}
|
|
1164
1172
|
}
|
|
1165
1173
|
},
|
|
@@ -2896,35 +2904,24 @@ function Build({
|
|
|
2896
2904
|
}
|
|
2897
2905
|
}
|
|
2898
2906
|
|
|
2899
|
-
// src/utilities/checkIfReactIsUsable.ts
|
|
2900
|
-
var import_react7 = require("react");
|
|
2901
|
-
var checkIfReactIsUsable_default = ({ cons = console, proc = process } = {}) => {
|
|
2902
|
-
try {
|
|
2903
|
-
(0, import_react7.useState)(null);
|
|
2904
|
-
} catch (e) {
|
|
2905
|
-
cons.error(e);
|
|
2906
|
-
proc.exit(1);
|
|
2907
|
-
}
|
|
2908
|
-
};
|
|
2909
|
-
|
|
2910
2907
|
// src/components/LoginHOC.tsx
|
|
2911
2908
|
var import_ink16 = require("ink");
|
|
2912
|
-
var
|
|
2909
|
+
var import_react9 = require("react");
|
|
2913
2910
|
var import_prop_types9 = __toESM(require("prop-types"));
|
|
2914
2911
|
var import_is_ci4 = __toESM(require("is-ci"));
|
|
2915
2912
|
|
|
2916
2913
|
// src/components/Login.tsx
|
|
2917
2914
|
var import_ink14 = require("ink");
|
|
2918
2915
|
var import_prop_types8 = __toESM(require("prop-types"));
|
|
2919
|
-
var
|
|
2916
|
+
var import_react8 = require("react");
|
|
2920
2917
|
var import_react_final_form = require("react-final-form");
|
|
2921
2918
|
|
|
2922
2919
|
// src/components/TextInput.tsx
|
|
2923
2920
|
var import_ink_text_input = __toESM(require("ink-text-input"));
|
|
2924
|
-
var
|
|
2921
|
+
var import_react7 = __toESM(require("react"));
|
|
2925
2922
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2926
2923
|
var TextInput = ({ onBlur, onFocus, ...props }) => {
|
|
2927
|
-
|
|
2924
|
+
import_react7.default.useEffect(() => {
|
|
2928
2925
|
onFocus();
|
|
2929
2926
|
return onBlur;
|
|
2930
2927
|
}, [onFocus, onBlur]);
|
|
@@ -2958,10 +2955,10 @@ var loginFields = [
|
|
|
2958
2955
|
}
|
|
2959
2956
|
];
|
|
2960
2957
|
var Login = ({ setIsLoggedIn }) => {
|
|
2961
|
-
const [activeField, setActiveField] = (0,
|
|
2962
|
-
const [error, setError] = (0,
|
|
2963
|
-
const [failureMessage, setFailureMessage] = (0,
|
|
2964
|
-
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);
|
|
2965
2962
|
const onFailure = (message2) => {
|
|
2966
2963
|
setIsSubmittingForm(false);
|
|
2967
2964
|
setFailureMessage(message2);
|
|
@@ -3060,11 +3057,11 @@ var LoadingText_default = LoadingText;
|
|
|
3060
3057
|
// src/components/LoginHOC.tsx
|
|
3061
3058
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3062
3059
|
var LoginHOC = ({ children, isInteractive = true }) => {
|
|
3063
|
-
const [isLoggedIn, setIsLoggedIn] = (0,
|
|
3064
|
-
const [isEffectDone, setEffectDone] = (0,
|
|
3065
|
-
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);
|
|
3066
3063
|
const { isRawModeSupported } = (0, import_ink16.useStdin)();
|
|
3067
|
-
(0,
|
|
3064
|
+
(0, import_react9.useEffect)(() => {
|
|
3068
3065
|
async function isAccessTokenValid() {
|
|
3069
3066
|
const { accessToken, email, jwtToken } = getAuthConfig();
|
|
3070
3067
|
let userCreds = null;
|
|
@@ -3141,9 +3138,9 @@ LoginHOC.propTypes = {
|
|
|
3141
3138
|
var LoginHOC_default = LoginHOC;
|
|
3142
3139
|
|
|
3143
3140
|
// src/components/ErrorBoundary.tsx
|
|
3144
|
-
var
|
|
3141
|
+
var import_react10 = __toESM(require("react"));
|
|
3145
3142
|
var Sentry2 = __toESM(require("@sentry/node"));
|
|
3146
|
-
var ErrorBoundary = class extends
|
|
3143
|
+
var ErrorBoundary = class extends import_react10.default.Component {
|
|
3147
3144
|
constructor(props) {
|
|
3148
3145
|
super(props);
|
|
3149
3146
|
this.state = { eventId: null, error: null };
|
|
@@ -3171,7 +3168,7 @@ var ErrorBoundary_default = ErrorBoundary;
|
|
|
3171
3168
|
var import_ink20 = require("ink");
|
|
3172
3169
|
var import_ink_select_input = __toESM(require("ink-select-input"));
|
|
3173
3170
|
var import_prop_types11 = __toESM(require("prop-types"));
|
|
3174
|
-
var
|
|
3171
|
+
var import_react12 = require("react");
|
|
3175
3172
|
|
|
3176
3173
|
// src/components/CustomSelectInputIndicator.tsx
|
|
3177
3174
|
var import_ink17 = require("ink");
|
|
@@ -3198,7 +3195,7 @@ function CustomSelectInputItem({
|
|
|
3198
3195
|
// src/components/ViewBuild.tsx
|
|
3199
3196
|
var import_ink19 = require("ink");
|
|
3200
3197
|
var import_prop_types10 = __toESM(require("prop-types"));
|
|
3201
|
-
var
|
|
3198
|
+
var import_react11 = require("react");
|
|
3202
3199
|
|
|
3203
3200
|
// src/utilities/getLatestBuildId.ts
|
|
3204
3201
|
async function getLatestBuildId({
|
|
@@ -3293,7 +3290,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3293
3290
|
isLoading
|
|
3294
3291
|
},
|
|
3295
3292
|
setState
|
|
3296
|
-
] = (0,
|
|
3293
|
+
] = (0, import_react11.useState)({
|
|
3297
3294
|
appId: null,
|
|
3298
3295
|
arbitraryMessageComponent: null,
|
|
3299
3296
|
build: null,
|
|
@@ -3309,7 +3306,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3309
3306
|
error: error2
|
|
3310
3307
|
}));
|
|
3311
3308
|
};
|
|
3312
|
-
(0,
|
|
3309
|
+
(0, import_react11.useEffect)(() => {
|
|
3313
3310
|
let firebaseUnsubscribe;
|
|
3314
3311
|
async function viewBuild() {
|
|
3315
3312
|
let config2;
|
|
@@ -3366,12 +3363,12 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3366
3363
|
}
|
|
3367
3364
|
};
|
|
3368
3365
|
}, [id, configPath]);
|
|
3369
|
-
(0,
|
|
3366
|
+
(0, import_react11.useEffect)(() => {
|
|
3370
3367
|
if (hasBuildEverFailed && shouldExitOnBuildFailure_default(build)) {
|
|
3371
3368
|
setTimeout(() => exit(new Error("Build has failed")), 10);
|
|
3372
3369
|
}
|
|
3373
3370
|
}, [build, exit, hasBuildEverFailed]);
|
|
3374
|
-
(0,
|
|
3371
|
+
(0, import_react11.useEffect)(() => {
|
|
3375
3372
|
if (arbitraryMessageComponent) {
|
|
3376
3373
|
setTimeout(() => exit(new Error("Validation failed")), 10);
|
|
3377
3374
|
}
|
|
@@ -3450,14 +3447,14 @@ var OngoingBuildGuard = ({
|
|
|
3450
3447
|
const { isRawModeSupported } = (0, import_ink20.useStdin)();
|
|
3451
3448
|
const onInput = useInput_default();
|
|
3452
3449
|
const exit = useExit_default();
|
|
3453
|
-
const [{ appId, builds, error, isLoading, itemChosen }, setState] = (0,
|
|
3450
|
+
const [{ appId, builds, error, isLoading, itemChosen }, setState] = (0, import_react12.useState)({
|
|
3454
3451
|
appId: null,
|
|
3455
3452
|
builds: [],
|
|
3456
3453
|
error: null,
|
|
3457
3454
|
isLoading: true,
|
|
3458
3455
|
itemChosen: null
|
|
3459
3456
|
});
|
|
3460
|
-
(0,
|
|
3457
|
+
(0, import_react12.useEffect)(() => {
|
|
3461
3458
|
if (!isLoading) {
|
|
3462
3459
|
return;
|
|
3463
3460
|
}
|
|
@@ -3580,9 +3577,9 @@ OngoingBuildGuard.propTypes = {
|
|
|
3580
3577
|
var OngoingBuildGuard_default = OngoingBuildGuard;
|
|
3581
3578
|
|
|
3582
3579
|
// src/utilities/useAnalytics.ts
|
|
3583
|
-
var
|
|
3580
|
+
var import_react13 = require("react");
|
|
3584
3581
|
var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
|
|
3585
|
-
const [hasAttemptedTracking, setTrackingAttempt] = (0,
|
|
3582
|
+
const [hasAttemptedTracking, setTrackingAttempt] = (0, import_react13.useState)(false);
|
|
3586
3583
|
logger_default.info({ command, flags, properties }, "useAnalyticsCommand");
|
|
3587
3584
|
try {
|
|
3588
3585
|
if (flags.projectPath) {
|
|
@@ -3593,7 +3590,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
|
|
|
3593
3590
|
}
|
|
3594
3591
|
} catch (err) {
|
|
3595
3592
|
}
|
|
3596
|
-
(0,
|
|
3593
|
+
(0, import_react13.useEffect)(() => {
|
|
3597
3594
|
const authUnsubscribe = onUserAuth(async (user) => {
|
|
3598
3595
|
if (user.uid) {
|
|
3599
3596
|
identify(
|
|
@@ -3628,7 +3625,6 @@ function BuildCommand({
|
|
|
3628
3625
|
configPath,
|
|
3629
3626
|
flags
|
|
3630
3627
|
}) {
|
|
3631
|
-
checkIfReactIsUsable_default();
|
|
3632
3628
|
useAnalyticsCommand("build", {
|
|
3633
3629
|
async: flags.exitAfterUploading,
|
|
3634
3630
|
codeSign: flags.shouldCodeSign,
|
|
@@ -3649,7 +3645,7 @@ function BuildCommand({
|
|
|
3649
3645
|
// src/components/ViewBuilds.tsx
|
|
3650
3646
|
var import_ink26 = require("ink");
|
|
3651
3647
|
var import_prop_types17 = __toESM(require("prop-types"));
|
|
3652
|
-
var
|
|
3648
|
+
var import_react15 = require("react");
|
|
3653
3649
|
|
|
3654
3650
|
// src/components/Table.tsx
|
|
3655
3651
|
var import_ink24 = require("ink");
|
|
@@ -3673,7 +3669,7 @@ var TableEnd_default = TableEnd;
|
|
|
3673
3669
|
// src/components/TableHead.tsx
|
|
3674
3670
|
var import_ink22 = require("ink");
|
|
3675
3671
|
var import_prop_types13 = __toESM(require("prop-types"));
|
|
3676
|
-
var
|
|
3672
|
+
var import_react14 = require("react");
|
|
3677
3673
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3678
3674
|
var TableHead = ({ keyDetails, ...props }) => {
|
|
3679
3675
|
let topLine = "\u250C";
|
|
@@ -3681,7 +3677,7 @@ var TableHead = ({ keyDetails, ...props }) => {
|
|
|
3681
3677
|
topLine += "\u2510";
|
|
3682
3678
|
const contentLineElements = Object.values(keyDetails).map(
|
|
3683
3679
|
({ key, width }, index) => {
|
|
3684
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react14.Fragment, { children: [
|
|
3685
3681
|
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink22.Text, { children: " \u2502 " }) : null,
|
|
3686
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 }) })
|
|
3687
3683
|
] }, key);
|
|
@@ -3915,7 +3911,7 @@ var ViewBuilds = ({
|
|
|
3915
3911
|
user
|
|
3916
3912
|
},
|
|
3917
3913
|
setState
|
|
3918
|
-
] = (0,
|
|
3914
|
+
] = (0, import_react15.useState)({
|
|
3919
3915
|
builds: [],
|
|
3920
3916
|
error: null,
|
|
3921
3917
|
hasMoreToLoad: true,
|
|
@@ -3940,7 +3936,7 @@ var ViewBuilds = ({
|
|
|
3940
3936
|
}));
|
|
3941
3937
|
}
|
|
3942
3938
|
});
|
|
3943
|
-
(0,
|
|
3939
|
+
(0, import_react15.useEffect)(() => {
|
|
3944
3940
|
async function viewBuilds() {
|
|
3945
3941
|
if (error || isLoading || isInitialLoadComplete && (!hasMoreToLoad || !startAfter)) {
|
|
3946
3942
|
return;
|
|
@@ -4015,12 +4011,12 @@ var ViewBuilds = ({
|
|
|
4015
4011
|
format,
|
|
4016
4012
|
count
|
|
4017
4013
|
]);
|
|
4018
|
-
(0,
|
|
4014
|
+
(0, import_react15.useEffect)(() => {
|
|
4019
4015
|
if (!hasMoreToLoad) {
|
|
4020
4016
|
setTimeout(exit, 10);
|
|
4021
4017
|
}
|
|
4022
4018
|
}, [exit, hasMoreToLoad]);
|
|
4023
|
-
(0,
|
|
4019
|
+
(0, import_react15.useEffect)(() => {
|
|
4024
4020
|
if (!isLoading && isInitialLoadComplete && shouldExitAfterViewingBuilds) {
|
|
4025
4021
|
setTimeout(exit, 10);
|
|
4026
4022
|
}
|
|
@@ -4106,7 +4102,6 @@ var BuildsCommand = ({
|
|
|
4106
4102
|
format = "table",
|
|
4107
4103
|
exit
|
|
4108
4104
|
}) => {
|
|
4109
|
-
checkIfReactIsUsable_default();
|
|
4110
4105
|
useAnalyticsCommand("builds", {
|
|
4111
4106
|
id,
|
|
4112
4107
|
shouldViewLatest,
|
|
@@ -4148,15 +4143,14 @@ var BuildsCommand = ({
|
|
|
4148
4143
|
var BuildsCommand_default = BuildsCommand;
|
|
4149
4144
|
|
|
4150
4145
|
// src/commands/LogoutCommand.tsx
|
|
4151
|
-
var
|
|
4146
|
+
var import_react16 = require("react");
|
|
4152
4147
|
var import_ink27 = require("ink");
|
|
4153
4148
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4154
4149
|
var Logout = () => {
|
|
4155
4150
|
const exit = useExit_default();
|
|
4156
4151
|
const { hasAttemptedTracking } = useAnalyticsCommand("logout");
|
|
4157
|
-
checkIfReactIsUsable_default();
|
|
4158
4152
|
deleteAuthConfig();
|
|
4159
|
-
(0,
|
|
4153
|
+
(0, import_react16.useEffect)(() => {
|
|
4160
4154
|
if (hasAttemptedTracking) {
|
|
4161
4155
|
exit();
|
|
4162
4156
|
}
|
|
@@ -4170,7 +4164,7 @@ var LogoutCommand_default = LogoutWrapper;
|
|
|
4170
4164
|
|
|
4171
4165
|
// src/components/BuildPicker.tsx
|
|
4172
4166
|
var import_ink29 = require("ink");
|
|
4173
|
-
var
|
|
4167
|
+
var import_react17 = require("react");
|
|
4174
4168
|
|
|
4175
4169
|
// src/components/SelectTable.tsx
|
|
4176
4170
|
var import_ink28 = require("ink");
|
|
@@ -4288,11 +4282,11 @@ function BuildPicker({
|
|
|
4288
4282
|
const exit = useExit_default();
|
|
4289
4283
|
const onInput = useInput_default();
|
|
4290
4284
|
const isRealIdPassed = buildId && buildId !== "latest";
|
|
4291
|
-
const [state, setState] = (0,
|
|
4285
|
+
const [state, setState] = (0, import_react17.useState)({
|
|
4292
4286
|
selectedBuildId: isRealIdPassed ? buildId : void 0,
|
|
4293
4287
|
state: isRealIdPassed ? "selected" : "loading"
|
|
4294
4288
|
});
|
|
4295
|
-
(0,
|
|
4289
|
+
(0, import_react17.useEffect)(() => {
|
|
4296
4290
|
loadData({
|
|
4297
4291
|
buildFilter,
|
|
4298
4292
|
buildId,
|
|
@@ -4407,7 +4401,7 @@ async function getBuildItems({
|
|
|
4407
4401
|
}
|
|
4408
4402
|
|
|
4409
4403
|
// src/commands/release/components/ReleaseBuildLogic.tsx
|
|
4410
|
-
var
|
|
4404
|
+
var import_react18 = require("react");
|
|
4411
4405
|
|
|
4412
4406
|
// src/utilities/getBuildAttributes.ts
|
|
4413
4407
|
async function getBuildAttributes({
|
|
@@ -4544,8 +4538,8 @@ function ReleaseBuildLogic({
|
|
|
4544
4538
|
configPath
|
|
4545
4539
|
}) {
|
|
4546
4540
|
const exit = useExit_default();
|
|
4547
|
-
const [state, setState] = (0,
|
|
4548
|
-
(0,
|
|
4541
|
+
const [state, setState] = (0, import_react18.useState)({ state: "loading" });
|
|
4542
|
+
(0, import_react18.useEffect)(() => {
|
|
4549
4543
|
releaseBuildWorkflow({ configPath, buildId, updateState }).catch(
|
|
4550
4544
|
logger_default.error
|
|
4551
4545
|
);
|
|
@@ -4583,7 +4577,7 @@ async function releaseBuildWorkflow({
|
|
|
4583
4577
|
|
|
4584
4578
|
// src/commands/release/components/ReleaseConfirmation.tsx
|
|
4585
4579
|
var import_ink34 = require("ink");
|
|
4586
|
-
var
|
|
4580
|
+
var import_react20 = require("react");
|
|
4587
4581
|
|
|
4588
4582
|
// src/commands/smoke-test/utilities/build.ts
|
|
4589
4583
|
var import_semver = __toESM(require("semver"));
|
|
@@ -4742,15 +4736,15 @@ function analyzeRelease({
|
|
|
4742
4736
|
// src/commands/release/components/DowngradeConfirmation.tsx
|
|
4743
4737
|
var import_ink32 = require("ink");
|
|
4744
4738
|
var import_ink_text_input2 = __toESM(require("ink-text-input"));
|
|
4745
|
-
var
|
|
4739
|
+
var import_react19 = require("react");
|
|
4746
4740
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4747
4741
|
function DowngradeConfirmation({
|
|
4748
4742
|
build,
|
|
4749
4743
|
latestReleasedBuild,
|
|
4750
4744
|
confirmDowngrade: confirmDowngrade2
|
|
4751
4745
|
}) {
|
|
4752
|
-
const [confirmText, setConfirmText] = (0,
|
|
4753
|
-
const [showError, setShowError] = (0,
|
|
4746
|
+
const [confirmText, setConfirmText] = (0, import_react19.useState)("");
|
|
4747
|
+
const [showError, setShowError] = (0, import_react19.useState)(false);
|
|
4754
4748
|
const buildVersion = build.appVersion;
|
|
4755
4749
|
const latestVersion2 = latestReleasedBuild.appVersion;
|
|
4756
4750
|
function onType(text) {
|
|
@@ -4835,10 +4829,10 @@ function ReleaseConfirmation({
|
|
|
4835
4829
|
loadData = loadBuildsData
|
|
4836
4830
|
}) {
|
|
4837
4831
|
var _a;
|
|
4838
|
-
const [state, setState] = (0,
|
|
4832
|
+
const [state, setState] = (0, import_react20.useState)({
|
|
4839
4833
|
state: disabled ? "bypass" : "loading"
|
|
4840
4834
|
});
|
|
4841
|
-
(0,
|
|
4835
|
+
(0, import_react20.useEffect)(() => {
|
|
4842
4836
|
confirmationWorkflow({
|
|
4843
4837
|
buildId,
|
|
4844
4838
|
configPath,
|
|
@@ -5018,7 +5012,6 @@ function ReleaseCommand({
|
|
|
5018
5012
|
configPath,
|
|
5019
5013
|
shouldConfirm
|
|
5020
5014
|
}) {
|
|
5021
|
-
checkIfReactIsUsable_default();
|
|
5022
5015
|
useAnalyticsCommand("release", {
|
|
5023
5016
|
buildId,
|
|
5024
5017
|
shouldConfirm,
|
|
@@ -5061,11 +5054,11 @@ function isBuildReleasable(opts) {
|
|
|
5061
5054
|
}
|
|
5062
5055
|
|
|
5063
5056
|
// src/commands/smoke-test/SmokeTestCommand.tsx
|
|
5064
|
-
var
|
|
5057
|
+
var import_react22 = require("react");
|
|
5065
5058
|
|
|
5066
5059
|
// src/commands/smoke-test/components/Cancellation.tsx
|
|
5067
5060
|
var import_ink35 = require("ink");
|
|
5068
|
-
var
|
|
5061
|
+
var import_react21 = require("react");
|
|
5069
5062
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5070
5063
|
function Cancellation({
|
|
5071
5064
|
children,
|
|
@@ -5085,8 +5078,8 @@ function Cancellation({
|
|
|
5085
5078
|
renderError = (e) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ErrorDisplay, { error: e }),
|
|
5086
5079
|
subject
|
|
5087
5080
|
}) {
|
|
5088
|
-
const [state, setState] = (0,
|
|
5089
|
-
const [error, setError] = (0,
|
|
5081
|
+
const [state, setState] = (0, import_react21.useState)("normal");
|
|
5082
|
+
const [error, setError] = (0, import_react21.useState)();
|
|
5090
5083
|
const onInput = useInput_default();
|
|
5091
5084
|
const exit = useExit_default();
|
|
5092
5085
|
onInput(async (input, key) => {
|
|
@@ -5323,7 +5316,6 @@ function SmokeTestCommand({
|
|
|
5323
5316
|
buildId,
|
|
5324
5317
|
configPath
|
|
5325
5318
|
}) {
|
|
5326
|
-
checkIfReactIsUsable_default();
|
|
5327
5319
|
useAnalyticsCommand("smoke-test", { buildId, configPath });
|
|
5328
5320
|
const command = `todesktop release ${buildId === "latest" ? "--latest" : "<id>"}`;
|
|
5329
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)(
|
|
@@ -5351,13 +5343,13 @@ function SmokeTestContainer({
|
|
|
5351
5343
|
configPath
|
|
5352
5344
|
}) {
|
|
5353
5345
|
const exit = useExit_default();
|
|
5354
|
-
const [state, setState] = (0,
|
|
5346
|
+
const [state, setState] = (0, import_react22.useState)({
|
|
5355
5347
|
buildId,
|
|
5356
5348
|
state: "loading"
|
|
5357
5349
|
});
|
|
5358
|
-
const [abortController] = (0,
|
|
5350
|
+
const [abortController] = (0, import_react22.useState)(new AbortController());
|
|
5359
5351
|
const abortSignal = abortController.signal;
|
|
5360
|
-
(0,
|
|
5352
|
+
(0, import_react22.useEffect)(() => {
|
|
5361
5353
|
smokeTestWorkflow({ abortSignal, buildId, configPath, updateState }).catch(
|
|
5362
5354
|
logger_default.error
|
|
5363
5355
|
);
|
|
@@ -5448,15 +5440,14 @@ function isCancelable(state) {
|
|
|
5448
5440
|
}
|
|
5449
5441
|
|
|
5450
5442
|
// src/commands/WhoamiCommand.tsx
|
|
5451
|
-
var
|
|
5443
|
+
var import_react23 = require("react");
|
|
5452
5444
|
var import_ink38 = require("ink");
|
|
5453
5445
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5454
5446
|
var WhoAmI = () => {
|
|
5455
5447
|
const exit = useExit_default();
|
|
5456
|
-
checkIfReactIsUsable_default();
|
|
5457
5448
|
const auth = getAuthConfig();
|
|
5458
5449
|
const { hasAttemptedTracking } = useAnalyticsCommand("whoami", {}, {});
|
|
5459
|
-
(0,
|
|
5450
|
+
(0, import_react23.useEffect)(() => {
|
|
5460
5451
|
if (hasAttemptedTracking) {
|
|
5461
5452
|
exit();
|
|
5462
5453
|
}
|
|
@@ -5507,7 +5498,7 @@ var package_default = {
|
|
|
5507
5498
|
access: "public"
|
|
5508
5499
|
},
|
|
5509
5500
|
name: "@todesktop/cli",
|
|
5510
|
-
version: "1.12.
|
|
5501
|
+
version: "1.12.3",
|
|
5511
5502
|
license: "MIT",
|
|
5512
5503
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
5513
5504
|
homepage: "https://todesktop.com/cli",
|
|
@@ -5808,7 +5799,7 @@ import_commander.program.command("whoami").description("Prints the email of the
|
|
|
5808
5799
|
});
|
|
5809
5800
|
var runCommand = (component, props = null, { exitIfOutOfDate = true } = {}) => {
|
|
5810
5801
|
onCommand_default({ exitIfOutOfDate });
|
|
5811
|
-
const { waitUntilExit } = (0, import_ink39.render)((0,
|
|
5802
|
+
const { waitUntilExit } = (0, import_ink39.render)((0, import_react24.createElement)(component, props));
|
|
5812
5803
|
waitUntilExit().catch((error) => {
|
|
5813
5804
|
console.error(error.stack);
|
|
5814
5805
|
});
|