ecosyste-ms-cli 1.3.2__py3-none-any.whl

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 (84) hide show
  1. ecosyste_ms_cli-1.3.2.dist-info/METADATA +133 -0
  2. ecosyste_ms_cli-1.3.2.dist-info/RECORD +84 -0
  3. ecosyste_ms_cli-1.3.2.dist-info/WHEEL +5 -0
  4. ecosyste_ms_cli-1.3.2.dist-info/entry_points.txt +2 -0
  5. ecosyste_ms_cli-1.3.2.dist-info/licenses/LICENSE +21 -0
  6. ecosyste_ms_cli-1.3.2.dist-info/top_level.txt +1 -0
  7. ecosystems_cli/__init__.py +3 -0
  8. ecosystems_cli/__main__.py +4 -0
  9. ecosystems_cli/apis/__init__.py +0 -0
  10. ecosystems_cli/apis/advisories.openapi.yaml +347 -0
  11. ecosystems_cli/apis/archives.openapi.yaml +193 -0
  12. ecosystems_cli/apis/commits.openapi.yaml +391 -0
  13. ecosystems_cli/apis/dependabot.openapi.yaml +887 -0
  14. ecosystems_cli/apis/diff.openapi.yaml +90 -0
  15. ecosystems_cli/apis/docker.openapi.yaml +534 -0
  16. ecosystems_cli/apis/issues.openapi.yaml +839 -0
  17. ecosystems_cli/apis/licenses.openapi.yaml +80 -0
  18. ecosystems_cli/apis/opencollective.openapi.yaml +247 -0
  19. ecosystems_cli/apis/packages.openapi.yaml +2522 -0
  20. ecosystems_cli/apis/parser.openapi.yaml +97 -0
  21. ecosystems_cli/apis/registries.yaml +155 -0
  22. ecosystems_cli/apis/repos.openapi.yaml +1521 -0
  23. ecosystems_cli/apis/resolve.openapi.yaml +130 -0
  24. ecosystems_cli/apis/sbom.openapi.yaml +79 -0
  25. ecosystems_cli/apis/sponsors.openapi.yaml +283 -0
  26. ecosystems_cli/apis/summary.openapi.yaml +239 -0
  27. ecosystems_cli/apis/timeline.openapi.yaml +91 -0
  28. ecosystems_cli/cli.py +213 -0
  29. ecosystems_cli/commands/__init__.py +1 -0
  30. ecosystems_cli/commands/advisories.py +109 -0
  31. ecosystems_cli/commands/archives.py +5 -0
  32. ecosystems_cli/commands/commits.py +5 -0
  33. ecosystems_cli/commands/decorators.py +101 -0
  34. ecosystems_cli/commands/dependabot.py +5 -0
  35. ecosystems_cli/commands/diff.py +144 -0
  36. ecosystems_cli/commands/docker.py +5 -0
  37. ecosystems_cli/commands/execution.py +99 -0
  38. ecosystems_cli/commands/generator.py +127 -0
  39. ecosystems_cli/commands/handlers/__init__.py +45 -0
  40. ecosystems_cli/commands/handlers/advisories.py +73 -0
  41. ecosystems_cli/commands/handlers/archives.py +40 -0
  42. ecosystems_cli/commands/handlers/base.py +38 -0
  43. ecosystems_cli/commands/handlers/commits.py +76 -0
  44. ecosystems_cli/commands/handlers/default.py +40 -0
  45. ecosystems_cli/commands/handlers/dependabot.py +205 -0
  46. ecosystems_cli/commands/handlers/diff.py +72 -0
  47. ecosystems_cli/commands/handlers/docker.py +142 -0
  48. ecosystems_cli/commands/handlers/factory.py +60 -0
  49. ecosystems_cli/commands/handlers/issues.py +87 -0
  50. ecosystems_cli/commands/handlers/licenses.py +52 -0
  51. ecosystems_cli/commands/handlers/opencollective.py +86 -0
  52. ecosystems_cli/commands/handlers/packages.py +103 -0
  53. ecosystems_cli/commands/handlers/parser.py +57 -0
  54. ecosystems_cli/commands/handlers/repos.py +97 -0
  55. ecosystems_cli/commands/handlers/resolve.py +68 -0
  56. ecosystems_cli/commands/handlers/sbom.py +52 -0
  57. ecosystems_cli/commands/handlers/sponsors.py +52 -0
  58. ecosystems_cli/commands/handlers/summary.py +81 -0
  59. ecosystems_cli/commands/handlers/timeline.py +45 -0
  60. ecosystems_cli/commands/issues.py +5 -0
  61. ecosystems_cli/commands/licenses.py +135 -0
  62. ecosystems_cli/commands/mcp.py +54 -0
  63. ecosystems_cli/commands/opencollective.py +5 -0
  64. ecosystems_cli/commands/packages.py +151 -0
  65. ecosystems_cli/commands/parser.py +135 -0
  66. ecosystems_cli/commands/repos.py +5 -0
  67. ecosystems_cli/commands/resolve.py +160 -0
  68. ecosystems_cli/commands/sbom.py +135 -0
  69. ecosystems_cli/commands/sponsors.py +5 -0
  70. ecosystems_cli/commands/summary.py +5 -0
  71. ecosystems_cli/commands/timeline.py +5 -0
  72. ecosystems_cli/constants.py +92 -0
  73. ecosystems_cli/exceptions.py +149 -0
  74. ecosystems_cli/helpers/click_params.py +49 -0
  75. ecosystems_cli/helpers/flatten_dict.py +15 -0
  76. ecosystems_cli/helpers/format_value.py +30 -0
  77. ecosystems_cli/helpers/get_domain.py +68 -0
  78. ecosystems_cli/helpers/load_api_spec.py +31 -0
  79. ecosystems_cli/helpers/print_error.py +15 -0
  80. ecosystems_cli/helpers/print_operations.py +73 -0
  81. ecosystems_cli/helpers/print_output.py +183 -0
  82. ecosystems_cli/helpers/purl_parser.py +121 -0
  83. ecosystems_cli/mcp_server.py +267 -0
  84. ecosystems_cli/openapi_client.py +461 -0
@@ -0,0 +1,193 @@
1
+ ---
2
+ openapi: 3.0.1
3
+ info:
4
+ title: 'Ecosyste.ms: Archives'
5
+ description: An open API service for inspecting package archives and files from
6
+ many open source software ecosystems. Archives acts as a caching proxy that allows
7
+ you to explore package contents (tarballs, zips, etc.) without downloading them
8
+ locally.
9
+ contact:
10
+ name: Ecosyste.ms
11
+ email: support@ecosyste.ms
12
+ url: https://ecosyste.ms
13
+ version: 1.0.0
14
+ license:
15
+ name: CC-BY-SA-4.0
16
+ url: https://creativecommons.org/licenses/by-sa/4.0/
17
+ externalDocs:
18
+ description: GitHub Repository
19
+ url: https://github.com/ecosyste-ms/archives
20
+ servers:
21
+ - url: https://archives.ecosyste.ms/api/v1
22
+ paths:
23
+ "/archives/list":
24
+ get:
25
+ summary: list files in an archive
26
+ operationId: list
27
+ parameters:
28
+ - name: url
29
+ in: query
30
+ description: URL to a package archive file (e.g., https://registry.npmjs.org/express/-/express-4.18.2.tgz)
31
+ required: true
32
+ schema:
33
+ type: string
34
+ example: https://registry.npmjs.org/express/-/express-4.18.2.tgz
35
+ responses:
36
+ 200:
37
+ description: OK
38
+ content:
39
+ application/json:
40
+ schema:
41
+ type: array
42
+ items:
43
+ type: string
44
+ example:
45
+ - package.json
46
+ - README.md
47
+ - lib/express.js
48
+ - lib/application.js
49
+ "/archives/contents":
50
+ get:
51
+ summary: get contents of a path from an archive
52
+ operationId: contents
53
+ parameters:
54
+ - name: url
55
+ in: query
56
+ description: URL to a package archive file (e.g., https://registry.npmjs.org/express/-/express-4.18.2.tgz)
57
+ required: true
58
+ schema:
59
+ type: string
60
+ example: https://registry.npmjs.org/express/-/express-4.18.2.tgz
61
+ - name: path
62
+ in: query
63
+ description: Path to a specific file or folder within the archive (e.g., 'package.json'
64
+ or 'lib/')
65
+ required: true
66
+ schema:
67
+ type: string
68
+ example: package.json
69
+ responses:
70
+ 200:
71
+ description: OK
72
+ content:
73
+ application/json:
74
+ schema:
75
+ "$ref": "#/components/schemas/Content"
76
+ "/archives/readme":
77
+ get:
78
+ summary: get readme from an archive
79
+ operationId: readme
80
+ parameters:
81
+ - name: url
82
+ in: query
83
+ description: URL to a package archive file (e.g., https://registry.npmjs.org/express/-/express-4.18.2.tgz)
84
+ required: true
85
+ schema:
86
+ type: string
87
+ example: https://registry.npmjs.org/express/-/express-4.18.2.tgz
88
+ responses:
89
+ 200:
90
+ description: OK
91
+ content:
92
+ application/json:
93
+ schema:
94
+ "$ref": "#/components/schemas/Readme"
95
+ "/archives/changelog":
96
+ get:
97
+ summary: get changelog from an archive
98
+ operationId: changelog
99
+ parameters:
100
+ - name: url
101
+ in: query
102
+ description: URL to a package archive file (e.g., https://registry.npmjs.org/express/-/express-4.18.2.tgz)
103
+ required: true
104
+ schema:
105
+ type: string
106
+ example: https://registry.npmjs.org/express/-/express-4.18.2.tgz
107
+ responses:
108
+ 200:
109
+ description: OK
110
+ content:
111
+ application/json:
112
+ schema:
113
+ "$ref": "#/components/schemas/Changelog"
114
+ "/archives/repopack":
115
+ get:
116
+ summary: get repopack from an archive
117
+ operationId: repopack
118
+ parameters:
119
+ - name: url
120
+ in: query
121
+ description: URL to a package archive file (e.g., https://registry.npmjs.org/express/-/express-4.18.2.tgz)
122
+ required: true
123
+ schema:
124
+ type: string
125
+ example: https://registry.npmjs.org/express/-/express-4.18.2.tgz
126
+ responses:
127
+ 200:
128
+ description: OK
129
+ content:
130
+ application/json:
131
+ schema:
132
+ "$ref": "#/components/schemas/RepoPack"
133
+ components:
134
+ schemas:
135
+ Content:
136
+ type: object
137
+ properties:
138
+ name:
139
+ type: string
140
+ description: Name of the file or directory
141
+ example: package.json
142
+ directory:
143
+ type: boolean
144
+ description: Whether this path is a directory
145
+ example: false
146
+ contents:
147
+ type: string
148
+ description: File contents (only present for files, not directories)
149
+ example: |-
150
+ {
151
+ "name": "express",
152
+ "version": "4.18.2",
153
+ "description": "Fast, unopinionated, minimalist web framework"
154
+ }
155
+ Readme:
156
+ type: object
157
+ properties:
158
+ name:
159
+ type: string
160
+ raw:
161
+ type: string
162
+ html:
163
+ type: string
164
+ plain:
165
+ type: string
166
+ extension:
167
+ type: string
168
+ language:
169
+ type: string
170
+ other_readme_files:
171
+ type: array
172
+ items:
173
+ type: string
174
+ Changelog:
175
+ type: object
176
+ properties:
177
+ name:
178
+ type: string
179
+ raw:
180
+ type: string
181
+ html:
182
+ type: string
183
+ plain:
184
+ type: string
185
+ extension:
186
+ type: string
187
+ language:
188
+ type: string
189
+ RepoPack:
190
+ type: object
191
+ properties:
192
+ output:
193
+ type: string
@@ -0,0 +1,391 @@
1
+ ---
2
+ openapi: 3.1.1
3
+ info:
4
+ title: 'Ecosyste.ms: commits'
5
+ description: 'An open API service providing commit metadata for open source projects. '
6
+ contact:
7
+ name: Ecosyste.ms
8
+ email: support@ecosyste.ms
9
+ url: https://ecosyste.ms
10
+ version: 1.0.0
11
+ license:
12
+ name: CC-BY-SA-4.0
13
+ url: https://creativecommons.org/licenses/by-sa/4.0/
14
+ externalDocs:
15
+ description: GitHub Repository
16
+ url: https://github.com/ecosyste-ms/commits
17
+ servers:
18
+ - url: https://commits.ecosyste.ms/api/v1
19
+ paths:
20
+ "/repositories/lookup":
21
+ get:
22
+ summary: Lookup repository metadata
23
+ operationId: repositoriesLookup
24
+ parameters:
25
+ - name: url
26
+ in: query
27
+ description: The URL of the repository to lookup
28
+ required: true
29
+ schema:
30
+ type: string
31
+ responses:
32
+ 200:
33
+ description: OK
34
+ content:
35
+ application/json:
36
+ schema:
37
+ "$ref": "#/components/schemas/Repository"
38
+ "/hosts":
39
+ get:
40
+ summary: list registies
41
+ operationId: getRegistries
42
+ parameters:
43
+ - name: page
44
+ in: query
45
+ description: pagination page number
46
+ required: false
47
+ schema:
48
+ type: integer
49
+ - name: per_page
50
+ in: query
51
+ description: Number of records to return
52
+ required: false
53
+ schema:
54
+ type: integer
55
+ responses:
56
+ 200:
57
+ description: OK
58
+ content:
59
+ application/json:
60
+ schema:
61
+ type: array
62
+ items:
63
+ "$ref": "#/components/schemas/Host"
64
+ "/hosts/{hostName}":
65
+ get:
66
+ summary: get a host by name
67
+ operationId: getHost
68
+ parameters:
69
+ - in: path
70
+ name: hostName
71
+ schema:
72
+ type: string
73
+ required: true
74
+ description: name of host
75
+ - name: page
76
+ in: query
77
+ description: pagination page number
78
+ required: false
79
+ schema:
80
+ type: integer
81
+ - name: per_page
82
+ in: query
83
+ description: Number of records to return
84
+ required: false
85
+ schema:
86
+ type: integer
87
+ responses:
88
+ 200:
89
+ description: OK
90
+ content:
91
+ application/json:
92
+ schema:
93
+ "$ref": "#/components/schemas/Host"
94
+ "/hosts/{hostName}/repositories":
95
+ get:
96
+ summary: get a list of repositories from a host
97
+ operationId: getHostRepositories
98
+ parameters:
99
+ - in: path
100
+ name: hostName
101
+ schema:
102
+ type: string
103
+ required: true
104
+ description: name of host
105
+ - name: page
106
+ in: query
107
+ description: pagination page number
108
+ required: false
109
+ schema:
110
+ type: integer
111
+ - name: per_page
112
+ in: query
113
+ description: Number of records to return
114
+ required: false
115
+ schema:
116
+ type: integer
117
+ - name: created_after
118
+ in: query
119
+ description: filter by created_at after given time
120
+ required: false
121
+ schema:
122
+ type: string
123
+ format: date-time
124
+ - name: updated_after
125
+ in: query
126
+ description: filter by updated_at after given time
127
+ required: false
128
+ schema:
129
+ type: string
130
+ format: date-time
131
+ - name: sort
132
+ in: query
133
+ description: field to order results by
134
+ required: false
135
+ schema:
136
+ type: string
137
+ - name: order
138
+ in: query
139
+ description: direction to order results by
140
+ required: false
141
+ schema:
142
+ type: string
143
+ responses:
144
+ 200:
145
+ description: OK
146
+ content:
147
+ application/json:
148
+ schema:
149
+ type: array
150
+ items:
151
+ "$ref": "#/components/schemas/Repository"
152
+ "/hosts/{hostName}/repositories/{repoName}":
153
+ get:
154
+ summary: get a repository from a host
155
+ operationId: getHostRepository
156
+ parameters:
157
+ - in: path
158
+ name: hostName
159
+ schema:
160
+ type: string
161
+ required: true
162
+ description: name of host
163
+ - in: path
164
+ name: repoName
165
+ schema:
166
+ type: string
167
+ required: true
168
+ description: name of repository
169
+ responses:
170
+ 200:
171
+ description: OK
172
+ content:
173
+ application/json:
174
+ schema:
175
+ "$ref": "#/components/schemas/Repository"
176
+ "/hosts/{hostName}/repositories/{repoName}/commits":
177
+ get:
178
+ summary: get a list of commits from a repository
179
+ operationId: getRepositoryCommits
180
+ parameters:
181
+ - in: path
182
+ name: hostName
183
+ schema:
184
+ type: string
185
+ required: true
186
+ description: name of host
187
+ - in: path
188
+ name: repoName
189
+ schema:
190
+ type: string
191
+ required: true
192
+ description: name of repository
193
+ - name: page
194
+ in: query
195
+ description: pagination page number
196
+ required: false
197
+ schema:
198
+ type: integer
199
+ - name: per_page
200
+ in: query
201
+ description: Number of records to return
202
+ required: false
203
+ schema:
204
+ type: integer
205
+ - name: since
206
+ in: query
207
+ description: filter by commits since given time
208
+ required: false
209
+ schema:
210
+ type: string
211
+ format: date-time
212
+ - name: until
213
+ in: query
214
+ description: filter by commits until given time
215
+ required: false
216
+ schema:
217
+ type: string
218
+ format: date-time
219
+ - name: sort
220
+ in: query
221
+ description: field to order results by
222
+ required: false
223
+ schema:
224
+ type: string
225
+ - name: order
226
+ in: query
227
+ description: direction to order results by
228
+ required: false
229
+ schema:
230
+ type: string
231
+ responses:
232
+ 200:
233
+ description: OK
234
+ content:
235
+ application/json:
236
+ schema:
237
+ type: array
238
+ items:
239
+ "$ref": "#/components/schemas/Commit"
240
+ "/hosts/{hostName}/committers/{login}":
241
+ get:
242
+ summary: get a committer from a host
243
+ operationId: getHostCommitter
244
+ parameters:
245
+ - in: path
246
+ name: hostName
247
+ schema:
248
+ type: string
249
+ required: true
250
+ description: name of host
251
+ - in: path
252
+ name: login
253
+ schema:
254
+ type: string
255
+ required: true
256
+ description: login or email of committer
257
+ responses:
258
+ 200:
259
+ description: OK
260
+ content:
261
+ application/json:
262
+ schema:
263
+ "$ref": "#/components/schemas/Committer"
264
+ components:
265
+ schemas:
266
+ Host:
267
+ type: object
268
+ properties:
269
+ name:
270
+ type: string
271
+ url:
272
+ type: string
273
+ kind:
274
+ type: string
275
+ repositories_count:
276
+ type: integer
277
+ last_synced_at:
278
+ type: string
279
+ format: date-time
280
+ commits_count:
281
+ type: integer
282
+ contributors_count:
283
+ type: integer
284
+ owners_count:
285
+ type: integer
286
+ icon_url:
287
+ type: string
288
+ Repository:
289
+ type: object
290
+ properties:
291
+ id:
292
+ type: integer
293
+ full_name:
294
+ type: string
295
+ default_branch:
296
+ type: string
297
+ committers:
298
+ type: array
299
+ items:
300
+ type: object
301
+ total_commits:
302
+ type: integer
303
+ total_committers:
304
+ type: integer
305
+ total_bot_commits:
306
+ type: integer
307
+ total_bot_committers:
308
+ type: integer
309
+ mean_commits:
310
+ type: number
311
+ dds:
312
+ type: number
313
+ past_year_committers:
314
+ type: array
315
+ items:
316
+ type: object
317
+ past_year_total_commits:
318
+ type: integer
319
+ past_year_total_committers:
320
+ type: integer
321
+ past_year_total_bot_commits:
322
+ type: integer
323
+ past_year_total_bot_committers:
324
+ type: integer
325
+ past_year_mean_commits:
326
+ type: number
327
+ past_year_dds:
328
+ type: number
329
+ last_synced_at:
330
+ type: string
331
+ format: date-time
332
+ last_synced_commit:
333
+ type: string
334
+ updated_at:
335
+ type: string
336
+ format: date-time
337
+ created_at:
338
+ type: string
339
+ format: date-time
340
+ commits_url:
341
+ type: string
342
+ Commit:
343
+ type: object
344
+ properties:
345
+ sha:
346
+ type: string
347
+ message:
348
+ type: string
349
+ author:
350
+ type: string
351
+ committer:
352
+ type: string
353
+ timestamp:
354
+ type: string
355
+ format: date-time
356
+ merge:
357
+ type: boolean
358
+ html_url:
359
+ type: string
360
+ Committer:
361
+ type: object
362
+ properties:
363
+ id:
364
+ type: integer
365
+ login:
366
+ type: string
367
+ emails:
368
+ type: array
369
+ items:
370
+ type: string
371
+ commits_count:
372
+ type: integer
373
+ repositories_count:
374
+ type: integer
375
+ created_at:
376
+ type: string
377
+ format: date-time
378
+ updated_at:
379
+ type: string
380
+ format: date-time
381
+ repositories:
382
+ type: array
383
+ items:
384
+ type: object
385
+ properties:
386
+ id:
387
+ type: integer
388
+ full_name:
389
+ type: string
390
+ commit_count:
391
+ type: integer