Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(cli): add t3 service restart and make t3 update repoint the service eagerly #11702

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/11702/headmerged by juliusmarminge View on GitHub

Showing 9 changed files with 71 additions and 16 deletions (loading 7).

x
0 of 9 viewed, 9 left
38 additions and 10 deletionsapps/server/src/cli/service.test.tsModified
View file
@@ -45,7 +45,7 @@
it("gives a direct repair command for a stale service", () => {
assert.include(
formatServiceStatus({ ...status, current: false }, "0.0.29"),
- "Next: Run `npx t3@0.0.29 service update`.",
+ "Next: Run `t3 service install` to repair it.",
);
});
​
@@ -64,17 +64,17 @@
expect(output).toContain("last login session ends");
expect(output).toContain('sudo loginctl enable-linger "$(id -un)"');
expect(output).toContain("[service-stopped]");
- expect(output).toContain("npx t3@0.0.32-nightly.1 service update");
- expect(output).not.toContain("t3@latest");
+ expect(output).toContain("Run `t3 service install` to repair it.");
+ expect(output).not.toContain("npx");
});
​
-it("suggests the newer CLI version when the installed service needs an update", () => {
+it("points an older service at a repair, never at npx", () => {
const output = formatServiceStatus(
{ ...status, current: false, installedVersion: "0.0.28" },
"0.0.29",
);
- expect(output).toContain("npx t3@0.0.29 service update");
- expect(output).not.toContain("npx t3@0.0.28 service update");
+ expect(output).toContain("Run `t3 service install` to repair it.");
+ expect(output).not.toContain("npx");