pan-stack-cli 0.1.5 → 0.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/README.md +572 -24
- package/bin/pan.js +204 -21
- package/lib/ai-skills.js +829 -0
- package/lib/create.js +22 -4
- package/lib/discover.js +59 -1
- package/lib/git/git-checkout.js +395 -0
- package/lib/git/git-clone.js +162 -27
- package/lib/git/git-fetch-all.js +100 -33
- package/lib/git/git-grv.js +68 -37
- package/lib/git/git-gst.js +97 -26
- package/lib/git/git-mr.js +546 -0
- package/lib/git/git-pull.js +104 -43
- package/lib/git/git-push.js +150 -41
- package/lib/git/git-sync-main.js +42 -28
- package/lib/git/helpers/bulk-report.js +202 -0
- package/lib/git/helpers/cli.js +40 -5
- package/lib/git/helpers/manifest.js +93 -0
- package/lib/git/helpers/repo-select.js +328 -9
- package/lib/git/helpers/repo-summary.js +161 -0
- package/lib/i18n.js +61 -0
- package/lib/inquirer-theme.js +20 -0
- package/lib/language.js +121 -0
- package/lib/languages.js +14 -0
- package/lib/manifest.js +115 -14
- package/lib/menu-prompt.js +201 -0
- package/lib/menu.js +134 -0
- package/lib/messages.js +647 -0
- package/lib/run-command.js +173 -52
- package/lib/select.js +0 -0
- package/lib/serve.js +75 -0
- package/lib/skill-registry-client.js +173 -0
- package/lib/stats/aggregate.js +51 -0
- package/lib/stats/identity.js +20 -0
- package/lib/stats/index.js +189 -0
- package/lib/stats/parse.js +46 -0
- package/lib/stats/range.js +38 -0
- package/lib/stats/report.js +264 -0
- package/lib/stats/review.js +157 -0
- package/lib/stats/scan.js +92 -0
- package/lib/stats/serve.js +25 -0
- package/lib/ui/api.js +202 -0
- package/lib/ui/clone.js +115 -0
- package/lib/ui/config.js +182 -0
- package/lib/ui/diff.js +128 -0
- package/lib/ui/export-gate.js +79 -0
- package/lib/ui/gen-react-mobile-code.js +6 -0
- package/lib/ui/gen-react-web-code.js +75 -0
- package/lib/ui/index.js +89 -0
- package/lib/ui/init.js +252 -0
- package/lib/ui/login.js +128 -0
- package/lib/ui/logout.js +22 -0
- package/lib/ui/palettes.js +103 -0
- package/lib/ui/published-html.js +24 -0
- package/lib/ui/sync.js +137 -0
- package/lib/ui/workspace.js +213 -0
- package/package.json +10 -3
- package/templates/workspace/.claude/skills/writing-guidelines/SKILL.md +0 -48
- package/templates/workspace/.codex/skills/writing-guidelines/SKILL.md +0 -48
- package/templates/workspace/.cursor/skills/writing-guidelines/SKILL.md +0 -48
- package/templates/workspace/.pan.yaml +0 -25
- package/templates/workspace/.project.yaml +0 -15
- package/templates/workspace/README.md +0 -35
package/lib/git/git-gst.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* Git status for PAN Stack project repositories.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Default: compact summary — only repos with changes and file counts.
|
|
6
|
+
* Use --verbose or pass git status args for full git status output.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
const { parseCommonArgs, loadManifestRepos, printCommonOptions } = require("./helpers/cli");
|
|
9
10
|
const { ensureRepoExists, isGitRepo, runGitStatus } = require("./helpers/git");
|
|
11
|
+
const { getRepoStatusSummary, printChangeSummary } = require("./helpers/repo-summary");
|
|
10
12
|
|
|
11
13
|
function printRepoStatus({ label, destination, dryRun, gitArgs }) {
|
|
12
14
|
const statusArgs = gitArgs.length > 0 ? gitArgs.join(" ") : "";
|
|
@@ -21,37 +23,61 @@ function printRepoStatus({ label, destination, dryRun, gitArgs }) {
|
|
|
21
23
|
console.log("");
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
function
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
26
|
+
function collectRepoStatus({ name, destination, dryRun }) {
|
|
27
|
+
if (dryRun) {
|
|
28
|
+
return {
|
|
29
|
+
name,
|
|
30
|
+
destination,
|
|
31
|
+
branch: "",
|
|
32
|
+
total: 0,
|
|
33
|
+
staged: 0,
|
|
34
|
+
unstaged: 0,
|
|
35
|
+
untracked: 0,
|
|
36
|
+
dryRun: true,
|
|
37
|
+
};
|
|
27
38
|
}
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
40
|
+
const summary = getRepoStatusSummary(destination);
|
|
41
|
+
return {
|
|
42
|
+
name,
|
|
43
|
+
destination,
|
|
44
|
+
...summary,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function printSummaryDryRun({ totalRepos, includeWorkspace, repoCount }) {
|
|
49
|
+
console.log("");
|
|
50
|
+
console.log("[dry-run] gst summary");
|
|
51
|
+
console.log(
|
|
52
|
+
`[dry-run] would scan ${totalRepos} repo(s)` +
|
|
53
|
+
(includeWorkspace ? " (workspace + manifest)" : " (manifest only)")
|
|
54
|
+
);
|
|
55
|
+
console.log(`[dry-run] manifest repos: ${repoCount}`);
|
|
35
56
|
}
|
|
36
57
|
|
|
37
58
|
function printHelp() {
|
|
38
|
-
console.log(`usage: git-gst.js [--base-dir BASE_DIR] [--dry-run] [--no-workspace] [manifest] [git status args...]
|
|
59
|
+
console.log(`usage: git-gst.js [--base-dir BASE_DIR] [--dry-run] [--no-workspace] [--verbose] [manifest] [git status args...]
|
|
39
60
|
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
Show a compact summary of repos with uncommitted changes (default).
|
|
62
|
+
Only dirty repos are listed with file counts; clean repos are hidden.
|
|
42
63
|
|
|
43
64
|
${printCommonOptions()}
|
|
44
|
-
--no-workspace Skip workspace root (manifest repos only)
|
|
65
|
+
--no-workspace Skip workspace root (manifest repos only)
|
|
66
|
+
--verbose Full git status for every repo (legacy output)
|
|
67
|
+
[git status args] Implies --verbose (e.g. pan gst -sb)`);
|
|
45
68
|
}
|
|
46
69
|
|
|
47
70
|
function main() {
|
|
48
71
|
const args = parseCommonArgs(process.argv.slice(2), {
|
|
49
|
-
defaults: { noWorkspace: false, gitArgs: [] },
|
|
72
|
+
defaults: { noWorkspace: false, verbose: false, gitArgs: [] },
|
|
50
73
|
passthrough: true,
|
|
51
74
|
handlers: {
|
|
52
75
|
"--no-workspace": (parsed) => {
|
|
53
76
|
parsed.noWorkspace = true;
|
|
54
77
|
},
|
|
78
|
+
"--verbose": (parsed) => {
|
|
79
|
+
parsed.verbose = true;
|
|
80
|
+
},
|
|
55
81
|
},
|
|
56
82
|
});
|
|
57
83
|
if (args.help) {
|
|
@@ -60,30 +86,75 @@ function main() {
|
|
|
60
86
|
}
|
|
61
87
|
|
|
62
88
|
const gitArgs = args.gitArgs || [];
|
|
89
|
+
const verbose = args.verbose || gitArgs.length > 0;
|
|
63
90
|
const { repos, workspaceRoot } = loadManifestRepos({
|
|
64
91
|
manifestPath: args.manifest,
|
|
65
92
|
baseDir: args.baseDir,
|
|
66
93
|
});
|
|
67
94
|
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
95
|
+
if (verbose) {
|
|
96
|
+
if (!args.noWorkspace && isGitRepo(workspaceRoot)) {
|
|
97
|
+
printRepoStatus({
|
|
98
|
+
label: "workspace",
|
|
99
|
+
destination: workspaceRoot,
|
|
100
|
+
dryRun: args.dryRun,
|
|
101
|
+
gitArgs,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
for (const repo of repos) {
|
|
106
|
+
if (!ensureRepoExists({ name: repo.name, destination: repo.destination })) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
printRepoStatus({
|
|
110
|
+
label: repo.name,
|
|
111
|
+
destination: repo.destination,
|
|
112
|
+
dryRun: args.dryRun,
|
|
113
|
+
gitArgs,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const results = [];
|
|
120
|
+
|
|
121
|
+
if (!args.noWorkspace && isGitRepo(workspaceRoot)) {
|
|
122
|
+
results.push(
|
|
123
|
+
collectRepoStatus({
|
|
124
|
+
name: "workspace",
|
|
125
|
+
destination: workspaceRoot,
|
|
126
|
+
dryRun: args.dryRun,
|
|
127
|
+
})
|
|
128
|
+
);
|
|
74
129
|
}
|
|
75
130
|
|
|
76
131
|
for (const repo of repos) {
|
|
77
132
|
if (!ensureRepoExists({ name: repo.name, destination: repo.destination })) {
|
|
78
133
|
continue;
|
|
79
134
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
135
|
+
results.push(
|
|
136
|
+
collectRepoStatus({
|
|
137
|
+
name: repo.name,
|
|
138
|
+
destination: repo.destination,
|
|
139
|
+
dryRun: args.dryRun,
|
|
140
|
+
})
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (args.dryRun) {
|
|
145
|
+
printSummaryDryRun({
|
|
146
|
+
totalRepos: results.length,
|
|
147
|
+
includeWorkspace: !args.noWorkspace && isGitRepo(workspaceRoot),
|
|
148
|
+
repoCount: repos.length,
|
|
85
149
|
});
|
|
150
|
+
return;
|
|
86
151
|
}
|
|
152
|
+
|
|
153
|
+
printChangeSummary({
|
|
154
|
+
title: "gst summary",
|
|
155
|
+
results,
|
|
156
|
+
totalRepos: results.length,
|
|
157
|
+
});
|
|
87
158
|
}
|
|
88
159
|
|
|
89
160
|
try {
|