inflight-cli 2.0.5 → 2.0.6
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 +2 -2
- package/dist/commands/setup.js +4 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@ Get feedback directly on your staging URL with [Inflight](https://www.inflight.c
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npm install -g inflight-cli && inflight setup
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
That's it. The CLI
|
|
11
|
+
That's it. The CLI installs globally, logs you in, adds the widget to your project, and walks you through sharing your first staging URL.
|
|
12
12
|
|
|
13
13
|
## Commands
|
|
14
14
|
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
2
|
import pc from "picocolors";
|
|
3
|
-
import { execSync
|
|
4
|
-
import { promisify } from "util";
|
|
5
|
-
const execAsync = promisify(exec);
|
|
3
|
+
import { execSync } from "child_process";
|
|
6
4
|
import { readGlobalAuth, writeWorkspaceConfig } from "../lib/config.js";
|
|
7
5
|
import { apiGetMe, apiDetectWidgetLocation } from "../lib/api.js";
|
|
8
6
|
import { loginCommand } from "./login.js";
|
|
@@ -10,24 +8,11 @@ import { shareCommand } from "./share.js";
|
|
|
10
8
|
import { gatherProjectContext, hasInflightWidget, insertWidgetScript } from "../lib/framework.js";
|
|
11
9
|
import { isGitRepo } from "../lib/git.js";
|
|
12
10
|
import { installSkill } from "../lib/skill.js";
|
|
13
|
-
async function ensureGlobalInstall() {
|
|
14
|
-
try {
|
|
15
|
-
await execAsync("inflight-cli --version 2>/dev/null");
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
try {
|
|
19
|
-
await execAsync("npm install -g inflight-cli 2>/dev/null");
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
// Non-fatal — they can still use npx
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
11
|
export async function setupCommand() {
|
|
27
12
|
const cwd = process.cwd();
|
|
28
|
-
// ── Step 1: Install
|
|
29
|
-
p.log.step("Installing
|
|
30
|
-
await
|
|
13
|
+
// ── Step 1: Install agent skill ──
|
|
14
|
+
p.log.step("Installing agent skill...");
|
|
15
|
+
await installSkill();
|
|
31
16
|
// ── Step 2: Authenticate ──
|
|
32
17
|
let auth = readGlobalAuth();
|
|
33
18
|
if (!auth) {
|