@bakit-org/ai-sdlc-cli 0.0.0-stage → 0.1.0
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/README.md +93 -2
- package/bin/ai-sdlc.js +13 -0
- package/docs/cli.md +115 -0
- package/docs/tui.md +87 -0
- package/lib/apply-plan.js +61 -0
- package/lib/bundle.js +120 -0
- package/lib/cli-args.js +89 -0
- package/lib/cli-output.js +36 -0
- package/lib/command-plan.js +28 -0
- package/lib/commands.js +173 -0
- package/lib/config.js +42 -0
- package/lib/doctor.js +123 -0
- package/lib/errors.js +19 -0
- package/lib/fs-safe.js +133 -0
- package/lib/github-auth.js +115 -0
- package/lib/github-checks.js +43 -0
- package/lib/github-errors.js +39 -0
- package/lib/github-http.js +107 -0
- package/lib/github-release.js +156 -0
- package/lib/journal.js +117 -0
- package/lib/manifest.js +64 -0
- package/lib/merge-claude-md.js +63 -0
- package/lib/merge-settings.js +125 -0
- package/lib/path-rules.js +23 -0
- package/lib/plan-files.js +86 -0
- package/lib/plan.js +78 -0
- package/lib/project-picker.js +117 -0
- package/lib/release-source.js +30 -0
- package/lib/semver.js +27 -0
- package/lib/termination-cleanup.js +22 -0
- package/lib/tui/cancelled.js +16 -0
- package/lib/tui/colors.js +33 -0
- package/lib/tui/flows/init-flow.js +126 -0
- package/lib/tui/flows/intro.js +12 -0
- package/lib/tui/flows/menu-flow.js +51 -0
- package/lib/tui/flows/pick-project-step.js +42 -0
- package/lib/tui/flows/preflight.js +80 -0
- package/lib/tui/flows/project-choices.js +64 -0
- package/lib/tui/flows/recent-projects.js +76 -0
- package/lib/tui/flows/result-views.js +89 -0
- package/lib/tui/flows/review-view.js +45 -0
- package/lib/tui/flows/session-options.js +7 -0
- package/lib/tui/flows/terminal-views.js +17 -0
- package/lib/tui/keys.js +182 -0
- package/lib/tui/launch.js +19 -0
- package/lib/tui/logo-fonts.js +29 -0
- package/lib/tui/logo.js +98 -0
- package/lib/tui/sanitize.js +27 -0
- package/lib/tui/terminal-guards.js +58 -0
- package/lib/tui/terminal.js +196 -0
- package/lib/tui/text-width.js +122 -0
- package/lib/tui/theme.js +84 -0
- package/lib/tui/widgets/confirm.js +56 -0
- package/lib/tui/widgets/input-box.js +88 -0
- package/lib/tui/widgets/panel.js +31 -0
- package/lib/tui/widgets/path-input.js +110 -0
- package/lib/tui/widgets/progress-bar.js +17 -0
- package/lib/tui/widgets/select-list.js +89 -0
- package/lib/tui/widgets/spinner.js +41 -0
- package/lib/version-check.js +38 -0
- package/package.json +32 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// `ai-sdlc version --check`: the CLI version, the latest payload release and,
|
|
3
|
+
// when a project is known, what is installed there.
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const pkg = require('../package.json');
|
|
6
|
+
const { CliError } = require('./errors');
|
|
7
|
+
const { readManifest } = require('./manifest');
|
|
8
|
+
const semver = require('./semver');
|
|
9
|
+
const { stripV } = require('./github-release');
|
|
10
|
+
|
|
11
|
+
function installedVersion(flags, io) {
|
|
12
|
+
if (flags.project) return readManifest(path.resolve(io.cwd, flags.project));
|
|
13
|
+
try {
|
|
14
|
+
return readManifest(io.cwd);
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function runVersionCheck(flags, io, say) {
|
|
21
|
+
const { repo } = await io.github.checkAccess();
|
|
22
|
+
const release = await io.github.findRelease();
|
|
23
|
+
const latest = stripV(release && release.tag_name);
|
|
24
|
+
if (!semver.isStrict(latest)) throw new CliError(`the latest release of ${repo} has an unusable tag`);
|
|
25
|
+
const manifest = installedVersion(flags, io);
|
|
26
|
+
const installed = manifest ? manifest.payload_version : null;
|
|
27
|
+
const cmp = installed ? semver.compare(installed, latest) : null;
|
|
28
|
+
const status = cmp === null ? null : cmp < 0 ? 'update-available' : 'up-to-date';
|
|
29
|
+
if (flags.json) {
|
|
30
|
+
say.stdout.write(`${JSON.stringify({ version: pkg.version, repo, latest, installed, status })}\n`);
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
say.stdout.write(`ai-sdlc-cli ${pkg.version}\nlatest payload release (${repo}): ${latest}\n`);
|
|
34
|
+
if (installed) say.stdout.write(`installed payload: ${installed} (${status === 'update-available' ? 'run `ai-sdlc update` to upgrade' : 'up to date'})\n`);
|
|
35
|
+
return 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = { runVersionCheck };
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakit-org/ai-sdlc-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Installs, updates, checks and removes the ai-sdlc Claude Code harness in a project repository.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ai-sdlc": "bin/ai-sdlc.js"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=18"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin",
|
|
14
|
+
"lib",
|
|
15
|
+
"docs",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "node --test"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"claude-code",
|
|
23
|
+
"sdlc",
|
|
24
|
+
"cli"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/bakit-org/ai-sdlc-cli.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/bakit-org/ai-sdlc-cli#readme"
|
|
34
|
+
}
|