@todesktop/cli 1.6.0 → 1.6.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.
- package/dist/cli.js +243 -222
- package/dist/cli.js.map +4 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var import_commander = require("commander");
|
|
23
|
-
var
|
|
23
|
+
var import_ink33 = require("ink");
|
|
24
24
|
var import_react21 = require("react");
|
|
25
25
|
var import_register = require("source-map-support/register");
|
|
26
26
|
|
|
@@ -197,10 +197,14 @@ if (fs2.existsSync(oldConfigPath)) {
|
|
|
197
197
|
var import_pkg_up = __toESM(require("pkg-up"));
|
|
198
198
|
|
|
199
199
|
// src/utilities/readJson.ts
|
|
200
|
-
|
|
200
|
+
function readJson(filePath) {
|
|
201
|
+
return require(filePath);
|
|
202
|
+
}
|
|
201
203
|
|
|
202
204
|
// src/utilities/getToDesktopPackageJson.ts
|
|
203
|
-
var packageJson =
|
|
205
|
+
var packageJson = readJson(
|
|
206
|
+
import_pkg_up.default.sync({ cwd: __dirname })
|
|
207
|
+
);
|
|
204
208
|
function getToDesktopPackageJson() {
|
|
205
209
|
return packageJson;
|
|
206
210
|
}
|
|
@@ -961,11 +965,16 @@ var import_fs = require("fs");
|
|
|
961
965
|
var import_find_up = __toESM(require("find-up"));
|
|
962
966
|
|
|
963
967
|
// src/utilities/projectConfig/loadConfig.ts
|
|
964
|
-
|
|
968
|
+
function loadConfig(configPath) {
|
|
969
|
+
return require(configPath);
|
|
970
|
+
}
|
|
965
971
|
|
|
966
972
|
// src/utilities/projectConfig/resolveConfigPaths.ts
|
|
967
973
|
var path5 = __toESM(require("path"));
|
|
968
|
-
|
|
974
|
+
function resolveConfigPaths({
|
|
975
|
+
config: config2,
|
|
976
|
+
projectRoot
|
|
977
|
+
}) {
|
|
969
978
|
const appRoot = config2.appPath ? path5.isAbsolute(config2.appPath) ? config2.appPath : path5.join(projectRoot, config2.appPath) : projectRoot;
|
|
970
979
|
const transformIfExists = (value, transformer) => value ? transformer(value) : void 0;
|
|
971
980
|
const resolvePath = (filePath) => path5.isAbsolute(filePath) ? filePath : path5.join(projectRoot, filePath);
|
|
@@ -1019,7 +1028,7 @@ var resolveConfigPaths_default = ({ config: config2, projectRoot }) => {
|
|
|
1019
1028
|
}
|
|
1020
1029
|
}
|
|
1021
1030
|
return result;
|
|
1022
|
-
}
|
|
1031
|
+
}
|
|
1023
1032
|
|
|
1024
1033
|
// src/utilities/projectConfig/validateConfig.ts
|
|
1025
1034
|
var import_ajv3 = __toESM(require("ajv"));
|
|
@@ -1693,7 +1702,10 @@ var full_default = (context) => {
|
|
|
1693
1702
|
};
|
|
1694
1703
|
|
|
1695
1704
|
// src/utilities/projectConfig/validateConfig.ts
|
|
1696
|
-
|
|
1705
|
+
function validateConfig({
|
|
1706
|
+
config: config2,
|
|
1707
|
+
projectRoot
|
|
1708
|
+
}) {
|
|
1697
1709
|
const context = { projectRoot };
|
|
1698
1710
|
const schema = full_default(context);
|
|
1699
1711
|
const ajv = new import_ajv3.default({ allErrors: true });
|
|
@@ -1720,19 +1732,19 @@ The "productName" property is no longer supported in todesktop.json. Please remo
|
|
|
1720
1732
|
We made this change because Electron also uses the "productName" if it exists in your app's package.json. If you do not add it to your package.json, your app name will default to the value of the "name" property in your package.json.`
|
|
1721
1733
|
);
|
|
1722
1734
|
}
|
|
1723
|
-
}
|
|
1735
|
+
}
|
|
1724
1736
|
|
|
1725
1737
|
// src/utilities/projectConfig/computeFullProjectConfig.ts
|
|
1726
1738
|
var import_path4 = require("path");
|
|
1727
1739
|
var import_lodash2 = __toESM(require("lodash.merge"));
|
|
1728
|
-
|
|
1740
|
+
function computeFullProjectConfig(partialConfig, projectRoot) {
|
|
1729
1741
|
if (!partialConfig.extends) {
|
|
1730
1742
|
logger_default.debug("No extends field, returning partial config");
|
|
1731
1743
|
return partialConfig;
|
|
1732
1744
|
} else {
|
|
1733
1745
|
logger_default.debug("Extends field found, resolving");
|
|
1734
1746
|
const parentConfigPath = (0, import_path4.resolve)(projectRoot, partialConfig.extends);
|
|
1735
|
-
const parentConfig =
|
|
1747
|
+
const parentConfig = loadConfig(parentConfigPath);
|
|
1736
1748
|
const parentFullConfig = computeFullProjectConfig(
|
|
1737
1749
|
parentConfig,
|
|
1738
1750
|
projectRoot
|
|
@@ -1741,11 +1753,10 @@ var computeFullProjectConfig = (partialConfig, projectRoot) => {
|
|
|
1741
1753
|
delete result.extends;
|
|
1742
1754
|
return result;
|
|
1743
1755
|
}
|
|
1744
|
-
}
|
|
1745
|
-
var computeFullProjectConfig_default = computeFullProjectConfig;
|
|
1756
|
+
}
|
|
1746
1757
|
|
|
1747
1758
|
// src/utilities/projectConfig/getProjectConfig.ts
|
|
1748
|
-
|
|
1759
|
+
function getProjectConfig(configPath = null) {
|
|
1749
1760
|
if (configPath === null) {
|
|
1750
1761
|
logger_default.debug("No config path provided, searching for one");
|
|
1751
1762
|
configPath = import_find_up.default.sync("todesktop.json");
|
|
@@ -1766,13 +1777,13 @@ var getProjectConfig_default = (configPath = null) => {
|
|
|
1766
1777
|
}
|
|
1767
1778
|
}
|
|
1768
1779
|
const projectRoot = (0, import_path5.dirname)(configPath);
|
|
1769
|
-
const partialConfig =
|
|
1780
|
+
const partialConfig = loadConfig(configPath);
|
|
1770
1781
|
partialConfig.appPath = partialConfig.appPath || ".";
|
|
1771
|
-
const config2 =
|
|
1772
|
-
|
|
1773
|
-
const result =
|
|
1782
|
+
const config2 = computeFullProjectConfig(partialConfig, projectRoot);
|
|
1783
|
+
validateConfig({ config: config2, projectRoot });
|
|
1784
|
+
const result = resolveConfigPaths({ config: config2, projectRoot });
|
|
1774
1785
|
return { config: result, unprocessedConfig: config2, projectRoot };
|
|
1775
|
-
}
|
|
1786
|
+
}
|
|
1776
1787
|
|
|
1777
1788
|
// src/utilities/postToFirebaseFunction.ts
|
|
1778
1789
|
var import_axios = __toESM(require("axios"));
|
|
@@ -2141,7 +2152,7 @@ function removeNullDependencies(pkgJson) {
|
|
|
2141
2152
|
function getAppPkgJson({ config: config2 }) {
|
|
2142
2153
|
const packageJsonFromConfig = config2.packageJson || {};
|
|
2143
2154
|
const extendsFrom = packageJsonFromConfig.extends || "package.json";
|
|
2144
|
-
const packageJsonFromFile =
|
|
2155
|
+
const packageJsonFromFile = readJson(import_path7.default.join(config2.appPath, extendsFrom));
|
|
2145
2156
|
return removeNullDependencies(
|
|
2146
2157
|
(0, import_lodash3.default)({}, packageJsonFromFile, packageJsonFromConfig)
|
|
2147
2158
|
);
|
|
@@ -2152,7 +2163,7 @@ var getPackageJson_default = getAppPkgJson;
|
|
|
2152
2163
|
var runBuild_default = async ({ onEvent, shouldCodeSign = true, configPath }) => {
|
|
2153
2164
|
logForCI_default("Getting application information...");
|
|
2154
2165
|
const primaryUserId = currentUser().uid;
|
|
2155
|
-
const { config: config2, unprocessedConfig } =
|
|
2166
|
+
const { config: config2, unprocessedConfig } = getProjectConfig(configPath);
|
|
2156
2167
|
const appId = config2.id;
|
|
2157
2168
|
const appPkgJson = getPackageJson_default({ config: config2 });
|
|
2158
2169
|
onEvent("progress", {
|
|
@@ -2358,7 +2369,7 @@ var checkIfReactIsUsable_default = ({ cons = console, proc = process } = {}) =>
|
|
|
2358
2369
|
};
|
|
2359
2370
|
|
|
2360
2371
|
// src/components/LoginHOC.tsx
|
|
2361
|
-
var
|
|
2372
|
+
var import_ink16 = require("ink");
|
|
2362
2373
|
var import_react10 = require("react");
|
|
2363
2374
|
var import_prop_types11 = __toESM(require("prop-types"));
|
|
2364
2375
|
var import_is_ci4 = __toESM(require("is-ci"));
|
|
@@ -2488,13 +2499,28 @@ Login.propTypes = {
|
|
|
2488
2499
|
};
|
|
2489
2500
|
var Login_default = Login;
|
|
2490
2501
|
|
|
2491
|
-
// src/components/
|
|
2502
|
+
// src/components/LoadingText.tsx
|
|
2503
|
+
var import_ink15 = require("ink");
|
|
2492
2504
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2505
|
+
var LoadingText = () => {
|
|
2506
|
+
const { stdout } = (0, import_ink15.useStdout)();
|
|
2507
|
+
const stdOutRedirected = !stdout.isTTY;
|
|
2508
|
+
if (stdOutRedirected) {
|
|
2509
|
+
return null;
|
|
2510
|
+
}
|
|
2511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ink15.Text, { children: "Loading..." });
|
|
2512
|
+
};
|
|
2513
|
+
var LoadingText_default = LoadingText;
|
|
2514
|
+
|
|
2515
|
+
// src/components/LoginHOC.tsx
|
|
2516
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2493
2517
|
var LoginHOC = ({ children, isInteractive = true }) => {
|
|
2494
2518
|
const [isLoggedIn, setIsLoggedIn] = (0, import_react10.useState)(false);
|
|
2495
2519
|
const [isEffectDone, setEffectDone] = (0, import_react10.useState)(false);
|
|
2496
2520
|
const [error, setError] = (0, import_react10.useState)(null);
|
|
2497
|
-
const { isRawModeSupported } = (0,
|
|
2521
|
+
const { isRawModeSupported } = (0, import_ink16.useStdin)();
|
|
2522
|
+
const { stdout } = (0, import_ink16.useStdout)();
|
|
2523
|
+
const stdOutRedirected = !stdout.isTTY;
|
|
2498
2524
|
const onFailure = (message2, err = {}) => {
|
|
2499
2525
|
setError({
|
|
2500
2526
|
...err,
|
|
@@ -2556,15 +2582,15 @@ var LoginHOC = ({ children, isInteractive = true }) => {
|
|
|
2556
2582
|
isAccessTokenValid();
|
|
2557
2583
|
}, []);
|
|
2558
2584
|
if (error && isInteractive) {
|
|
2559
|
-
return /* @__PURE__ */ (0,
|
|
2585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorDisplay_default, { error });
|
|
2560
2586
|
}
|
|
2561
2587
|
if (!isEffectDone) {
|
|
2562
|
-
return /* @__PURE__ */ (0,
|
|
2588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LoadingText_default, {});
|
|
2563
2589
|
}
|
|
2564
2590
|
if (!isLoggedIn && isInteractive) {
|
|
2565
|
-
return /* @__PURE__ */ (0,
|
|
2591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Login_default, { setIsLoggedIn });
|
|
2566
2592
|
}
|
|
2567
|
-
return /* @__PURE__ */ (0,
|
|
2593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children });
|
|
2568
2594
|
};
|
|
2569
2595
|
LoginHOC.propTypes = {
|
|
2570
2596
|
children: import_prop_types11.default.object,
|
|
@@ -2600,26 +2626,26 @@ var ErrorBoundary = class extends import_react11.default.Component {
|
|
|
2600
2626
|
var ErrorBoundary_default = ErrorBoundary;
|
|
2601
2627
|
|
|
2602
2628
|
// src/components/OngoingBuildGuard.tsx
|
|
2603
|
-
var
|
|
2629
|
+
var import_ink20 = require("ink");
|
|
2604
2630
|
var import_ink_select_input = __toESM(require("ink-select-input"));
|
|
2605
2631
|
var import_prop_types15 = __toESM(require("prop-types"));
|
|
2606
2632
|
var import_react13 = require("react");
|
|
2607
2633
|
|
|
2608
2634
|
// src/components/CustomSelectInputIndicator.tsx
|
|
2609
|
-
var
|
|
2635
|
+
var import_ink17 = require("ink");
|
|
2610
2636
|
var import_prop_types12 = __toESM(require("prop-types"));
|
|
2611
|
-
var
|
|
2612
|
-
var CustomSelectInputIndicator = ({ isSelected, ...props }) => /* @__PURE__ */ (0,
|
|
2637
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2638
|
+
var CustomSelectInputIndicator = ({ isSelected, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ink17.Box, { marginRight: 1, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ink17.Text, { children: isSelected ? process.platform === "win32" ? ">" : "\u276F" : " " }) });
|
|
2613
2639
|
CustomSelectInputIndicator.propTypes = {
|
|
2614
2640
|
isSelected: import_prop_types12.default.bool.isRequired
|
|
2615
2641
|
};
|
|
2616
2642
|
var CustomSelectInputIndicator_default = CustomSelectInputIndicator;
|
|
2617
2643
|
|
|
2618
2644
|
// src/components/CustomSelectInputItem.tsx
|
|
2619
|
-
var
|
|
2645
|
+
var import_ink18 = require("ink");
|
|
2620
2646
|
var import_prop_types13 = __toESM(require("prop-types"));
|
|
2621
|
-
var
|
|
2622
|
-
var CustomSelectInputItem = ({ isSelected, label, ...props }) => /* @__PURE__ */ (0,
|
|
2647
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2648
|
+
var CustomSelectInputItem = ({ isSelected, label, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ink18.Text, { bold: isSelected, color: isSelected ? void 0 : "gray", ...props, children: label });
|
|
2623
2649
|
CustomSelectInputItem.propTypes = {
|
|
2624
2650
|
isSelected: import_prop_types13.default.bool.isRequired,
|
|
2625
2651
|
label: import_prop_types13.default.string.isRequired
|
|
@@ -2627,7 +2653,7 @@ CustomSelectInputItem.propTypes = {
|
|
|
2627
2653
|
var CustomSelectInputItem_default = CustomSelectInputItem;
|
|
2628
2654
|
|
|
2629
2655
|
// src/components/ViewBuild.tsx
|
|
2630
|
-
var
|
|
2656
|
+
var import_ink19 = require("ink");
|
|
2631
2657
|
var import_prop_types14 = __toESM(require("prop-types"));
|
|
2632
2658
|
var import_react12 = require("react");
|
|
2633
2659
|
|
|
@@ -2677,7 +2703,7 @@ var findAppUserId = async (appId) => {
|
|
|
2677
2703
|
var findAppUserId_default = findAppUserId;
|
|
2678
2704
|
|
|
2679
2705
|
// src/components/ViewBuild.tsx
|
|
2680
|
-
var
|
|
2706
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2681
2707
|
var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
2682
2708
|
const exit = useExit_default();
|
|
2683
2709
|
const [
|
|
@@ -2711,7 +2737,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
2711
2737
|
async function viewBuild() {
|
|
2712
2738
|
let config2;
|
|
2713
2739
|
try {
|
|
2714
|
-
config2 =
|
|
2740
|
+
config2 = getProjectConfig(configPath).config;
|
|
2715
2741
|
} catch (e) {
|
|
2716
2742
|
setState((previousState) => ({ ...previousState, error: e }));
|
|
2717
2743
|
return;
|
|
@@ -2748,7 +2774,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
2748
2774
|
if (!latestBuildId) {
|
|
2749
2775
|
setState((previousState) => ({
|
|
2750
2776
|
...previousState,
|
|
2751
|
-
arbitraryMessageComponent: /* @__PURE__ */ (0,
|
|
2777
|
+
arbitraryMessageComponent: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ink19.Text, { children: "There are no builds yet" })
|
|
2752
2778
|
}));
|
|
2753
2779
|
return;
|
|
2754
2780
|
}
|
|
@@ -2774,13 +2800,13 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
2774
2800
|
}
|
|
2775
2801
|
}, [arbitraryMessageComponent, exit]);
|
|
2776
2802
|
if (error) {
|
|
2777
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorDisplay_default, { commandUsed, error });
|
|
2778
2804
|
}
|
|
2779
2805
|
if (arbitraryMessageComponent) {
|
|
2780
2806
|
return arbitraryMessageComponent;
|
|
2781
2807
|
}
|
|
2782
2808
|
if (isLoading) {
|
|
2783
|
-
return /* @__PURE__ */ (0,
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LoadingText_default, {});
|
|
2784
2810
|
}
|
|
2785
2811
|
const onBuildFailure = () => {
|
|
2786
2812
|
if (hasBuildEverFailed) {
|
|
@@ -2791,7 +2817,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
2791
2817
|
hasBuildEverFailed: true
|
|
2792
2818
|
}));
|
|
2793
2819
|
};
|
|
2794
|
-
return /* @__PURE__ */ (0,
|
|
2820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2795
2821
|
MainLayout_default,
|
|
2796
2822
|
{
|
|
2797
2823
|
appId,
|
|
@@ -2800,7 +2826,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
2800
2826
|
build,
|
|
2801
2827
|
commandUsed,
|
|
2802
2828
|
hasBuildEverFailed,
|
|
2803
|
-
children: /* @__PURE__ */ (0,
|
|
2829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BuildProgress_default, { build, onBuildFailure })
|
|
2804
2830
|
}
|
|
2805
2831
|
);
|
|
2806
2832
|
};
|
|
@@ -2838,9 +2864,9 @@ var ViewBuild_default = ViewBuild;
|
|
|
2838
2864
|
|
|
2839
2865
|
// src/components/OngoingBuildGuard.tsx
|
|
2840
2866
|
var import_is_ci5 = __toESM(require("is-ci"));
|
|
2841
|
-
var
|
|
2867
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2842
2868
|
var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
2843
|
-
const { isRawModeSupported } = (0,
|
|
2869
|
+
const { isRawModeSupported } = (0, import_ink20.useStdin)();
|
|
2844
2870
|
const onInput = useInput_default();
|
|
2845
2871
|
const exit = useExit_default();
|
|
2846
2872
|
const [{ appId, builds, error, isLoading, itemChosen }, setState] = (0, import_react13.useState)({
|
|
@@ -2856,7 +2882,7 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
2856
2882
|
}
|
|
2857
2883
|
(async () => {
|
|
2858
2884
|
try {
|
|
2859
|
-
const applicationId =
|
|
2885
|
+
const applicationId = getProjectConfig(configPath).config.id;
|
|
2860
2886
|
const { id } = await findAppUserId_default(applicationId);
|
|
2861
2887
|
const buildsResult = await firestore_default.doc(`users/${id}/applications/${applicationId}`).collection("builds").orderBy("createdAt", "desc").limit(10).get();
|
|
2862
2888
|
const stateUpdates = {
|
|
@@ -2895,20 +2921,20 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
2895
2921
|
});
|
|
2896
2922
|
}
|
|
2897
2923
|
if (error) {
|
|
2898
|
-
return /* @__PURE__ */ (0,
|
|
2924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorDisplay_default, { commandUsed, error });
|
|
2899
2925
|
}
|
|
2900
2926
|
if (isLoading) {
|
|
2901
|
-
return /* @__PURE__ */ (0,
|
|
2927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ink20.Text, { children: "..." });
|
|
2902
2928
|
}
|
|
2903
2929
|
if (itemChosen) {
|
|
2904
2930
|
logger_default.debug({ itemChosen }, "OngoingBuildGuard component: item chosen");
|
|
2905
2931
|
const build = builds.find(Boolean);
|
|
2906
2932
|
if (itemChosen.value === "view") {
|
|
2907
|
-
return /* @__PURE__ */ (0,
|
|
2933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ViewBuild_default, { commandUsed, id: build.id });
|
|
2908
2934
|
} else if (itemChosen.value === "cancel") {
|
|
2909
|
-
return /* @__PURE__ */ (0,
|
|
2935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CancelBuild_default, { appId, commandUsed, id: build.id, children });
|
|
2910
2936
|
} else if (itemChosen.value === "concurrent") {
|
|
2911
|
-
return /* @__PURE__ */ (0,
|
|
2937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children });
|
|
2912
2938
|
} else {
|
|
2913
2939
|
setTimeout(exit, 10);
|
|
2914
2940
|
}
|
|
@@ -2937,17 +2963,17 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
2937
2963
|
value: "exit"
|
|
2938
2964
|
});
|
|
2939
2965
|
const handleSelect = (itemChosen2) => setState((previousState) => ({ ...previousState, itemChosen: itemChosen2 }));
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
2941
|
-
/* @__PURE__ */ (0,
|
|
2942
|
-
/* @__PURE__ */ (0,
|
|
2943
|
-
/* @__PURE__ */ (0,
|
|
2966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ink20.Box, { marginBottom: 1, children: [
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ink20.Text, { bold: true, children: multiple ? "There are ongoing builds " : "There is an ongoing build " }),
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ink20.Text, { children: [
|
|
2944
2970
|
"(",
|
|
2945
2971
|
latestBuild.appName,
|
|
2946
2972
|
latestBuild.appVersion ? ` v${latestBuild.appVersion}` : "",
|
|
2947
2973
|
")"
|
|
2948
2974
|
] })
|
|
2949
2975
|
] }),
|
|
2950
|
-
/* @__PURE__ */ (0,
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2951
2977
|
import_ink_select_input.default,
|
|
2952
2978
|
{
|
|
2953
2979
|
indicatorComponent: CustomSelectInputIndicator_default,
|
|
@@ -2958,7 +2984,7 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
2958
2984
|
)
|
|
2959
2985
|
] });
|
|
2960
2986
|
} else {
|
|
2961
|
-
return /* @__PURE__ */ (0,
|
|
2987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children });
|
|
2962
2988
|
}
|
|
2963
2989
|
};
|
|
2964
2990
|
OngoingBuildGuard.propTypes = {
|
|
@@ -2977,7 +3003,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
|
|
|
2977
3003
|
if (flags.projectPath) {
|
|
2978
3004
|
properties = {
|
|
2979
3005
|
...properties,
|
|
2980
|
-
...
|
|
3006
|
+
...getProjectConfig()
|
|
2981
3007
|
};
|
|
2982
3008
|
}
|
|
2983
3009
|
} catch (err) {
|
|
@@ -3012,7 +3038,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
|
|
|
3012
3038
|
};
|
|
3013
3039
|
|
|
3014
3040
|
// src/commands/BuildCommand.tsx
|
|
3015
|
-
var
|
|
3041
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3016
3042
|
var BuildCommand = ({
|
|
3017
3043
|
shouldCodeSign = true,
|
|
3018
3044
|
configPath = null
|
|
@@ -3023,7 +3049,7 @@ var BuildCommand = ({
|
|
|
3023
3049
|
config: configPath
|
|
3024
3050
|
});
|
|
3025
3051
|
const commandUsed = "todesktop build";
|
|
3026
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LoginHOC_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(OngoingBuildGuard_default, { configPath, commandUsed, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3027
3053
|
Build_default,
|
|
3028
3054
|
{
|
|
3029
3055
|
commandUsed,
|
|
@@ -3035,23 +3061,23 @@ var BuildCommand = ({
|
|
|
3035
3061
|
var BuildCommand_default = BuildCommand;
|
|
3036
3062
|
|
|
3037
3063
|
// src/components/ViewBuilds.tsx
|
|
3038
|
-
var
|
|
3039
|
-
var
|
|
3064
|
+
var import_ink26 = require("ink");
|
|
3065
|
+
var import_prop_types21 = __toESM(require("prop-types"));
|
|
3040
3066
|
var import_react16 = require("react");
|
|
3041
3067
|
|
|
3042
3068
|
// src/components/Table.tsx
|
|
3043
|
-
var
|
|
3069
|
+
var import_ink24 = require("ink");
|
|
3044
3070
|
var import_prop_types20 = __toESM(require("prop-types"));
|
|
3045
3071
|
|
|
3046
3072
|
// src/components/TableEnd.tsx
|
|
3047
|
-
var
|
|
3073
|
+
var import_ink21 = require("ink");
|
|
3048
3074
|
var import_prop_types16 = __toESM(require("prop-types"));
|
|
3049
|
-
var
|
|
3075
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3050
3076
|
var TableEnd = ({ keyDetails, ...props }) => {
|
|
3051
3077
|
let content = "\u2514";
|
|
3052
3078
|
content += Object.values(keyDetails).map(({ width }) => "\u2500".repeat(width + 2)).join("\u2534");
|
|
3053
3079
|
content += "\u2518";
|
|
3054
|
-
return /* @__PURE__ */ (0,
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Box, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { children: content }) });
|
|
3055
3081
|
};
|
|
3056
3082
|
TableEnd.propTypes = {
|
|
3057
3083
|
keyDetails: import_prop_types16.default.object.isRequired
|
|
@@ -3059,28 +3085,28 @@ TableEnd.propTypes = {
|
|
|
3059
3085
|
var TableEnd_default = TableEnd;
|
|
3060
3086
|
|
|
3061
3087
|
// src/components/TableHead.tsx
|
|
3062
|
-
var
|
|
3088
|
+
var import_ink22 = require("ink");
|
|
3063
3089
|
var import_prop_types17 = __toESM(require("prop-types"));
|
|
3064
3090
|
var import_react15 = require("react");
|
|
3065
|
-
var
|
|
3091
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3066
3092
|
var TableHead = ({ keyDetails, ...props }) => {
|
|
3067
3093
|
let topLine = "\u250C";
|
|
3068
3094
|
topLine += Object.values(keyDetails).map(({ width }) => "\u2500".repeat(width + 2)).join("\u252C");
|
|
3069
3095
|
topLine += "\u2510";
|
|
3070
3096
|
const contentLineElements = Object.values(keyDetails).map(
|
|
3071
3097
|
({ key, width }, index) => {
|
|
3072
|
-
return /* @__PURE__ */ (0,
|
|
3073
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
3074
|
-
/* @__PURE__ */ (0,
|
|
3098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react15.Fragment, { children: [
|
|
3099
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: " \u2502 " }) : null,
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { width, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { bold: true, children: key }) })
|
|
3075
3101
|
] }, key);
|
|
3076
3102
|
}
|
|
3077
3103
|
);
|
|
3078
|
-
return /* @__PURE__ */ (0,
|
|
3079
|
-
/* @__PURE__ */ (0,
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3081
|
-
/* @__PURE__ */ (0,
|
|
3104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink22.Box, { flexDirection: "column", ...props, children: [
|
|
3105
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: topLine }) }),
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink22.Box, { children: [
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: "\u2502 " }),
|
|
3082
3108
|
contentLineElements,
|
|
3083
|
-
/* @__PURE__ */ (0,
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: " \u2502" })
|
|
3084
3110
|
] }) })
|
|
3085
3111
|
] });
|
|
3086
3112
|
};
|
|
@@ -3094,9 +3120,9 @@ var TableHead_default = TableHead;
|
|
|
3094
3120
|
var import_prop_types19 = __toESM(require("prop-types"));
|
|
3095
3121
|
|
|
3096
3122
|
// src/components/TableRow.tsx
|
|
3097
|
-
var
|
|
3123
|
+
var import_ink23 = require("ink");
|
|
3098
3124
|
var import_prop_types18 = __toESM(require("prop-types"));
|
|
3099
|
-
var
|
|
3125
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3100
3126
|
var TableRow = ({
|
|
3101
3127
|
data,
|
|
3102
3128
|
getCellTextProps = ({ props }) => props,
|
|
@@ -3106,13 +3132,13 @@ var TableRow = ({
|
|
|
3106
3132
|
let topLine = "\u251C";
|
|
3107
3133
|
topLine += Object.values(keyDetails).map(({ width }) => "\u2500".repeat(width + 2)).join("\u253C");
|
|
3108
3134
|
topLine += "\u2524";
|
|
3109
|
-
const content = /* @__PURE__ */ (0,
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3135
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: "\u2502 " }),
|
|
3111
3137
|
Object.entries(data).map(([key, value], index) => {
|
|
3112
|
-
return /* @__PURE__ */ (0,
|
|
3113
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
3114
|
-
/* @__PURE__ */ (0,
|
|
3115
|
-
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_ink23.Box, { children: [
|
|
3139
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: " \u2502 " }) : null,
|
|
3140
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Box, { width: keyDetails[key].width, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3141
|
+
import_ink23.Text,
|
|
3116
3142
|
{
|
|
3117
3143
|
...getCellTextProps({
|
|
3118
3144
|
key,
|
|
@@ -3125,11 +3151,11 @@ var TableRow = ({
|
|
|
3125
3151
|
) })
|
|
3126
3152
|
] }, key);
|
|
3127
3153
|
}),
|
|
3128
|
-
/* @__PURE__ */ (0,
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: " \u2502" })
|
|
3129
3155
|
] });
|
|
3130
|
-
return /* @__PURE__ */ (0,
|
|
3131
|
-
/* @__PURE__ */ (0,
|
|
3132
|
-
/* @__PURE__ */ (0,
|
|
3156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_ink23.Box, { flexDirection: "column", children: [
|
|
3157
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: topLine }),
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Box, { children: content })
|
|
3133
3159
|
] }) });
|
|
3134
3160
|
};
|
|
3135
3161
|
TableRow.propTypes = {
|
|
@@ -3141,9 +3167,9 @@ TableRow.propTypes = {
|
|
|
3141
3167
|
var TableRow_default = TableRow;
|
|
3142
3168
|
|
|
3143
3169
|
// src/components/TableBody.tsx
|
|
3144
|
-
var
|
|
3170
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3145
3171
|
var TableBody = ({ data, getCellTextProps, keyDetails }) => {
|
|
3146
|
-
return /* @__PURE__ */ (0,
|
|
3172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: data.map((rowData, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3147
3173
|
TableRow_default,
|
|
3148
3174
|
{
|
|
3149
3175
|
data: rowData,
|
|
@@ -3188,12 +3214,12 @@ var getKeyDetails_default = (data) => {
|
|
|
3188
3214
|
};
|
|
3189
3215
|
|
|
3190
3216
|
// src/components/Table.tsx
|
|
3191
|
-
var
|
|
3217
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3192
3218
|
var Table = ({ data, getCellTextProps }) => {
|
|
3193
3219
|
const keyDetails = getKeyDetails_default(data);
|
|
3194
|
-
return /* @__PURE__ */ (0,
|
|
3195
|
-
/* @__PURE__ */ (0,
|
|
3196
|
-
/* @__PURE__ */ (0,
|
|
3220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_ink24.Box, { flexDirection: "column", children: [
|
|
3221
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHead_default, { keyDetails }),
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3197
3223
|
TableBody_default,
|
|
3198
3224
|
{
|
|
3199
3225
|
data,
|
|
@@ -3201,7 +3227,7 @@ var Table = ({ data, getCellTextProps }) => {
|
|
|
3201
3227
|
keyDetails
|
|
3202
3228
|
}
|
|
3203
3229
|
),
|
|
3204
|
-
/* @__PURE__ */ (0,
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableEnd_default, { keyDetails })
|
|
3205
3231
|
] });
|
|
3206
3232
|
};
|
|
3207
3233
|
Table.propTypes = {
|
|
@@ -3263,25 +3289,26 @@ var dateFns = __toESM(require("date-fns"));
|
|
|
3263
3289
|
var getRelativeDateFromDateString_default = (input) => dateFns.formatDistance(new Date(input), new Date()) + " ago";
|
|
3264
3290
|
|
|
3265
3291
|
// src/components/SyntaxHighlight.tsx
|
|
3292
|
+
var import_chalk2 = __toESM(require("chalk"));
|
|
3266
3293
|
var React3 = __toESM(require("react"));
|
|
3267
|
-
var
|
|
3268
|
-
var
|
|
3269
|
-
var
|
|
3270
|
-
var
|
|
3271
|
-
var SyntaxHighlight = ({
|
|
3294
|
+
var import_ink25 = require("ink");
|
|
3295
|
+
var import_util2 = __toESM(require("util"));
|
|
3296
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3297
|
+
var supportsColor = import_chalk2.default.stderr.supportsColor;
|
|
3298
|
+
var SyntaxHighlight = ({
|
|
3299
|
+
object,
|
|
3300
|
+
colors = supportsColor == null ? void 0 : supportsColor.hasBasic
|
|
3301
|
+
}) => {
|
|
3302
|
+
const { stdout } = (0, import_ink25.useStdout)();
|
|
3272
3303
|
const highlightedCode = React3.useMemo(() => {
|
|
3273
|
-
return
|
|
3274
|
-
}, [
|
|
3275
|
-
return /* @__PURE__ */ (0,
|
|
3276
|
-
};
|
|
3277
|
-
SyntaxHighlight.propTypes = {
|
|
3278
|
-
code: import_prop_types21.default.string.isRequired,
|
|
3279
|
-
language: import_prop_types21.default.string
|
|
3304
|
+
return stdout.isTTY ? import_util2.default.inspect(object, { colors, depth: 6 }) : JSON.stringify(object, null, 2);
|
|
3305
|
+
}, [colors, object, stdout.isTTY]);
|
|
3306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Text, { wrap: "end", children: highlightedCode });
|
|
3280
3307
|
};
|
|
3281
3308
|
var SyntaxHighlight_default = SyntaxHighlight;
|
|
3282
3309
|
|
|
3283
3310
|
// src/components/ViewBuilds.tsx
|
|
3284
|
-
var
|
|
3311
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3285
3312
|
var ViewBuilds = ({
|
|
3286
3313
|
commandUsed,
|
|
3287
3314
|
configPath,
|
|
@@ -3347,7 +3374,7 @@ var ViewBuilds = ({
|
|
|
3347
3374
|
}));
|
|
3348
3375
|
let config2;
|
|
3349
3376
|
try {
|
|
3350
|
-
config2 = projectConfig ||
|
|
3377
|
+
config2 = projectConfig || getProjectConfig(configPath).config;
|
|
3351
3378
|
} catch (e) {
|
|
3352
3379
|
setState((previousState) => ({ ...previousState, error: e }));
|
|
3353
3380
|
return;
|
|
@@ -3410,10 +3437,10 @@ var ViewBuilds = ({
|
|
|
3410
3437
|
}
|
|
3411
3438
|
}, [exit, isLoading, shouldExitAfterViewingBuilds, isInitialLoadComplete]);
|
|
3412
3439
|
if (error) {
|
|
3413
|
-
return /* @__PURE__ */ (0,
|
|
3440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorDisplay_default, { commandUsed, error });
|
|
3414
3441
|
}
|
|
3415
3442
|
if (!isInitialLoadComplete) {
|
|
3416
|
-
return /* @__PURE__ */ (0,
|
|
3443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingText_default, {});
|
|
3417
3444
|
}
|
|
3418
3445
|
if (builds.length) {
|
|
3419
3446
|
const formatData = (builds2) => builds2.map((build) => ({
|
|
@@ -3442,52 +3469,46 @@ var ViewBuilds = ({
|
|
|
3442
3469
|
}
|
|
3443
3470
|
return result;
|
|
3444
3471
|
};
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
if (build.mac && build.mac.appBuilderLibConfig) {
|
|
3448
|
-
delete build.mac.appBuilderLibConfig;
|
|
3449
|
-
}
|
|
3450
|
-
if (build.windows && build.windows.appBuilderLibConfig) {
|
|
3451
|
-
delete build.windows.appBuilderLibConfig;
|
|
3452
|
-
}
|
|
3453
|
-
if (build.linux && build.linux.appBuilderLibConfig) {
|
|
3454
|
-
delete build.linux.appBuilderLibConfig;
|
|
3455
|
-
}
|
|
3456
|
-
return build;
|
|
3457
|
-
});
|
|
3458
|
-
};
|
|
3459
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
3460
|
-
format === "table" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
3473
|
+
format === "table" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3461
3474
|
Table_default,
|
|
3462
3475
|
{
|
|
3463
3476
|
getCellTextProps,
|
|
3464
3477
|
data: formatData(builds)
|
|
3465
3478
|
}
|
|
3466
3479
|
) : null,
|
|
3467
|
-
format === "json" ? /* @__PURE__ */ (0,
|
|
3468
|
-
|
|
3469
|
-
{
|
|
3470
|
-
code: JSON.stringify(removeAppBuilderLibConfig(builds), null, 2),
|
|
3471
|
-
language: "JSON"
|
|
3472
|
-
}
|
|
3473
|
-
) : null,
|
|
3474
|
-
!shouldExitAfterViewingBuilds && builds.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Text, { color: "gray", dimColor: true, children: isLoading ? "Loading more..." : hasMoreToLoad ? `Showing the latest ${builds.length} builds. Press space/down to load more.` : `Showing all (${builds.length}) builds` }) }) : null
|
|
3480
|
+
format === "json" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SyntaxHighlight_default, { object: removeAppBuilderLibConfig(builds) }) : null,
|
|
3481
|
+
!shouldExitAfterViewingBuilds && builds.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ink26.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ink26.Text, { color: "gray", dimColor: true, children: isLoading ? "Loading more..." : hasMoreToLoad ? `Showing the latest ${builds.length} builds. Press space/down to load more.` : `Showing all (${builds.length}) builds` }) }) : null
|
|
3475
3482
|
] });
|
|
3476
3483
|
} else {
|
|
3477
|
-
return /* @__PURE__ */ (0,
|
|
3484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ink26.Text, { children: "There are no builds yet" });
|
|
3478
3485
|
}
|
|
3479
3486
|
};
|
|
3487
|
+
var removeAppBuilderLibConfig = (builds) => {
|
|
3488
|
+
return builds.map((build) => {
|
|
3489
|
+
if (build.mac && build.mac.appBuilderLibConfig) {
|
|
3490
|
+
delete build.mac.appBuilderLibConfig;
|
|
3491
|
+
}
|
|
3492
|
+
if (build.windows && build.windows.appBuilderLibConfig) {
|
|
3493
|
+
delete build.windows.appBuilderLibConfig;
|
|
3494
|
+
}
|
|
3495
|
+
if (build.linux && build.linux.appBuilderLibConfig) {
|
|
3496
|
+
delete build.linux.appBuilderLibConfig;
|
|
3497
|
+
}
|
|
3498
|
+
return build;
|
|
3499
|
+
});
|
|
3500
|
+
};
|
|
3480
3501
|
ViewBuilds.propTypes = {
|
|
3481
|
-
commandUsed:
|
|
3482
|
-
configPath:
|
|
3483
|
-
count:
|
|
3484
|
-
format:
|
|
3485
|
-
exit:
|
|
3502
|
+
commandUsed: import_prop_types21.default.string.isRequired,
|
|
3503
|
+
configPath: import_prop_types21.default.string,
|
|
3504
|
+
count: import_prop_types21.default.number,
|
|
3505
|
+
format: import_prop_types21.default.string,
|
|
3506
|
+
exit: import_prop_types21.default.bool
|
|
3486
3507
|
};
|
|
3487
3508
|
var ViewBuilds_default = ViewBuilds;
|
|
3488
3509
|
|
|
3489
3510
|
// src/commands/BuildsCommand.tsx
|
|
3490
|
-
var
|
|
3511
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3491
3512
|
var BuildsCommand = ({
|
|
3492
3513
|
id,
|
|
3493
3514
|
shouldViewLatest,
|
|
@@ -3509,10 +3530,10 @@ var BuildsCommand = ({
|
|
|
3509
3530
|
let commandUsed = "todesktop builds";
|
|
3510
3531
|
if (id) {
|
|
3511
3532
|
commandUsed += " <id>";
|
|
3512
|
-
return /* @__PURE__ */ (0,
|
|
3533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ViewBuild_default, { commandUsed, id, configPath });
|
|
3513
3534
|
} else if (shouldViewLatest) {
|
|
3514
3535
|
commandUsed += " --latest";
|
|
3515
|
-
return /* @__PURE__ */ (0,
|
|
3536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3516
3537
|
ViewBuild_default,
|
|
3517
3538
|
{
|
|
3518
3539
|
commandUsed,
|
|
@@ -3521,7 +3542,7 @@ var BuildsCommand = ({
|
|
|
3521
3542
|
}
|
|
3522
3543
|
);
|
|
3523
3544
|
} else {
|
|
3524
|
-
return /* @__PURE__ */ (0,
|
|
3545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3525
3546
|
ViewBuilds_default,
|
|
3526
3547
|
{
|
|
3527
3548
|
commandUsed,
|
|
@@ -3533,14 +3554,14 @@ var BuildsCommand = ({
|
|
|
3533
3554
|
);
|
|
3534
3555
|
}
|
|
3535
3556
|
};
|
|
3536
|
-
return /* @__PURE__ */ (0,
|
|
3557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LoginHOC_default, { children: getContents() }) });
|
|
3537
3558
|
};
|
|
3538
3559
|
var BuildsCommand_default = BuildsCommand;
|
|
3539
3560
|
|
|
3540
3561
|
// src/commands/LogoutCommand.tsx
|
|
3541
3562
|
var import_react17 = require("react");
|
|
3542
|
-
var
|
|
3543
|
-
var
|
|
3563
|
+
var import_ink27 = require("ink");
|
|
3564
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3544
3565
|
var Logout = () => {
|
|
3545
3566
|
const exit = useExit_default();
|
|
3546
3567
|
const { hasAttemptedTracking } = useAnalyticsCommand("logout");
|
|
@@ -3551,21 +3572,21 @@ var Logout = () => {
|
|
|
3551
3572
|
exit();
|
|
3552
3573
|
}
|
|
3553
3574
|
}, [exit, hasAttemptedTracking]);
|
|
3554
|
-
return /* @__PURE__ */ (0,
|
|
3575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: "Log out successful" });
|
|
3555
3576
|
};
|
|
3556
3577
|
var LogoutWrapper = () => {
|
|
3557
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LoginHOC_default, { isInteractive: false, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Logout, {}) }) });
|
|
3558
3579
|
};
|
|
3559
3580
|
var LogoutCommand_default = LogoutWrapper;
|
|
3560
3581
|
|
|
3561
3582
|
// src/commands/ReleaseCommand.tsx
|
|
3562
|
-
var
|
|
3583
|
+
var import_ink31 = require("ink");
|
|
3563
3584
|
|
|
3564
3585
|
// src/components/ReleaseBuild.tsx
|
|
3565
|
-
var
|
|
3586
|
+
var import_ink28 = require("ink");
|
|
3566
3587
|
var import_ink_link4 = __toESM(require("ink-link"));
|
|
3567
3588
|
var import_ink_select_input2 = __toESM(require("ink-select-input"));
|
|
3568
|
-
var
|
|
3589
|
+
var import_prop_types22 = __toESM(require("prop-types"));
|
|
3569
3590
|
var import_react18 = require("react");
|
|
3570
3591
|
|
|
3571
3592
|
// src/utilities/getBuildById.ts
|
|
@@ -3579,18 +3600,18 @@ var getBuildById_default = async ({ appId, buildId, userId }) => {
|
|
|
3579
3600
|
};
|
|
3580
3601
|
|
|
3581
3602
|
// src/components/ReleaseBuild.tsx
|
|
3582
|
-
var
|
|
3603
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3583
3604
|
var getValidationErrorMessageDisplay = (build, validationMessage) => {
|
|
3584
|
-
return /* @__PURE__ */ (0,
|
|
3585
|
-
/* @__PURE__ */ (0,
|
|
3605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { flexDirection: "column", children: [
|
|
3606
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Text, { bold: true, color: "red", children: [
|
|
3586
3607
|
"Can't release ",
|
|
3587
3608
|
build.appName,
|
|
3588
3609
|
" v",
|
|
3589
3610
|
build.appVersion
|
|
3590
3611
|
] }),
|
|
3591
|
-
/* @__PURE__ */ (0,
|
|
3592
|
-
/* @__PURE__ */ (0,
|
|
3593
|
-
/* @__PURE__ */ (0,
|
|
3612
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Box, { marginBottom: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: validationMessage }) }),
|
|
3613
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { bold: true, children: "See web UI for more information: " }),
|
|
3614
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink_link4.default, { fallback: false, url: build.url, children: build.url }) })
|
|
3594
3615
|
] });
|
|
3595
3616
|
};
|
|
3596
3617
|
var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
|
|
@@ -3630,7 +3651,7 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
|
|
|
3630
3651
|
if (build) {
|
|
3631
3652
|
return;
|
|
3632
3653
|
}
|
|
3633
|
-
const config2 =
|
|
3654
|
+
const config2 = getProjectConfig(configPath).config;
|
|
3634
3655
|
const appId2 = config2.id;
|
|
3635
3656
|
const { id: userId } = await findAppUserId_default(appId2);
|
|
3636
3657
|
const loadBuild = (buildId) => {
|
|
@@ -3654,7 +3675,7 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
|
|
|
3654
3675
|
if (!buildId) {
|
|
3655
3676
|
setState((previousState) => ({
|
|
3656
3677
|
...previousState,
|
|
3657
|
-
arbitraryMessageComponent: /* @__PURE__ */ (0,
|
|
3678
|
+
arbitraryMessageComponent: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: "There are no builds yet" })
|
|
3658
3679
|
}));
|
|
3659
3680
|
return;
|
|
3660
3681
|
}
|
|
@@ -3742,7 +3763,7 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
|
|
|
3742
3763
|
}
|
|
3743
3764
|
}, [arbitraryMessageComponent, exit, isComplete]);
|
|
3744
3765
|
if (error) {
|
|
3745
|
-
return /* @__PURE__ */ (0,
|
|
3766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorDisplay_default, { commandUsed, error });
|
|
3746
3767
|
}
|
|
3747
3768
|
if (arbitraryMessageComponent) {
|
|
3748
3769
|
return arbitraryMessageComponent;
|
|
@@ -3768,21 +3789,21 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
|
|
|
3768
3789
|
hasConfirmed: true
|
|
3769
3790
|
}));
|
|
3770
3791
|
};
|
|
3771
|
-
return /* @__PURE__ */ (0,
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { flexDirection: "column", children: [
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { children: [
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Text, { children: [
|
|
3774
3795
|
"This will release build ",
|
|
3775
3796
|
build.id,
|
|
3776
3797
|
" as "
|
|
3777
3798
|
] }),
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Text, { bold: true, children: [
|
|
3779
3800
|
build.appName,
|
|
3780
3801
|
" v",
|
|
3781
3802
|
build.appVersion
|
|
3782
3803
|
] }),
|
|
3783
|
-
/* @__PURE__ */ (0,
|
|
3804
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: ", are you sure?" })
|
|
3784
3805
|
] }),
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Box, { marginBottom: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3786
3807
|
import_ink_select_input2.default,
|
|
3787
3808
|
{
|
|
3788
3809
|
indicatorComponent: CustomSelectInputIndicator_default,
|
|
@@ -3792,16 +3813,16 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
|
|
|
3792
3813
|
onSelect: onSubmit
|
|
3793
3814
|
}
|
|
3794
3815
|
) }),
|
|
3795
|
-
/* @__PURE__ */ (0,
|
|
3816
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { dimColor: true, children: "Your users will be auto-updated to this version. You can use --force to bypass this confirmation in future" })
|
|
3796
3817
|
] });
|
|
3797
3818
|
}
|
|
3798
3819
|
if (isReleasing) {
|
|
3799
|
-
return /* @__PURE__ */ (0,
|
|
3820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: "Releasing..." });
|
|
3800
3821
|
}
|
|
3801
3822
|
if (isComplete) {
|
|
3802
|
-
return /* @__PURE__ */ (0,
|
|
3823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { bold: true, color: "greenBright", children: "Released!" });
|
|
3803
3824
|
}
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: "..." });
|
|
3805
3826
|
};
|
|
3806
3827
|
ReleaseBuild.propTypes = {
|
|
3807
3828
|
id: (props, propName, componentName) => {
|
|
@@ -3817,7 +3838,7 @@ ReleaseBuild.propTypes = {
|
|
|
3817
3838
|
);
|
|
3818
3839
|
}
|
|
3819
3840
|
},
|
|
3820
|
-
commandUsed:
|
|
3841
|
+
commandUsed: import_prop_types22.default.string.isRequired,
|
|
3821
3842
|
shouldReleaseLatest: (props, propName, componentName) => {
|
|
3822
3843
|
if ([props.id, props.shouldReleaseLatest].filter(Boolean).length !== 1) {
|
|
3823
3844
|
return new Error(
|
|
@@ -3831,22 +3852,22 @@ ReleaseBuild.propTypes = {
|
|
|
3831
3852
|
);
|
|
3832
3853
|
}
|
|
3833
3854
|
},
|
|
3834
|
-
shouldConfirm:
|
|
3835
|
-
configPath:
|
|
3855
|
+
shouldConfirm: import_prop_types22.default.bool.isRequired,
|
|
3856
|
+
configPath: import_prop_types22.default.string
|
|
3836
3857
|
};
|
|
3837
3858
|
var ReleaseBuild_default = ReleaseBuild;
|
|
3838
3859
|
|
|
3839
3860
|
// src/components/PickBuildForRelease.tsx
|
|
3840
|
-
var
|
|
3841
|
-
var
|
|
3861
|
+
var import_ink30 = require("ink");
|
|
3862
|
+
var import_prop_types24 = __toESM(require("prop-types"));
|
|
3842
3863
|
var import_react19 = require("react");
|
|
3843
3864
|
|
|
3844
3865
|
// src/components/SelectTable.tsx
|
|
3845
|
-
var
|
|
3866
|
+
var import_ink29 = require("ink");
|
|
3846
3867
|
var import_ink_select_input3 = __toESM(require("ink-select-input"));
|
|
3847
|
-
var
|
|
3848
|
-
var
|
|
3849
|
-
var CustomIndicator = (props) => /* @__PURE__ */ (0,
|
|
3868
|
+
var import_prop_types23 = __toESM(require("prop-types"));
|
|
3869
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3870
|
+
var CustomIndicator = (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelectInputIndicator_default, { marginTop: 1, ...props });
|
|
3850
3871
|
var SelectTable = ({ data, onSelect }) => {
|
|
3851
3872
|
const keyDetails = getKeyDetails_default(data);
|
|
3852
3873
|
const getSelectItems = () => {
|
|
@@ -3863,7 +3884,7 @@ var SelectTable = ({ data, onSelect }) => {
|
|
|
3863
3884
|
index,
|
|
3864
3885
|
isSelected
|
|
3865
3886
|
}) => {
|
|
3866
|
-
return /* @__PURE__ */ (0,
|
|
3887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3867
3888
|
TableRow_default,
|
|
3868
3889
|
{
|
|
3869
3890
|
data: data[index],
|
|
@@ -3873,9 +3894,9 @@ var SelectTable = ({ data, onSelect }) => {
|
|
|
3873
3894
|
index
|
|
3874
3895
|
);
|
|
3875
3896
|
};
|
|
3876
|
-
return /* @__PURE__ */ (0,
|
|
3877
|
-
/* @__PURE__ */ (0,
|
|
3878
|
-
/* @__PURE__ */ (0,
|
|
3897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_ink29.Box, { flexDirection: "column", children: [
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead_default, { keyDetails, marginLeft: 2 }),
|
|
3899
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3879
3900
|
import_ink_select_input3.default,
|
|
3880
3901
|
{
|
|
3881
3902
|
indicatorComponent: CustomIndicator,
|
|
@@ -3884,7 +3905,7 @@ var SelectTable = ({ data, onSelect }) => {
|
|
|
3884
3905
|
onSelect
|
|
3885
3906
|
}
|
|
3886
3907
|
),
|
|
3887
|
-
/* @__PURE__ */ (0,
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableEnd_default, { keyDetails, marginLeft: 2 })
|
|
3888
3909
|
] });
|
|
3889
3910
|
};
|
|
3890
3911
|
SelectTable.propTypes = {
|
|
@@ -3901,12 +3922,12 @@ SelectTable.propTypes = {
|
|
|
3901
3922
|
);
|
|
3902
3923
|
}
|
|
3903
3924
|
},
|
|
3904
|
-
onSelect:
|
|
3925
|
+
onSelect: import_prop_types23.default.func
|
|
3905
3926
|
};
|
|
3906
3927
|
var SelectTable_default = SelectTable;
|
|
3907
3928
|
|
|
3908
3929
|
// src/components/PickBuildForRelease.tsx
|
|
3909
|
-
var
|
|
3930
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3910
3931
|
var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
|
|
3911
3932
|
const exit = useExit_default();
|
|
3912
3933
|
const [{ error, builds, chosenBuildId, isLoading, user }, setState] = (0, import_react19.useState)({
|
|
@@ -3924,7 +3945,7 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
|
|
|
3924
3945
|
}
|
|
3925
3946
|
let config2;
|
|
3926
3947
|
try {
|
|
3927
|
-
config2 =
|
|
3948
|
+
config2 = getProjectConfig(configPath).config;
|
|
3928
3949
|
} catch (e) {
|
|
3929
3950
|
setState((previousState) => ({ ...previousState, error: e }));
|
|
3930
3951
|
return;
|
|
@@ -3962,13 +3983,13 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
|
|
|
3962
3983
|
}
|
|
3963
3984
|
});
|
|
3964
3985
|
if (error) {
|
|
3965
|
-
return /* @__PURE__ */ (0,
|
|
3986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ErrorDisplay_default, { commandUsed, error });
|
|
3966
3987
|
}
|
|
3967
3988
|
if (isLoading) {
|
|
3968
|
-
return /* @__PURE__ */ (0,
|
|
3989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingText_default, {});
|
|
3969
3990
|
}
|
|
3970
3991
|
if (chosenBuildId) {
|
|
3971
|
-
return /* @__PURE__ */ (0,
|
|
3992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3972
3993
|
ReleaseBuild_default,
|
|
3973
3994
|
{
|
|
3974
3995
|
commandUsed,
|
|
@@ -3988,31 +4009,31 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
|
|
|
3988
4009
|
...previousState,
|
|
3989
4010
|
chosenBuildId: item.value.ID
|
|
3990
4011
|
}));
|
|
3991
|
-
return /* @__PURE__ */ (0,
|
|
3992
|
-
/* @__PURE__ */ (0,
|
|
3993
|
-
/* @__PURE__ */ (0,
|
|
3994
|
-
/* @__PURE__ */ (0,
|
|
4012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: "Which build would you like to release?" }) }),
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectTable_default, { data, onSelect }),
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ink30.Text, { dimColor: true, children: [
|
|
3995
4016
|
"Showing the latest ",
|
|
3996
4017
|
builds.length,
|
|
3997
4018
|
" unreleased successful builds"
|
|
3998
4019
|
] }) })
|
|
3999
4020
|
] });
|
|
4000
4021
|
} else {
|
|
4001
|
-
return /* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4003
|
-
/* @__PURE__ */ (0,
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ink30.Box, { children: [
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: "No elligible builds found " }),
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { dimColor: true, children: "(i.e. unreleased and successful)" })
|
|
4004
4025
|
] });
|
|
4005
4026
|
}
|
|
4006
4027
|
};
|
|
4007
4028
|
PickBuildForRelease.propTypes = {
|
|
4008
|
-
commandUsed:
|
|
4009
|
-
shouldConfirm:
|
|
4010
|
-
configPath:
|
|
4029
|
+
commandUsed: import_prop_types24.default.string.isRequired,
|
|
4030
|
+
shouldConfirm: import_prop_types24.default.bool.isRequired,
|
|
4031
|
+
configPath: import_prop_types24.default.string
|
|
4011
4032
|
};
|
|
4012
4033
|
var PickBuildForRelease_default = PickBuildForRelease;
|
|
4013
4034
|
|
|
4014
4035
|
// src/commands/ReleaseCommand.tsx
|
|
4015
|
-
var
|
|
4036
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4016
4037
|
var ReleaseCommand = ({
|
|
4017
4038
|
id,
|
|
4018
4039
|
force,
|
|
@@ -4027,17 +4048,17 @@ var ReleaseCommand = ({
|
|
|
4027
4048
|
config: configPath
|
|
4028
4049
|
});
|
|
4029
4050
|
if (id && id.startsWith(".")) {
|
|
4030
|
-
return /* @__PURE__ */ (0,
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4033
|
-
/* @__PURE__ */ (0,
|
|
4051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_ink31.Box, { children: [
|
|
4053
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { bold: true, color: "red", children: "todesktop release <project-path>" }),
|
|
4054
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { children: " is no longer supported. Run this instead:" })
|
|
4034
4055
|
] }),
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4056
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { bold: true, color: "greenBright", children: "todesktop build && todesktop release --latest --force" })
|
|
4036
4057
|
] });
|
|
4037
4058
|
}
|
|
4038
4059
|
const getContents = () => {
|
|
4039
4060
|
if (id) {
|
|
4040
|
-
return /* @__PURE__ */ (0,
|
|
4061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4041
4062
|
ReleaseBuild_default,
|
|
4042
4063
|
{
|
|
4043
4064
|
configPath,
|
|
@@ -4047,7 +4068,7 @@ var ReleaseCommand = ({
|
|
|
4047
4068
|
}
|
|
4048
4069
|
);
|
|
4049
4070
|
} else if (shouldReleaseLatest) {
|
|
4050
|
-
return /* @__PURE__ */ (0,
|
|
4071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4051
4072
|
ReleaseBuild_default,
|
|
4052
4073
|
{
|
|
4053
4074
|
configPath,
|
|
@@ -4057,7 +4078,7 @@ var ReleaseCommand = ({
|
|
|
4057
4078
|
}
|
|
4058
4079
|
);
|
|
4059
4080
|
} else {
|
|
4060
|
-
return /* @__PURE__ */ (0,
|
|
4081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4061
4082
|
PickBuildForRelease_default,
|
|
4062
4083
|
{
|
|
4063
4084
|
configPath,
|
|
@@ -4067,14 +4088,14 @@ var ReleaseCommand = ({
|
|
|
4067
4088
|
);
|
|
4068
4089
|
}
|
|
4069
4090
|
};
|
|
4070
|
-
return /* @__PURE__ */ (0,
|
|
4091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoginHOC_default, { children: getContents() }) });
|
|
4071
4092
|
};
|
|
4072
4093
|
var ReleaseCommand_default = ReleaseCommand;
|
|
4073
4094
|
|
|
4074
4095
|
// src/commands/WhoamiCommand.tsx
|
|
4075
4096
|
var import_react20 = require("react");
|
|
4076
|
-
var
|
|
4077
|
-
var
|
|
4097
|
+
var import_ink32 = require("ink");
|
|
4098
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4078
4099
|
var WhoAmI = () => {
|
|
4079
4100
|
const exit = useExit_default();
|
|
4080
4101
|
checkIfReactIsUsable_default();
|
|
@@ -4086,15 +4107,15 @@ var WhoAmI = () => {
|
|
|
4086
4107
|
}
|
|
4087
4108
|
}, [exit, hasAttemptedTracking]);
|
|
4088
4109
|
if (!auth || !auth.email) {
|
|
4089
|
-
return /* @__PURE__ */ (0,
|
|
4110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { children: "You're not signed in" });
|
|
4090
4111
|
}
|
|
4091
|
-
return /* @__PURE__ */ (0,
|
|
4112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { children: auth.email });
|
|
4092
4113
|
};
|
|
4093
|
-
var WhoAmIWrapper = () => /* @__PURE__ */ (0,
|
|
4114
|
+
var WhoAmIWrapper = () => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoginHOC_default, { isInteractive: false, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(WhoAmI, {}) }) });
|
|
4094
4115
|
var WhoamiCommand_default = WhoAmIWrapper;
|
|
4095
4116
|
|
|
4096
4117
|
// src/utilities/exitIfCLIOutOfDate.ts
|
|
4097
|
-
var
|
|
4118
|
+
var import_chalk3 = __toESM(require("chalk"));
|
|
4098
4119
|
var import_is_installed_globally = __toESM(require("is-installed-globally"));
|
|
4099
4120
|
var import_latest_version = __toESM(require("latest-version"));
|
|
4100
4121
|
var import_semver = __toESM(require("semver"));
|
|
@@ -4105,7 +4126,7 @@ var exitIfCLIOutOfDate_default = () => {
|
|
|
4105
4126
|
const pkg = getToDesktopPackageJson();
|
|
4106
4127
|
(0, import_latest_version.default)(pkg.name).then((latest) => {
|
|
4107
4128
|
if (import_semver.default.gt(latest, pkg.version)) {
|
|
4108
|
-
const commandToUpdate =
|
|
4129
|
+
const commandToUpdate = import_chalk3.default.greenBright(
|
|
4109
4130
|
`npm install ${import_is_installed_globally.default ? "--location=global" : "--save-dev"} @todesktop/cli`
|
|
4110
4131
|
);
|
|
4111
4132
|
console.log(
|
|
@@ -4131,7 +4152,7 @@ var package_default = {
|
|
|
4131
4152
|
access: "public"
|
|
4132
4153
|
},
|
|
4133
4154
|
name: "@todesktop/cli",
|
|
4134
|
-
version: "1.
|
|
4155
|
+
version: "1.6.0",
|
|
4135
4156
|
license: "MIT",
|
|
4136
4157
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
4137
4158
|
homepage: "https://todesktop.com/cli",
|
|
@@ -4175,7 +4196,6 @@ var package_default = {
|
|
|
4175
4196
|
"better-ajv-errors": "^1.2.0",
|
|
4176
4197
|
bunyan: "^1.8.14",
|
|
4177
4198
|
chalk: "^4.1.0",
|
|
4178
|
-
"cli-highlight": "^2.1.11",
|
|
4179
4199
|
commander: "^9.4.1",
|
|
4180
4200
|
conf: "^7.1.2",
|
|
4181
4201
|
"date-fns": "^2.28.0",
|
|
@@ -4212,6 +4232,7 @@ var package_default = {
|
|
|
4212
4232
|
"xdg-basedir": "^4.0.0"
|
|
4213
4233
|
},
|
|
4214
4234
|
devDependencies: {
|
|
4235
|
+
"@todesktop/shared": "^7.147.0",
|
|
4215
4236
|
"@types/bunyan": "^1.8.6",
|
|
4216
4237
|
"@types/react": "^18.0.26",
|
|
4217
4238
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
|
@@ -4322,7 +4343,7 @@ var initSentry_default = () => {
|
|
|
4322
4343
|
} catch (err) {
|
|
4323
4344
|
}
|
|
4324
4345
|
try {
|
|
4325
|
-
const configResult =
|
|
4346
|
+
const configResult = getProjectConfig();
|
|
4326
4347
|
scope.setExtra("config", configResult);
|
|
4327
4348
|
} catch (err) {
|
|
4328
4349
|
}
|
|
@@ -4396,7 +4417,7 @@ import_commander.program.command("whoami").description("Prints the email of the
|
|
|
4396
4417
|
});
|
|
4397
4418
|
var runCommand = (component, props = null, { exitIfOutOfDate = true } = {}) => {
|
|
4398
4419
|
onCommand_default({ exitIfOutOfDate });
|
|
4399
|
-
const { waitUntilExit } = (0,
|
|
4420
|
+
const { waitUntilExit } = (0, import_ink33.render)((0, import_react21.createElement)(component, props));
|
|
4400
4421
|
waitUntilExit().catch((error) => {
|
|
4401
4422
|
console.error(error.stack);
|
|
4402
4423
|
});
|