delimit-cli 4.1.32 → 4.1.33
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/bin/delimit-cli.js +40 -0
- package/package.json +1 -1
package/bin/delimit-cli.js
CHANGED
|
@@ -2540,8 +2540,44 @@ program
|
|
|
2540
2540
|
console.log(chalk.gray(' Tip: point at a spec file: npx delimit-cli scan openapi.yaml'));
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
|
+
// Governance readiness checklist
|
|
2544
|
+
const hasPolicy = fs.existsSync(path.join(target, '.delimit', 'policies.yml'));
|
|
2545
|
+
const hasWorkflow = fs.existsSync(path.join(target, '.github', 'workflows', 'api-governance.yml'));
|
|
2546
|
+
const hasGitHooks = fs.existsSync(path.join(target, '.git', 'hooks', 'pre-commit')) &&
|
|
2547
|
+
(() => { try { return fs.readFileSync(path.join(target, '.git', 'hooks', 'pre-commit'), 'utf-8').includes('delimit'); } catch { return false; } })();
|
|
2548
|
+
const hasMcp = fs.existsSync(path.join(os.homedir(), '.mcp.json')) &&
|
|
2549
|
+
(() => { try { return fs.readFileSync(path.join(os.homedir(), '.mcp.json'), 'utf-8').includes('delimit'); } catch { return false; } })();
|
|
2550
|
+
const hasSpecs = found.length > 0;
|
|
2551
|
+
|
|
2552
|
+
const checks = [
|
|
2553
|
+
{ name: 'API spec', done: hasSpecs, fix: 'Add an openapi.yaml to your project' },
|
|
2554
|
+
{ name: 'Policy', done: hasPolicy, fix: 'npx delimit-cli init' },
|
|
2555
|
+
{ name: 'CI gate', done: hasWorkflow, fix: 'npx delimit-cli ci' },
|
|
2556
|
+
{ name: 'Git hooks', done: hasGitHooks, fix: 'npx delimit-cli hooks install' },
|
|
2557
|
+
{ name: 'MCP tools', done: hasMcp, fix: 'npx delimit-cli setup' },
|
|
2558
|
+
];
|
|
2559
|
+
const score = checks.filter(c => c.done).length;
|
|
2560
|
+
|
|
2561
|
+
console.log(chalk.bold(`\n Governance Readiness: ${score}/${checks.length}\n`));
|
|
2562
|
+
for (const c of checks) {
|
|
2563
|
+
if (c.done) {
|
|
2564
|
+
console.log(` ${chalk.green('●')} ${c.name}`);
|
|
2565
|
+
} else {
|
|
2566
|
+
console.log(` ${chalk.gray('○')} ${c.name} ${chalk.gray('—')} ${chalk.yellow(c.fix)}`);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
console.log('');
|
|
2570
|
+
|
|
2543
2571
|
// Interactive next step picker
|
|
2544
2572
|
try {
|
|
2573
|
+
// Pre-select the first missing item
|
|
2574
|
+
const firstMissing = checks.find(c => !c.done);
|
|
2575
|
+
const defaultChoice = firstMissing ?
|
|
2576
|
+
(firstMissing.name === 'Policy' ? 'init' :
|
|
2577
|
+
firstMissing.name === 'CI gate' ? 'ci' :
|
|
2578
|
+
firstMissing.name === 'Git hooks' ? 'hooks' :
|
|
2579
|
+
firstMissing.name === 'MCP tools' ? 'setup' : 'init') : 'exit';
|
|
2580
|
+
|
|
2545
2581
|
const { next } = await inquirer.prompt([{
|
|
2546
2582
|
type: 'list',
|
|
2547
2583
|
name: 'next',
|
|
@@ -2549,15 +2585,19 @@ program
|
|
|
2549
2585
|
choices: [
|
|
2550
2586
|
{ name: 'Set up governance for this project', value: 'init' },
|
|
2551
2587
|
{ name: 'Add CI gate (GitHub Action)', value: 'ci' },
|
|
2588
|
+
{ name: 'Install git hooks', value: 'hooks' },
|
|
2552
2589
|
{ name: 'Configure AI assistants (Claude, Codex, Gemini)', value: 'setup' },
|
|
2553
2590
|
{ name: 'Run a breaking change demo', value: 'try' },
|
|
2554
2591
|
{ name: 'Exit', value: 'exit' },
|
|
2555
2592
|
],
|
|
2593
|
+
default: defaultChoice,
|
|
2556
2594
|
}]);
|
|
2557
2595
|
if (next === 'init') {
|
|
2558
2596
|
execSync('npx delimit-cli init', { stdio: 'inherit' });
|
|
2559
2597
|
} else if (next === 'ci') {
|
|
2560
2598
|
execSync('npx delimit-cli ci', { stdio: 'inherit' });
|
|
2599
|
+
} else if (next === 'hooks') {
|
|
2600
|
+
execSync('npx delimit-cli hooks install', { stdio: 'inherit' });
|
|
2561
2601
|
} else if (next === 'setup') {
|
|
2562
2602
|
execSync('npx delimit-cli setup', { stdio: 'inherit' });
|
|
2563
2603
|
} else if (next === 'try') {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.33",
|
|
5
5
|
"description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|