jvcli 2.0.24__py3-none-any.whl → 2.0.26__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.
- jvcli/__init__.py +1 -1
- jvcli/client/app.py +7 -0
- jvcli/utils.py +32 -10
- {jvcli-2.0.24.dist-info → jvcli-2.0.26.dist-info}/METADATA +1 -1
- {jvcli-2.0.24.dist-info → jvcli-2.0.26.dist-info}/RECORD +9 -9
- {jvcli-2.0.24.dist-info → jvcli-2.0.26.dist-info}/WHEEL +1 -1
- {jvcli-2.0.24.dist-info → jvcli-2.0.26.dist-info}/entry_points.txt +0 -0
- {jvcli-2.0.24.dist-info → jvcli-2.0.26.dist-info}/licenses/LICENSE +0 -0
- {jvcli-2.0.24.dist-info → jvcli-2.0.26.dist-info}/top_level.txt +0 -0
jvcli/__init__.py
CHANGED
jvcli/client/app.py
CHANGED
@@ -146,6 +146,13 @@ def main() -> None:
|
|
146
146
|
):
|
147
147
|
st.session_state.actions_data = actions_data
|
148
148
|
|
149
|
+
# Sort actions_data alphabetically by the action's title
|
150
|
+
actions_data.sort(
|
151
|
+
key=lambda action: action.get("_package", {})
|
152
|
+
.get("meta", {})
|
153
|
+
.get("title", "")
|
154
|
+
)
|
155
|
+
|
149
156
|
for action in actions_data:
|
150
157
|
package = action.get("_package", {})
|
151
158
|
|
jvcli/utils.py
CHANGED
@@ -96,27 +96,24 @@ def is_version_compatible(
|
|
96
96
|
version: str, specifiers: str, allow_prerelease: bool = True
|
97
97
|
) -> bool:
|
98
98
|
"""
|
99
|
-
Determines if the provided version satisfies the given specifiers
|
100
|
-
|
101
|
-
|
102
|
-
- Converts comma-separated specifiers to space-separated (Node-style).
|
99
|
+
Determines if the provided version satisfies the given specifiers, with strict
|
100
|
+
prerelease checks when `allow_prerelease` is True.
|
103
101
|
"""
|
104
102
|
if not version or not specifiers:
|
105
103
|
return False
|
106
104
|
|
107
|
-
#
|
105
|
+
# Normalize specifiers to Node.js format
|
108
106
|
specifiers = re.sub(r"\s*,\s*", " ", specifiers.strip())
|
109
107
|
|
110
108
|
try:
|
111
|
-
#
|
112
|
-
|
109
|
+
# Check using nodesemver
|
110
|
+
result = nodesemver.satisfies(
|
113
111
|
version, specifiers, include_prerelease=allow_prerelease
|
114
112
|
)
|
115
113
|
except ImportError:
|
116
114
|
try:
|
117
|
-
#
|
118
|
-
|
119
|
-
return semver.satisfies(
|
115
|
+
# Fallback to python-semver
|
116
|
+
result = semver.satisfies(
|
120
117
|
version, specifiers, allow_prerelease=allow_prerelease
|
121
118
|
)
|
122
119
|
except Exception:
|
@@ -124,6 +121,31 @@ def is_version_compatible(
|
|
124
121
|
except Exception:
|
125
122
|
return False
|
126
123
|
|
124
|
+
# Additional scrutiny for prerelease logic
|
125
|
+
if allow_prerelease and result:
|
126
|
+
try:
|
127
|
+
version_info = semver.VersionInfo.parse(version)
|
128
|
+
# Extract base version from specifier (e.g., "^2.0.0-alpha.44" → "2.0.0-alpha.44")
|
129
|
+
base_version_match = re.search(
|
130
|
+
r"[\^~>=<]*(?P<version>\d+\.\d+\.\d+(-[a-zA-Z0-9\.]+)?)", specifiers
|
131
|
+
)
|
132
|
+
if base_version_match:
|
133
|
+
base_version_str = base_version_match.group("version")
|
134
|
+
base_version_info = semver.VersionInfo.parse(base_version_str)
|
135
|
+
|
136
|
+
# Case 1: Specifier is a prerelease
|
137
|
+
if base_version_info.prerelease:
|
138
|
+
# Reject stable versions or prereleases lower than the base prerelease
|
139
|
+
if (not version_info.prerelease) or (
|
140
|
+
version_info < base_version_info
|
141
|
+
):
|
142
|
+
return False
|
143
|
+
|
144
|
+
except (ValueError, TypeError):
|
145
|
+
pass # Fallback to original result if parsing fails
|
146
|
+
|
147
|
+
return result
|
148
|
+
|
127
149
|
|
128
150
|
def validate_dependencies(dependencies: dict, token: Optional[str] = None) -> None:
|
129
151
|
"""Ensure all dependencies exist in the registry."""
|
@@ -1,10 +1,10 @@
|
|
1
|
-
jvcli/__init__.py,sha256=
|
1
|
+
jvcli/__init__.py,sha256=hr8tbcUWGFi26QZac7x9w2E2ZRXUxHu9IZEdV84kM_E,171
|
2
2
|
jvcli/api.py,sha256=gd-EP1e75e7HijyrP-EF6i_jjCo6YUeSbm1l5daKLfQ,10352
|
3
3
|
jvcli/auth.py,sha256=mHP425hvXhNxzeX--cApkrP7SdDPmfG6V0Li5TLHmIg,1953
|
4
4
|
jvcli/cli.py,sha256=ntTkriNGtfxFAdJw5ikdq2wD43pIqDpb7lfXsCMXOWQ,1191
|
5
|
-
jvcli/utils.py,sha256=
|
5
|
+
jvcli/utils.py,sha256=DlDsvsGGTyzFY9EezSA0Fo7on4ZiPgreRvoDGrfuWJE,8240
|
6
6
|
jvcli/client/__init__.py,sha256=WGP05OBzZHReqENYs1qYqMnYvgAaNVW6KvGQvyB3NGs,85
|
7
|
-
jvcli/client/app.py,sha256=
|
7
|
+
jvcli/client/app.py,sha256=wQhJNfeF7NOx_MzzgnVy8Nfy9OW5fX0si6A34U1Woek,6452
|
8
8
|
jvcli/client/lib/__init__.py,sha256=_Wv8CNIxeIle_x0U9T6w9s5mPuOY9-0u69BvTEPXLUw,38
|
9
9
|
jvcli/client/lib/page.py,sha256=QF53ffO4A2P9QTdPFfi0baCpKyEMmfkLyhJNxm7pTb0,2225
|
10
10
|
jvcli/client/lib/utils.py,sha256=Z1YJfeu8PnS-Ko2VcvDNu7mP6JrfUP3yJsFdKDf-psg,9692
|
@@ -53,9 +53,9 @@ jvcli/templates/2.0.0/project/main.jac,sha256=r37jsaGq-85YvDbHP3bQvBXk0u8w0rtRTZ
|
|
53
53
|
jvcli/templates/2.0.0/project/actions/README.md,sha256=TU1t-rOBH5WQP_HUWaEBLq5BbPv4jejtjIrwTW4hZwM,1742
|
54
54
|
jvcli/templates/2.0.0/project/daf/README.md,sha256=fO-dcc3j-1E6sFagIvvJsISAth11N-2d64G0yHi7JrY,1682
|
55
55
|
jvcli/templates/2.0.0/project/tests/README.md,sha256=-1ZXkxuUKa6tMw_jlF3rpCvUFq8ijW2L-nSuAkbCANo,917
|
56
|
-
jvcli-2.0.
|
57
|
-
jvcli-2.0.
|
58
|
-
jvcli-2.0.
|
59
|
-
jvcli-2.0.
|
60
|
-
jvcli-2.0.
|
61
|
-
jvcli-2.0.
|
56
|
+
jvcli-2.0.26.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
57
|
+
jvcli-2.0.26.dist-info/METADATA,sha256=PAetbexEYq4nLZ5Ym2v0AX9NeJeGagpNB4u5vuUmZ_c,21667
|
58
|
+
jvcli-2.0.26.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
59
|
+
jvcli-2.0.26.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
|
60
|
+
jvcli-2.0.26.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
|
61
|
+
jvcli-2.0.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|