@react-grab/cli 0.1.13 → 0.1.14

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.
Files changed (3) hide show
  1. package/dist/cli.cjs +21 -15
  2. package/dist/cli.js +21 -15
  3. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -65,10 +65,19 @@ var onCancel = () => {
65
65
  var prompts = (questions) => {
66
66
  return basePrompts__default.default(questions, { onCancel });
67
67
  };
68
+ var VALID_PACKAGE_MANAGERS = /* @__PURE__ */ new Set([
69
+ "npm",
70
+ "yarn",
71
+ "pnpm",
72
+ "bun"
73
+ ]);
68
74
  var detectPackageManager = async (projectRoot) => {
69
75
  const detected = await ni.detect({ cwd: projectRoot });
70
- if (detected && ["npm", "yarn", "pnpm", "bun"].includes(detected)) {
71
- return detected;
76
+ if (detected) {
77
+ const managerName = detected.split("@")[0];
78
+ if (VALID_PACKAGE_MANAGERS.has(managerName)) {
79
+ return managerName;
80
+ }
72
81
  }
73
82
  return "npm";
74
83
  };
@@ -2185,9 +2194,9 @@ var previewCdnTransform = (projectRoot, framework, nextRouterType, targetCdnDoma
2185
2194
  };
2186
2195
 
2187
2196
  // src/commands/add.ts
2188
- var VERSION = "0.1.13";
2197
+ var VERSION = "0.1.14";
2189
2198
  var formatInstalledAgentNames = (agents) => agents.map((agent) => AGENT_NAMES[agent] || agent).join(", ");
2190
- var add = new commander.Command().name("add").alias("install").description("connect React Grab to your agent").argument("[agent]", `agent to add (${AGENTS.join(", ")})`).option("-y, --yes", "skip confirmation prompts", false).option(
2199
+ var add = new commander.Command().name("add").alias("install").description("connect React Grab to your agent").argument("[agent]", `agent to connect (${AGENTS.join(", ")}, mcp)`).option("-y, --yes", "skip confirmation prompts", false).option(
2191
2200
  "-c, --cwd <cwd>",
2192
2201
  "working directory (defaults to current directory)",
2193
2202
  process.cwd()
@@ -2349,7 +2358,7 @@ var add = new commander.Command().name("add").alias("install").description("conn
2349
2358
  }
2350
2359
  } else {
2351
2360
  logger.break();
2352
- logger.error("Please specify an agent to add.");
2361
+ logger.error("Please specify an agent to connect.");
2353
2362
  logger.error("Available agents: " + availableAgents.join(", "));
2354
2363
  logger.break();
2355
2364
  process.exit(1);
@@ -2546,7 +2555,7 @@ var MAX_KEY_HOLD_DURATION_MS = 2e3;
2546
2555
  var MAX_CONTEXT_LINES = 50;
2547
2556
 
2548
2557
  // src/commands/configure.ts
2549
- var VERSION2 = "0.1.13";
2558
+ var VERSION2 = "0.1.14";
2550
2559
  var isMac = process.platform === "darwin";
2551
2560
  var META_LABEL = isMac ? "Cmd" : "Win";
2552
2561
  var ALT_LABEL = isMac ? "Option" : "Alt";
@@ -3102,7 +3111,7 @@ var uninstallPackagesWithFeedback = (packages, packageManager, projectRoot) => {
3102
3111
  };
3103
3112
 
3104
3113
  // src/commands/init.ts
3105
- var VERSION3 = "0.1.13";
3114
+ var VERSION3 = "0.1.14";
3106
3115
  var REPORT_URL = "https://react-grab.com/api/report-cli";
3107
3116
  var DOCS_URL = "https://github.com/aidenybai/react-grab";
3108
3117
  var reportToCli = (type, config, error) => {
@@ -3153,7 +3162,7 @@ var formatActivationKeyDisplay2 = (activationKey) => {
3153
3162
  };
3154
3163
  var init = new commander.Command().name("init").description("initialize React Grab in your project").option("-y, --yes", "skip confirmation prompts", false).option("-f, --force", "force overwrite existing config", false).option(
3155
3164
  "-a, --agent <agent>",
3156
- "connect to your agent (claude-code, cursor, opencode, codex, gemini, amp, mcp)"
3165
+ `connect to your agent (${AGENTS.join(", ")}, mcp)`
3157
3166
  ).option(
3158
3167
  "-k, --key <key>",
3159
3168
  "activation key (e.g., Meta+K, Ctrl+Shift+G, Space)"
@@ -3936,11 +3945,8 @@ var init = new commander.Command().name("init").description("initialize React Gr
3936
3945
  reportToCli("error", void 0, error);
3937
3946
  }
3938
3947
  });
3939
- var VERSION4 = "0.1.13";
3940
- var remove = new commander.Command().name("remove").description("disconnect React Grab from your agent").argument(
3941
- "[agent]",
3942
- "agent to remove (claude-code, cursor, opencode, codex, gemini, amp, ami, mcp)"
3943
- ).option("-y, --yes", "skip confirmation prompts", false).option(
3948
+ var VERSION4 = "0.1.14";
3949
+ var remove = new commander.Command().name("remove").description("disconnect React Grab from your agent").argument("[agent]", `agent to disconnect (${AGENTS.join(", ")}, mcp)`).option("-y, --yes", "skip confirmation prompts", false).option(
3944
3950
  "-c, --cwd <cwd>",
3945
3951
  "working directory (defaults to current directory)",
3946
3952
  process.cwd()
@@ -4001,7 +4007,7 @@ var remove = new commander.Command().name("remove").description("disconnect Reac
4001
4007
  agentToRemove = agent;
4002
4008
  } else {
4003
4009
  logger.break();
4004
- logger.error("Please specify an agent to remove.");
4010
+ logger.error("Please specify an agent to disconnect.");
4005
4011
  logger.error(
4006
4012
  "Installed agents: " + projectInfo.installedAgents.join(", ")
4007
4013
  );
@@ -4115,7 +4121,7 @@ var remove = new commander.Command().name("remove").description("disconnect Reac
4115
4121
  });
4116
4122
 
4117
4123
  // src/cli.ts
4118
- var VERSION5 = "0.1.13";
4124
+ var VERSION5 = "0.1.14";
4119
4125
  var VERSION_API_URL = "https://www.react-grab.com/api/version";
4120
4126
  process.on("SIGINT", () => process.exit(0));
4121
4127
  process.on("SIGTERM", () => process.exit(0));
package/dist/cli.js CHANGED
@@ -53,10 +53,19 @@ var onCancel = () => {
53
53
  var prompts = (questions) => {
54
54
  return basePrompts(questions, { onCancel });
55
55
  };
56
+ var VALID_PACKAGE_MANAGERS = /* @__PURE__ */ new Set([
57
+ "npm",
58
+ "yarn",
59
+ "pnpm",
60
+ "bun"
61
+ ]);
56
62
  var detectPackageManager = async (projectRoot) => {
57
63
  const detected = await detect({ cwd: projectRoot });
58
- if (detected && ["npm", "yarn", "pnpm", "bun"].includes(detected)) {
59
- return detected;
64
+ if (detected) {
65
+ const managerName = detected.split("@")[0];
66
+ if (VALID_PACKAGE_MANAGERS.has(managerName)) {
67
+ return managerName;
68
+ }
60
69
  }
61
70
  return "npm";
62
71
  };
@@ -2173,9 +2182,9 @@ var previewCdnTransform = (projectRoot, framework, nextRouterType, targetCdnDoma
2173
2182
  };
2174
2183
 
2175
2184
  // src/commands/add.ts
2176
- var VERSION = "0.1.13";
2185
+ var VERSION = "0.1.14";
2177
2186
  var formatInstalledAgentNames = (agents) => agents.map((agent) => AGENT_NAMES[agent] || agent).join(", ");
2178
- var add = new Command().name("add").alias("install").description("connect React Grab to your agent").argument("[agent]", `agent to add (${AGENTS.join(", ")})`).option("-y, --yes", "skip confirmation prompts", false).option(
2187
+ var add = new Command().name("add").alias("install").description("connect React Grab to your agent").argument("[agent]", `agent to connect (${AGENTS.join(", ")}, mcp)`).option("-y, --yes", "skip confirmation prompts", false).option(
2179
2188
  "-c, --cwd <cwd>",
2180
2189
  "working directory (defaults to current directory)",
2181
2190
  process.cwd()
@@ -2337,7 +2346,7 @@ var add = new Command().name("add").alias("install").description("connect React
2337
2346
  }
2338
2347
  } else {
2339
2348
  logger.break();
2340
- logger.error("Please specify an agent to add.");
2349
+ logger.error("Please specify an agent to connect.");
2341
2350
  logger.error("Available agents: " + availableAgents.join(", "));
2342
2351
  logger.break();
2343
2352
  process.exit(1);
@@ -2534,7 +2543,7 @@ var MAX_KEY_HOLD_DURATION_MS = 2e3;
2534
2543
  var MAX_CONTEXT_LINES = 50;
2535
2544
 
2536
2545
  // src/commands/configure.ts
2537
- var VERSION2 = "0.1.13";
2546
+ var VERSION2 = "0.1.14";
2538
2547
  var isMac = process.platform === "darwin";
2539
2548
  var META_LABEL = isMac ? "Cmd" : "Win";
2540
2549
  var ALT_LABEL = isMac ? "Option" : "Alt";
@@ -3090,7 +3099,7 @@ var uninstallPackagesWithFeedback = (packages, packageManager, projectRoot) => {
3090
3099
  };
3091
3100
 
3092
3101
  // src/commands/init.ts
3093
- var VERSION3 = "0.1.13";
3102
+ var VERSION3 = "0.1.14";
3094
3103
  var REPORT_URL = "https://react-grab.com/api/report-cli";
3095
3104
  var DOCS_URL = "https://github.com/aidenybai/react-grab";
3096
3105
  var reportToCli = (type, config, error) => {
@@ -3141,7 +3150,7 @@ var formatActivationKeyDisplay2 = (activationKey) => {
3141
3150
  };
3142
3151
  var init = new Command().name("init").description("initialize React Grab in your project").option("-y, --yes", "skip confirmation prompts", false).option("-f, --force", "force overwrite existing config", false).option(
3143
3152
  "-a, --agent <agent>",
3144
- "connect to your agent (claude-code, cursor, opencode, codex, gemini, amp, mcp)"
3153
+ `connect to your agent (${AGENTS.join(", ")}, mcp)`
3145
3154
  ).option(
3146
3155
  "-k, --key <key>",
3147
3156
  "activation key (e.g., Meta+K, Ctrl+Shift+G, Space)"
@@ -3924,11 +3933,8 @@ var init = new Command().name("init").description("initialize React Grab in your
3924
3933
  reportToCli("error", void 0, error);
3925
3934
  }
3926
3935
  });
3927
- var VERSION4 = "0.1.13";
3928
- var remove = new Command().name("remove").description("disconnect React Grab from your agent").argument(
3929
- "[agent]",
3930
- "agent to remove (claude-code, cursor, opencode, codex, gemini, amp, ami, mcp)"
3931
- ).option("-y, --yes", "skip confirmation prompts", false).option(
3936
+ var VERSION4 = "0.1.14";
3937
+ var remove = new Command().name("remove").description("disconnect React Grab from your agent").argument("[agent]", `agent to disconnect (${AGENTS.join(", ")}, mcp)`).option("-y, --yes", "skip confirmation prompts", false).option(
3932
3938
  "-c, --cwd <cwd>",
3933
3939
  "working directory (defaults to current directory)",
3934
3940
  process.cwd()
@@ -3989,7 +3995,7 @@ var remove = new Command().name("remove").description("disconnect React Grab fro
3989
3995
  agentToRemove = agent;
3990
3996
  } else {
3991
3997
  logger.break();
3992
- logger.error("Please specify an agent to remove.");
3998
+ logger.error("Please specify an agent to disconnect.");
3993
3999
  logger.error(
3994
4000
  "Installed agents: " + projectInfo.installedAgents.join(", ")
3995
4001
  );
@@ -4103,7 +4109,7 @@ var remove = new Command().name("remove").description("disconnect React Grab fro
4103
4109
  });
4104
4110
 
4105
4111
  // src/cli.ts
4106
- var VERSION5 = "0.1.13";
4112
+ var VERSION5 = "0.1.14";
4107
4113
  var VERSION_API_URL = "https://www.react-grab.com/api/version";
4108
4114
  process.on("SIGINT", () => process.exit(0));
4109
4115
  process.on("SIGTERM", () => process.exit(0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-grab/cli",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "bin": {
5
5
  "react-grab": "./dist/cli.js"
6
6
  },