chatsbom 0.2.6__py3-none-any.whl → 0.2.7__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.
- chatsbom/__main__.py +24 -1
- chatsbom/__version__.py +19 -0
- {chatsbom-0.2.6.dist-info → chatsbom-0.2.7.dist-info}/METADATA +1 -1
- {chatsbom-0.2.6.dist-info → chatsbom-0.2.7.dist-info}/RECORD +6 -5
- {chatsbom-0.2.6.dist-info → chatsbom-0.2.7.dist-info}/WHEEL +0 -0
- {chatsbom-0.2.6.dist-info → chatsbom-0.2.7.dist-info}/entry_points.txt +0 -0
chatsbom/__main__.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import typer
|
|
2
2
|
|
|
3
|
+
from chatsbom.__version__ import __version__
|
|
3
4
|
from chatsbom.commands import chat
|
|
4
5
|
from chatsbom.commands import collect
|
|
5
6
|
from chatsbom.commands import convert
|
|
@@ -8,13 +9,35 @@ from chatsbom.commands import index
|
|
|
8
9
|
from chatsbom.commands import query
|
|
9
10
|
from chatsbom.commands import status
|
|
10
11
|
|
|
12
|
+
|
|
13
|
+
def version_callback(value: bool):
|
|
14
|
+
"""Print version and exit."""
|
|
15
|
+
if value:
|
|
16
|
+
typer.echo(f"ChatSBOM version {__version__}")
|
|
17
|
+
raise typer.Exit()
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
app = typer.Typer(
|
|
12
21
|
help='ChatSBOM - Talk to your Supply Chain. Chat with SBOMs.',
|
|
13
22
|
no_args_is_help=True,
|
|
14
23
|
add_completion=False,
|
|
15
24
|
)
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
|
|
27
|
+
@app.callback()
|
|
28
|
+
def main(
|
|
29
|
+
version: bool = typer.Option(
|
|
30
|
+
None,
|
|
31
|
+
'--version',
|
|
32
|
+
'-v',
|
|
33
|
+
help='Show version and exit',
|
|
34
|
+
callback=version_callback,
|
|
35
|
+
is_eager=True,
|
|
36
|
+
),
|
|
37
|
+
):
|
|
38
|
+
"""ChatSBOM - Talk to your Supply Chain. Chat with SBOMs."""
|
|
39
|
+
|
|
40
|
+
|
|
18
41
|
app.command(name='collect')(collect.main)
|
|
19
42
|
app.command(name='download')(download.main)
|
|
20
43
|
app.command(name='convert')(convert.main)
|
chatsbom/__version__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Version information for ChatSBOM."""
|
|
2
|
+
from importlib.metadata import PackageNotFoundError
|
|
3
|
+
from importlib.metadata import version
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def get_version() -> str:
|
|
7
|
+
"""
|
|
8
|
+
Get version from installed package metadata.
|
|
9
|
+
|
|
10
|
+
Returns:
|
|
11
|
+
Version string (e.g., "0.2.6")
|
|
12
|
+
"""
|
|
13
|
+
try:
|
|
14
|
+
return version('chatsbom')
|
|
15
|
+
except PackageNotFoundError:
|
|
16
|
+
return '0.0.0-dev'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
__version__ = get_version()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
chatsbom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
chatsbom/__main__.py,sha256=
|
|
2
|
+
chatsbom/__main__.py,sha256=QVs4sO1YUqJt642_Gw4wyiDBwQ5YeL4I9v_xEDkTPdM,1228
|
|
3
|
+
chatsbom/__version__.py,sha256=JodF7HbCCwUPFhWltShEeNCAWHPTwRcPvSm7qWfMTCQ,411
|
|
3
4
|
chatsbom/commands/__init__.py,sha256=vOL_QwoyFQhEIfs-rf0LVieAjStfkqlhqkjaZ_1p7gQ,15
|
|
4
5
|
chatsbom/commands/chat.py,sha256=_X0bgXKIKTLAR-UKry0guCeRtnh08Bou5io5sTnYHBc,11236
|
|
5
6
|
chatsbom/commands/collect.py,sha256=ApweQztO889o4X4lBrxlIwdYorDUSiE01M4-XMO0HUM,16536
|
|
@@ -18,7 +19,7 @@ chatsbom/core/validation.py,sha256=v4boiht4hK73nuZNYpzLTkZKsNSoFPMUDIX-8sP2E9g,3
|
|
|
18
19
|
chatsbom/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
20
|
chatsbom/models/framework.py,sha256=Whlsbnn64YwftMifMEMVvhsWADC9uupBV4QN1i1BoNQ,2833
|
|
20
21
|
chatsbom/models/language.py,sha256=RgbBQZfG630uNZ7w-BtB1LZ5B5Q_nEExGrwUadfpRqE,3601
|
|
21
|
-
chatsbom-0.2.
|
|
22
|
-
chatsbom-0.2.
|
|
23
|
-
chatsbom-0.2.
|
|
24
|
-
chatsbom-0.2.
|
|
22
|
+
chatsbom-0.2.7.dist-info/METADATA,sha256=--56Qd-BYDIvcJIvbypG5jGM8Hch2Zd0XcnRn6LDaCY,4115
|
|
23
|
+
chatsbom-0.2.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
24
|
+
chatsbom-0.2.7.dist-info/entry_points.txt,sha256=906Ig6u2FwWk3ftNi4mth03N1NRgP4-B2p9kpppcqWA,51
|
|
25
|
+
chatsbom-0.2.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|