Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
07248b8
feat: add PubPascal integration and Cyber Resilience Act (CRA) compli…
isaquepinheiro Jul 16, 2026
e3eb863
chore: drop hand-written SBOM artifact and restore upstream go.mod
isaquepinheiro Jul 22, 2026
52703e5
fix(sbom): repair panic, emit valid CycloneDX, drop unsafe stub commands
isaquepinheiro Jul 22, 2026
2e9fbaf
fix(cli): wire portal login, group commands reliably, harden contribute
isaquepinheiro Jul 22, 2026
78e3caa
style: apply golangci-lint --fix
isaquepinheiro Jul 22, 2026
59d784c
revert: leave Windows-only files untouched
isaquepinheiro Jul 22, 2026
f608106
refactor(cli): split Execute, name commands by constant, extract proj…
isaquepinheiro Jul 22, 2026
79d989f
fix(pubpascal): close response bodies, carry a context into git/HTTP,…
isaquepinheiro Jul 22, 2026
df13357
test(cli): drop the nil-flag dereference, use t.Chdir, deduplicate lo…
isaquepinheiro Jul 22, 2026
3c08907
fix(workspace): stop indexing a split that may have one element
isaquepinheiro Jul 22, 2026
87327f4
Merge pull request #1 from isaquepinheiro/fix/pr263-blockers
isaquepinheiro Jul 22, 2026
c9ce3ef
fix(security): use #nosec so the standalone gosec scan sees the suppr…
isaquepinheiro Jul 22, 2026
938fcd6
Merge pull request #4 from isaquepinheiro/fix/gosec-nosec
isaquepinheiro Jul 22, 2026
88de5dc
fix: correct the SBOM, honour pinned refs, and drop unreachable commands
isaquepinheiro Jul 22, 2026
ceee5c5
refactor(pkg): remove the 'pack' stub and the unreachable login fallback
isaquepinheiro Jul 22, 2026
23ee7b1
fix(sbom): reject an unsupported --format instead of silently falling…
isaquepinheiro Jul 22, 2026
580edf3
fix(workspace): keep the .dproj search path order deterministic
isaquepinheiro Jul 22, 2026
57b03e0
docs(pubpascal): correct two comments that promised more than the cod…
isaquepinheiro Jul 22, 2026
fde86f4
fix(contribute): trim the portal URL, bound the body, keep the error …
isaquepinheiro Jul 22, 2026
9f7b0d2
fix(cra): exit 1 when a required compliance signal is missing
isaquepinheiro Jul 22, 2026
e99d3b9
fix(cli): only the first argument selects the minimal setup
isaquepinheiro Jul 22, 2026
ac36d53
chore: drop SECURITY.md and the CRA badge from this contribution
isaquepinheiro Jul 22, 2026
5e45665
Merge pull request #8 from isaquepinheiro/fix/review-round3
isaquepinheiro Jul 22, 2026
8f4aa25
fix(workspace): resolve a "<slug>@<version>" reference before cloning
isaquepinheiro Jul 22, 2026
65ab319
feat(workspace): add the list, search, diff, pull and commit sub-comm…
isaquepinheiro Jul 22, 2026
dc691aa
feat(workspace): report the workspace graph with 'status [<id>] [--js…
isaquepinheiro Jul 22, 2026
ae9d612
Merge pull request #11 from isaquepinheiro/fix/resolve-workspace-ref
isaquepinheiro Jul 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
362 changes: 168 additions & 194 deletions README.md

Large diffs are not rendered by default.

59 changes: 58 additions & 1 deletion internal/adapters/primary/cli/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestRootCommand(t *testing.T) {
t.Run("register commands", func(t *testing.T) {
// These should not panic
versionCmdRegister(root)
pubpascalCmdRegister(root)

// Verify command was added
if root.Commands() == nil {
Expand All @@ -39,7 +40,7 @@ func TestVersionCommand(t *testing.T) {
// Find the version command
var versionCmd *cobra.Command
for _, cmd := range root.Commands() {
if cmd.Use == "version" {
if cmd.Use == cmdNameVersion {
versionCmd = cmd
break
}
Expand Down Expand Up @@ -117,6 +118,8 @@ func TestCommandHelp(t *testing.T) {
// Register all commands
versionCmdRegister(root)
installCmdRegister(root)
pubpascalCmdRegister(root)
craCmdRegister(root)

for _, cmd := range root.Commands() {
t.Run(cmd.Use, func(t *testing.T) {
Expand Down Expand Up @@ -160,3 +163,57 @@ func TestRootHelp(t *testing.T) {
t.Error("Root command should produce help output")
}
}

// findCommand returns the direct sub-command of parent with the given name.
func findCommand(parent *cobra.Command, name string) *cobra.Command {
for _, cmd := range parent.Commands() {
if cmd.Name() == name {
return cmd
}
}

return nil
}

// assertSubcommands reports every expected sub-command missing from parent.
func assertSubcommands(t *testing.T, parent *cobra.Command, label string, names []string) {
t.Helper()

for _, name := range names {
if findCommand(parent, name) == nil {
t.Errorf("%s subcommand '%s' not found", label, name)
}
}
}

// TestPubPascalCommands tests that the PubPascal commands are registered correctly.
func TestPubPascalCommands(t *testing.T) {
root := &cobra.Command{Use: "boss"}
pubpascalCmdRegister(root)

// Check workspace command and its subcommands
workspaceCmd := findCommand(root, "workspace")
if workspaceCmd == nil {
t.Fatal("Workspace command not found")
}
// list/search/diff/pull/commit are the sub-commands the PubPascal desktop
// app and the RAD Studio (OTA) plugin spawn. While they were missing, cobra
// answered "boss workspace pull" by printing the workspace help and exiting
// 0, which the app read as a successful pull.
assertSubcommands(t, workspaceCmd, "Workspace", []string{
"clone", "status", "update", "push",
"list", "search", "diff", "pull", "commit",
})

// Check pkg command and root commands
pkgCmd := findCommand(root, "pkg")
if pkgCmd == nil {
t.Fatal("Pkg command not found")
}
if findCommand(root, "sbom") == nil {
t.Error("Root command 'sbom' not found")
}

// Check pkg subcommands
assertSubcommands(t, pkgCmd, "Pkg", []string{"spec"})
}
Loading
Loading