@todesktop/cli 1.19.0 → 1.19.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 +87 -11
- package/dist/cli.js.map +4 -4
- package/package.json +3 -5
package/dist/cli.js
CHANGED
|
@@ -399,7 +399,86 @@ function BreakpointNotice({ plan }) {
|
|
|
399
399
|
// src/components/BreakpointPrompt.tsx
|
|
400
400
|
var import_ink4 = require("ink");
|
|
401
401
|
var import_react2 = require("react");
|
|
402
|
-
|
|
402
|
+
|
|
403
|
+
// ../shared/lib/esm/desktopify.js
|
|
404
|
+
var PlatformName;
|
|
405
|
+
(function(PlatformName3) {
|
|
406
|
+
PlatformName3["linux"] = "linux";
|
|
407
|
+
PlatformName3["mac"] = "mac";
|
|
408
|
+
PlatformName3["windows"] = "windows";
|
|
409
|
+
})(PlatformName || (PlatformName = {}));
|
|
410
|
+
var PackageManager;
|
|
411
|
+
(function(PackageManager2) {
|
|
412
|
+
PackageManager2["npm"] = "npm";
|
|
413
|
+
PackageManager2["pnpm"] = "pnpm";
|
|
414
|
+
PackageManager2["yarn"] = "yarn";
|
|
415
|
+
})(PackageManager || (PackageManager = {}));
|
|
416
|
+
var BuildStatus;
|
|
417
|
+
(function(BuildStatus2) {
|
|
418
|
+
BuildStatus2["building"] = "building";
|
|
419
|
+
BuildStatus2["cancelled"] = "cancelled";
|
|
420
|
+
BuildStatus2["failed"] = "failed";
|
|
421
|
+
BuildStatus2["preparation"] = "preparation";
|
|
422
|
+
BuildStatus2["queued"] = "queued";
|
|
423
|
+
BuildStatus2["succeeded"] = "succeeded";
|
|
424
|
+
})(BuildStatus || (BuildStatus = {}));
|
|
425
|
+
var AnalysisStatus;
|
|
426
|
+
(function(AnalysisStatus2) {
|
|
427
|
+
AnalysisStatus2["analyzing"] = "analyzing";
|
|
428
|
+
AnalysisStatus2["done"] = "done";
|
|
429
|
+
AnalysisStatus2["downloading"] = "downloading";
|
|
430
|
+
AnalysisStatus2["error"] = "error";
|
|
431
|
+
AnalysisStatus2["extracting"] = "extracting";
|
|
432
|
+
AnalysisStatus2["initializing"] = "initializing";
|
|
433
|
+
AnalysisStatus2["notStarted"] = "notStarted";
|
|
434
|
+
})(AnalysisStatus || (AnalysisStatus = {}));
|
|
435
|
+
var ManifestCategory;
|
|
436
|
+
(function(ManifestCategory2) {
|
|
437
|
+
ManifestCategory2["buildStamped"] = "build-stamped";
|
|
438
|
+
ManifestCategory2["primary"] = "primary";
|
|
439
|
+
ManifestCategory2["versioned"] = "versioned";
|
|
440
|
+
})(ManifestCategory || (ManifestCategory = {}));
|
|
441
|
+
|
|
442
|
+
// ../shared/lib/esm/introspection/breakpoints.js
|
|
443
|
+
var MINUTE = 60 * 1e3;
|
|
444
|
+
var BREAKPOINT_DEFAULT_LEASE_MS = 20 * MINUTE;
|
|
445
|
+
var BREAKPOINT_RENEW_INCREMENT_MS = 10 * MINUTE;
|
|
446
|
+
var BREAKPOINT_MAX_REMAINING_MS = 20 * MINUTE;
|
|
447
|
+
|
|
448
|
+
// ../shared/lib/esm/introspection/status.js
|
|
449
|
+
function formatIntrospectionStatus(breakpointStatus, shellStatus) {
|
|
450
|
+
if (breakpointStatus === "paused") {
|
|
451
|
+
if (shellStatus === "connected") {
|
|
452
|
+
return "paused (shell connected)";
|
|
453
|
+
}
|
|
454
|
+
if (shellStatus === "disconnected") {
|
|
455
|
+
return "paused (shell disconnected)";
|
|
456
|
+
}
|
|
457
|
+
return "paused";
|
|
458
|
+
}
|
|
459
|
+
if (breakpointStatus === "ready") {
|
|
460
|
+
if (shellStatus === "connected") {
|
|
461
|
+
return "ready (shell connected)";
|
|
462
|
+
}
|
|
463
|
+
if (shellStatus === "disconnected") {
|
|
464
|
+
return "ready (shell disconnected)";
|
|
465
|
+
}
|
|
466
|
+
return "ready";
|
|
467
|
+
}
|
|
468
|
+
if (breakpointStatus === "resuming") {
|
|
469
|
+
return "resuming";
|
|
470
|
+
}
|
|
471
|
+
if (breakpointStatus === "initializing") {
|
|
472
|
+
return "initializing";
|
|
473
|
+
}
|
|
474
|
+
if (breakpointStatus === "finished") {
|
|
475
|
+
return "finished";
|
|
476
|
+
}
|
|
477
|
+
if (breakpointStatus === "error" || shellStatus === "error") {
|
|
478
|
+
return "error";
|
|
479
|
+
}
|
|
480
|
+
return "status unknown";
|
|
481
|
+
}
|
|
403
482
|
|
|
404
483
|
// src/utilities/useInput.ts
|
|
405
484
|
var import_is_ci = __toESM(require("is-ci"));
|
|
@@ -902,7 +981,6 @@ if (firebaseFunctionsBase.includes("localhost")) {
|
|
|
902
981
|
var getCallableFirebaseFunction_default = (functionName) => (0, import_functions.httpsCallable)(functions, functionName);
|
|
903
982
|
|
|
904
983
|
// src/utilities/introspectionStatus.ts
|
|
905
|
-
var import_shared = require("@todesktop/shared");
|
|
906
984
|
function getIntrospectionStatusIndicator(breakpointStatus, shellStatus) {
|
|
907
985
|
if (shellStatus === "connected") {
|
|
908
986
|
return "\u25C6";
|
|
@@ -1042,14 +1120,14 @@ function BreakpointPrompt({
|
|
|
1042
1120
|
const { shellStatus } = data;
|
|
1043
1121
|
const expiresAtMs = ((_a2 = toDateSafe(breakpoint.expiresAt)) == null ? void 0 : _a2.getTime()) ?? NaN;
|
|
1044
1122
|
const remainingMs = expiresAtMs - now;
|
|
1045
|
-
const canRenew = remainingMs <
|
|
1123
|
+
const canRenew = remainingMs < BREAKPOINT_MAX_REMAINING_MS;
|
|
1046
1124
|
const formattedBreakpoint = formatBreakpoint(toBreakpointConfig(breakpoint));
|
|
1047
1125
|
const renewalsDescription = describeRenewals(breakpoint.renewals);
|
|
1048
1126
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink4.Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
1049
1127
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink4.Text, { color: "yellow", children: [
|
|
1050
1128
|
platform,
|
|
1051
1129
|
" ",
|
|
1052
|
-
|
|
1130
|
+
formatIntrospectionStatus(breakpointStatus, shellStatus),
|
|
1053
1131
|
" at",
|
|
1054
1132
|
" ",
|
|
1055
1133
|
formattedBreakpoint,
|
|
@@ -6889,7 +6967,6 @@ function useBuildTableState({
|
|
|
6889
6967
|
|
|
6890
6968
|
// src/commands/introspect/utilities/buildQueries.ts
|
|
6891
6969
|
var import_firestore23 = require("firebase/firestore");
|
|
6892
|
-
var import_shared3 = require("@todesktop/shared");
|
|
6893
6970
|
async function getRunningBuildsWithIntrospection(configPath) {
|
|
6894
6971
|
const { id: appId } = getProjectConfig(configPath).config;
|
|
6895
6972
|
const { id: userId } = await findAppUserId_default(appId);
|
|
@@ -6900,7 +6977,7 @@ async function getRunningBuildsWithIntrospection(configPath) {
|
|
|
6900
6977
|
);
|
|
6901
6978
|
const q = (0, import_firestore23.query)(
|
|
6902
6979
|
buildsCollection,
|
|
6903
|
-
(0, import_firestore23.where)("status", "in", [
|
|
6980
|
+
(0, import_firestore23.where)("status", "in", [BuildStatus.building, BuildStatus.preparation]),
|
|
6904
6981
|
(0, import_firestore23.orderBy)("createdAt", "desc"),
|
|
6905
6982
|
(0, import_firestore23.limit)(10)
|
|
6906
6983
|
);
|
|
@@ -7109,7 +7186,7 @@ function PlatformSelector({
|
|
|
7109
7186
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ErrorDisplay, { commandUsed: "todesktop introspect", error: state.error });
|
|
7110
7187
|
case "show-platforms": {
|
|
7111
7188
|
const items = state.platforms.map((platform) => {
|
|
7112
|
-
const statusLabel =
|
|
7189
|
+
const statusLabel = formatIntrospectionStatus(
|
|
7113
7190
|
platform.breakpointStatus,
|
|
7114
7191
|
platform.shellStatus
|
|
7115
7192
|
);
|
|
@@ -8556,7 +8633,7 @@ var package_default = {
|
|
|
8556
8633
|
access: "public"
|
|
8557
8634
|
},
|
|
8558
8635
|
name: "@todesktop/cli",
|
|
8559
|
-
version: "1.19.
|
|
8636
|
+
version: "1.19.1",
|
|
8560
8637
|
license: "MIT",
|
|
8561
8638
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
8562
8639
|
homepage: "https://todesktop.com/cli",
|
|
@@ -8641,7 +8718,7 @@ var package_default = {
|
|
|
8641
8718
|
},
|
|
8642
8719
|
devDependencies: {
|
|
8643
8720
|
"@todesktop/dev-config": "workspace:*",
|
|
8644
|
-
"@todesktop/shared": "
|
|
8721
|
+
"@todesktop/shared": "workspace:*",
|
|
8645
8722
|
"@types/bunyan": "^1.8.11",
|
|
8646
8723
|
"@types/ink-testing-library": "^1.0.4",
|
|
8647
8724
|
"@types/is-ci": "^3.0.4",
|
|
@@ -8749,7 +8826,6 @@ var onCommand_default = ({ sentry = true, exitIfOutOfDate = true } = {}) => {
|
|
|
8749
8826
|
};
|
|
8750
8827
|
|
|
8751
8828
|
// src/commands/build/utilities/continueBreakpoint.ts
|
|
8752
|
-
var import_shared4 = require("@todesktop/shared");
|
|
8753
8829
|
async function continueBreakpoint({
|
|
8754
8830
|
buildId,
|
|
8755
8831
|
platform,
|
|
@@ -8781,7 +8857,7 @@ async function continueBreakpoint({
|
|
|
8781
8857
|
);
|
|
8782
8858
|
}
|
|
8783
8859
|
function isValidPlatform(value) {
|
|
8784
|
-
return typeof value === "string" && Object.values(
|
|
8860
|
+
return typeof value === "string" && Object.values(PlatformName).includes(value);
|
|
8785
8861
|
}
|
|
8786
8862
|
|
|
8787
8863
|
// src/index.ts
|