@paradigma-inc/flywheel 0.2.3 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paradigma-inc/flywheel",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "One-command setup for Flywheel MCP hosts",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,49 @@
1
+ import { select } from "@inquirer/prompts";
2
+ import pc from "picocolors";
3
+
4
+ const INSTALL_LOCATION_THEME = {
5
+ style: {
6
+ highlight: (text) => pc.green(text),
7
+ disabledChoice: (text) => ` ${pc.dim("◯")} ${pc.dim(text)}`,
8
+ },
9
+ };
10
+
11
+ export function buildInstallLocationPromptConfig() {
12
+ return {
13
+ message: "Where should Flywheel be installed?",
14
+ choices: [
15
+ {
16
+ name: "Project (this folder)",
17
+ value: "project",
18
+ short: "Project",
19
+ description:
20
+ "Files land under the current directory; commit them so teammates get them too.",
21
+ },
22
+ {
23
+ name: "Global (your machine)",
24
+ value: "global",
25
+ short: "Global",
26
+ description: "Available in all your projects on this machine.",
27
+ },
28
+ ],
29
+ default: "global",
30
+ theme: INSTALL_LOCATION_THEME,
31
+ };
32
+ }
33
+
34
+ export async function promptInstallLocation() {
35
+ return await select(buildInstallLocationPromptConfig());
36
+ }
37
+
38
+ export async function resolveInteractiveSetupScope(
39
+ options,
40
+ { allowPrompt = false, promptLocation = promptInstallLocation } = {},
41
+ ) {
42
+ if (options.project) {
43
+ return "project";
44
+ }
45
+ if (allowPrompt) {
46
+ return await promptLocation();
47
+ }
48
+ return "global";
49
+ }