mcli-framework 7.12.3__py3-none-any.whl → 7.12.4__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.

Potentially problematic release.


This version of mcli-framework might be problematic. Click here for more details.

mcli/app/commands_cmd.py CHANGED
@@ -153,11 +153,19 @@ def append_lockfile(new_state):
153
153
 
154
154
 
155
155
  def find_state_by_hash(hash_value):
156
- """Find a state by its hash value."""
156
+ """Find a state by its hash value (supports partial hash matching)."""
157
157
  states = load_lockfile()
158
+ matches = []
158
159
  for state in states:
159
- if state["hash"] == hash_value:
160
- return state
160
+ # Support both full hash and partial hash (prefix) matching
161
+ if state["hash"] == hash_value or state["hash"].startswith(hash_value):
162
+ matches.append(state)
163
+
164
+ if len(matches) == 1:
165
+ return matches[0]
166
+ elif len(matches) > 1:
167
+ # Ambiguous - multiple matches
168
+ return None
161
169
  return None
162
170
 
163
171
 
mcli/app/lock_cmd.py CHANGED
@@ -48,11 +48,19 @@ def append_lockfile(new_state):
48
48
 
49
49
 
50
50
  def find_state_by_hash(hash_value):
51
- """Find a state by its hash value."""
51
+ """Find a state by its hash value (supports partial hash matching)."""
52
52
  states = load_lockfile()
53
+ matches = []
53
54
  for state in states:
54
- if state["hash"] == hash_value:
55
- return state
55
+ # Support both full hash and partial hash (prefix) matching
56
+ if state["hash"] == hash_value or state["hash"].startswith(hash_value):
57
+ matches.append(state)
58
+
59
+ if len(matches) == 1:
60
+ return matches[0]
61
+ elif len(matches) > 1:
62
+ # Ambiguous - multiple matches
63
+ return None
56
64
  return None
57
65
 
58
66
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcli-framework
3
- Version: 7.12.3
3
+ Version: 7.12.4
4
4
  Summary: Portable workflow framework - transform any script into a versioned, schedulable command. Store in ~/.mcli/workflows/, version with lockfile, run as daemon or cron job.
5
5
  Author-email: Luis Fernandez de la Vara <luis@lefv.io>
6
6
  Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
@@ -3,10 +3,10 @@ mcli/__main__.py,sha256=nKdf3WqtXi5PhWhZGjpXKAT3a2yGUYkYCBgSLxk4hSQ,295
3
3
  mcli/cli.py,sha256=3OgzOodRtHGZnsq5H3Fy-hl7JKwjJZa5ig2L4-izK2E,382
4
4
  mcli/config.toml,sha256=263yEVvP_W9F2zOLssUBgy7amKaRAFQuBrfxcMhKxaQ,1706
5
5
  mcli/app/__init__.py,sha256=UWt7rsI_lHjZ29_iH5lX6qSLt__uBMmp5W-Rt3BEG0E,447
6
- mcli/app/commands_cmd.py,sha256=-ZMnqUjEhgRYEYXHYEcwXwZjtxu0zLxQOXqSOHg9w80,50298
6
+ mcli/app/commands_cmd.py,sha256=ClrCdFUzBBgTvdV-vCSEQgwTXI92v7D8LS-QmmEN1bA,50604
7
7
  mcli/app/completion_helpers.py,sha256=_gBHJukhseferp3G7pj6QkDvAhVt72nsfbyOHcnBazg,7484
8
8
  mcli/app/init_cmd.py,sha256=VWeCAaN5tinFBBHgzmt_JR3UdSTNVBofXXRZ4FNdkcw,12428
9
- mcli/app/lock_cmd.py,sha256=nkTTvt0UNpMuvwpxIOtVPBhGbMhR0jdRF6J_rP-ODaU,12577
9
+ mcli/app/lock_cmd.py,sha256=0m7xkpWxfJ8vxTgyvRNY2XKAwJj_CB7Sf-wvnte5RS4,12883
10
10
  mcli/app/main.py,sha256=eSrgA4C0vePllEuH2TSqyBpOxAbyAEkc-rUZk77KQBw,19076
11
11
  mcli/app/model_cmd.py,sha256=LQQD8FaebFoaJGK3u_kt19wZ3HJyo_ecwSMYyC2xIp8,2497
12
12
  mcli/app/store_cmd.py,sha256=N7FhnrhIeY6Hetv6kW4mcJ97EQvhgh0pwHiwoZSfzhU,14315
@@ -271,9 +271,9 @@ mcli/workflow/sync/test_cmd.py,sha256=E-DItNtiBTGE9ofmfrjm9qjgYjeBpMXp08fmRk6nhR
271
271
  mcli/workflow/videos/__init__.py,sha256=aV3DEoO7qdKJY4odWKoQbOKDQq4ludTeCLnZcupOFIM,25
272
272
  mcli/workflow/wakatime/__init__.py,sha256=gD6SKA7dJ28HXFd1w04YuB_WgL0SWosbEFtT2uS__pg,2595
273
273
  mcli/workflow/wakatime/wakatime.py,sha256=ig86g04qXgRrx6UXsIKd9Cv9OFhJnQLL2Plylf8TMAA,134
274
- mcli_framework-7.12.3.dist-info/licenses/LICENSE,sha256=sahwAMfrJv2-V66HNPTp7A9UmMjxtyejwTZZoWQvEcI,1075
275
- mcli_framework-7.12.3.dist-info/METADATA,sha256=MCbvO8aDP_lYdW6GLTu2Yfe9sA9i-8rLgutymLuVrko,18635
276
- mcli_framework-7.12.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
277
- mcli_framework-7.12.3.dist-info/entry_points.txt,sha256=dYrZbDIm-KUPsl1wfv600Kx_8sMy89phMkCihbDRgP8,261
278
- mcli_framework-7.12.3.dist-info/top_level.txt,sha256=_bnO8J2EUkliWivey_1le0UrnocFKmyVMQjbQ8iVXjc,5
279
- mcli_framework-7.12.3.dist-info/RECORD,,
274
+ mcli_framework-7.12.4.dist-info/licenses/LICENSE,sha256=sahwAMfrJv2-V66HNPTp7A9UmMjxtyejwTZZoWQvEcI,1075
275
+ mcli_framework-7.12.4.dist-info/METADATA,sha256=3dzhxxLFSjKvJe_psAdAJ0oZ1tqFuPDflAo2FCqFHxI,18635
276
+ mcli_framework-7.12.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
277
+ mcli_framework-7.12.4.dist-info/entry_points.txt,sha256=dYrZbDIm-KUPsl1wfv600Kx_8sMy89phMkCihbDRgP8,261
278
+ mcli_framework-7.12.4.dist-info/top_level.txt,sha256=_bnO8J2EUkliWivey_1le0UrnocFKmyVMQjbQ8iVXjc,5
279
+ mcli_framework-7.12.4.dist-info/RECORD,,