diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 1b4ad69..bcfbafe 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -96,7 +96,7 @@ func NewApp() *cli.App { &cli.StringFlag{ Name: "runtime", Aliases: []string{"r"}, - Usage: "runtime name (nodejs, python, tomcat, yarn, temurin, vscode, intellij_idea_ultimate, pycharm_professional). If not specified, downloads all enabled runtimes from config", + Usage: "runtime name (nodejs, python, tomcat, yarn, temurin, vscode, intellij_idea_ultimate, pycharm). If not specified, downloads all enabled runtimes from config", }, &cli.StringFlag{ Name: "version", @@ -654,9 +654,9 @@ func initializeManager(configPath string, db *storage.DB, stdout, stderr *slog.L "runtime", runtimeName, "endoflife_product", runtimeConfig.EndOfLifeProduct, "policy_file", runtimeConfig.PolicyFile) - case "pycharm_professional": + case "pycharm": adapter := pycharmAdapter.NewAdapterWithConfig(&runtimeConfig, &cfg.Config, stdout, stderr) - if err := registry.Register("pycharm_professional", adapter); err != nil { + if err := registry.Register("pycharm", adapter); err != nil { return nil, nil, fmt.Errorf("failed to register pycharm adapter: %w", err) } stdout.Info("registered runtime adapter", diff --git a/internal/config/config.go b/internal/config/config.go index 7a9eaf6..5a78137 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -290,7 +290,7 @@ func (c *Config) Validate() error { // RuntimeSkipsPolicyFile reports runtimes that resolve versions from an upstream API and do not use policies/*.json. func RuntimeSkipsPolicyFile(name string) bool { switch strings.ToLower(strings.TrimSpace(name)) { - case "vscode", "intellij_idea_ultimate", "pycharm_professional": + case "vscode", "intellij_idea_ultimate", "pycharm": return true default: return false @@ -300,7 +300,7 @@ func RuntimeSkipsPolicyFile(name string) bool { // RuntimeSkipsEndOfLifeProduct reports runtimes not indexed on endoflife.date; endoflife_product may be omitted. func RuntimeSkipsEndOfLifeProduct(name string) bool { switch strings.ToLower(strings.TrimSpace(name)) { - case "intellij_idea_ultimate", "pycharm_professional": + case "intellij_idea_ultimate", "pycharm": return true default: return false diff --git a/internal/config/config_test.go b/internal/config/config_test.go index f8ae273..2ff11c1 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -352,7 +352,7 @@ func TestRuntime_Validate(t *testing.T) { expectError: false, }, { - name: "pycharm_professional skips endoflife.date and policy", + name: "pycharm skips endoflife.date and policy", runtime: Runtime{ Enabled: true, EndOfLifeProduct: "", @@ -361,7 +361,7 @@ func TestRuntime_Validate(t *testing.T) { Enabled: false, }, }, - runtimeName: "pycharm_professional", + runtimeName: "pycharm", expectError: false, }, } diff --git a/internal/runtimes/pycharm/pycharm.go b/internal/runtimes/pycharm/pycharm.go index 9fe1a2d..311073a 100644 --- a/internal/runtimes/pycharm/pycharm.go +++ b/internal/runtimes/pycharm/pycharm.go @@ -1,4 +1,4 @@ -// Package pycharm provides a PyCharm Professional runtime adapter using shared JetBrains runtime logic. +// Package pycharm provides a unified PyCharm runtime adapter using shared JetBrains runtime logic. package pycharm import ( @@ -10,9 +10,9 @@ import ( ) const ( - // PyCharmProfessionalRuntime is the registry key for PyCharm Professional (PCP). - PyCharmProfessionalRuntime = "pycharm_professional" - defaultProductCode = "PCP" + // PyCharmRuntime is the registry key for the unified PyCharm product (PCP). + PyCharmRuntime = "pycharm" + defaultProductCode = "PCP" ) // Adapter is a thin PyCharm wrapper around the shared JetBrains adapter. @@ -20,16 +20,16 @@ type Adapter struct { *jetbrains.Adapter } -// NewAdapterWithConfig builds a PyCharm Professional adapter. +// NewAdapterWithConfig builds a unified PyCharm adapter. func NewAdapterWithConfig(cfg *config.Runtime, globalCfg *config.GlobalConfig, stdout, stderr *slog.Logger) runtime.RuntimeProvider { return &Adapter{ Adapter: jetbrains.NewAdapterWithConfig(cfg, globalCfg, jetbrains.ProductOptions{ - RuntimeName: PyCharmProfessionalRuntime, + RuntimeName: PyCharmRuntime, DefaultProductCode: defaultProductCode, DefaultReleaseType: "release", DefaultReleasesURL: "https://data.services.jetbrains.com/products/releases", DefaultUserAgent: "cdprun/1.0 (PyCharm)", - ArtifactPrefix: "pycharm-professional", + ArtifactPrefix: "pycharm", }, stdout, stderr), } } diff --git a/internal/runtimes/pycharm/pycharm_test.go b/internal/runtimes/pycharm/pycharm_test.go index 3cce58d..79890e9 100644 --- a/internal/runtimes/pycharm/pycharm_test.go +++ b/internal/runtimes/pycharm/pycharm_test.go @@ -89,8 +89,8 @@ func TestAdapter_GetLatestVersion(t *testing.T) { if latest.LatestPatch != "2099.1.1" { t.Fatalf("LatestPatch = %s, want 2099.1.1", latest.LatestPatch) } - if latest.RuntimeName != PyCharmProfessionalRuntime { - t.Fatalf("RuntimeName = %s, want %s", latest.RuntimeName, PyCharmProfessionalRuntime) + if latest.RuntimeName != PyCharmRuntime { + t.Fatalf("RuntimeName = %s, want %s", latest.RuntimeName, PyCharmRuntime) } } diff --git a/runtime-registry.yaml b/runtime-registry.yaml index 22c2ced..803b7f4 100644 --- a/runtime-registry.yaml +++ b/runtime-registry.yaml @@ -53,6 +53,9 @@ runtimes: gpg: enabled: true signature_pattern: ".asc" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "python" check_eol: true @@ -126,6 +129,9 @@ runtimes: gpg: enabled: true signature_pattern: "SHASUMS256.txt.asc" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "nodejs" check_eol: true @@ -197,6 +203,9 @@ runtimes: gpg: enabled: true signature_pattern: "*.sig" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" audit_logging: enabled: true output_dir: "./verification-logs" @@ -260,6 +269,9 @@ runtimes: gpg: enabled: true signature_pattern: ".asc" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "tomcat" check_eol: true @@ -332,6 +344,9 @@ runtimes: gpg: enabled: true signature_pattern: ".asc" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "yarn" check_eol: true @@ -401,6 +416,9 @@ runtimes: gpg: enabled: false signature_pattern: "" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "vscode" check_eol: false @@ -455,6 +473,9 @@ runtimes: gpg: enabled: false signature_pattern: "" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "" check_eol: false @@ -468,10 +489,10 @@ runtimes: enabled: false targets: [] - pycharm_professional: + pycharm: enabled: true - name: "PyCharm Professional" - description: "PyCharm Professional (PCP) — versions from JetBrains releases API only; not on endoflife.date" + name: "PyCharm" + description: "PyCharm (PCP) — unified product; versions from JetBrains releases API only; not on endoflife.date" endoflife_product: "" policy_file: "" version_pattern: "major" @@ -509,6 +530,9 @@ runtimes: gpg: enabled: false signature_pattern: "" + clamav: + enabled: true + image: "clamav/clamav-debian:latest" endoflife: product_name: "" check_eol: false @@ -517,7 +541,7 @@ runtimes: auto_release: true github_repository: "Clean-Dependency-Project/cdprun" draft_release: false - release_name_template: "PyCharm Professional - {version}" + release_name_template: "PyCharm - {version}" packaging: enabled: false targets: [] \ No newline at end of file