javi-forge 1.6.0 → 1.7.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 +45 -1
- package/ci-local/README.md +56 -11
- package/ci-local/ci-local.ps1 +445 -0
- package/ci-local/ci-local.sh +52 -9
- package/ci-local/docker/python.Dockerfile +7 -0
- package/ci-local/hooks/commit-msg +120 -44
- package/ci-local/hooks/commit-msg.test.sh +286 -0
- package/ci-local/hooks/pre-commit +9 -1
- package/ci-local/hooks/pre-push +13 -2
- package/ci-local/install.ps1 +367 -0
- package/ci-local/install.sh +151 -5
- package/ci-local/uninstall.ps1 +85 -0
- package/ci-local/uninstall.sh +95 -0
- package/dist/cli/dispatch/ci.d.ts +12 -0
- package/dist/cli/dispatch/ci.js +38 -0
- package/dist/cli/dispatch/security.d.ts +11 -0
- package/dist/cli/dispatch/security.js +68 -0
- package/dist/cli/dispatch/simple-renderers.d.ts +16 -0
- package/dist/cli/dispatch/simple-renderers.js +65 -0
- package/dist/cli/dispatch/skill-publish.d.ts +15 -0
- package/dist/cli/dispatch/skill-publish.js +44 -0
- package/dist/cli/dispatch/skills-cmd.d.ts +13 -0
- package/dist/cli/dispatch/skills-cmd.js +93 -0
- package/dist/cli/dispatch/tdd.d.ts +11 -0
- package/dist/cli/dispatch/tdd.js +45 -0
- package/dist/cli/dispatch/types.d.ts +29 -0
- package/dist/cli/dispatch/types.js +2 -0
- package/dist/cli/dispatch/workflow.d.ts +11 -0
- package/dist/cli/dispatch/workflow.js +67 -0
- package/dist/cli/help.d.ts +127 -0
- package/dist/cli/help.js +138 -0
- package/dist/cli/runtime.d.ts +16 -0
- package/dist/cli/runtime.js +38 -0
- package/dist/cli/validators.d.ts +17 -0
- package/dist/cli/validators.js +35 -0
- package/dist/commands/analyze.d.ts +1 -1
- package/dist/commands/analyze.js +14 -16
- package/dist/commands/ci.d.ts +50 -3
- package/dist/commands/ci.js +537 -182
- package/dist/commands/doctor.d.ts +2 -2
- package/dist/commands/doctor.js +112 -62
- package/dist/commands/init/report.d.ts +13 -0
- package/dist/commands/init/report.js +13 -0
- package/dist/commands/init/steps/agent-skills.d.ts +13 -0
- package/dist/commands/init/steps/agent-skills.js +45 -0
- package/dist/commands/init/steps/ai-sync.d.ts +15 -0
- package/dist/commands/init/steps/ai-sync.js +62 -0
- package/dist/commands/init/steps/ci.d.ts +24 -0
- package/dist/commands/init/steps/ci.js +74 -0
- package/dist/commands/init/steps/claude-md.d.ts +14 -0
- package/dist/commands/init/steps/claude-md.js +54 -0
- package/dist/commands/init/steps/code-graph.d.ts +16 -0
- package/dist/commands/init/steps/code-graph.js +68 -0
- package/dist/commands/init/steps/context-dir.d.ts +13 -0
- package/dist/commands/init/steps/context-dir.js +47 -0
- package/dist/commands/init/steps/docker-deploy.d.ts +16 -0
- package/dist/commands/init/steps/docker-deploy.js +60 -0
- package/dist/commands/init/steps/ghagga.d.ts +15 -0
- package/dist/commands/init/steps/ghagga.js +58 -0
- package/dist/commands/init/steps/git.d.ts +25 -0
- package/dist/commands/init/steps/git.js +81 -0
- package/dist/commands/init/steps/gitignore.d.ts +13 -0
- package/dist/commands/init/steps/gitignore.js +39 -0
- package/dist/commands/init/steps/local-ai.d.ts +14 -0
- package/dist/commands/init/steps/local-ai.js +53 -0
- package/dist/commands/init/steps/manifest.d.ts +13 -0
- package/dist/commands/init/steps/manifest.js +58 -0
- package/dist/commands/init/steps/memory.d.ts +15 -0
- package/dist/commands/init/steps/memory.js +60 -0
- package/dist/commands/init/steps/mock.d.ts +13 -0
- package/dist/commands/init/steps/mock.js +64 -0
- package/dist/commands/init/steps/sdd.d.ts +12 -0
- package/dist/commands/init/steps/sdd.js +40 -0
- package/dist/commands/init/steps/security.d.ts +28 -0
- package/dist/commands/init/steps/security.js +103 -0
- package/dist/commands/init/types.d.ts +30 -0
- package/dist/commands/init/types.js +2 -0
- package/dist/commands/init.d.ts +5 -4
- package/dist/commands/init.js +42 -387
- package/dist/commands/llmstxt.d.ts +1 -1
- package/dist/commands/llmstxt.js +36 -34
- package/dist/commands/plugin.d.ts +10 -1
- package/dist/commands/plugin.js +92 -47
- package/dist/commands/security.d.ts +11 -5
- package/dist/commands/security.js +236 -77
- package/dist/commands/skills/analysis.d.ts +19 -0
- package/dist/commands/skills/analysis.js +211 -0
- package/dist/commands/skills/benchmark.d.ts +6 -0
- package/dist/commands/skills/benchmark.js +82 -0
- package/dist/commands/skills/constants.d.ts +10 -0
- package/dist/commands/skills/constants.js +27 -0
- package/dist/commands/skills/directives.d.ts +21 -0
- package/dist/commands/skills/directives.js +101 -0
- package/dist/commands/skills/parsing.d.ts +16 -0
- package/dist/commands/skills/parsing.js +108 -0
- package/dist/commands/skills/rules.d.ts +5 -0
- package/dist/commands/skills/rules.js +32 -0
- package/dist/commands/skills/scoring.d.ts +47 -0
- package/dist/commands/skills/scoring.js +306 -0
- package/dist/commands/skills.d.ts +8 -69
- package/dist/commands/skills.js +9 -490
- package/dist/commands/tdd-pipeline.d.ts +17 -0
- package/dist/commands/tdd-pipeline.js +144 -0
- package/dist/commands/tdd.d.ts +1 -1
- package/dist/commands/tdd.js +21 -18
- package/dist/commands/workflow.d.ts +23 -0
- package/dist/commands/workflow.js +116 -0
- package/dist/constants.d.ts +15 -1
- package/dist/constants.js +161 -122
- package/dist/index.js +43 -280
- package/dist/lib/agent-skills.d.ts +36 -1
- package/dist/lib/agent-skills.js +168 -19
- package/dist/lib/atlassian-mcp.d.ts +42 -0
- package/dist/lib/atlassian-mcp.js +98 -0
- package/dist/lib/auto-skill-install.d.ts +37 -0
- package/dist/lib/auto-skill-install.js +91 -0
- package/dist/lib/auto-wire.d.ts +20 -0
- package/dist/lib/auto-wire.js +240 -0
- package/dist/lib/ci-config.d.ts +65 -0
- package/dist/lib/ci-config.js +297 -0
- package/dist/lib/claudemd.d.ts +13 -1
- package/dist/lib/claudemd.js +174 -24
- package/dist/lib/codex-export.d.ts +1 -1
- package/dist/lib/codex-export.js +26 -32
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.js +52 -44
- package/dist/lib/context.d.ts +17 -2
- package/dist/lib/context.js +142 -13
- package/dist/lib/crash-recovery.d.ts +34 -0
- package/dist/lib/crash-recovery.js +123 -0
- package/dist/lib/docker.d.ts +23 -2
- package/dist/lib/docker.js +168 -131
- package/dist/lib/exec.d.ts +10 -0
- package/dist/lib/exec.js +11 -0
- package/dist/lib/frontmatter.d.ts +1 -1
- package/dist/lib/frontmatter.js +29 -15
- package/dist/lib/harness-audit.d.ts +35 -0
- package/dist/lib/harness-audit.js +277 -0
- package/dist/lib/parallel-batch.d.ts +42 -0
- package/dist/lib/parallel-batch.js +88 -0
- package/dist/lib/plugin.d.ts +9 -3
- package/dist/lib/plugin.js +127 -70
- package/dist/lib/secret-scanner.d.ts +30 -0
- package/dist/lib/secret-scanner.js +274 -0
- package/dist/lib/security-analysis.d.ts +74 -0
- package/dist/lib/security-analysis.js +489 -0
- package/dist/lib/skill-publish.d.ts +40 -0
- package/dist/lib/skill-publish.js +164 -0
- package/dist/lib/skill-scanner.d.ts +63 -0
- package/dist/lib/skill-scanner.js +383 -0
- package/dist/lib/stack-detector.d.ts +38 -0
- package/dist/lib/stack-detector.js +207 -0
- package/dist/lib/supply-chain.d.ts +23 -0
- package/dist/lib/supply-chain.js +126 -0
- package/dist/lib/team-presets.d.ts +53 -0
- package/dist/lib/team-presets.js +201 -0
- package/dist/lib/template.d.ts +16 -1
- package/dist/lib/template.js +46 -17
- package/dist/lib/workflow/discovery.d.ts +27 -0
- package/dist/lib/workflow/discovery.js +85 -0
- package/dist/lib/workflow/index.d.ts +5 -0
- package/dist/lib/workflow/index.js +5 -0
- package/dist/lib/workflow/parser.d.ts +16 -0
- package/dist/lib/workflow/parser.js +198 -0
- package/dist/lib/workflow/renderer.d.ts +9 -0
- package/dist/lib/workflow/renderer.js +152 -0
- package/dist/lib/workflow/validator.d.ts +10 -0
- package/dist/lib/workflow/validator.js +189 -0
- package/dist/tasks/index.d.ts +4 -0
- package/dist/tasks/index.js +4 -0
- package/dist/tasks/scaffold-tasks.d.ts +3 -0
- package/dist/tasks/scaffold-tasks.js +14 -0
- package/dist/tasks/task-id.d.ts +30 -0
- package/dist/tasks/task-id.js +59 -0
- package/dist/tasks/task-tracker.d.ts +15 -0
- package/dist/tasks/task-tracker.js +81 -0
- package/dist/types/index.d.ts +134 -6
- package/dist/types/index.js +11 -1
- package/dist/ui/AnalyzeUI.d.ts +1 -1
- package/dist/ui/AnalyzeUI.js +38 -39
- package/dist/ui/App.d.ts +5 -3
- package/dist/ui/App.js +86 -46
- package/dist/ui/AutoSkills.d.ts +9 -0
- package/dist/ui/AutoSkills.js +124 -0
- package/dist/ui/CI.d.ts +2 -2
- package/dist/ui/CI.js +24 -26
- package/dist/ui/CIContext.d.ts +1 -1
- package/dist/ui/CIContext.js +2 -2
- package/dist/ui/CISelector.d.ts +2 -2
- package/dist/ui/CISelector.js +23 -15
- package/dist/ui/Doctor.d.ts +1 -1
- package/dist/ui/Doctor.js +35 -29
- package/dist/ui/Header.d.ts +1 -1
- package/dist/ui/Header.js +14 -14
- package/dist/ui/HookProfileSelector.d.ts +9 -0
- package/dist/ui/HookProfileSelector.js +54 -0
- package/dist/ui/LlmsTxt.d.ts +1 -1
- package/dist/ui/LlmsTxt.js +31 -22
- package/dist/ui/MemorySelector.d.ts +2 -2
- package/dist/ui/MemorySelector.js +28 -16
- package/dist/ui/NameInput.d.ts +1 -1
- package/dist/ui/NameInput.js +21 -21
- package/dist/ui/OptionSelector.d.ts +6 -2
- package/dist/ui/OptionSelector.js +83 -32
- package/dist/ui/Plugin.d.ts +4 -3
- package/dist/ui/Plugin.js +78 -35
- package/dist/ui/Progress.d.ts +3 -3
- package/dist/ui/Progress.js +23 -22
- package/dist/ui/Skills.d.ts +2 -2
- package/dist/ui/Skills.js +61 -32
- package/dist/ui/StackSelector.d.ts +2 -2
- package/dist/ui/StackSelector.js +27 -17
- package/dist/ui/Summary.d.ts +3 -3
- package/dist/ui/Summary.js +60 -50
- package/dist/ui/Welcome.d.ts +1 -1
- package/dist/ui/Welcome.js +15 -16
- package/dist/ui/theme.d.ts +1 -1
- package/dist/ui/theme.js +6 -6
- package/lib/common.psm1 +167 -0
- package/lib/common.sh +30 -0
- package/package.json +46 -24
- package/templates/common/atlassian/mcp-atlassian-snippet.json +16 -0
- package/templates/common/repoforge/mcp-repoforge-snippet.json +11 -0
- package/templates/common/repoforge/repoforge.yaml +34 -0
- package/templates/github/deploy-docker-zero-downtime.yml +140 -0
- package/templates/github/repoforge-graph.yml +45 -0
- package/templates/gitlab/deploy-docker-zero-downtime.yml +57 -0
- package/templates/local-ai/.env.example +17 -0
- package/templates/local-ai/docker-compose.yml +95 -0
- package/templates/security-hooks/claude-settings-security.json +30 -0
- package/templates/security-hooks/commit-msg-signing +29 -0
- package/templates/security-hooks/pre-commit-permissions +74 -0
- package/templates/security-hooks/pre-commit-secrets +74 -0
- package/templates/security-hooks/pre-push-branch-protection +62 -0
- package/templates/security-hooks/pre-push-deps +83 -0
- package/templates/security-hooks/pre-push-signing +67 -0
- package/templates/woodpecker/deploy-docker-zero-downtime.yml +50 -0
- package/templates/workflows/ci-pipeline.dot +15 -0
- package/templates/workflows/feature-flow.dot +21 -0
- package/templates/workflows/release.dot +16 -0
- package/dist/__integration__/helpers.d.ts +0 -20
- package/dist/__integration__/helpers.d.ts.map +0 -1
- package/dist/__integration__/helpers.js +0 -31
- package/dist/__integration__/helpers.js.map +0 -1
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/ci.d.ts.map +0 -1
- package/dist/commands/ci.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/llmstxt.d.ts.map +0 -1
- package/dist/commands/llmstxt.js.map +0 -1
- package/dist/commands/plugin.d.ts.map +0 -1
- package/dist/commands/plugin.js.map +0 -1
- package/dist/commands/security.d.ts.map +0 -1
- package/dist/commands/security.js.map +0 -1
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/tdd.d.ts.map +0 -1
- package/dist/commands/tdd.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/agent-skills.d.ts.map +0 -1
- package/dist/lib/agent-skills.js.map +0 -1
- package/dist/lib/claudemd.d.ts.map +0 -1
- package/dist/lib/claudemd.js.map +0 -1
- package/dist/lib/codex-export.d.ts.map +0 -1
- package/dist/lib/codex-export.js.map +0 -1
- package/dist/lib/common.d.ts.map +0 -1
- package/dist/lib/common.js.map +0 -1
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/context.js.map +0 -1
- package/dist/lib/docker.d.ts.map +0 -1
- package/dist/lib/docker.js.map +0 -1
- package/dist/lib/frontmatter.d.ts.map +0 -1
- package/dist/lib/frontmatter.js.map +0 -1
- package/dist/lib/plugin.d.ts.map +0 -1
- package/dist/lib/plugin.js.map +0 -1
- package/dist/lib/template.d.ts.map +0 -1
- package/dist/lib/template.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/ui/AnalyzeUI.d.ts.map +0 -1
- package/dist/ui/AnalyzeUI.js.map +0 -1
- package/dist/ui/App.d.ts.map +0 -1
- package/dist/ui/App.js.map +0 -1
- package/dist/ui/CI.d.ts.map +0 -1
- package/dist/ui/CI.js.map +0 -1
- package/dist/ui/CIContext.d.ts.map +0 -1
- package/dist/ui/CIContext.js.map +0 -1
- package/dist/ui/CISelector.d.ts.map +0 -1
- package/dist/ui/CISelector.js.map +0 -1
- package/dist/ui/Doctor.d.ts.map +0 -1
- package/dist/ui/Doctor.js.map +0 -1
- package/dist/ui/Header.d.ts.map +0 -1
- package/dist/ui/Header.js.map +0 -1
- package/dist/ui/LlmsTxt.d.ts.map +0 -1
- package/dist/ui/LlmsTxt.js.map +0 -1
- package/dist/ui/MemorySelector.d.ts.map +0 -1
- package/dist/ui/MemorySelector.js.map +0 -1
- package/dist/ui/NameInput.d.ts.map +0 -1
- package/dist/ui/NameInput.js.map +0 -1
- package/dist/ui/OptionSelector.d.ts.map +0 -1
- package/dist/ui/OptionSelector.js.map +0 -1
- package/dist/ui/Plugin.d.ts.map +0 -1
- package/dist/ui/Plugin.js.map +0 -1
- package/dist/ui/Progress.d.ts.map +0 -1
- package/dist/ui/Progress.js.map +0 -1
- package/dist/ui/Skills.d.ts.map +0 -1
- package/dist/ui/Skills.js.map +0 -1
- package/dist/ui/StackSelector.d.ts.map +0 -1
- package/dist/ui/StackSelector.js.map +0 -1
- package/dist/ui/Summary.d.ts.map +0 -1
- package/dist/ui/Summary.js.map +0 -1
- package/dist/ui/Welcome.d.ts.map +0 -1
- package/dist/ui/Welcome.js.map +0 -1
- package/dist/ui/theme.d.ts.map +0 -1
- package/dist/ui/theme.js.map +0 -1
package/dist/ui/AnalyzeUI.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { runAnalyze } from
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
1
|
+
import { Box, Text, useApp, useInput } from "ink";
|
|
2
|
+
import Spinner from "ink-spinner";
|
|
3
|
+
import React, { useEffect, useState } from "react";
|
|
4
|
+
import { runAnalyze } from "../commands/analyze.js";
|
|
5
|
+
import { useCIMode } from "./CIContext.js";
|
|
6
|
+
import Header from "./Header.js";
|
|
7
|
+
import { theme } from "./theme.js";
|
|
8
8
|
export default function AnalyzeUI({ dryRun }) {
|
|
9
9
|
const { exit } = useApp();
|
|
10
10
|
const isCI = useCIMode();
|
|
@@ -12,8 +12,8 @@ export default function AnalyzeUI({ dryRun }) {
|
|
|
12
12
|
const [finished, setFinished] = useState(false);
|
|
13
13
|
const [startTime] = useState(Date.now());
|
|
14
14
|
useEffect(() => {
|
|
15
|
-
runAnalyze(process.cwd(), dryRun, (step) => setSteps(prev => {
|
|
16
|
-
const idx = prev.findIndex(s => s.id === step.id);
|
|
15
|
+
runAnalyze(process.cwd(), dryRun, (step) => setSteps((prev) => {
|
|
16
|
+
const idx = prev.findIndex((s) => s.id === step.id);
|
|
17
17
|
if (idx >= 0) {
|
|
18
18
|
const next = [...prev];
|
|
19
19
|
next[idx] = step;
|
|
@@ -34,9 +34,9 @@ export default function AnalyzeUI({ dryRun }) {
|
|
|
34
34
|
if (finished && (key.return || key.escape))
|
|
35
35
|
exit();
|
|
36
36
|
}, { isActive: !isCI });
|
|
37
|
-
const doneCount = steps.filter(s => s.status ===
|
|
38
|
-
const errorCount = steps.filter(s => s.status ===
|
|
39
|
-
const notInstalled = steps.some(s => s.status ===
|
|
37
|
+
const doneCount = steps.filter((s) => s.status === "done").length;
|
|
38
|
+
const errorCount = steps.filter((s) => s.status === "error").length;
|
|
39
|
+
const notInstalled = steps.some((s) => s.status === "error" && s.detail?.includes("not found"));
|
|
40
40
|
const elapsed = finished
|
|
41
41
|
? `${((Date.now() - startTime) / 1000).toFixed(1)}s`
|
|
42
42
|
: null;
|
|
@@ -45,52 +45,51 @@ export default function AnalyzeUI({ dryRun }) {
|
|
|
45
45
|
!finished && steps.length === 0 && (React.createElement(Box, { marginLeft: 2 },
|
|
46
46
|
React.createElement(Text, { color: theme.warning },
|
|
47
47
|
React.createElement(Spinner, { type: "dots" }),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
React.createElement(Box, { flexDirection: "column" }, steps.map(step => (React.createElement(Box, { key: step.id, marginLeft: 2 }, step.status === 'running' ? (React.createElement(Text, { color: theme.warning },
|
|
48
|
+
" Checking for repoforge..."))),
|
|
49
|
+
React.createElement(Box, { flexDirection: "column" }, steps.map((step) => (React.createElement(Box, { key: step.id, marginLeft: 2 }, step.status === "running" ? (React.createElement(Text, { color: theme.warning },
|
|
51
50
|
React.createElement(Spinner, { type: "dots" }),
|
|
52
|
-
|
|
53
|
-
step.label)) : step.status ===
|
|
54
|
-
|
|
51
|
+
" ",
|
|
52
|
+
step.label)) : step.status === "done" ? (React.createElement(Text, { color: theme.success },
|
|
53
|
+
"\u2713",
|
|
55
54
|
" ",
|
|
56
55
|
step.label,
|
|
57
|
-
step.detail && React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
58
|
-
"
|
|
59
|
-
step.detail))) : step.status ===
|
|
60
|
-
|
|
56
|
+
step.detail && (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
57
|
+
" ",
|
|
58
|
+
step.detail)))) : step.status === "error" ? (React.createElement(Text, { color: theme.error },
|
|
59
|
+
"\u2717",
|
|
61
60
|
" ",
|
|
62
61
|
step.label,
|
|
63
|
-
step.detail && React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
64
|
-
"
|
|
65
|
-
step.detail))) : (React.createElement(Text, { color: theme.muted },
|
|
66
|
-
|
|
62
|
+
step.detail && (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
63
|
+
" ",
|
|
64
|
+
step.detail)))) : (React.createElement(Text, { color: theme.muted },
|
|
65
|
+
"\u2013",
|
|
67
66
|
" ",
|
|
68
67
|
step.label,
|
|
69
68
|
step.detail && React.createElement(Text, { dimColor: true },
|
|
70
|
-
"
|
|
69
|
+
" ",
|
|
71
70
|
step.detail))))))),
|
|
72
71
|
finished && notInstalled && (React.createElement(Box, { marginTop: 1, flexDirection: "column", marginLeft: 2 },
|
|
73
72
|
React.createElement(Text, { color: theme.warning, bold: true }, "repoforge is not installed"),
|
|
74
73
|
React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
75
|
-
React.createElement(Text, { color: theme.muted }, "
|
|
76
|
-
React.createElement(Text, { color: theme.primary }, "
|
|
77
|
-
React.createElement(Text, { color: theme.muted }, "
|
|
78
|
-
React.createElement(Text, { color: theme.primary }, "
|
|
74
|
+
React.createElement(Text, { color: theme.muted }, " Install it with:"),
|
|
75
|
+
React.createElement(Text, { color: theme.primary }, " pip install repoforge"),
|
|
76
|
+
React.createElement(Text, { color: theme.muted }, " Then run:"),
|
|
77
|
+
React.createElement(Text, { color: theme.primary }, " javi-forge analyze")))),
|
|
79
78
|
finished && (React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
80
79
|
React.createElement(Text, { bold: true, color: errorCount > 0 ? theme.warning : theme.success },
|
|
81
|
-
dryRun ?
|
|
82
|
-
elapsed && React.createElement(Text, { color: theme.muted },
|
|
83
|
-
"
|
|
84
|
-
elapsed)),
|
|
80
|
+
dryRun ? "\u25cb Dry run complete" : "\u2713 Analysis complete",
|
|
81
|
+
elapsed && (React.createElement(Text, { color: theme.muted },
|
|
82
|
+
" Completed in ",
|
|
83
|
+
elapsed))),
|
|
85
84
|
doneCount > 0 && (React.createElement(Text, { color: theme.success },
|
|
86
|
-
"
|
|
87
|
-
|
|
85
|
+
" ",
|
|
86
|
+
"\u2713",
|
|
88
87
|
" ",
|
|
89
88
|
doneCount,
|
|
90
89
|
" checks passed")),
|
|
91
90
|
errorCount > 0 && (React.createElement(Text, { color: theme.error },
|
|
92
|
-
"
|
|
93
|
-
|
|
91
|
+
" ",
|
|
92
|
+
"\u2717",
|
|
94
93
|
" ",
|
|
95
94
|
errorCount,
|
|
96
95
|
" errors")),
|
package/dist/ui/App.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CIProvider, HookProfile, MemoryOption, Stack } from "../types/index.js";
|
|
3
3
|
interface AppProps {
|
|
4
4
|
dryRun?: boolean;
|
|
5
5
|
presetStack?: Stack;
|
|
@@ -8,7 +8,9 @@ interface AppProps {
|
|
|
8
8
|
presetName?: string;
|
|
9
9
|
presetGhagga?: boolean;
|
|
10
10
|
presetMock?: boolean;
|
|
11
|
+
presetLocalAi?: boolean;
|
|
12
|
+
presetHookProfile?: HookProfile;
|
|
11
13
|
}
|
|
12
|
-
export default function App({ dryRun, presetStack, presetCI, presetMemory, presetName, presetGhagga, presetMock, }: AppProps): React.JSX.Element;
|
|
14
|
+
export default function App({ dryRun, presetStack, presetCI, presetMemory, presetName, presetGhagga, presetMock, presetLocalAi, presetHookProfile, }: AppProps): React.JSX.Element;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=App.d.ts.map
|
package/dist/ui/App.js
CHANGED
|
@@ -1,54 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Box } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import OptionSelector from
|
|
11
|
-
import Progress from
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const [
|
|
17
|
-
const [
|
|
18
|
-
const [
|
|
19
|
-
const [
|
|
20
|
-
const [
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { Box } from "ink";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { initProject } from "../commands/init.js";
|
|
5
|
+
import CISelector from "./CISelector.js";
|
|
6
|
+
import Header from "./Header.js";
|
|
7
|
+
import HookProfileSelector from "./HookProfileSelector.js";
|
|
8
|
+
import MemorySelector from "./MemorySelector.js";
|
|
9
|
+
import NameInput from "./NameInput.js";
|
|
10
|
+
import OptionSelector from "./OptionSelector.js";
|
|
11
|
+
import Progress from "./Progress.js";
|
|
12
|
+
import StackSelector from "./StackSelector.js";
|
|
13
|
+
import Summary from "./Summary.js";
|
|
14
|
+
import Welcome from "./Welcome.js";
|
|
15
|
+
export default function App({ dryRun = false, presetStack, presetCI, presetMemory, presetName, presetGhagga = false, presetMock = false, presetLocalAi = false, presetHookProfile, }) {
|
|
16
|
+
const [stage, setStage] = useState("welcome");
|
|
17
|
+
const [projectName, setProjectName] = useState(presetName ?? "");
|
|
18
|
+
const [projectDir, setProjectDir] = useState(presetName ? path.resolve(process.cwd(), presetName) : "");
|
|
19
|
+
const [stack, setStack] = useState(presetStack ?? "node");
|
|
20
|
+
const [ciProvider, setCIProvider] = useState(presetCI ?? "github");
|
|
21
|
+
const [memory, setMemory] = useState(presetMemory ?? "engram");
|
|
21
22
|
const [aiSync, setAiSync] = useState(true);
|
|
22
23
|
const [sdd, setSdd] = useState(true);
|
|
23
24
|
const [contextDir, setContextDir] = useState(true);
|
|
24
25
|
const [claudeMd, setClaudeMd] = useState(true);
|
|
25
26
|
const [ghagga, setGhagga] = useState(presetGhagga);
|
|
27
|
+
const [securityHooks, setSecurityHooks] = useState(true);
|
|
28
|
+
const [hookProfile, setHookProfile] = useState(presetHookProfile ?? "standard");
|
|
29
|
+
const [codeGraph, setCodeGraph] = useState(false);
|
|
30
|
+
const [localAi, setLocalAi] = useState(false);
|
|
26
31
|
const [steps, setSteps] = useState([]);
|
|
27
32
|
const [startTime] = useState(Date.now());
|
|
28
33
|
const handleNameConfirm = (name, dir) => {
|
|
29
34
|
setProjectName(name);
|
|
30
35
|
setProjectDir(dir);
|
|
31
|
-
setStage(presetStack ?
|
|
36
|
+
setStage(presetStack ? "ci" : "stack");
|
|
32
37
|
};
|
|
33
38
|
const handleStackConfirm = (s) => {
|
|
34
39
|
setStack(s);
|
|
35
|
-
setStage(presetCI ?
|
|
40
|
+
setStage(presetCI ? "memory" : "ci");
|
|
36
41
|
};
|
|
37
42
|
const handleCIConfirm = (p) => {
|
|
38
43
|
setCIProvider(p);
|
|
39
|
-
setStage(presetMemory ?
|
|
44
|
+
setStage(presetMemory ? "options" : "memory");
|
|
40
45
|
};
|
|
41
46
|
const handleMemoryConfirm = (m) => {
|
|
42
47
|
setMemory(m);
|
|
43
|
-
setStage(
|
|
48
|
+
setStage("options");
|
|
44
49
|
};
|
|
45
|
-
const handleOptionsConfirm =
|
|
50
|
+
const handleOptionsConfirm = (opts) => {
|
|
46
51
|
setAiSync(opts.aiSync);
|
|
47
52
|
setSdd(opts.sdd);
|
|
48
53
|
setContextDir(opts.contextDir);
|
|
49
54
|
setClaudeMd(opts.claudeMd);
|
|
50
55
|
setGhagga(opts.ghagga);
|
|
51
|
-
|
|
56
|
+
setSecurityHooks(opts.securityHooks);
|
|
57
|
+
setCodeGraph(opts.codeGraph);
|
|
58
|
+
setLocalAi(opts.localAi);
|
|
59
|
+
// If securityHooks is selected, ask for profile; otherwise skip to running
|
|
60
|
+
if (opts.securityHooks) {
|
|
61
|
+
setStage("hook-profile");
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
void runInit({ ...opts, hookProfile });
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const handleHookProfileConfirm = (profile) => {
|
|
68
|
+
setHookProfile(profile);
|
|
69
|
+
void runInit({
|
|
70
|
+
aiSync,
|
|
71
|
+
sdd,
|
|
72
|
+
contextDir,
|
|
73
|
+
claudeMd,
|
|
74
|
+
ghagga,
|
|
75
|
+
securityHooks,
|
|
76
|
+
codeGraph,
|
|
77
|
+
localAi,
|
|
78
|
+
hookProfile: profile,
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const runInit = async (opts) => {
|
|
82
|
+
setStage("running");
|
|
52
83
|
await initProject({
|
|
53
84
|
projectName,
|
|
54
85
|
projectDir,
|
|
@@ -60,10 +91,16 @@ export default function App({ dryRun = false, presetStack, presetCI, presetMemor
|
|
|
60
91
|
ghagga: opts.ghagga,
|
|
61
92
|
contextDir: opts.contextDir,
|
|
62
93
|
claudeMd: opts.claudeMd,
|
|
94
|
+
securityHooks: opts.securityHooks,
|
|
95
|
+
hookProfile: opts.hookProfile,
|
|
96
|
+
codeGraph: opts.codeGraph,
|
|
97
|
+
localAi: opts.localAi,
|
|
98
|
+
dockerDeploy: false,
|
|
99
|
+
dockerServiceName: "app",
|
|
63
100
|
mock: presetMock,
|
|
64
101
|
dryRun,
|
|
65
|
-
}, (step) => setSteps(prev => {
|
|
66
|
-
const idx = prev.findIndex(s => s.id === step.id);
|
|
102
|
+
}, (step) => setSteps((prev) => {
|
|
103
|
+
const idx = prev.findIndex((s) => s.id === step.id);
|
|
67
104
|
if (idx >= 0) {
|
|
68
105
|
const next = [...prev];
|
|
69
106
|
next[idx] = step;
|
|
@@ -71,37 +108,40 @@ export default function App({ dryRun = false, presetStack, presetCI, presetMemor
|
|
|
71
108
|
}
|
|
72
109
|
return [...prev, step];
|
|
73
110
|
}));
|
|
74
|
-
setStage(
|
|
111
|
+
setStage("done");
|
|
75
112
|
};
|
|
76
|
-
const subtitle = stage ===
|
|
77
|
-
|
|
78
|
-
|
|
113
|
+
const subtitle = stage === "running"
|
|
114
|
+
? "scaffolding..."
|
|
115
|
+
: stage === "done"
|
|
116
|
+
? "complete"
|
|
117
|
+
: undefined;
|
|
79
118
|
return (React.createElement(Box, { flexDirection: "column", padding: 1 },
|
|
80
|
-
stage !==
|
|
81
|
-
stage ===
|
|
119
|
+
stage !== "welcome" && React.createElement(Header, { subtitle: subtitle, dryRun: dryRun }),
|
|
120
|
+
stage === "welcome" && (React.createElement(Welcome, { onDone: () => {
|
|
82
121
|
// Skip stages for which presets are already provided
|
|
83
122
|
if (presetName && presetStack && presetCI && presetMemory) {
|
|
84
|
-
setStage(
|
|
123
|
+
setStage("options");
|
|
85
124
|
}
|
|
86
125
|
else if (presetName && presetStack && presetCI) {
|
|
87
|
-
setStage(
|
|
126
|
+
setStage("memory");
|
|
88
127
|
}
|
|
89
128
|
else if (presetName && presetStack) {
|
|
90
|
-
setStage(
|
|
129
|
+
setStage("ci");
|
|
91
130
|
}
|
|
92
131
|
else if (presetName) {
|
|
93
|
-
setStage(
|
|
132
|
+
setStage("stack");
|
|
94
133
|
}
|
|
95
134
|
else {
|
|
96
|
-
setStage(
|
|
135
|
+
setStage("name");
|
|
97
136
|
}
|
|
98
137
|
} })),
|
|
99
|
-
stage ===
|
|
100
|
-
stage ===
|
|
101
|
-
stage ===
|
|
102
|
-
stage ===
|
|
103
|
-
stage ===
|
|
104
|
-
stage ===
|
|
105
|
-
stage ===
|
|
138
|
+
stage === "name" && (React.createElement(NameInput, { defaultName: projectName || "my-project", onConfirm: handleNameConfirm })),
|
|
139
|
+
stage === "stack" && (React.createElement(StackSelector, { projectDir: projectDir || process.cwd(), onConfirm: handleStackConfirm })),
|
|
140
|
+
stage === "ci" && React.createElement(CISelector, { onConfirm: handleCIConfirm }),
|
|
141
|
+
stage === "memory" && React.createElement(MemorySelector, { onConfirm: handleMemoryConfirm }),
|
|
142
|
+
stage === "options" && (React.createElement(OptionSelector, { onConfirm: handleOptionsConfirm, presetGhagga: presetGhagga, presetLocalAi: presetLocalAi })),
|
|
143
|
+
stage === "hook-profile" && (React.createElement(HookProfileSelector, { onConfirm: handleHookProfileConfirm, presetProfile: presetHookProfile })),
|
|
144
|
+
stage === "running" && (React.createElement(Progress, { steps: steps, projectName: projectName, contextLine: `${projectName} (${stack} + ${ciProvider})`, onDone: () => setStage("done") })),
|
|
145
|
+
stage === "done" && (React.createElement(Summary, { steps: steps, dryRun: dryRun, projectName: projectName, stack: stack, elapsedMs: Date.now() - startTime }))));
|
|
106
146
|
}
|
|
107
147
|
//# sourceMappingURL=App.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface AutoSkillsProps {
|
|
3
|
+
projectDir: string;
|
|
4
|
+
skillsDir?: string;
|
|
5
|
+
dryRun?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default function AutoSkills({ projectDir, skillsDir, dryRun, }: AutoSkillsProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=AutoSkills.d.ts.map
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Box, Text, useApp, useInput } from "ink";
|
|
2
|
+
import Spinner from "ink-spinner";
|
|
3
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { autoInstallSkills } from "../lib/auto-skill-install.js";
|
|
5
|
+
import { useCIMode } from "./CIContext.js";
|
|
6
|
+
import Header from "./Header.js";
|
|
7
|
+
import { theme } from "./theme.js";
|
|
8
|
+
export default function AutoSkills({ projectDir, skillsDir, dryRun, }) {
|
|
9
|
+
const { exit } = useApp();
|
|
10
|
+
const isCI = useCIMode();
|
|
11
|
+
const [result, setResult] = useState(null);
|
|
12
|
+
const [error, setError] = useState(null);
|
|
13
|
+
const [loading, setLoading] = useState(true);
|
|
14
|
+
const runDetection = useCallback(() => {
|
|
15
|
+
setLoading(true);
|
|
16
|
+
setResult(null);
|
|
17
|
+
setError(null);
|
|
18
|
+
autoInstallSkills({
|
|
19
|
+
projectDir,
|
|
20
|
+
skillsSourceDir: skillsDir,
|
|
21
|
+
skillsTargetDir: skillsDir,
|
|
22
|
+
dryRun: dryRun ?? false,
|
|
23
|
+
})
|
|
24
|
+
.then((r) => {
|
|
25
|
+
setResult(r);
|
|
26
|
+
setLoading(false);
|
|
27
|
+
})
|
|
28
|
+
.catch((e) => {
|
|
29
|
+
setError(String(e));
|
|
30
|
+
setLoading(false);
|
|
31
|
+
});
|
|
32
|
+
}, [projectDir, skillsDir, dryRun]);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
runDetection();
|
|
35
|
+
}, [runDetection]);
|
|
36
|
+
// Auto-exit in CI mode once loading finishes
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (isCI && !loading) {
|
|
39
|
+
const t = setTimeout(() => exit(), 100);
|
|
40
|
+
return () => clearTimeout(t);
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}, [isCI, loading, exit]);
|
|
44
|
+
useInput((input, key) => {
|
|
45
|
+
if (input.toLowerCase() === "r")
|
|
46
|
+
runDetection();
|
|
47
|
+
if (input.toLowerCase() === "q" || key.return || key.escape)
|
|
48
|
+
exit();
|
|
49
|
+
}, { isActive: !isCI });
|
|
50
|
+
const totalSkills = result
|
|
51
|
+
? result.installed.length + result.skipped.length + result.notFound.length
|
|
52
|
+
: 0;
|
|
53
|
+
return (React.createElement(Box, { flexDirection: "column", padding: 1 },
|
|
54
|
+
React.createElement(Header, { subtitle: "skills auto", dryRun: dryRun }),
|
|
55
|
+
loading && (React.createElement(Text, { color: theme.warning },
|
|
56
|
+
React.createElement(Spinner, { type: "dots" }),
|
|
57
|
+
" Detecting project stack...")),
|
|
58
|
+
error && (React.createElement(Text, { color: theme.error },
|
|
59
|
+
"\u2717",
|
|
60
|
+
" Error: ",
|
|
61
|
+
error)),
|
|
62
|
+
result && (React.createElement(Box, { flexDirection: "column" },
|
|
63
|
+
React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
64
|
+
React.createElement(Text, { bold: true, color: theme.primary },
|
|
65
|
+
" ",
|
|
66
|
+
"Stack Detection"),
|
|
67
|
+
React.createElement(Box, { marginLeft: 2 },
|
|
68
|
+
React.createElement(Text, { color: result.detection.stack ? theme.success : theme.warning },
|
|
69
|
+
result.detection.stack ? "\u2713" : "\u2717",
|
|
70
|
+
" ",
|
|
71
|
+
result.detection.stack
|
|
72
|
+
? `Detected: ${result.detection.stack}`
|
|
73
|
+
: "No stack detected"))),
|
|
74
|
+
result.detection.signals.length > 0 && (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
75
|
+
React.createElement(Text, { bold: true, color: theme.primary },
|
|
76
|
+
" ",
|
|
77
|
+
"Signals (",
|
|
78
|
+
result.detection.signals.length,
|
|
79
|
+
")"),
|
|
80
|
+
result.detection.signals.map((s, i) => (React.createElement(Box, { key: `signal-${i}`, marginLeft: 4 },
|
|
81
|
+
React.createElement(Text, { color: theme.muted }, s.signal),
|
|
82
|
+
React.createElement(Text, { dimColor: true, color: theme.muted },
|
|
83
|
+
" ",
|
|
84
|
+
"via ",
|
|
85
|
+
s.source),
|
|
86
|
+
React.createElement(Text, { color: theme.accent },
|
|
87
|
+
" \u2192 ",
|
|
88
|
+
s.skills.join(", "))))))),
|
|
89
|
+
React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
90
|
+
React.createElement(Text, { bold: true, color: theme.primary },
|
|
91
|
+
" ",
|
|
92
|
+
"Skills (",
|
|
93
|
+
totalSkills,
|
|
94
|
+
")"),
|
|
95
|
+
result.installed.length > 0 && (React.createElement(Box, { flexDirection: "column" }, result.installed.map((name) => (React.createElement(Box, { key: name, marginLeft: 4 },
|
|
96
|
+
React.createElement(Text, { color: theme.success },
|
|
97
|
+
dryRun ? "\u25CB" : "\u2713",
|
|
98
|
+
" ",
|
|
99
|
+
name),
|
|
100
|
+
React.createElement(Text, { dimColor: true, color: theme.muted },
|
|
101
|
+
" ",
|
|
102
|
+
dryRun ? "would install" : "installed")))))),
|
|
103
|
+
result.skipped.length > 0 && (React.createElement(Box, { flexDirection: "column" }, result.skipped.map((name) => (React.createElement(Box, { key: name, marginLeft: 4 },
|
|
104
|
+
React.createElement(Text, { color: theme.muted },
|
|
105
|
+
"\u2500",
|
|
106
|
+
" ",
|
|
107
|
+
name),
|
|
108
|
+
React.createElement(Text, { dimColor: true, color: theme.muted },
|
|
109
|
+
" ",
|
|
110
|
+
"already present")))))),
|
|
111
|
+
result.notFound.length > 0 && (React.createElement(Box, { flexDirection: "column" }, result.notFound.map((name) => (React.createElement(Box, { key: name, marginLeft: 4 },
|
|
112
|
+
React.createElement(Text, { color: theme.warning },
|
|
113
|
+
"?",
|
|
114
|
+
" ",
|
|
115
|
+
name),
|
|
116
|
+
React.createElement(Text, { dimColor: true, color: theme.warning },
|
|
117
|
+
" ",
|
|
118
|
+
"not found in source")))))),
|
|
119
|
+
totalSkills === 0 && (React.createElement(Box, { marginLeft: 4 },
|
|
120
|
+
React.createElement(Text, { color: theme.muted }, "No skills recommended for this stack")))))),
|
|
121
|
+
!loading && (React.createElement(Box, { marginTop: 1 },
|
|
122
|
+
React.createElement(Text, { color: theme.muted, dimColor: true }, "Press r to re-scan, q to quit")))));
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=AutoSkills.js.map
|
package/dist/ui/CI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { CIOptions } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CIOptions } from "../commands/ci.js";
|
|
3
3
|
interface CIProps extends CIOptions {
|
|
4
4
|
/** Called when CI finishes (success or failure) */
|
|
5
5
|
onDone?: (success: boolean) => void;
|
package/dist/ui/CI.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { runCI } from
|
|
5
|
-
import Header from
|
|
6
|
-
import { theme } from
|
|
1
|
+
import { Box, Text, useApp } from "ink";
|
|
2
|
+
import Spinner from "ink-spinner";
|
|
3
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { runCI } from "../commands/ci.js";
|
|
5
|
+
import Header from "./Header.js";
|
|
6
|
+
import { theme } from "./theme.js";
|
|
7
7
|
// =============================================================================
|
|
8
8
|
// Icons
|
|
9
9
|
// =============================================================================
|
|
10
10
|
const STATUS_ICON = {
|
|
11
|
-
pending:
|
|
12
|
-
running:
|
|
13
|
-
done:
|
|
14
|
-
error:
|
|
15
|
-
skipped:
|
|
11
|
+
pending: "○",
|
|
12
|
+
running: "●",
|
|
13
|
+
done: "✓",
|
|
14
|
+
error: "✗",
|
|
15
|
+
skipped: "–",
|
|
16
16
|
};
|
|
17
17
|
const STATUS_COLOR = {
|
|
18
18
|
pending: theme.muted,
|
|
@@ -35,8 +35,8 @@ export default function CI(props) {
|
|
|
35
35
|
return;
|
|
36
36
|
started.current = true;
|
|
37
37
|
const onStep = (step) => {
|
|
38
|
-
setSteps(prev => {
|
|
39
|
-
const idx = prev.findIndex(s => s.id === step.id);
|
|
38
|
+
setSteps((prev) => {
|
|
39
|
+
const idx = prev.findIndex((s) => s.id === step.id);
|
|
40
40
|
if (idx >= 0) {
|
|
41
41
|
const next = [...prev];
|
|
42
42
|
next[idx] = step;
|
|
@@ -64,28 +64,26 @@ export default function CI(props) {
|
|
|
64
64
|
});
|
|
65
65
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
66
66
|
}, []);
|
|
67
|
-
const mode = props.mode ??
|
|
68
|
-
const subtitle = mode ===
|
|
67
|
+
const mode = props.mode ?? "full";
|
|
68
|
+
const subtitle = mode === "quick" ? "ci — quick" : mode === "shell" ? "ci — shell" : "ci";
|
|
69
69
|
return (React.createElement(Box, { flexDirection: "column", padding: 1 },
|
|
70
70
|
React.createElement(Header, { subtitle: subtitle }),
|
|
71
|
-
React.createElement(Box, { flexDirection: "column", marginBottom: 1 }, steps.map(step => (React.createElement(Box, { key: step.id },
|
|
71
|
+
React.createElement(Box, { flexDirection: "column", marginBottom: 1 }, steps.map((step) => (React.createElement(Box, { key: step.id },
|
|
72
72
|
React.createElement(Text, { color: STATUS_COLOR[step.status] },
|
|
73
|
-
step.status ===
|
|
74
|
-
? React.createElement(Spinner, { type: "dots" })
|
|
75
|
-
: `${STATUS_ICON[step.status]} `,
|
|
73
|
+
step.status === "running" ? (React.createElement(Spinner, { type: "dots" })) : (`${STATUS_ICON[step.status]} `),
|
|
76
74
|
step.label,
|
|
77
|
-
step.detail
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
step.detail)
|
|
81
|
-
: null))))),
|
|
75
|
+
step.detail ? (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
76
|
+
" ",
|
|
77
|
+
step.detail)) : null))))),
|
|
82
78
|
done && success === true && (React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
83
79
|
React.createElement(Text, { color: theme.success, bold: true }, "\u2713 CI passed \u2014 safe to push!"))),
|
|
84
80
|
done && success === false && (React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
85
81
|
React.createElement(Text, { color: theme.error, bold: true }, "\u2717 CI failed \u2014 fix the issues above before pushing."),
|
|
86
|
-
React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
82
|
+
React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
83
|
+
" ",
|
|
84
|
+
"To skip: git push --no-verify"))),
|
|
87
85
|
!done && steps.length === 0 && (React.createElement(Text, { color: theme.warning },
|
|
88
86
|
React.createElement(Spinner, { type: "dots" }),
|
|
89
|
-
|
|
87
|
+
" Starting CI..."))));
|
|
90
88
|
}
|
|
91
89
|
//# sourceMappingURL=CI.js.map
|
package/dist/ui/CIContext.d.ts
CHANGED
package/dist/ui/CIContext.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { createContext, useContext } from
|
|
1
|
+
import React, { createContext, useContext } from "react";
|
|
2
2
|
const CIContext = createContext({ isCI: false });
|
|
3
3
|
export function useCIMode() {
|
|
4
4
|
return useContext(CIContext).isCI;
|
|
5
5
|
}
|
|
6
6
|
export function CIProvider({ isCI, children }) {
|
|
7
|
-
return
|
|
7
|
+
return React.createElement(CIContext.Provider, { value: { isCI } }, children);
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=CIContext.js.map
|
package/dist/ui/CISelector.d.ts
CHANGED