@react-grab/cli 0.1.20 → 0.1.22
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/dist/cli.cjs +30 -27
- package/dist/cli.js +30 -27
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1290,7 +1290,7 @@ var addAgentToExistingTanStack = (originalContent, agent, filePath) => {
|
|
|
1290
1290
|
message: "Could not find React Grab import to add agent after"
|
|
1291
1291
|
};
|
|
1292
1292
|
};
|
|
1293
|
-
var transformNextAppRouter = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1293
|
+
var transformNextAppRouter = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1294
1294
|
const layoutPath = findLayoutFile(projectRoot);
|
|
1295
1295
|
if (!layoutPath) {
|
|
1296
1296
|
return {
|
|
@@ -1303,10 +1303,10 @@ var transformNextAppRouter = (projectRoot, agent, reactGrabAlreadyConfigured) =>
|
|
|
1303
1303
|
let newContent = originalContent;
|
|
1304
1304
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1305
1305
|
const hasReactGrabInInstrumentationFile = hasReactGrabInInstrumentation(projectRoot);
|
|
1306
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1306
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1307
1307
|
return addAgentToExistingNextApp(originalContent, agent, layoutPath);
|
|
1308
1308
|
}
|
|
1309
|
-
if (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile) {
|
|
1309
|
+
if (!force && (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile)) {
|
|
1310
1310
|
return {
|
|
1311
1311
|
success: true,
|
|
1312
1312
|
filePath: layoutPath,
|
|
@@ -1356,7 +1356,7 @@ ${newContent}`;
|
|
|
1356
1356
|
newContent
|
|
1357
1357
|
};
|
|
1358
1358
|
};
|
|
1359
|
-
var transformNextPagesRouter = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1359
|
+
var transformNextPagesRouter = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1360
1360
|
const documentPath = findDocumentFile(projectRoot);
|
|
1361
1361
|
if (!documentPath) {
|
|
1362
1362
|
return {
|
|
@@ -1369,10 +1369,10 @@ var transformNextPagesRouter = (projectRoot, agent, reactGrabAlreadyConfigured)
|
|
|
1369
1369
|
let newContent = originalContent;
|
|
1370
1370
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1371
1371
|
const hasReactGrabInInstrumentationFile = hasReactGrabInInstrumentation(projectRoot);
|
|
1372
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1372
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1373
1373
|
return addAgentToExistingNextApp(originalContent, agent, documentPath);
|
|
1374
1374
|
}
|
|
1375
|
-
if (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile) {
|
|
1375
|
+
if (!force && (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile)) {
|
|
1376
1376
|
return {
|
|
1377
1377
|
success: true,
|
|
1378
1378
|
filePath: documentPath,
|
|
@@ -1407,7 +1407,7 @@ ${SCRIPT_IMPORT}`
|
|
|
1407
1407
|
newContent
|
|
1408
1408
|
};
|
|
1409
1409
|
};
|
|
1410
|
-
var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1410
|
+
var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1411
1411
|
const indexPath = findIndexHtml(projectRoot);
|
|
1412
1412
|
if (!indexPath) {
|
|
1413
1413
|
return {
|
|
@@ -1419,10 +1419,10 @@ var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1419
1419
|
const originalContent = fs.readFileSync(indexPath, "utf-8");
|
|
1420
1420
|
let newContent = originalContent;
|
|
1421
1421
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1422
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1422
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1423
1423
|
return addAgentToExistingVite(originalContent, agent, indexPath);
|
|
1424
1424
|
}
|
|
1425
|
-
if (hasReactGrabInFile2) {
|
|
1425
|
+
if (!force && hasReactGrabInFile2) {
|
|
1426
1426
|
return {
|
|
1427
1427
|
success: true,
|
|
1428
1428
|
filePath: indexPath,
|
|
@@ -1447,7 +1447,7 @@ var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1447
1447
|
newContent
|
|
1448
1448
|
};
|
|
1449
1449
|
};
|
|
1450
|
-
var transformWebpack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1450
|
+
var transformWebpack = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1451
1451
|
const entryPath = findEntryFile(projectRoot);
|
|
1452
1452
|
if (!entryPath) {
|
|
1453
1453
|
return {
|
|
@@ -1458,10 +1458,10 @@ var transformWebpack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
const originalContent = fs.readFileSync(entryPath, "utf-8");
|
|
1460
1460
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1461
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1461
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1462
1462
|
return addAgentToExistingWebpack(originalContent, agent, entryPath);
|
|
1463
1463
|
}
|
|
1464
|
-
if (hasReactGrabInFile2) {
|
|
1464
|
+
if (!force && hasReactGrabInFile2) {
|
|
1465
1465
|
return {
|
|
1466
1466
|
success: true,
|
|
1467
1467
|
filePath: entryPath,
|
|
@@ -1481,7 +1481,7 @@ ${originalContent}`;
|
|
|
1481
1481
|
newContent
|
|
1482
1482
|
};
|
|
1483
1483
|
};
|
|
1484
|
-
var transformTanStack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1484
|
+
var transformTanStack = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1485
1485
|
const rootPath = findTanStackRootFile(projectRoot);
|
|
1486
1486
|
if (!rootPath) {
|
|
1487
1487
|
return {
|
|
@@ -1493,10 +1493,10 @@ var transformTanStack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1493
1493
|
const originalContent = fs.readFileSync(rootPath, "utf-8");
|
|
1494
1494
|
let newContent = originalContent;
|
|
1495
1495
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1496
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1496
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1497
1497
|
return addAgentToExistingTanStack(originalContent, agent, rootPath);
|
|
1498
1498
|
}
|
|
1499
|
-
if (hasReactGrabInFile2) {
|
|
1499
|
+
if (!force && hasReactGrabInFile2) {
|
|
1500
1500
|
return {
|
|
1501
1501
|
success: true,
|
|
1502
1502
|
filePath: rootPath,
|
|
@@ -1554,27 +1554,29 @@ ${newContent}`;
|
|
|
1554
1554
|
newContent
|
|
1555
1555
|
};
|
|
1556
1556
|
};
|
|
1557
|
-
var previewTransform = (projectRoot, framework, nextRouterType, agent, reactGrabAlreadyConfigured = false) => {
|
|
1557
|
+
var previewTransform = (projectRoot, framework, nextRouterType, agent, reactGrabAlreadyConfigured = false, force = false) => {
|
|
1558
1558
|
switch (framework) {
|
|
1559
1559
|
case "next":
|
|
1560
1560
|
if (nextRouterType === "app") {
|
|
1561
1561
|
return transformNextAppRouter(
|
|
1562
1562
|
projectRoot,
|
|
1563
1563
|
agent,
|
|
1564
|
-
reactGrabAlreadyConfigured
|
|
1564
|
+
reactGrabAlreadyConfigured,
|
|
1565
|
+
force
|
|
1565
1566
|
);
|
|
1566
1567
|
}
|
|
1567
1568
|
return transformNextPagesRouter(
|
|
1568
1569
|
projectRoot,
|
|
1569
1570
|
agent,
|
|
1570
|
-
reactGrabAlreadyConfigured
|
|
1571
|
+
reactGrabAlreadyConfigured,
|
|
1572
|
+
force
|
|
1571
1573
|
);
|
|
1572
1574
|
case "vite":
|
|
1573
|
-
return transformVite(projectRoot, agent, reactGrabAlreadyConfigured);
|
|
1575
|
+
return transformVite(projectRoot, agent, reactGrabAlreadyConfigured, force);
|
|
1574
1576
|
case "tanstack":
|
|
1575
|
-
return transformTanStack(projectRoot, agent, reactGrabAlreadyConfigured);
|
|
1577
|
+
return transformTanStack(projectRoot, agent, reactGrabAlreadyConfigured, force);
|
|
1576
1578
|
case "webpack":
|
|
1577
|
-
return transformWebpack(projectRoot, agent, reactGrabAlreadyConfigured);
|
|
1579
|
+
return transformWebpack(projectRoot, agent, reactGrabAlreadyConfigured, force);
|
|
1578
1580
|
default:
|
|
1579
1581
|
return {
|
|
1580
1582
|
success: false,
|
|
@@ -2228,7 +2230,7 @@ var previewCdnTransform = (projectRoot, framework, nextRouterType, targetCdnDoma
|
|
|
2228
2230
|
};
|
|
2229
2231
|
|
|
2230
2232
|
// src/commands/add.ts
|
|
2231
|
-
var VERSION = "0.1.
|
|
2233
|
+
var VERSION = "0.1.22";
|
|
2232
2234
|
var formatInstalledAgentNames = (agents) => agents.map((agent) => AGENT_NAMES[agent] || agent).join(", ");
|
|
2233
2235
|
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(
|
|
2234
2236
|
"-c, --cwd <cwd>",
|
|
@@ -2589,7 +2591,7 @@ var MAX_KEY_HOLD_DURATION_MS = 2e3;
|
|
|
2589
2591
|
var MAX_CONTEXT_LINES = 50;
|
|
2590
2592
|
|
|
2591
2593
|
// src/commands/configure.ts
|
|
2592
|
-
var VERSION2 = "0.1.
|
|
2594
|
+
var VERSION2 = "0.1.22";
|
|
2593
2595
|
var isMac = process.platform === "darwin";
|
|
2594
2596
|
var META_LABEL = isMac ? "Cmd" : "Win";
|
|
2595
2597
|
var ALT_LABEL = isMac ? "Option" : "Alt";
|
|
@@ -3145,7 +3147,7 @@ var uninstallPackagesWithFeedback = (packages, packageManager, projectRoot) => {
|
|
|
3145
3147
|
};
|
|
3146
3148
|
|
|
3147
3149
|
// src/commands/init.ts
|
|
3148
|
-
var VERSION3 = "0.1.
|
|
3150
|
+
var VERSION3 = "0.1.22";
|
|
3149
3151
|
var REPORT_URL = "https://react-grab.com/api/report-cli";
|
|
3150
3152
|
var DOCS_URL = "https://github.com/aidenybai/react-grab";
|
|
3151
3153
|
var reportToCli = (type, config, error) => {
|
|
@@ -3903,7 +3905,8 @@ var init = new commander.Command().name("init").description("initialize React Gr
|
|
|
3903
3905
|
finalFramework,
|
|
3904
3906
|
finalNextRouterType,
|
|
3905
3907
|
agentIntegration,
|
|
3906
|
-
false
|
|
3908
|
+
false,
|
|
3909
|
+
opts.force
|
|
3907
3910
|
);
|
|
3908
3911
|
const packageJsonResult = previewPackageJsonTransform(
|
|
3909
3912
|
projectInfo.projectRoot,
|
|
@@ -4003,7 +4006,7 @@ var init = new commander.Command().name("init").description("initialize React Gr
|
|
|
4003
4006
|
reportToCli("error", void 0, error);
|
|
4004
4007
|
}
|
|
4005
4008
|
});
|
|
4006
|
-
var VERSION4 = "0.1.
|
|
4009
|
+
var VERSION4 = "0.1.22";
|
|
4007
4010
|
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(
|
|
4008
4011
|
"-c, --cwd <cwd>",
|
|
4009
4012
|
"working directory (defaults to current directory)",
|
|
@@ -4179,7 +4182,7 @@ var remove = new commander.Command().name("remove").description("disconnect Reac
|
|
|
4179
4182
|
});
|
|
4180
4183
|
|
|
4181
4184
|
// src/cli.ts
|
|
4182
|
-
var VERSION5 = "0.1.
|
|
4185
|
+
var VERSION5 = "0.1.22";
|
|
4183
4186
|
var VERSION_API_URL = "https://www.react-grab.com/api/version";
|
|
4184
4187
|
process.on("SIGINT", () => process.exit(0));
|
|
4185
4188
|
process.on("SIGTERM", () => process.exit(0));
|
package/dist/cli.js
CHANGED
|
@@ -1257,7 +1257,7 @@ var addAgentToExistingTanStack = (originalContent, agent, filePath) => {
|
|
|
1257
1257
|
message: "Could not find React Grab import to add agent after"
|
|
1258
1258
|
};
|
|
1259
1259
|
};
|
|
1260
|
-
var transformNextAppRouter = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1260
|
+
var transformNextAppRouter = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1261
1261
|
const layoutPath = findLayoutFile(projectRoot);
|
|
1262
1262
|
if (!layoutPath) {
|
|
1263
1263
|
return {
|
|
@@ -1270,10 +1270,10 @@ var transformNextAppRouter = (projectRoot, agent, reactGrabAlreadyConfigured) =>
|
|
|
1270
1270
|
let newContent = originalContent;
|
|
1271
1271
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1272
1272
|
const hasReactGrabInInstrumentationFile = hasReactGrabInInstrumentation(projectRoot);
|
|
1273
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1273
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1274
1274
|
return addAgentToExistingNextApp(originalContent, agent, layoutPath);
|
|
1275
1275
|
}
|
|
1276
|
-
if (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile) {
|
|
1276
|
+
if (!force && (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile)) {
|
|
1277
1277
|
return {
|
|
1278
1278
|
success: true,
|
|
1279
1279
|
filePath: layoutPath,
|
|
@@ -1323,7 +1323,7 @@ ${newContent}`;
|
|
|
1323
1323
|
newContent
|
|
1324
1324
|
};
|
|
1325
1325
|
};
|
|
1326
|
-
var transformNextPagesRouter = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1326
|
+
var transformNextPagesRouter = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1327
1327
|
const documentPath = findDocumentFile(projectRoot);
|
|
1328
1328
|
if (!documentPath) {
|
|
1329
1329
|
return {
|
|
@@ -1336,10 +1336,10 @@ var transformNextPagesRouter = (projectRoot, agent, reactGrabAlreadyConfigured)
|
|
|
1336
1336
|
let newContent = originalContent;
|
|
1337
1337
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1338
1338
|
const hasReactGrabInInstrumentationFile = hasReactGrabInInstrumentation(projectRoot);
|
|
1339
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1339
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1340
1340
|
return addAgentToExistingNextApp(originalContent, agent, documentPath);
|
|
1341
1341
|
}
|
|
1342
|
-
if (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile) {
|
|
1342
|
+
if (!force && (hasReactGrabInFile2 || hasReactGrabInInstrumentationFile)) {
|
|
1343
1343
|
return {
|
|
1344
1344
|
success: true,
|
|
1345
1345
|
filePath: documentPath,
|
|
@@ -1374,7 +1374,7 @@ ${SCRIPT_IMPORT}`
|
|
|
1374
1374
|
newContent
|
|
1375
1375
|
};
|
|
1376
1376
|
};
|
|
1377
|
-
var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1377
|
+
var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1378
1378
|
const indexPath = findIndexHtml(projectRoot);
|
|
1379
1379
|
if (!indexPath) {
|
|
1380
1380
|
return {
|
|
@@ -1386,10 +1386,10 @@ var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1386
1386
|
const originalContent = readFileSync(indexPath, "utf-8");
|
|
1387
1387
|
let newContent = originalContent;
|
|
1388
1388
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1389
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1389
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1390
1390
|
return addAgentToExistingVite(originalContent, agent, indexPath);
|
|
1391
1391
|
}
|
|
1392
|
-
if (hasReactGrabInFile2) {
|
|
1392
|
+
if (!force && hasReactGrabInFile2) {
|
|
1393
1393
|
return {
|
|
1394
1394
|
success: true,
|
|
1395
1395
|
filePath: indexPath,
|
|
@@ -1414,7 +1414,7 @@ var transformVite = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1414
1414
|
newContent
|
|
1415
1415
|
};
|
|
1416
1416
|
};
|
|
1417
|
-
var transformWebpack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1417
|
+
var transformWebpack = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1418
1418
|
const entryPath = findEntryFile(projectRoot);
|
|
1419
1419
|
if (!entryPath) {
|
|
1420
1420
|
return {
|
|
@@ -1425,10 +1425,10 @@ var transformWebpack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
const originalContent = readFileSync(entryPath, "utf-8");
|
|
1427
1427
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1428
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1428
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1429
1429
|
return addAgentToExistingWebpack(originalContent, agent, entryPath);
|
|
1430
1430
|
}
|
|
1431
|
-
if (hasReactGrabInFile2) {
|
|
1431
|
+
if (!force && hasReactGrabInFile2) {
|
|
1432
1432
|
return {
|
|
1433
1433
|
success: true,
|
|
1434
1434
|
filePath: entryPath,
|
|
@@ -1448,7 +1448,7 @@ ${originalContent}`;
|
|
|
1448
1448
|
newContent
|
|
1449
1449
|
};
|
|
1450
1450
|
};
|
|
1451
|
-
var transformTanStack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
1451
|
+
var transformTanStack = (projectRoot, agent, reactGrabAlreadyConfigured, force = false) => {
|
|
1452
1452
|
const rootPath = findTanStackRootFile(projectRoot);
|
|
1453
1453
|
if (!rootPath) {
|
|
1454
1454
|
return {
|
|
@@ -1460,10 +1460,10 @@ var transformTanStack = (projectRoot, agent, reactGrabAlreadyConfigured) => {
|
|
|
1460
1460
|
const originalContent = readFileSync(rootPath, "utf-8");
|
|
1461
1461
|
let newContent = originalContent;
|
|
1462
1462
|
const hasReactGrabInFile2 = hasReactGrabCode(originalContent);
|
|
1463
|
-
if (hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1463
|
+
if (!force && hasReactGrabInFile2 && reactGrabAlreadyConfigured) {
|
|
1464
1464
|
return addAgentToExistingTanStack(originalContent, agent, rootPath);
|
|
1465
1465
|
}
|
|
1466
|
-
if (hasReactGrabInFile2) {
|
|
1466
|
+
if (!force && hasReactGrabInFile2) {
|
|
1467
1467
|
return {
|
|
1468
1468
|
success: true,
|
|
1469
1469
|
filePath: rootPath,
|
|
@@ -1521,27 +1521,29 @@ ${newContent}`;
|
|
|
1521
1521
|
newContent
|
|
1522
1522
|
};
|
|
1523
1523
|
};
|
|
1524
|
-
var previewTransform = (projectRoot, framework, nextRouterType, agent, reactGrabAlreadyConfigured = false) => {
|
|
1524
|
+
var previewTransform = (projectRoot, framework, nextRouterType, agent, reactGrabAlreadyConfigured = false, force = false) => {
|
|
1525
1525
|
switch (framework) {
|
|
1526
1526
|
case "next":
|
|
1527
1527
|
if (nextRouterType === "app") {
|
|
1528
1528
|
return transformNextAppRouter(
|
|
1529
1529
|
projectRoot,
|
|
1530
1530
|
agent,
|
|
1531
|
-
reactGrabAlreadyConfigured
|
|
1531
|
+
reactGrabAlreadyConfigured,
|
|
1532
|
+
force
|
|
1532
1533
|
);
|
|
1533
1534
|
}
|
|
1534
1535
|
return transformNextPagesRouter(
|
|
1535
1536
|
projectRoot,
|
|
1536
1537
|
agent,
|
|
1537
|
-
reactGrabAlreadyConfigured
|
|
1538
|
+
reactGrabAlreadyConfigured,
|
|
1539
|
+
force
|
|
1538
1540
|
);
|
|
1539
1541
|
case "vite":
|
|
1540
|
-
return transformVite(projectRoot, agent, reactGrabAlreadyConfigured);
|
|
1542
|
+
return transformVite(projectRoot, agent, reactGrabAlreadyConfigured, force);
|
|
1541
1543
|
case "tanstack":
|
|
1542
|
-
return transformTanStack(projectRoot, agent, reactGrabAlreadyConfigured);
|
|
1544
|
+
return transformTanStack(projectRoot, agent, reactGrabAlreadyConfigured, force);
|
|
1543
1545
|
case "webpack":
|
|
1544
|
-
return transformWebpack(projectRoot, agent, reactGrabAlreadyConfigured);
|
|
1546
|
+
return transformWebpack(projectRoot, agent, reactGrabAlreadyConfigured, force);
|
|
1545
1547
|
default:
|
|
1546
1548
|
return {
|
|
1547
1549
|
success: false,
|
|
@@ -2195,7 +2197,7 @@ var previewCdnTransform = (projectRoot, framework, nextRouterType, targetCdnDoma
|
|
|
2195
2197
|
};
|
|
2196
2198
|
|
|
2197
2199
|
// src/commands/add.ts
|
|
2198
|
-
var VERSION = "0.1.
|
|
2200
|
+
var VERSION = "0.1.22";
|
|
2199
2201
|
var formatInstalledAgentNames = (agents) => agents.map((agent) => AGENT_NAMES[agent] || agent).join(", ");
|
|
2200
2202
|
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(
|
|
2201
2203
|
"-c, --cwd <cwd>",
|
|
@@ -2556,7 +2558,7 @@ var MAX_KEY_HOLD_DURATION_MS = 2e3;
|
|
|
2556
2558
|
var MAX_CONTEXT_LINES = 50;
|
|
2557
2559
|
|
|
2558
2560
|
// src/commands/configure.ts
|
|
2559
|
-
var VERSION2 = "0.1.
|
|
2561
|
+
var VERSION2 = "0.1.22";
|
|
2560
2562
|
var isMac = process.platform === "darwin";
|
|
2561
2563
|
var META_LABEL = isMac ? "Cmd" : "Win";
|
|
2562
2564
|
var ALT_LABEL = isMac ? "Option" : "Alt";
|
|
@@ -3112,7 +3114,7 @@ var uninstallPackagesWithFeedback = (packages, packageManager, projectRoot) => {
|
|
|
3112
3114
|
};
|
|
3113
3115
|
|
|
3114
3116
|
// src/commands/init.ts
|
|
3115
|
-
var VERSION3 = "0.1.
|
|
3117
|
+
var VERSION3 = "0.1.22";
|
|
3116
3118
|
var REPORT_URL = "https://react-grab.com/api/report-cli";
|
|
3117
3119
|
var DOCS_URL = "https://github.com/aidenybai/react-grab";
|
|
3118
3120
|
var reportToCli = (type, config, error) => {
|
|
@@ -3870,7 +3872,8 @@ var init = new Command().name("init").description("initialize React Grab in your
|
|
|
3870
3872
|
finalFramework,
|
|
3871
3873
|
finalNextRouterType,
|
|
3872
3874
|
agentIntegration,
|
|
3873
|
-
false
|
|
3875
|
+
false,
|
|
3876
|
+
opts.force
|
|
3874
3877
|
);
|
|
3875
3878
|
const packageJsonResult = previewPackageJsonTransform(
|
|
3876
3879
|
projectInfo.projectRoot,
|
|
@@ -3970,7 +3973,7 @@ var init = new Command().name("init").description("initialize React Grab in your
|
|
|
3970
3973
|
reportToCli("error", void 0, error);
|
|
3971
3974
|
}
|
|
3972
3975
|
});
|
|
3973
|
-
var VERSION4 = "0.1.
|
|
3976
|
+
var VERSION4 = "0.1.22";
|
|
3974
3977
|
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(
|
|
3975
3978
|
"-c, --cwd <cwd>",
|
|
3976
3979
|
"working directory (defaults to current directory)",
|
|
@@ -4146,7 +4149,7 @@ var remove = new Command().name("remove").description("disconnect React Grab fro
|
|
|
4146
4149
|
});
|
|
4147
4150
|
|
|
4148
4151
|
// src/cli.ts
|
|
4149
|
-
var VERSION5 = "0.1.
|
|
4152
|
+
var VERSION5 = "0.1.22";
|
|
4150
4153
|
var VERSION_API_URL = "https://www.react-grab.com/api/version";
|
|
4151
4154
|
process.on("SIGINT", () => process.exit(0));
|
|
4152
4155
|
process.on("SIGTERM", () => process.exit(0));
|