Skip to content

Commit 1731ca2

Browse files
authored
fix(bot): correctly output npx command (#35)
1 parent b77826a commit 1731ca2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/__tests__/bot-commands.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("bot messages", () => {
5353
const message = createdMessage(
5454
"ru",
5555
"demo-app",
56-
"spawn-dock spawn --token pair_demo",
56+
"npx -y @spawn-dock/cli spawn --token pair_demo",
5757
"spawndock://spawn?token=pair_demo",
5858
);
5959

@@ -62,14 +62,14 @@ describe("bot messages", () => {
6262
expect(message).toContain("Нажми на ссылку, чтобы открыть рабочее окружение:");
6363
expect(message).toContain("spawndock://spawn?token=pair_demo");
6464
expect(message).toContain("Или запусти команду локально в терминале:");
65-
expect(message).toContain("spawn-dock spawn --token pair_demo");
65+
expect(message).toContain("npx -y @spawn-dock/cli spawn --token pair_demo");
6666
});
6767

6868
it("createdMessage (en) uses English copy", () => {
6969
const message = createdMessage(
7070
"en",
7171
"demo-app",
72-
"spawn-dock spawn --token pair_demo",
72+
"npx -y @spawn-dock/cli spawn --token pair_demo",
7373
"spawndock://spawn?token=pair_demo",
7474
);
7575

src/bot/polling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async function processUpdate(cfg: ReturnType<typeof readBotConfig>, update: Tele
158158
clearTimeout(ackTimeout);
159159
const slug = data.project.slug;
160160
const token = data.pairingToken.token;
161-
const spawnCmd = `spawn-dock spawn --token ${token}`;
161+
const spawnCmd = `npx -y @spawn-dock/cli spawn --token ${token}`;
162162
const spawnLink = `spawndock://spawn?token=${token}`;
163163
await sendMessage(cfg.telegramBotToken, msg.chat.id, createdMessage(locale, slug, spawnCmd, spawnLink));
164164
return;

0 commit comments

Comments
 (0)