prjct-cli 1.1.1 → 1.2.1
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/CHANGELOG.md +104 -1
- package/bin/prjct.ts +31 -31
- package/core/cli/start.ts +45 -59
- package/core/commands/planning.ts +1 -0
- package/core/index.ts +21 -24
- package/core/infrastructure/setup.ts +29 -32
- package/core/schemas/ideas.ts +1 -1
- package/core/services/hooks-service.ts +676 -0
- package/core/utils/help.ts +48 -45
- package/core/utils/subtask-table.ts +27 -34
- package/core/workflow/workflow-preferences.ts +11 -17
- package/dist/bin/prjct.mjs +1492 -1036
- package/dist/core/infrastructure/setup.js +29 -30
- package/package.json +1 -1
|
@@ -408,6 +408,7 @@ var import_node_child_process3 = require("node:child_process");
|
|
|
408
408
|
var import_node_fs3 = __toESM(require("node:fs"));
|
|
409
409
|
var import_node_os4 = __toESM(require("node:os"));
|
|
410
410
|
var import_node_path5 = __toESM(require("node:path"));
|
|
411
|
+
var import_chalk = __toESM(require("chalk"));
|
|
411
412
|
|
|
412
413
|
// core/constants/index.ts
|
|
413
414
|
var TIMEOUTS = {
|
|
@@ -1389,54 +1390,52 @@ var editorsConfig = new EditorsConfig();
|
|
|
1389
1390
|
var editors_config_default = editorsConfig;
|
|
1390
1391
|
|
|
1391
1392
|
// core/infrastructure/setup.ts
|
|
1392
|
-
var GREEN = "\x1B[32m";
|
|
1393
|
-
var YELLOW = "\x1B[33m";
|
|
1394
|
-
var DIM = "\x1B[2m";
|
|
1395
|
-
var NC = "\x1B[0m";
|
|
1396
1393
|
async function installAICLI(provider) {
|
|
1397
1394
|
const packageName = provider.name === "claude" ? "@anthropic-ai/claude-code" : "@google/gemini-cli";
|
|
1398
1395
|
if (!dependencyValidator.isAvailable("npm")) {
|
|
1399
|
-
console.log(`${
|
|
1396
|
+
console.log(`${import_chalk.default.yellow("\u26A0\uFE0F npm is not available")}`);
|
|
1400
1397
|
console.log("");
|
|
1401
|
-
console.log(`${
|
|
1402
|
-
console.log(
|
|
1398
|
+
console.log(`${import_chalk.default.dim(`Install ${provider.displayName} using one of:`)}`);
|
|
1399
|
+
console.log(import_chalk.default.dim(" \u2022 Install Node.js: https://nodejs.org"));
|
|
1403
1400
|
console.log(
|
|
1404
|
-
|
|
1401
|
+
import_chalk.default.dim(
|
|
1402
|
+
` \u2022 Use Homebrew: brew install ${provider.name === "claude" ? "claude" : "gemini"}`
|
|
1403
|
+
)
|
|
1405
1404
|
);
|
|
1406
|
-
console.log(
|
|
1405
|
+
console.log(import_chalk.default.dim(` \u2022 Use npx directly: npx ${packageName}`));
|
|
1407
1406
|
console.log("");
|
|
1408
1407
|
return false;
|
|
1409
1408
|
}
|
|
1410
1409
|
try {
|
|
1411
|
-
console.log(
|
|
1410
|
+
console.log(import_chalk.default.yellow(`\u{1F4E6} ${provider.displayName} not found. Installing...`));
|
|
1412
1411
|
console.log("");
|
|
1413
1412
|
(0, import_node_child_process3.execSync)(`npm install -g ${packageName}`, {
|
|
1414
1413
|
stdio: "inherit",
|
|
1415
1414
|
timeout: getTimeout("NPM_INSTALL")
|
|
1416
1415
|
});
|
|
1417
1416
|
console.log("");
|
|
1418
|
-
console.log(`${
|
|
1417
|
+
console.log(`${import_chalk.default.green("\u2713")} ${provider.displayName} installed successfully`);
|
|
1419
1418
|
console.log("");
|
|
1420
1419
|
return true;
|
|
1421
1420
|
} catch (error) {
|
|
1422
1421
|
const err = error;
|
|
1423
1422
|
const isTimeout = err.killed && err.signal === "SIGTERM";
|
|
1424
1423
|
if (isTimeout) {
|
|
1425
|
-
console.log(
|
|
1424
|
+
console.log(import_chalk.default.yellow(`\u26A0\uFE0F Installation timed out for ${provider.displayName}`));
|
|
1426
1425
|
console.log("");
|
|
1427
|
-
console.log(
|
|
1428
|
-
console.log(
|
|
1429
|
-
console.log(
|
|
1426
|
+
console.log(import_chalk.default.dim("The npm install took too long. Try:"));
|
|
1427
|
+
console.log(import_chalk.default.dim(" \u2022 Set PRJCT_TIMEOUT_NPM_INSTALL=300000 for 5 minutes"));
|
|
1428
|
+
console.log(import_chalk.default.dim(` \u2022 Run manually: npm install -g ${packageName}`));
|
|
1430
1429
|
} else {
|
|
1431
|
-
console.log(
|
|
1430
|
+
console.log(import_chalk.default.yellow(`\u26A0\uFE0F Failed to install ${provider.displayName}: ${err.message}`));
|
|
1432
1431
|
}
|
|
1433
1432
|
console.log("");
|
|
1434
|
-
console.log(
|
|
1435
|
-
console.log(
|
|
1436
|
-
console.log(
|
|
1437
|
-
console.log(
|
|
1433
|
+
console.log(import_chalk.default.dim("Alternative installation methods:"));
|
|
1434
|
+
console.log(import_chalk.default.dim(` \u2022 npm: npm install -g ${packageName}`));
|
|
1435
|
+
console.log(import_chalk.default.dim(` \u2022 yarn: yarn global add ${packageName}`));
|
|
1436
|
+
console.log(import_chalk.default.dim(` \u2022 pnpm: pnpm add -g ${packageName}`));
|
|
1438
1437
|
console.log(
|
|
1439
|
-
|
|
1438
|
+
import_chalk.default.dim(` \u2022 brew: brew install ${provider.name === "claude" ? "claude" : "gemini"}`)
|
|
1440
1439
|
);
|
|
1441
1440
|
console.log("");
|
|
1442
1441
|
return false;
|
|
@@ -1517,7 +1516,7 @@ async function run() {
|
|
|
1517
1516
|
if (antigravityDetection.installed) {
|
|
1518
1517
|
const antigravityResult = await installAntigravitySkill();
|
|
1519
1518
|
if (antigravityResult.success) {
|
|
1520
|
-
console.log(` ${
|
|
1519
|
+
console.log(` ${import_chalk.default.green("\u2713")} Antigravity skill installed`);
|
|
1521
1520
|
}
|
|
1522
1521
|
}
|
|
1523
1522
|
await editors_config_default.saveConfig(VERSION, command_installer_default.getInstallPath(), selection.provider);
|
|
@@ -1831,7 +1830,7 @@ async function migrateProjectsCliVersion() {
|
|
|
1831
1830
|
}
|
|
1832
1831
|
}
|
|
1833
1832
|
if (migrated > 0) {
|
|
1834
|
-
console.log(` ${
|
|
1833
|
+
console.log(` ${import_chalk.default.green("\u2713")} Updated ${migrated} project(s) to v${VERSION}`);
|
|
1835
1834
|
}
|
|
1836
1835
|
} catch (error) {
|
|
1837
1836
|
if (!isNotFoundError(error)) {
|
|
@@ -2043,25 +2042,25 @@ __name(ensureStatusLineSymlink, "ensureStatusLineSymlink");
|
|
|
2043
2042
|
function showResults(results, provider) {
|
|
2044
2043
|
console.log("");
|
|
2045
2044
|
if (results.cliInstalled) {
|
|
2046
|
-
console.log(` ${
|
|
2045
|
+
console.log(` ${import_chalk.default.green("\u2713")} ${provider.displayName} CLI installed`);
|
|
2047
2046
|
} else {
|
|
2048
|
-
console.log(` ${
|
|
2047
|
+
console.log(` ${import_chalk.default.green("\u2713")} ${provider.displayName} CLI found`);
|
|
2049
2048
|
}
|
|
2050
2049
|
const totalCommands = results.commandsAdded + results.commandsUpdated;
|
|
2051
2050
|
if (totalCommands > 0) {
|
|
2052
2051
|
const parts = [];
|
|
2053
2052
|
if (results.commandsAdded > 0) parts.push(`${results.commandsAdded} new`);
|
|
2054
2053
|
if (results.commandsUpdated > 0) parts.push(`${results.commandsUpdated} updated`);
|
|
2055
|
-
console.log(` ${
|
|
2054
|
+
console.log(` ${import_chalk.default.green("\u2713")} Commands synced (${parts.join(", ")})`);
|
|
2056
2055
|
} else {
|
|
2057
|
-
console.log(` ${
|
|
2056
|
+
console.log(` ${import_chalk.default.green("\u2713")} Commands up to date`);
|
|
2058
2057
|
}
|
|
2059
2058
|
if (results.configAction === "created") {
|
|
2060
|
-
console.log(` ${
|
|
2059
|
+
console.log(` ${import_chalk.default.green("\u2713")} Global config created (${provider.contextFile})`);
|
|
2061
2060
|
} else if (results.configAction === "updated") {
|
|
2062
|
-
console.log(` ${
|
|
2061
|
+
console.log(` ${import_chalk.default.green("\u2713")} Global config updated (${provider.contextFile})`);
|
|
2063
2062
|
} else if (results.configAction === "appended") {
|
|
2064
|
-
console.log(` ${
|
|
2063
|
+
console.log(` ${import_chalk.default.green("\u2713")} Global config merged (${provider.contextFile})`);
|
|
2065
2064
|
}
|
|
2066
2065
|
console.log("");
|
|
2067
2066
|
}
|