ecosyste-ms-cli 1.6.0__tar.gz → 2.0.1__tar.gz

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.
Files changed (108) hide show
  1. ecosyste_ms_cli-2.0.1/CHANGELOG.md +5 -0
  2. {ecosyste_ms_cli-1.6.0/ecosyste_ms_cli.egg-info → ecosyste_ms_cli-2.0.1}/PKG-INFO +10 -11
  3. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1/ecosyste_ms_cli.egg-info}/PKG-INFO +10 -11
  4. ecosyste_ms_cli-2.0.1/ecosyste_ms_cli.egg-info/requires.txt +19 -0
  5. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/__init__.py +1 -1
  6. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/advisories.openapi.yaml +25 -4
  7. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/commits.openapi.yaml +2 -2
  8. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/issues.openapi.yaml +2 -2
  9. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/packages.openapi.yaml +76 -4
  10. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/repos.openapi.yaml +2 -2
  11. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/advisories.py +23 -4
  12. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/generator.py +0 -3
  13. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/pyproject.toml +10 -11
  14. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_help_output.py +18 -2
  15. ecosyste_ms_cli-1.6.0/CHANGELOG.md +0 -22
  16. ecosyste_ms_cli-1.6.0/ecosyste_ms_cli.egg-info/requires.txt +0 -22
  17. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/LICENSE +0 -0
  18. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/MANIFEST.in +0 -0
  19. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/Readme.md +0 -0
  20. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosyste_ms_cli.egg-info/SOURCES.txt +0 -0
  21. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosyste_ms_cli.egg-info/dependency_links.txt +0 -0
  22. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosyste_ms_cli.egg-info/entry_points.txt +0 -0
  23. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosyste_ms_cli.egg-info/top_level.txt +0 -0
  24. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/__main__.py +0 -0
  25. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/__init__.py +0 -0
  26. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/archives.openapi.yaml +0 -0
  27. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/dependabot.openapi.yaml +0 -0
  28. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/diff.openapi.yaml +0 -0
  29. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/docker.openapi.yaml +0 -0
  30. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/licenses.openapi.yaml +0 -0
  31. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/opencollective.openapi.yaml +0 -0
  32. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/parser.openapi.yaml +0 -0
  33. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/registries.yaml +0 -0
  34. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/resolve.openapi.yaml +0 -0
  35. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/sbom.openapi.yaml +0 -0
  36. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/sponsors.openapi.yaml +0 -0
  37. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/summary.openapi.yaml +0 -0
  38. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/apis/timeline.openapi.yaml +0 -0
  39. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/cli.py +0 -0
  40. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/__init__.py +0 -0
  41. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/archives.py +0 -0
  42. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/commits.py +0 -0
  43. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/decorators.py +0 -0
  44. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/dependabot.py +0 -0
  45. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/diff.py +0 -0
  46. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/docker.py +0 -0
  47. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/execution.py +0 -0
  48. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/__init__.py +0 -0
  49. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/advisories.py +0 -0
  50. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/archives.py +0 -0
  51. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/base.py +0 -0
  52. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/commits.py +0 -0
  53. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/default.py +0 -0
  54. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/dependabot.py +0 -0
  55. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/diff.py +0 -0
  56. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/docker.py +0 -0
  57. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/factory.py +0 -0
  58. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/issues.py +0 -0
  59. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/licenses.py +0 -0
  60. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/opencollective.py +0 -0
  61. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/packages.py +0 -0
  62. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/parser.py +0 -0
  63. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/repos.py +0 -0
  64. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/resolve.py +0 -0
  65. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/sbom.py +0 -0
  66. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/sponsors.py +0 -0
  67. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/summary.py +0 -0
  68. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/handlers/timeline.py +0 -0
  69. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/issues.py +0 -0
  70. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/licenses.py +0 -0
  71. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/mcp.py +0 -0
  72. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/opencollective.py +0 -0
  73. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/packages.py +0 -0
  74. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/parser.py +0 -0
  75. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/purl_options.py +0 -0
  76. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/repos.py +0 -0
  77. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/resolve.py +0 -0
  78. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/sbom.py +0 -0
  79. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/sponsors.py +0 -0
  80. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/summary.py +0 -0
  81. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/commands/timeline.py +0 -0
  82. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/constants.py +0 -0
  83. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/exceptions.py +0 -0
  84. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/build_kwargs.py +0 -0
  85. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/click_params.py +0 -0
  86. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/flatten_dict.py +0 -0
  87. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/format_value.py +0 -0
  88. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/get_domain.py +0 -0
  89. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/job_polling.py +0 -0
  90. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/load_api_spec.py +0 -0
  91. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/print_error.py +0 -0
  92. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/print_operations.py +0 -0
  93. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/print_output.py +0 -0
  94. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/helpers/purl_parser.py +0 -0
  95. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/mcp_server.py +0 -0
  96. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/ecosystems_cli/openapi_client.py +0 -0
  97. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/setup.cfg +0 -0
  98. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_cli.py +0 -0
  99. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_cli_domain.py +0 -0
  100. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_constants.py +0 -0
  101. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_format_value.py +0 -0
  102. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_handlers.py +0 -0
  103. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_load_api_spec.py +0 -0
  104. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_mcp_server.py +0 -0
  105. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_openapi_client.py +0 -0
  106. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_package_metadata.py +0 -0
  107. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_print_operations.py +0 -0
  108. {ecosyste_ms_cli-1.6.0 → ecosyste_ms_cli-2.0.1}/tests/test_print_output.py +0 -0
@@ -0,0 +1,5 @@
1
+ # Changelog for v2.0.1
2
+
3
+ ## Changes since v2.0.0
4
+
5
+ - feat(advisories): add --version filter to get_advisories, refresh specs (348ad88)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecosyste_ms_cli
3
- Version: 1.6.0
3
+ Version: 2.0.1
4
4
  Summary: CLI for ecosyste.ms API
5
5
  Author-email: Sebastian Schürmann <sebs@2xs.org>
6
6
  License-Expression: MIT
@@ -21,23 +21,22 @@ Classifier: Topic :: Utilities
21
21
  Requires-Python: >=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
- Requires-Dist: click~=8.3.1
25
- Requires-Dist: requests~=2.33.1
24
+ Requires-Dist: click~=8.5.0
25
+ Requires-Dist: requests~=2.34.2
26
26
  Requires-Dist: pyyaml~=6.0.3
27
27
  Requires-Dist: rich~=15.0.0
28
- Requires-Dist: mcp~=1.27.0
28
+ Requires-Dist: mcp~=1.30.0
29
29
  Requires-Dist: openapi-core~=0.23.0
30
30
  Requires-Dist: packageurl-python~=0.17.6
31
- Requires-Dist: importlib-resources; python_version < "3.9"
32
31
  Provides-Extra: dev
33
- Requires-Dist: pytest~=9.0.2; extra == "dev"
34
- Requires-Dist: pytest-asyncio~=1.3.0; extra == "dev"
35
- Requires-Dist: black~=26.3.1; extra == "dev"
36
- Requires-Dist: isort~=8.0.1; extra == "dev"
32
+ Requires-Dist: pytest~=9.1.1; extra == "dev"
33
+ Requires-Dist: pytest-asyncio~=1.4.0; extra == "dev"
34
+ Requires-Dist: black~=26.5.1; extra == "dev"
35
+ Requires-Dist: isort~=9.0.1; extra == "dev"
37
36
  Requires-Dist: flake8~=7.3.0; extra == "dev"
38
37
  Requires-Dist: bandit~=1.9.4; extra == "dev"
39
- Requires-Dist: complexipy~=5.3.0; extra == "dev"
40
- Requires-Dist: tomli~=2.3.0; python_version < "3.11" and extra == "dev"
38
+ Requires-Dist: complexipy~=8.0.1; extra == "dev"
39
+ Requires-Dist: tomli~=2.4.1; python_version < "3.11" and extra == "dev"
41
40
  Dynamic: license-file
42
41
 
43
42
  # Ecosystems CLI
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecosyste_ms_cli
3
- Version: 1.6.0
3
+ Version: 2.0.1
4
4
  Summary: CLI for ecosyste.ms API
5
5
  Author-email: Sebastian Schürmann <sebs@2xs.org>
6
6
  License-Expression: MIT
@@ -21,23 +21,22 @@ Classifier: Topic :: Utilities
21
21
  Requires-Python: >=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
- Requires-Dist: click~=8.3.1
25
- Requires-Dist: requests~=2.33.1
24
+ Requires-Dist: click~=8.5.0
25
+ Requires-Dist: requests~=2.34.2
26
26
  Requires-Dist: pyyaml~=6.0.3
27
27
  Requires-Dist: rich~=15.0.0
28
- Requires-Dist: mcp~=1.27.0
28
+ Requires-Dist: mcp~=1.30.0
29
29
  Requires-Dist: openapi-core~=0.23.0
30
30
  Requires-Dist: packageurl-python~=0.17.6
31
- Requires-Dist: importlib-resources; python_version < "3.9"
32
31
  Provides-Extra: dev
33
- Requires-Dist: pytest~=9.0.2; extra == "dev"
34
- Requires-Dist: pytest-asyncio~=1.3.0; extra == "dev"
35
- Requires-Dist: black~=26.3.1; extra == "dev"
36
- Requires-Dist: isort~=8.0.1; extra == "dev"
32
+ Requires-Dist: pytest~=9.1.1; extra == "dev"
33
+ Requires-Dist: pytest-asyncio~=1.4.0; extra == "dev"
34
+ Requires-Dist: black~=26.5.1; extra == "dev"
35
+ Requires-Dist: isort~=9.0.1; extra == "dev"
37
36
  Requires-Dist: flake8~=7.3.0; extra == "dev"
38
37
  Requires-Dist: bandit~=1.9.4; extra == "dev"
39
- Requires-Dist: complexipy~=5.3.0; extra == "dev"
40
- Requires-Dist: tomli~=2.3.0; python_version < "3.11" and extra == "dev"
38
+ Requires-Dist: complexipy~=8.0.1; extra == "dev"
39
+ Requires-Dist: tomli~=2.4.1; python_version < "3.11" and extra == "dev"
41
40
  Dynamic: license-file
42
41
 
43
42
  # Ecosystems CLI
@@ -0,0 +1,19 @@
1
+ click~=8.5.0
2
+ requests~=2.34.2
3
+ pyyaml~=6.0.3
4
+ rich~=15.0.0
5
+ mcp~=1.30.0
6
+ openapi-core~=0.23.0
7
+ packageurl-python~=0.17.6
8
+
9
+ [dev]
10
+ pytest~=9.1.1
11
+ pytest-asyncio~=1.4.0
12
+ black~=26.5.1
13
+ isort~=9.0.1
14
+ flake8~=7.3.0
15
+ bandit~=1.9.4
16
+ complexipy~=8.0.1
17
+
18
+ [dev:python_version < "3.11"]
19
+ tomli~=2.4.1
@@ -1,3 +1,3 @@
1
1
  """Ecosystems CLI tool for interacting with ecosyste.ms APIs."""
2
2
 
3
- __version__ = "1.6.0"
3
+ __version__ = "2.0.1"
@@ -43,6 +43,13 @@ paths:
43
43
  required: false
44
44
  schema:
45
45
  type: string
46
+ - name: version
47
+ in: query
48
+ description: Return advisories whose affected ranges match this version. Requires
49
+ ecosystem and package_name. Advisories without a matching range are excluded.
50
+ required: false
51
+ schema:
52
+ type: string
46
53
  - name: repository_url
47
54
  in: query
48
55
  description: Repository URL to filter by
@@ -83,13 +90,16 @@ paths:
83
90
  format: date-time
84
91
  - name: sort
85
92
  in: query
86
- description: field to order results by
93
+ description: Comma-separated advisory column names to sort by. Defaults to
94
+ published_at. Unknown columns return 400.
87
95
  required: false
88
96
  schema:
89
97
  type: string
90
98
  - name: order
91
99
  in: query
92
- description: direction to order results by
100
+ description: Comma-separated asc or desc directions corresponding to sort
101
+ fields, case-insensitive. Missing directions default to desc. Invalid or
102
+ extra directions return 400.
93
103
  required: false
94
104
  schema:
95
105
  type: string
@@ -102,6 +112,15 @@ paths:
102
112
  type: array
103
113
  items:
104
114
  "$ref": "#/components/schemas/Advisory"
115
+ 400:
116
+ description: Invalid version filter, sort column or order direction
117
+ content:
118
+ application/json:
119
+ schema:
120
+ type: object
121
+ properties:
122
+ error:
123
+ type: string
105
124
  "/advisories/packages":
106
125
  get:
107
126
  summary: list packages that have advisories
@@ -129,7 +148,9 @@ paths:
129
148
  parameters:
130
149
  - name: purl
131
150
  in: query
132
- description: 'Package URL (PURL) to lookup advisories for. Format: pkg:type/namespace/name@version'
151
+ description: 'Package URL (PURL) to lookup advisories for. Format: pkg:type/namespace/name@version.
152
+ When a version is provided, only advisories with a matching affected range
153
+ are returned.'
133
154
  required: false
134
155
  schema:
135
156
  type: string
@@ -162,7 +183,7 @@ paths:
162
183
  example: purl or repository_url parameter is required
163
184
  "/advisories/{advisoryUUID}":
164
185
  get:
165
- summary: get a advisories by uuid
186
+ summary: get an advisory by uuid
166
187
  operationId: getAdvisory
167
188
  tags:
168
189
  - advisories
@@ -37,8 +37,8 @@ paths:
37
37
  "$ref": "#/components/schemas/Repository"
38
38
  "/hosts":
39
39
  get:
40
- summary: list registies
41
- operationId: getRegistries
40
+ summary: list hosts
41
+ operationId: getHosts
42
42
  parameters:
43
43
  - name: page
44
44
  in: query
@@ -37,8 +37,8 @@ paths:
37
37
  "$ref": "#/components/schemas/Repository"
38
38
  "/hosts":
39
39
  get:
40
- summary: list registies
41
- operationId: getRegistries
40
+ summary: list hosts
41
+ operationId: getHosts
42
42
  parameters:
43
43
  - name: page
44
44
  in: query
@@ -201,9 +201,64 @@ paths:
201
201
  type: array
202
202
  items:
203
203
  "$ref": "#/components/schemas/PackageWithRegistry"
204
+ "/versions/lookup":
205
+ get:
206
+ summary: lookup versions by integrity hash
207
+ operationId: lookupVersions
208
+ tags:
209
+ - versions
210
+ parameters:
211
+ - name: integrity
212
+ in: query
213
+ description: integrity hash (SRI format)
214
+ required: false
215
+ schema:
216
+ type: string
217
+ - name: sha256
218
+ in: query
219
+ description: sha256 hash (hex)
220
+ required: false
221
+ schema:
222
+ type: string
223
+ - name: sha1
224
+ in: query
225
+ description: sha1 hash (hex)
226
+ required: false
227
+ schema:
228
+ type: string
229
+ - name: sha512
230
+ in: query
231
+ description: sha512 hash (hex)
232
+ required: false
233
+ schema:
234
+ type: string
235
+ - name: page
236
+ in: query
237
+ description: page number
238
+ required: false
239
+ schema:
240
+ type: integer
241
+ - name: per_page
242
+ in: query
243
+ description: Number of records to return
244
+ required: false
245
+ schema:
246
+ type: integer
247
+ responses:
248
+ '200':
249
+ description: successful operation
250
+ content:
251
+ application/json:
252
+ schema:
253
+ type: array
254
+ items:
255
+ "$ref": "#/components/schemas/VersionLookup"
256
+ '400':
257
+ description: missing integrity parameter
204
258
  "/packages/lookup":
205
259
  get:
206
- summary: lookup a package by repository URL, purl or ecosystem+name
260
+ summary: lookup a single package by repository URL, purl or ecosystem+name.
261
+ For multiple packages use POST /packages/bulk_lookup.
207
262
  operationId: lookupPackage
208
263
  tags:
209
264
  - packages
@@ -216,7 +271,7 @@ paths:
216
271
  type: string
217
272
  - name: purl
218
273
  in: query
219
- description: package URL
274
+ description: single package URL. For multiple purls use POST /packages/bulk_lookup.
220
275
  required: false
221
276
  schema:
222
277
  type: string
@@ -267,6 +322,8 @@ paths:
267
322
  type: array
268
323
  items:
269
324
  "$ref": "#/components/schemas/PackageWithRegistry"
325
+ '400':
326
+ description: missing repository_url, purl or name parameter
270
327
  "/packages/critical":
271
328
  get:
272
329
  summary: list all critical packages
@@ -468,7 +525,7 @@ paths:
468
525
  "$ref": "#/components/schemas/KeywordWithPackages"
469
526
  "/registries":
470
527
  get:
471
- summary: list registies
528
+ summary: list registries
472
529
  operationId: getRegistries
473
530
  tags:
474
531
  - registries
@@ -553,7 +610,7 @@ paths:
553
610
  type: string
554
611
  - name: purl
555
612
  in: query
556
- description: package URL
613
+ description: single package URL. For multiple purls use POST /packages/bulk_lookup.
557
614
  required: false
558
615
  schema:
559
616
  type: string
@@ -1642,6 +1699,12 @@ paths:
1642
1699
  required: false
1643
1700
  schema:
1644
1701
  type: string
1702
+ - name: version_id
1703
+ in: query
1704
+ description: id of the version that declares the dependencies
1705
+ required: false
1706
+ schema:
1707
+ type: integer
1645
1708
  - name: package_name
1646
1709
  in: query
1647
1710
  description: package name
@@ -2098,6 +2161,15 @@ components:
2098
2161
  type: array
2099
2162
  items:
2100
2163
  "$ref": "#/components/schemas/Dependency"
2164
+ VersionLookup:
2165
+ allOf:
2166
+ - "$ref": "#/components/schemas/VersionWithDependencies"
2167
+ - type: object
2168
+ required:
2169
+ - package
2170
+ properties:
2171
+ package:
2172
+ "$ref": "#/components/schemas/PackageWithRegistry"
2101
2173
  VersionWithPackage:
2102
2174
  required:
2103
2175
  - id
@@ -335,8 +335,8 @@ paths:
335
335
  "$ref": "#/components/schemas/Repository"
336
336
  "/hosts":
337
337
  get:
338
- summary: list registies
339
- operationId: getRegistries
338
+ summary: list hosts
339
+ operationId: getHosts
340
340
  parameters:
341
341
  - name: page
342
342
  in: query
@@ -14,17 +14,28 @@ advisories = APICommandGenerator.create_api_group("advisories")
14
14
 
15
15
 
16
16
  @override_auto_command(advisories, "get_advisories", help="list advisories")
17
- @click.option("--purl", type=str, default=None, help="Package URL (PURL). Example: pkg:npm/fsa")
17
+ @click.option(
18
+ "--purl",
19
+ type=str,
20
+ default=None,
21
+ help="Package URL (PURL). Example: pkg:npm/fsa. A version (pkg:npm/fsa@1.0.0) sets --version.",
22
+ )
18
23
  @click.option("--ecosystem", type=str, default=None, help="Ecosystem to filter by")
19
24
  @click.option("--package-name", type=str, default=None, help="Package to filter by")
20
25
  @click.option("--severity", type=str, default=None, help="Severity to filter by")
26
+ @click.option(
27
+ "--version",
28
+ type=str,
29
+ default=None,
30
+ help="Only advisories whose affected ranges match this version. Requires ecosystem and package name.",
31
+ )
21
32
  @click.option("--repository-url", type=str, default=None, help="Repository URL to filter by")
22
33
  @click.option("--page", type=click.IntRange(min=1), default=None, help="pagination page number")
23
34
  @click.option("--per-page", type=click.IntRange(min=1), default=None, help="Number of records to return")
24
35
  @click.option("--created-after", type=str, default=None, help="filter by created_at after given time")
25
36
  @click.option("--updated-after", type=str, default=None, help="filter by updated_at after given time")
26
- @click.option("--sort", type=str, default=None, help="field to order results by")
27
- @click.option("--order", type=str, default=None, help="direction to order results by")
37
+ @click.option("--sort", type=str, default=None, help="Comma-separated columns to sort by (default: published_at)")
38
+ @click.option("--order", type=str, default=None, help="Comma-separated asc/desc per sort column (default: desc)")
28
39
  @click.option("--source", type=str, default=None, help="Source to filter by (e.g. github, erlef, cpansa)")
29
40
  @common_options
30
41
  @click.pass_context
@@ -38,6 +49,7 @@ def get_advisories(
38
49
  ecosystem: Optional[str],
39
50
  package_name: Optional[str],
40
51
  severity: Optional[str],
52
+ version: Optional[str],
41
53
  repository_url: Optional[str],
42
54
  page: Optional[int],
43
55
  per_page: Optional[int],
@@ -59,6 +71,7 @@ def get_advisories(
59
71
  ecosystem: Ecosystem to filter by
60
72
  package_name: Package name to filter by
61
73
  severity: Severity to filter by
74
+ version: Only advisories whose affected ranges match this version
62
75
  repository_url: Repository URL to filter by
63
76
  page: Pagination page number
64
77
  per_page: Number of records to return
@@ -70,15 +83,21 @@ def get_advisories(
70
83
  update_context(ctx, timeout, format, domain, mailto)
71
84
 
72
85
  # Explicit flags win over PURL-derived values.
73
- parsed = apply_purl(purl)
86
+ parsed = apply_purl(purl, with_version=True)
74
87
  ecosystem = ecosystem or parsed.get("ecosystem")
75
88
  package_name = package_name or parsed.get("package_name")
89
+ version = version or parsed.get("version")
90
+
91
+ # The API rejects a version filter without a package (HTTP 400); fail fast.
92
+ if version and not (ecosystem and package_name):
93
+ raise click.UsageError("--version requires --ecosystem and --package-name (or a --purl).")
76
94
 
77
95
  # Build kwargs for the API call
78
96
  kwargs = build_kwargs(
79
97
  ecosystem=ecosystem,
80
98
  package_name=package_name,
81
99
  severity=severity,
100
+ version=version,
82
101
  repository_url=repository_url,
83
102
  page=page,
84
103
  per_page=per_page,
@@ -15,11 +15,8 @@ from ecosystems_cli.helpers.load_api_spec import load_api_spec
15
15
  # corrected here instead of editing the spec files.
16
16
  HELP_OVERRIDES = {
17
17
  ("advisories", "getAdvisory"): "get an advisory by uuid",
18
- ("commits", "getRegistries"): "list registries",
19
18
  ("dependabot", "getRegistries"): "list registries",
20
- ("issues", "getRegistries"): "list registries",
21
19
  ("packages", "getRegistries"): "list registries",
22
- ("repos", "getRegistries"): "list registries",
23
20
  # The opencollective spec has no summary fields at all, so these commands
24
21
  # would otherwise fall back to "Execute <operationId>" placeholders.
25
22
  ("opencollective", "getCollectives"): "list open collective collectives",
@@ -52,7 +52,7 @@ exclude = ["tests*"]
52
52
 
53
53
  [project]
54
54
  name = "ecosyste_ms_cli"
55
- version = "1.6.0"
55
+ version = "2.0.1"
56
56
  description = "CLI for ecosyste.ms API"
57
57
  authors = [
58
58
  {name = "Sebastian Schürmann", email = "sebs@2xs.org"}
@@ -75,26 +75,25 @@ classifiers = [
75
75
  "Topic :: Utilities",
76
76
  ]
77
77
  dependencies = [
78
- "click~=8.3.1",
79
- "requests~=2.33.1",
78
+ "click~=8.5.0",
79
+ "requests~=2.34.2",
80
80
  "pyyaml~=6.0.3",
81
81
  "rich~=15.0.0",
82
- "mcp~=1.27.0",
82
+ "mcp~=1.30.0",
83
83
  "openapi-core~=0.23.0",
84
84
  "packageurl-python~=0.17.6",
85
- "importlib-resources; python_version < '3.9'",
86
85
  ]
87
86
 
88
87
  [project.optional-dependencies]
89
88
  dev = [
90
- "pytest~=9.0.2",
91
- "pytest-asyncio~=1.3.0",
92
- "black~=26.3.1",
93
- "isort~=8.0.1",
89
+ "pytest~=9.1.1",
90
+ "pytest-asyncio~=1.4.0",
91
+ "black~=26.5.1",
92
+ "isort~=9.0.1",
94
93
  "flake8~=7.3.0",
95
94
  "bandit~=1.9.4",
96
- "complexipy~=5.3.0",
97
- "tomli~=2.3.0; python_version < '3.11'"
95
+ "complexipy~=8.0.1",
96
+ "tomli~=2.4.1; python_version < '3.11'"
98
97
  ]
99
98
 
100
99
  [project.scripts]
@@ -41,14 +41,30 @@ def test_subcommand_help_includes_global_options():
41
41
 
42
42
 
43
43
  def test_get_registries_help_typo_overridden():
44
- """The upstream spec's 'list registies' typo is corrected via HELP_OVERRIDES."""
44
+ """The upstream spec's 'list registies' typo is corrected via HELP_OVERRIDES.
45
+
46
+ Upstream renamed this operation to getHosts in the commits, issues and repos
47
+ specs (and fixed the typo there); dependabot and packages still expose it as
48
+ getRegistries, and dependabot still carries the typo.
49
+ """
45
50
  runner = CliRunner()
46
- for group in ("commits", "dependabot", "issues", "packages", "repos"):
51
+ for group in ("dependabot", "packages"):
47
52
  result = runner.invoke(cli, [group, "--help"])
48
53
  assert "registies" not in result.output, group
49
54
  assert "list registries" in result.output, group
50
55
 
51
56
 
57
+ def test_get_hosts_replaces_get_registries():
58
+ """commits, issues and repos expose /hosts as get_hosts, not get_registries."""
59
+ runner = CliRunner()
60
+ for group in ("commits", "issues", "repos"):
61
+ result = runner.invoke(cli, [group, "--help"])
62
+ assert result.exit_code == 0, group
63
+ assert "get_hosts" in result.output, group
64
+ assert "get_registries" not in result.output, group
65
+ assert "registies" not in result.output, group
66
+
67
+
52
68
  def test_opencollective_help_has_no_placeholders():
53
69
  """The opencollective spec has no summaries; HELP_OVERRIDES supplies real ones."""
54
70
  runner = CliRunner()
@@ -1,22 +0,0 @@
1
- # Changelog for v1.6.0
2
-
3
- ## Changes since v1.5.0
4
-
5
- - fix: reactivate precommit (19e5887)
6
- - fix: treat a closed output pipe as SIGPIPE, not an error (9755aba)
7
- - fix: preserve UTC designator in JSON timestamp output (3ff1b05)
8
- - fix: fold long table values instead of truncating them (9e3d672)
9
- - fix: validate lookup_advisories requires --purl or --repository-url (f6a4616)
10
- - fix: validate page/per_page as positive integers client-side (1cc5f19)
11
- - fix: summarize HTML error pages instead of dumping markup (412532d)
12
- - fix: correct 'get a advisories by uuid' grammar in advisories help (5e360ab)
13
- - fix: real descriptions for opencollective commands (91eb3e8)
14
- - fix: correct 'list registies' typo in five API groups (4cd222d)
15
- - fix: state defaults in mcp --help option descriptions (0a10260)
16
- - fix: add --version flag (6c4aea3)
17
- - fix: correct argument order, option validation, and parameter precedence (ab8ac69)
18
- - fix: route errors to stderr, readable timeouts, working --ecosystem (2fb8bc7)
19
- - fix: exit codes, redirect handling, PURL mapping, and TSV output (25dfb9e)
20
- - fix: correct PURL registry mapping and maven name separator (f7875fd)
21
- - fix: exit non-zero on API errors and follow GET redirects (d28b391)
22
- - fix: updated how to release (94e3c28)
@@ -1,22 +0,0 @@
1
- click~=8.3.1
2
- requests~=2.33.1
3
- pyyaml~=6.0.3
4
- rich~=15.0.0
5
- mcp~=1.27.0
6
- openapi-core~=0.23.0
7
- packageurl-python~=0.17.6
8
-
9
- [:python_version < "3.9"]
10
- importlib-resources
11
-
12
- [dev]
13
- pytest~=9.0.2
14
- pytest-asyncio~=1.3.0
15
- black~=26.3.1
16
- isort~=8.0.1
17
- flake8~=7.3.0
18
- bandit~=1.9.4
19
- complexipy~=5.3.0
20
-
21
- [dev:python_version < "3.11"]
22
- tomli~=2.3.0
File without changes