jartify 0.2.2__tar.gz → 0.2.3__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.
- {jartify-0.2.2 → jartify-0.2.3}/PKG-INFO +4 -1
- {jartify-0.2.2 → jartify-0.2.3}/README.md +3 -0
- {jartify-0.2.2 → jartify-0.2.3}/pyproject.toml +1 -1
- jartify-0.2.3/src/jartify/__init__.py +1 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/locate.py +47 -3
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify.egg-info/PKG-INFO +4 -1
- jartify-0.2.2/src/jartify/__init__.py +0 -1
- {jartify-0.2.2 → jartify-0.2.3}/setup.cfg +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/__main__.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/app.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/cli.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/client.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/config.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/repos.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/reset.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify/setup.py +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify.egg-info/SOURCES.txt +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify.egg-info/dependency_links.txt +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify.egg-info/entry_points.txt +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify.egg-info/requires.txt +0 -0
- {jartify-0.2.2 → jartify-0.2.3}/src/jartify.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jartify
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: TUI and CLI for searching JFrog Artifactory artifacts (version, filename, sha256)
|
|
5
5
|
Author-email: Jakob Holst <code@jakobholst.dk>
|
|
6
6
|
License: MIT
|
|
@@ -134,6 +134,9 @@ jartify-locate --init
|
|
|
134
134
|
# commits so Ctrl+C keeps everything already indexed):
|
|
135
135
|
jartify-locate --init --status=progress
|
|
136
136
|
|
|
137
|
+
# Or one AQL per repo, printing the repo name as it goes (commits per repo):
|
|
138
|
+
jartify-locate --init --status=step
|
|
139
|
+
|
|
137
140
|
# Then search locally:
|
|
138
141
|
jartify-locate # list everything (respects --repo / --limit)
|
|
139
142
|
jartify-locate '*.json' # glob
|
|
@@ -108,6 +108,9 @@ jartify-locate --init
|
|
|
108
108
|
# commits so Ctrl+C keeps everything already indexed):
|
|
109
109
|
jartify-locate --init --status=progress
|
|
110
110
|
|
|
111
|
+
# Or one AQL per repo, printing the repo name as it goes (commits per repo):
|
|
112
|
+
jartify-locate --init --status=step
|
|
113
|
+
|
|
111
114
|
# Then search locally:
|
|
112
115
|
jartify-locate # list everything (respects --repo / --limit)
|
|
113
116
|
jartify-locate '*.json' # glob
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.3"
|
|
@@ -287,6 +287,47 @@ def _init_paginated(
|
|
|
287
287
|
return total_appended
|
|
288
288
|
|
|
289
289
|
|
|
290
|
+
def _init_step(
|
|
291
|
+
client: ArtifactoryClient, repos: list[str] | None
|
|
292
|
+
) -> int:
|
|
293
|
+
"""One AQL request per repo, printing the repo name as it goes."""
|
|
294
|
+
if repos is None:
|
|
295
|
+
all_repos = client.list_repositories()
|
|
296
|
+
repo_keys = [r.get("key") for r in all_repos if r.get("key")]
|
|
297
|
+
if not repo_keys:
|
|
298
|
+
print(" no repos visible to this token.")
|
|
299
|
+
return 0
|
|
300
|
+
else:
|
|
301
|
+
repo_keys = list(repos)
|
|
302
|
+
|
|
303
|
+
conn = _db_connect()
|
|
304
|
+
t0 = time.time()
|
|
305
|
+
total_appended = 0
|
|
306
|
+
skipped = 0
|
|
307
|
+
width = len(str(len(repo_keys)))
|
|
308
|
+
try:
|
|
309
|
+
for i, repo in enumerate(repo_keys, 1):
|
|
310
|
+
prefix = f"[{i:>{width}}/{len(repo_keys)}]"
|
|
311
|
+
print(f"{prefix} {repo} …", flush=True)
|
|
312
|
+
items = client.aql(_aql_query([repo]))
|
|
313
|
+
artifact_rows, location_rows, skip = _build_rows(items)
|
|
314
|
+
with conn:
|
|
315
|
+
_insert_batch(conn, artifact_rows, location_rows)
|
|
316
|
+
total_appended += len(artifact_rows)
|
|
317
|
+
skipped += skip
|
|
318
|
+
indent = " " * (len(prefix) + 1)
|
|
319
|
+
print(f"{indent}{len(artifact_rows):,} files appended "
|
|
320
|
+
f"({len(items):,} received)",
|
|
321
|
+
flush=True)
|
|
322
|
+
|
|
323
|
+
with conn:
|
|
324
|
+
_write_meta(conn)
|
|
325
|
+
_finalize(conn, t0, skipped)
|
|
326
|
+
finally:
|
|
327
|
+
conn.close()
|
|
328
|
+
return total_appended
|
|
329
|
+
|
|
330
|
+
|
|
290
331
|
def _init_index(
|
|
291
332
|
client: ArtifactoryClient,
|
|
292
333
|
repos: list[str] | None,
|
|
@@ -296,6 +337,8 @@ def _init_index(
|
|
|
296
337
|
print(f"Fetching artifact index for {scope} via AQL…", flush=True)
|
|
297
338
|
if status == "progress":
|
|
298
339
|
return _init_paginated(client, repos)
|
|
340
|
+
if status == "step":
|
|
341
|
+
return _init_step(client, repos)
|
|
299
342
|
return _init_single_shot(client, repos)
|
|
300
343
|
|
|
301
344
|
|
|
@@ -405,10 +448,11 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
405
448
|
help="Skip TLS cert verification during --init.")
|
|
406
449
|
p.add_argument(
|
|
407
450
|
"--status",
|
|
408
|
-
choices=("off", "progress"),
|
|
451
|
+
choices=("off", "progress", "step"),
|
|
409
452
|
default="off",
|
|
410
|
-
help="Progress display during --init. 'progress' paginates
|
|
411
|
-
"
|
|
453
|
+
help="Progress display during --init. 'progress' paginates AQL and "
|
|
454
|
+
"renders a live bar; 'step' runs one AQL per repo and prints "
|
|
455
|
+
"each repo name as it goes (default: off).",
|
|
412
456
|
)
|
|
413
457
|
p.add_argument("--version", action="version", version=f"jartify {__version__}")
|
|
414
458
|
return p
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jartify
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: TUI and CLI for searching JFrog Artifactory artifacts (version, filename, sha256)
|
|
5
5
|
Author-email: Jakob Holst <code@jakobholst.dk>
|
|
6
6
|
License: MIT
|
|
@@ -134,6 +134,9 @@ jartify-locate --init
|
|
|
134
134
|
# commits so Ctrl+C keeps everything already indexed):
|
|
135
135
|
jartify-locate --init --status=progress
|
|
136
136
|
|
|
137
|
+
# Or one AQL per repo, printing the repo name as it goes (commits per repo):
|
|
138
|
+
jartify-locate --init --status=step
|
|
139
|
+
|
|
137
140
|
# Then search locally:
|
|
138
141
|
jartify-locate # list everything (respects --repo / --limit)
|
|
139
142
|
jartify-locate '*.json' # glob
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|