@phreshos/cli 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/prompts.js +3 -3
- package/dist/system/command.js +5 -1
- package/dist/system/lifecycle.js +1 -0
- package/dist/template/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,9 +62,10 @@ Linux. In Linux containers with no init manager, it runs as a detached
|
|
|
62
62
|
user-owned background process that survives the terminal but ends with the
|
|
63
63
|
container. Automatic startup is unavailable there rather than being reported
|
|
64
64
|
as enabled. `start` and `stop` change current execution only; where a native
|
|
65
|
-
manager exists, `enable` and `disable` change automatic startup only.
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
manager exists, `enable` and `disable` change automatic startup only. Successful
|
|
66
|
+
installation and startup show the desktop address. `status` reports that same
|
|
67
|
+
address with the installed version, service readiness, and automatic startup
|
|
68
|
+
without changing them; `version` reports only the installed System release.
|
|
68
69
|
|
|
69
70
|
Installation files and persistent System state have separate homes. Removing
|
|
70
71
|
the System unregisters its service and removes its release files while keeping
|
package/dist/prompts.js
CHANGED
|
@@ -64,7 +64,7 @@ export default function prompts() {
|
|
|
64
64
|
async function ask(explanation, question, fallback) {
|
|
65
65
|
if (!interactive)
|
|
66
66
|
throw new Error(`${question} Supply the corresponding option when no terminal is attached`);
|
|
67
|
-
log.message(colors.dim(explanation), { spacing:
|
|
67
|
+
log.message(colors.dim(explanation), { spacing: 1 });
|
|
68
68
|
const value = await text({
|
|
69
69
|
message: question,
|
|
70
70
|
placeholder: fallback,
|
|
@@ -77,7 +77,7 @@ export default function prompts() {
|
|
|
77
77
|
async function yes(explanation, question, fallback) {
|
|
78
78
|
if (!interactive)
|
|
79
79
|
throw new Error(`${question} Supply the corresponding option when no terminal is attached`);
|
|
80
|
-
log.message(colors.dim(explanation), { spacing:
|
|
80
|
+
log.message(colors.dim(explanation), { spacing: 1 });
|
|
81
81
|
const value = await confirm({ message: question, initialValue: fallback });
|
|
82
82
|
if (isCancel(value))
|
|
83
83
|
stop();
|
|
@@ -86,7 +86,7 @@ export default function prompts() {
|
|
|
86
86
|
async function choose(explanation, question, values, fallback) {
|
|
87
87
|
if (!interactive)
|
|
88
88
|
throw new Error(`${question} Supply the corresponding option when no terminal is attached`);
|
|
89
|
-
log.message(colors.dim(explanation), { spacing:
|
|
89
|
+
log.message(colors.dim(explanation), { spacing: 1 });
|
|
90
90
|
const value = await select({
|
|
91
91
|
message: question,
|
|
92
92
|
options: values.map(value => ({ value, label: value })),
|
package/dist/system/command.js
CHANGED
|
@@ -12,6 +12,7 @@ export default function systemCommands(program, provided) {
|
|
|
12
12
|
const interaction = prompts();
|
|
13
13
|
interaction.begin("Install System", "official stable release");
|
|
14
14
|
const status = await interaction.progress("Installing PhreshOS", "PhreshOS installed", () => current().install());
|
|
15
|
+
interaction.detail("desktop", accent(status.desktop));
|
|
15
16
|
interaction.finish(`PhreshOS ${accent(status.installed?.version ?? "")} installed`);
|
|
16
17
|
});
|
|
17
18
|
system.command("uninstall")
|
|
@@ -54,12 +55,15 @@ function action(system, name, description, current, work) {
|
|
|
54
55
|
await installed(lifecycle);
|
|
55
56
|
const interaction = prompts();
|
|
56
57
|
interaction.begin(`System ${title(name)}`);
|
|
57
|
-
await interaction.progress(`${title(name)}ing PhreshOS`, `PhreshOS ${past(name)}`, () => work(lifecycle));
|
|
58
|
+
const status = await interaction.progress(`${title(name)}ing PhreshOS`, `PhreshOS ${past(name)}`, () => work(lifecycle));
|
|
59
|
+
if (name === "start")
|
|
60
|
+
interaction.detail("desktop", accent(status.desktop));
|
|
58
61
|
interaction.finish(`System ${past(name)}`);
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
function report(interaction, status) {
|
|
62
65
|
interaction.detail("version", accent(status.installed?.version ?? "unknown"));
|
|
66
|
+
interaction.detail("desktop", accent(status.desktop));
|
|
63
67
|
interaction.detail("service", service(status));
|
|
64
68
|
interaction.detail("startup", status.automaticStartup ? status.enabled ? positive("enabled") : dim("disabled") : dim("unavailable"));
|
|
65
69
|
}
|
package/dist/system/lifecycle.js
CHANGED
|
@@ -101,6 +101,7 @@ export default class SystemLifecycle {
|
|
|
101
101
|
const ready = state.running && await this.dependencies.ready(installation.paths.intake);
|
|
102
102
|
return {
|
|
103
103
|
...(installed ? { installed } : {}),
|
|
104
|
+
desktop: "http://localhost:4300",
|
|
104
105
|
...state,
|
|
105
106
|
ready,
|
|
106
107
|
root: installation.paths.root,
|