@rudderhq/cli 0.2.2-canary.0 → 0.2.2
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/index.js +1 -45
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6242,38 +6242,6 @@ function createDesktopProgressFactory() {
|
|
|
6242
6242
|
};
|
|
6243
6243
|
};
|
|
6244
6244
|
}
|
|
6245
|
-
async function waitForDesktopApplySignal() {
|
|
6246
|
-
process.stdin.setEncoding("utf8");
|
|
6247
|
-
process.stdin.resume();
|
|
6248
|
-
await new Promise((resolve, reject) => {
|
|
6249
|
-
let buffer = "";
|
|
6250
|
-
const cleanup = () => {
|
|
6251
|
-
process.stdin.off("data", onData);
|
|
6252
|
-
process.stdin.off("end", onEnd);
|
|
6253
|
-
process.stdin.off("error", onError);
|
|
6254
|
-
};
|
|
6255
|
-
const onData = (chunk) => {
|
|
6256
|
-
buffer += chunk;
|
|
6257
|
-
const lines = buffer.split(/\r?\n/);
|
|
6258
|
-
buffer = lines.pop() ?? "";
|
|
6259
|
-
if (lines.some((line) => line.trim() === "apply")) {
|
|
6260
|
-
cleanup();
|
|
6261
|
-
resolve();
|
|
6262
|
-
}
|
|
6263
|
-
};
|
|
6264
|
-
const onEnd = () => {
|
|
6265
|
-
cleanup();
|
|
6266
|
-
reject(new Error("Desktop update apply signal ended before confirmation."));
|
|
6267
|
-
};
|
|
6268
|
-
const onError = (error) => {
|
|
6269
|
-
cleanup();
|
|
6270
|
-
reject(error);
|
|
6271
|
-
};
|
|
6272
|
-
process.stdin.on("data", onData);
|
|
6273
|
-
process.stdin.on("end", onEnd);
|
|
6274
|
-
process.stdin.on("error", onError);
|
|
6275
|
-
});
|
|
6276
|
-
}
|
|
6277
6245
|
function resolveCurrentCliVersion(env = process.env) {
|
|
6278
6246
|
const version = resolveCliVersion(import.meta.url, env);
|
|
6279
6247
|
return version === "0.0.0" ? "latest" : version;
|
|
@@ -7004,18 +6972,6 @@ async function startCommand(opts) {
|
|
|
7004
6972
|
() => assertChecksumMatch(installerPath, expectedChecksum),
|
|
7005
6973
|
desktopProgressJson ? "verifying_checksum" : null
|
|
7006
6974
|
);
|
|
7007
|
-
if (desktopProgressJson && opts.desktopWaitForApply === true) {
|
|
7008
|
-
writeDesktopProgress({
|
|
7009
|
-
phase: "ready_to_install",
|
|
7010
|
-
message: "Desktop update is downloaded and verified.",
|
|
7011
|
-
percent: 100
|
|
7012
|
-
});
|
|
7013
|
-
await waitForDesktopApplySignal();
|
|
7014
|
-
writeDesktopProgress({
|
|
7015
|
-
phase: "preparing_restart",
|
|
7016
|
-
message: "Applying Desktop update..."
|
|
7017
|
-
});
|
|
7018
|
-
}
|
|
7019
6975
|
await runStartPhase(
|
|
7020
6976
|
"Replacing existing Rudder Desktop if needed...",
|
|
7021
6977
|
"Existing Desktop install is ready for replacement.",
|
|
@@ -11599,7 +11555,7 @@ function createProgram() {
|
|
|
11599
11555
|
});
|
|
11600
11556
|
loadRudderEnvFile(options.config);
|
|
11601
11557
|
});
|
|
11602
|
-
program.command("start").description("Start Rudder Desktop and prepare the matching persistent CLI").option("--no-cli", "Skip persistent CLI installation").option("--no-runtime", "Skip Rudder runtime installation").option("--no-desktop", "Skip desktop app installation").option("--version <version>", "Rudder version to start (default: current CLI version)").option("--target-version <version>", "Rudder version to start; avoids the root CLI version flag").option("--repo <owner/repo>", "GitHub repository that hosts desktop releases").option("--output-dir <path>", "Directory for downloaded desktop release assets").option("--desktop-install-dir <path>", "Directory for the portable Desktop install").option("--no-open", "Install Desktop without launching it").option("--wait-for-active-runs", "Wait for active Rudder runs to finish before replacing Desktop", false).option("--desktop-progress-json", "Emit newline-delimited Desktop update progress events").option("--
|
|
11558
|
+
program.command("start").description("Start Rudder Desktop and prepare the matching persistent CLI").option("--no-cli", "Skip persistent CLI installation").option("--no-runtime", "Skip Rudder runtime installation").option("--no-desktop", "Skip desktop app installation").option("--version <version>", "Rudder version to start (default: current CLI version)").option("--target-version <version>", "Rudder version to start; avoids the root CLI version flag").option("--repo <owner/repo>", "GitHub repository that hosts desktop releases").option("--output-dir <path>", "Directory for downloaded desktop release assets").option("--desktop-install-dir <path>", "Directory for the portable Desktop install").option("--no-open", "Install Desktop without launching it").option("--wait-for-active-runs", "Wait for active Rudder runs to finish before replacing Desktop", false).option("--desktop-progress-json", "Emit newline-delimited Desktop update progress events").option("--no-version-check", "Skip checking npm for a newer Rudder CLI version").option("--dry-run", "Print the start actions without changing the machine", false).action(startCommand);
|
|
11603
11559
|
program.command("onboard").description("Interactive first-run setup wizard").option("-c, --config <path>", "Path to config file").option("-d, --data-dir <path>", DATA_DIR_OPTION_HELP).option("-y, --yes", "Accept defaults (quickstart + start immediately)", false).option("--run", "Start Rudder immediately after saving config", false).action(onboard);
|
|
11604
11560
|
program.command("doctor").description("Run diagnostic checks on your Rudder setup").option("-c, --config <path>", "Path to config file").option("-d, --data-dir <path>", DATA_DIR_OPTION_HELP).option("--repair", "Attempt to repair issues automatically").alias("--fix").option("-y, --yes", "Skip repair confirmation prompts").action(async (opts) => {
|
|
11605
11561
|
await doctor(opts);
|