systemlink-cli 2.5.4__py3-none-any.whl → 2.5.6__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.
slcli/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Version information for slcli."""
2
2
 
3
3
  # This file is auto-generated. Do not edit manually.
4
- __version__ = "2.5.4"
4
+ __version__ = "2.5.6"
slcli/asset_click.py CHANGED
@@ -459,7 +459,7 @@ def register_asset_commands(cli: Any) -> None:
459
459
  @click.option(
460
460
  "--take",
461
461
  "-t",
462
- type=int,
462
+ type=click.IntRange(min=1),
463
463
  default=25,
464
464
  show_default=True,
465
465
  help="Maximum assets to return (table page size; JSON list total)",
@@ -789,7 +789,7 @@ def register_asset_commands(cli: Any) -> None:
789
789
  @click.option(
790
790
  "--take",
791
791
  "-t",
792
- type=int,
792
+ type=click.IntRange(min=1),
793
793
  default=25,
794
794
  show_default=True,
795
795
  help="Number of history entries to return",
@@ -865,7 +865,7 @@ def register_asset_commands(cli: Any) -> None:
865
865
  @click.option(
866
866
  "--take",
867
867
  "-t",
868
- type=int,
868
+ type=click.IntRange(min=1),
869
869
  default=25,
870
870
  show_default=True,
871
871
  help="Number of history entries to return",
slcli/cli_utils.py CHANGED
@@ -374,6 +374,10 @@ def paginate_list_output(
374
374
  empty_message: Message when no items found
375
375
  total_label: Label for count display
376
376
  """
377
+ if page_size < 1:
378
+ click.echo("✗ Page size must be at least 1.", err=True)
379
+ sys.exit(ExitCodes.INVALID_INPUT)
380
+
377
381
  if not items:
378
382
  if format_output.lower() == "json":
379
383
  click.echo("[]")
slcli/config_click.py CHANGED
@@ -532,7 +532,7 @@ def register_config_commands(cli: Any) -> None:
532
532
  @click.option(
533
533
  "--take",
534
534
  "-t",
535
- type=int,
535
+ type=click.IntRange(min=1),
536
536
  default=25,
537
537
  show_default=True,
538
538
  help="Maximum number of profiles to display per page",
slcli/dataframe_click.py CHANGED
@@ -645,7 +645,7 @@ def _post_arrow_append(table_id: str, input_path: str, end_of_data: bool) -> req
645
645
  url,
646
646
  headers=get_headers("application/vnd.apache.arrow.stream"),
647
647
  data=arrow_file,
648
- verify=active_profile_ssl_verify(),
648
+ verify=active_profile_ssl_verify(url),
649
649
  )
650
650
  response.raise_for_status()
651
651
  return response
@@ -693,7 +693,7 @@ def register_dataframe_commands(cli: Any) -> None:
693
693
  @click.option(
694
694
  "--take",
695
695
  "-t",
696
- type=int,
696
+ type=click.IntRange(min=1),
697
697
  default=25,
698
698
  show_default=True,
699
699
  help="Maximum tables to return (table page size; JSON list total)",
@@ -813,7 +813,14 @@ def register_dataframe_commands(cli: Any) -> None:
813
813
  multiple=True,
814
814
  help="Sort clause in the form column[:asc|desc]. Repeat for multiple clauses.",
815
815
  )
816
- @click.option("--take", "-t", type=int, default=100, show_default=True, help="Rows per page")
816
+ @click.option(
817
+ "--take",
818
+ "-t",
819
+ type=click.IntRange(min=1),
820
+ default=100,
821
+ show_default=True,
822
+ help="Rows per page",
823
+ )
817
824
  @click.option("--continuation-token", help="Continuation token for paged reads")
818
825
  @click.option(
819
826
  "--request",
@@ -961,7 +968,7 @@ def register_dataframe_commands(cli: Any) -> None:
961
968
  multiple=True,
962
969
  help="Sort clause in the form column[:asc|desc]. Repeat for multiple clauses.",
963
970
  )
964
- @click.option("--take", type=int, help="Limit the number of exported rows")
971
+ @click.option("--take", type=click.IntRange(min=1), help="Limit the number of exported rows")
965
972
  @click.option(
966
973
  "--request",
967
974
  type=click.Path(exists=True, dir_okay=False, readable=True),
slcli/dff_click.py CHANGED
@@ -407,6 +407,8 @@ def register_dff_commands(cli: Any) -> None:
407
407
  @click.option("--workspace", "-w", help="Filter by workspace name or ID")
408
408
  @click.option(
409
409
  "--take",
410
+ "-t",
411
+ type=click.IntRange(min=1),
410
412
  default=25,
411
413
  show_default=True,
412
414
  help="Maximum number of configurations to return",
slcli/feed_click.py CHANGED
@@ -457,7 +457,14 @@ def register_feed_commands(cli: Any) -> None:
457
457
  default="table",
458
458
  help="Output format",
459
459
  )
460
- @click.option("--take", "-t", type=int, default=25, show_default=True, help="Items per page")
460
+ @click.option(
461
+ "--take",
462
+ "-t",
463
+ type=click.IntRange(min=1),
464
+ default=25,
465
+ show_default=True,
466
+ help="Items per page",
467
+ )
461
468
  @click.option(
462
469
  "--platform",
463
470
  "-p",
@@ -740,7 +747,14 @@ def register_feed_commands(cli: Any) -> None:
740
747
  default="table",
741
748
  help="Output format",
742
749
  )
743
- @click.option("--take", "-t", type=int, default=25, show_default=True, help="Items per page")
750
+ @click.option(
751
+ "--take",
752
+ "-t",
753
+ type=click.IntRange(min=1),
754
+ default=25,
755
+ show_default=True,
756
+ help="Items per page",
757
+ )
744
758
  def list_packages(feed_id: str, format_: str, take: int) -> None:
745
759
  """List packages in a feed."""
746
760
  format_output = validate_output_format(format_)
slcli/file_click.py CHANGED
@@ -523,7 +523,7 @@ def register_file_commands(cli: Any) -> None:
523
523
  @click.option(
524
524
  "--take",
525
525
  "-t",
526
- type=int,
526
+ type=click.IntRange(min=1),
527
527
  default=25,
528
528
  show_default=True,
529
529
  help="Maximum number of files to return",
@@ -900,7 +900,7 @@ def register_file_commands(cli: Any) -> None:
900
900
  @click.option(
901
901
  "--take",
902
902
  "-t",
903
- type=int,
903
+ type=click.IntRange(min=1),
904
904
  default=25,
905
905
  show_default=True,
906
906
  help="Maximum number of files to return",
slcli/function_click.py CHANGED
@@ -389,7 +389,7 @@ def register_function_commands(cli: Any) -> None:
389
389
  @click.option(
390
390
  "--take",
391
391
  "-t",
392
- type=int,
392
+ type=click.IntRange(min=1),
393
393
  default=25,
394
394
  show_default=True,
395
395
  help="Maximum number of functions to return",
@@ -716,7 +716,7 @@ def register_function_commands(cli: Any) -> None:
716
716
  url,
717
717
  files=files, # type: ignore
718
718
  headers=get_headers(""),
719
- verify=active_profile_ssl_verify(),
719
+ verify=active_profile_ssl_verify(url),
720
720
  )
721
721
  resp.raise_for_status()
722
722
  else:
@@ -933,7 +933,7 @@ def register_function_commands(cli: Any) -> None:
933
933
  url,
934
934
  files=files,
935
935
  headers=get_headers(""),
936
- verify=active_profile_ssl_verify(),
936
+ verify=active_profile_ssl_verify(url),
937
937
  )
938
938
  resp.raise_for_status()
939
939
  click.echo("✓ Function definition updated successfully")
@@ -1040,7 +1040,7 @@ def register_function_commands(cli: Any) -> None:
1040
1040
  @click.option(
1041
1041
  "--take",
1042
1042
  "-t",
1043
- type=int,
1043
+ type=click.IntRange(min=1),
1044
1044
  default=25,
1045
1045
  show_default=True,
1046
1046
  help="Maximum executions to return (table page size; JSON list total)",
slcli/notebook_click.py CHANGED
@@ -162,7 +162,7 @@ def _query_notebooks_http(
162
162
  url = f"{base_url}/notebook/query"
163
163
 
164
164
  response = requests.post(
165
- url, headers=headers, json=payload, verify=active_profile_ssl_verify()
165
+ url, headers=headers, json=payload, verify=active_profile_ssl_verify(url)
166
166
  )
167
167
  response.raise_for_status()
168
168
 
@@ -221,7 +221,7 @@ def _get_notebook_http(notebook_id: str) -> Dict[str, Any]:
221
221
  # SLE uses ID-based endpoint: /notebook/{id}
222
222
  url = f"{base_url}/notebook/{notebook_id}"
223
223
 
224
- response = requests.get(url, headers=headers, verify=active_profile_ssl_verify())
224
+ response = requests.get(url, headers=headers, verify=active_profile_ssl_verify(url))
225
225
  response.raise_for_status()
226
226
  result = response.json()
227
227
 
@@ -250,7 +250,7 @@ def _get_notebook_content_http(notebook_id: str) -> bytes:
250
250
  # SLE uses ID-based endpoint: /notebook/{id}/content
251
251
  url = f"{base_url}/notebook/{notebook_id}/content"
252
252
 
253
- response = requests.get(url, headers=headers, verify=active_profile_ssl_verify())
253
+ response = requests.get(url, headers=headers, verify=active_profile_ssl_verify(url))
254
254
  response.raise_for_status()
255
255
  return response.content
256
256
  except requests.exceptions.RequestException as exc:
@@ -459,8 +459,9 @@ def _create_notebook_http(name: str, workspace: str, content: bytes) -> Dict[str
459
459
  }
460
460
 
461
461
  try:
462
+ url = f"{base_url}/notebook"
462
463
  response = requests.post(
463
- f"{base_url}/notebook", headers=headers, files=files, verify=active_profile_ssl_verify()
464
+ url, headers=headers, files=files, verify=active_profile_ssl_verify(url)
464
465
  )
465
466
  response.raise_for_status()
466
467
  return response.json()
@@ -500,11 +501,12 @@ def _update_notebook_http(
500
501
  files["content"] = ("notebook.ipynb", content, "application/octet-stream") # type: ignore
501
502
 
502
503
  try:
504
+ url = f"{base_url}/notebook/{notebook_id}"
503
505
  response = requests.put(
504
- f"{base_url}/notebook/{notebook_id}",
506
+ url,
505
507
  headers=headers,
506
508
  files=files,
507
- verify=active_profile_ssl_verify(),
509
+ verify=active_profile_ssl_verify(url),
508
510
  )
509
511
  response.raise_for_status()
510
512
  return response.json()
@@ -521,10 +523,11 @@ def _delete_notebook_http(notebook_id: str) -> None:
521
523
  headers = get_headers()
522
524
 
523
525
  try:
526
+ url = f"{base_url}/notebook/{notebook_id}"
524
527
  response = requests.delete(
525
- f"{base_url}/notebook/{notebook_id}",
528
+ url,
526
529
  headers=headers,
527
- verify=active_profile_ssl_verify(),
530
+ verify=active_profile_ssl_verify(url),
528
531
  )
529
532
  response.raise_for_status()
530
533
  except requests.exceptions.RequestException as exc:
@@ -867,7 +870,7 @@ def register_notebook_commands(cli: Any) -> None:
867
870
  @click.option(
868
871
  "--take",
869
872
  "-t",
870
- type=int,
873
+ type=click.IntRange(min=1),
871
874
  default=25,
872
875
  show_default=True,
873
876
  help="Maximum number of notebooks to return",
@@ -1327,7 +1330,14 @@ def register_notebook_commands(cli: Any) -> None:
1327
1330
  ),
1328
1331
  )
1329
1332
  @click.option("--notebook-id", "-n", help="Filter by notebook ID")
1330
- @click.option("--take", "-t", type=int, default=25, show_default=True, help="Max rows/page")
1333
+ @click.option(
1334
+ "--take",
1335
+ "-t",
1336
+ type=click.IntRange(min=1),
1337
+ default=25,
1338
+ show_default=True,
1339
+ help="Max rows/page",
1340
+ )
1331
1341
  @click.option(
1332
1342
  "--format",
1333
1343
  "-f",
@@ -1582,7 +1592,7 @@ def register_notebook_commands(cli: Any) -> None:
1582
1592
  # Use direct requests.post because make_api_request only supports dict payloads.
1583
1593
  headers = get_headers("application/json")
1584
1594
  resp = requests.post(
1585
- url, headers=headers, json=payload, verify=active_profile_ssl_verify()
1595
+ url, headers=headers, json=payload, verify=active_profile_ssl_verify(url)
1586
1596
  )
1587
1597
  resp.raise_for_status()
1588
1598
  resp_data = resp.json()
@@ -1704,7 +1714,7 @@ def register_notebook_commands(cli: Any) -> None:
1704
1714
  try:
1705
1715
  headers = get_headers("application/json")
1706
1716
  resp = requests.post(
1707
- url, headers=headers, json=payload, verify=active_profile_ssl_verify()
1717
+ url, headers=headers, json=payload, verify=active_profile_ssl_verify(url)
1708
1718
  )
1709
1719
  resp.raise_for_status()
1710
1720
  resp_data = resp.json()
@@ -1805,7 +1815,7 @@ def register_notebook_commands(cli: Any) -> None:
1805
1815
  url = f"{base}/cancel-executions"
1806
1816
  headers = get_headers("application/json")
1807
1817
  resp = requests.post(
1808
- url, headers=headers, json=[execution_id], verify=active_profile_ssl_verify()
1818
+ url, headers=headers, json=[execution_id], verify=active_profile_ssl_verify(url)
1809
1819
  )
1810
1820
  resp.raise_for_status()
1811
1821
  else:
slcli/policy_click.py CHANGED
@@ -75,7 +75,7 @@ def register_policy_commands(cli: Any) -> None:
75
75
  @click.option(
76
76
  "--take",
77
77
  "-t",
78
- type=int,
78
+ type=click.IntRange(min=1),
79
79
  default=None,
80
80
  help="Limit results (default: 25 for table, all for JSON)",
81
81
  )
@@ -642,7 +642,7 @@ def register_policy_commands(cli: Any) -> None:
642
642
  @click.option(
643
643
  "--take",
644
644
  "-t",
645
- type=int,
645
+ type=click.IntRange(min=1),
646
646
  default=None,
647
647
  help="Limit results (default: 25 for table, all for JSON)",
648
648
  )
slcli/routine_click.py CHANGED
@@ -154,7 +154,7 @@ def register_routine_commands(cli: Any) -> None:
154
154
  @click.option(
155
155
  "--take",
156
156
  "-t",
157
- type=int,
157
+ type=click.IntRange(min=1),
158
158
  default=25,
159
159
  show_default=True,
160
160
  help="Maximum number of routines to return",
slcli/spec_click.py CHANGED
@@ -1330,7 +1330,7 @@ def register_spec_commands(cli: Any) -> None:
1330
1330
  "-t",
1331
1331
  "--take",
1332
1332
  "take",
1333
- type=int,
1333
+ type=click.IntRange(min=1),
1334
1334
  default=25,
1335
1335
  show_default=True,
1336
1336
  help="Items per page for table output, or max items for JSON output",
@@ -1527,7 +1527,7 @@ def register_spec_commands(cli: Any) -> None:
1527
1527
  "-t",
1528
1528
  "--take",
1529
1529
  "take",
1530
- type=int,
1530
+ type=click.IntRange(min=1),
1531
1531
  default=25,
1532
1532
  show_default=True,
1533
1533
  help="Maximum number of specifications to request in this query",
@@ -1760,7 +1760,7 @@ def register_spec_commands(cli: Any) -> None:
1760
1760
  @click.option(
1761
1761
  "-t",
1762
1762
  "--take",
1763
- type=int,
1763
+ type=click.IntRange(min=1),
1764
1764
  default=1000,
1765
1765
  show_default=True,
1766
1766
  help="Maximum number of specifications to export (default is higher than list)",
slcli/state_click.py CHANGED
@@ -515,7 +515,7 @@ def register_state_commands(cli: Any) -> None:
515
515
  @click.option(
516
516
  "--take",
517
517
  "-t",
518
- type=int,
518
+ type=click.IntRange(min=1),
519
519
  default=25,
520
520
  show_default=True,
521
521
  help="Maximum states to return (table page size; JSON list total)",
@@ -1021,7 +1021,7 @@ def register_state_commands(cli: Any) -> None:
1021
1021
  @click.option(
1022
1022
  "--take",
1023
1023
  "-t",
1024
- type=int,
1024
+ type=click.IntRange(min=1),
1025
1025
  default=25,
1026
1026
  show_default=True,
1027
1027
  help="Number of items per page in table output",
slcli/system_click.py CHANGED
@@ -1891,7 +1891,7 @@ def register_system_commands(cli: Any) -> None:
1891
1891
  @click.option(
1892
1892
  "--take",
1893
1893
  "-t",
1894
- type=int,
1894
+ type=click.IntRange(min=1),
1895
1895
  default=100,
1896
1896
  show_default=True,
1897
1897
  help=(
@@ -2216,7 +2216,7 @@ def register_system_commands(cli: Any) -> None:
2216
2216
  @click.option(
2217
2217
  "--take",
2218
2218
  "-t",
2219
- type=int,
2219
+ type=click.IntRange(min=1),
2220
2220
  default=10,
2221
2221
  show_default=True,
2222
2222
  help="Maximum rows to show per related-resource section",
@@ -2778,7 +2778,7 @@ def register_system_commands(cli: Any) -> None:
2778
2778
  @click.option(
2779
2779
  "--take",
2780
2780
  "-t",
2781
- type=int,
2781
+ type=click.IntRange(min=1),
2782
2782
  default=25,
2783
2783
  show_default=True,
2784
2784
  help="Items per page (table output only)",
slcli/tag_click.py CHANGED
@@ -377,7 +377,7 @@ def register_tag_commands(cli: Any) -> None:
377
377
  @click.option(
378
378
  "--take",
379
379
  "-t",
380
- type=int,
380
+ type=click.IntRange(min=1),
381
381
  default=None,
382
382
  help="Limit number of results (table: 25, json: 1000)",
383
383
  )
@@ -434,6 +434,23 @@ def register_tag_commands(cli: Any) -> None:
434
434
  total_count = data.get("totalCount", len(tags))
435
435
  continuation_token = data.get("continuationToken")
436
436
 
437
+ if format == "json":
438
+ tags = tags[:take]
439
+ while continuation_token and len(tags) < take:
440
+ page_payload = {
441
+ **query_params,
442
+ "take": take - len(tags),
443
+ "continuationToken": continuation_token,
444
+ }
445
+ page = make_api_request("POST", url, payload=page_payload).json()
446
+ page_tags = page.get("tagsWithValues", [])
447
+ tags.extend(page_tags[: take - len(tags)])
448
+ continuation_token = page.get("continuationToken")
449
+ if not page_tags:
450
+ break
451
+ click.echo(json.dumps(tags, indent=2))
452
+ return
453
+
437
454
  # For table format with continuation, show interactive pagination
438
455
  if format == "table" and continuation_token:
439
456
  from .table_utils import output_formatted_list
slcli/templates_click.py CHANGED
@@ -277,7 +277,7 @@ def register_templates_commands(cli: Any) -> None:
277
277
  @click.option(
278
278
  "--take",
279
279
  "-t",
280
- type=int,
280
+ type=click.IntRange(min=1),
281
281
  default=25,
282
282
  show_default=True,
283
283
  help="Maximum number of templates to return",
@@ -767,7 +767,7 @@ def register_testmonitor_commands(cli: Any) -> None:
767
767
  @click.option(
768
768
  "--take",
769
769
  "-t",
770
- type=int,
770
+ type=click.IntRange(min=1),
771
771
  default=25,
772
772
  show_default=True,
773
773
  help="Items per page (table output only)",
@@ -957,7 +957,7 @@ def register_testmonitor_commands(cli: Any) -> None:
957
957
  @click.option(
958
958
  "--take",
959
959
  "-t",
960
- type=int,
960
+ type=click.IntRange(min=1),
961
961
  default=25,
962
962
  show_default=True,
963
963
  help="Items per page (table output only)",
slcli/user_click.py CHANGED
@@ -588,7 +588,7 @@ def register_user_commands(cli: click.Group) -> None:
588
588
  @click.option(
589
589
  "--take",
590
590
  "-t",
591
- type=int,
591
+ type=click.IntRange(min=1),
592
592
  default=25,
593
593
  help=(
594
594
  "Table page size (default 25). JSON returns up to 1000 users by default; "
slcli/utils.py CHANGED
@@ -734,22 +734,17 @@ def profile_ssl_verify(server_uri: Optional[str], profile: Profile) -> Union[boo
734
734
  return build_ssl_verify(server_uri, enabled=enabled)
735
735
 
736
736
 
737
- def active_profile_ssl_verify(server_uri: Optional[str] = None) -> Union[bool, str]:
737
+ def active_profile_ssl_verify(server_uri: str) -> Union[bool, str]:
738
738
  """Return the requests ``verify`` value for a server under the active profile.
739
739
 
740
740
  Args:
741
- server_uri: Server the operation connects to; defaults to the configured API URL.
741
+ server_uri: URL actually being requested. The profile's ``ssl-verify``
742
+ opt-out only applies when this URL belongs to the profile's hosts.
742
743
 
743
744
  Returns:
744
745
  The requests ``verify`` value from ``profile_ssl_verify``, or from
745
746
  ``build_ssl_verify`` with verification enabled when no profile is configured.
746
747
  """
747
- if server_uri is None:
748
- try:
749
- server_uri = get_base_url()
750
- except Exception:
751
- server_uri = None
752
-
753
748
  try:
754
749
  from .profiles import get_active_profile
755
750
 
slcli/web_editor.py CHANGED
@@ -287,7 +287,7 @@ class DFFWebEditor:
287
287
  api_base = get_base_url().rstrip("/")
288
288
  api_scheme, api_netloc = _validated_proxy_origin(api_base)
289
289
  default_headers = get_headers()
290
- ssl_verify = active_profile_ssl_verify()
290
+ ssl_verify = active_profile_ssl_verify(api_base)
291
291
  secret = self._secret
292
292
 
293
293
  class EditorTCPServer(socketserver.TCPServer):
slcli/webapp_click.py CHANGED
@@ -1274,7 +1274,7 @@ def register_webapp_commands(cli: Any) -> None:
1274
1274
  @click.option(
1275
1275
  "--take",
1276
1276
  "take",
1277
- type=int,
1277
+ type=click.IntRange(min=1),
1278
1278
  default=25,
1279
1279
  show_default=True,
1280
1280
  help="Maximum webapps to return (table page size; JSON list total)",
slcli/workflows_click.py CHANGED
@@ -360,7 +360,7 @@ def register_workflows_commands(cli: Any) -> None:
360
360
  @click.option(
361
361
  "--take",
362
362
  "-t",
363
- type=int,
363
+ type=click.IntRange(min=1),
364
364
  default=25,
365
365
  show_default=True,
366
366
  help="Maximum number of workflows to return",
slcli/workitem_click.py CHANGED
@@ -450,7 +450,7 @@ def register_workitem_commands(cli: Any) -> None:
450
450
  @click.option(
451
451
  "--take",
452
452
  "-t",
453
- type=int,
453
+ type=click.IntRange(min=1),
454
454
  default=25,
455
455
  show_default=True,
456
456
  help="Maximum number of work items to return (table) or fetch (json)",
@@ -1214,7 +1214,7 @@ def register_workitem_commands(cli: Any) -> None:
1214
1214
  @click.option(
1215
1215
  "--take",
1216
1216
  "-t",
1217
- type=int,
1217
+ type=click.IntRange(min=1),
1218
1218
  default=25,
1219
1219
  show_default=True,
1220
1220
  help="Maximum number of templates to display per page (table) or fetch (json)",
@@ -1801,7 +1801,7 @@ def register_workitem_commands(cli: Any) -> None:
1801
1801
  @click.option(
1802
1802
  "--take",
1803
1803
  "-t",
1804
- type=int,
1804
+ type=click.IntRange(min=1),
1805
1805
  default=25,
1806
1806
  show_default=True,
1807
1807
  help="Maximum number of workflows to display per page",
slcli/workspace_click.py CHANGED
@@ -7,7 +7,7 @@ from urllib.parse import urlencode
7
7
 
8
8
  import click
9
9
 
10
- from .cli_utils import validate_output_format
10
+ from .cli_utils import is_interactive_environment, validate_output_format
11
11
  from .rich_output import render_table
12
12
  from .utils import (
13
13
  ExitCodes,
@@ -85,7 +85,7 @@ def register_workspace_commands(cli: Any) -> None:
85
85
  @click.option(
86
86
  "--take",
87
87
  "-t",
88
- type=int,
88
+ type=click.IntRange(min=1),
89
89
  default=25,
90
90
  show_default=True,
91
91
  help="Maximum number of workspaces to return from API",
@@ -109,7 +109,7 @@ def register_workspace_commands(cli: Any) -> None:
109
109
  if format_output.lower() == "json":
110
110
  all_workspaces = []
111
111
  skip = 0
112
- remaining = take if take and take > 0 else 25
112
+ remaining = take
113
113
  while remaining > 0:
114
114
  page_take = min(remaining, 100)
115
115
  workspaces, total_count, error = _fetch_workspaces_page(
@@ -119,17 +119,17 @@ def register_workspace_commands(cli: Any) -> None:
119
119
  click.echo(f"✗ {error}", err=True)
120
120
  sys.exit(ExitCodes.GENERAL_ERROR)
121
121
 
122
- # Filter by enabled status if needed
122
+ fetched_count = len(workspaces)
123
+ skip += fetched_count
123
124
  if not include_disabled:
124
125
  workspaces = [ws for ws in workspaces if ws.get("enabled", True)]
125
126
 
126
127
  all_workspaces.extend(workspaces)
127
128
 
128
129
  # Stop when we've collected the requested amount or reached total
129
- if len(all_workspaces) >= take or skip + page_take >= total_count:
130
+ if not fetched_count or skip >= total_count:
130
131
  break
131
132
 
132
- skip += page_take
133
133
  remaining = take - len(all_workspaces)
134
134
 
135
135
  # Trim in case we over-collected due to page boundaries
@@ -158,17 +158,19 @@ def register_workspace_commands(cli: Any) -> None:
158
158
  click.echo(f"✗ {error}", err=True)
159
159
  sys.exit(ExitCodes.GENERAL_ERROR)
160
160
 
161
+ fetched_count = len(workspaces)
162
+ skip += fetched_count
163
+
161
164
  # Filter by enabled status if needed
162
165
  if not include_disabled:
163
166
  workspaces = [ws for ws in workspaces if ws.get("enabled", True)]
164
167
 
165
- if not workspaces and skip == 0:
166
- click.echo("No workspaces found.")
167
- return
168
-
169
168
  if not workspaces:
170
- # No more results on this page
171
- break
169
+ if not fetched_count or skip >= total_count_from_api:
170
+ if shown_count == 0:
171
+ click.echo("No workspaces found.")
172
+ break
173
+ continue
172
174
 
173
175
  # Display the page
174
176
  from .table_utils import output_formatted_list
@@ -184,7 +186,6 @@ def register_workspace_commands(cli: Any) -> None:
184
186
  )
185
187
 
186
188
  shown_count += len(workspaces)
187
- skip += take
188
189
 
189
190
  # Check if there are potentially more results from the API
190
191
  # We check skip against total_count to see if the next page exists
@@ -194,12 +195,7 @@ def register_workspace_commands(cli: Any) -> None:
194
195
  # Ask user if they want to see more; if non-interactive, stop
195
196
  click.echo(f"\nShowing {shown_count} workspace(s) so far. More may be available.")
196
197
 
197
- try:
198
- is_tty = sys.stdout.isatty() and sys.stdin.isatty()
199
- except Exception:
200
- is_tty = False
201
-
202
- if not is_tty:
198
+ if not is_interactive_environment():
203
199
  break
204
200
  if not click.confirm("Show next page?", default=True):
205
201
  break
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: systemlink-cli
3
- Version: 2.5.4
3
+ Version: 2.5.6
4
4
  Summary: SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates.
5
5
  License-File: LICENSE
6
6
  Author: Fred Visser
@@ -2,18 +2,18 @@ dff-editor/editor.js,sha256=VQJNqtkFSeXec_hidYdbsvhcKo8-dcdMoU5qvGVn3YQ,97488
2
2
  dff-editor/index.html,sha256=Bbicid_Fx66W7ypHgSGJrUtkAEFcLP3HkRoxiGKZjCs,11657
3
3
  slcli/__init__.py,sha256=ZRF050VsFgb4zeyyQzQINQ4eHFwEBBoUq-CPyziIB6g,66
4
4
  slcli/__main__.py,sha256=wUlBlvYS3Tn4ipw9_7zMr2d1houRpNnALG0TxHg6xZg,829
5
- slcli/_version.py,sha256=gHVQqWAKm1SGblI0BHOLB3Z7SZjQS_R48ZpidZewDLI,113
5
+ slcli/_version.py,sha256=HC6u5BvrUKdbz8WbuT2NGCYMbaO6nYU6D6zEmzZuLPs,113
6
6
  slcli/alarm_click.py,sha256=0z0SOO_LJQR9dYqLdOTfZgA4Ogl8d1fsJ7TrJHukDsU,32053
7
- slcli/asset_click.py,sha256=rBA52bBjn5Kmv0kHv4ft1vBMXFvMGmR292AbX3s_zvY,44544
7
+ slcli/asset_click.py,sha256=0JP_U1NNeNX-6swRQJizwnZQv4A_ou4r41pGQMEE_D4,44598
8
8
  slcli/cli_formatters.py,sha256=ShrU2RbnQUEKhJ6ahWuv8c3zw7C-yg0o20i1opq9gZk,7275
9
- slcli/cli_utils.py,sha256=tXagGGAeEVvxlKpyHSzbNiosjhrxMmwgDUMJ4glAK1I,13087
9
+ slcli/cli_utils.py,sha256=2mtvJ1jL0PTP4YnLFQ70JJxCJxgpncLLSmohITqum4Q,13218
10
10
  slcli/comment_click.py,sha256=klbOQfFYVQ-HDi1hoHWuZE3X8S_5iI2HWfPaAYyICOQ,21048
11
11
  slcli/completion_click.py,sha256=KYnGP-1LT-iQVg32BRQOmX5LQspVjZ7D--tpH0qh_MA,13952
12
12
  slcli/config.py,sha256=2UNPpJK_E5lDUbiyvRxbigTFQ-PZvDEKwuas2YYkiGU,1971
13
- slcli/config_click.py,sha256=3jQrgtyHXyz82yZk22V0WdmowXFlhRqMH10oeN0-sS8,45928
13
+ slcli/config_click.py,sha256=0gTCHFmk9oxH0r8CGPZxbv34LYx_xNbViT2e9YRXoj8,45946
14
14
  slcli/credentials.py,sha256=vKTS7hNAt3t7HB4ggWOZKMLNISefbT2hpCXtyEAyMCg,19996
15
- slcli/dataframe_click.py,sha256=LiqpXGBkxrpL-5sFmNBrIEEUf1bgfKvZGh8p27aDnIc,44064
16
- slcli/dff_click.py,sha256=eqpclQ59C7yoVHTfpZ-UF6I85wNes1JvKO9_fx0yN7E,39100
15
+ slcli/dataframe_click.py,sha256=52T4rCmWn3Uqk7aopxgq76aY6vKjg6uNJsQz4x9kDFI,44176
16
+ slcli/dff_click.py,sha256=iEajBP5t3AXI_dO72ncTVFU5CNgbSx0If_OSp-LO27M,39150
17
17
  slcli/dff_decorators.py,sha256=o-QfzYjWGnJ45GevsI-6vAdODCotwv7OgFgXKO3FVqQ,714
18
18
  slcli/example_click.py,sha256=RsutC-styxLoWPixPh1n1PXIJebp6busIr4d3dqePnM,19035
19
19
  slcli/example_loader.py,sha256=Zuv6IjkOqkM8cSYc1n5HLFuSxQ0F0jMQ_phlVlOfOos,10895
@@ -40,9 +40,9 @@ slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalcul
40
40
  slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb,sha256=BEW_ngIwDQ_X6ovCOpjXAYkq5U5sdcXxewMGJdfycLg,62544
41
41
  slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb,sha256=nhIRbiG_LfCEVe7S2eActnvlUIjTdOgfMxOpsVmpbOg,31836
42
42
  slcli/examples/spec-compliance-notebooks/spec_template.xlsx,sha256=fLMzo1oTLVFZ1HM5hqoCPhs_BIxppYM5ETVCgPZLGWg,15675
43
- slcli/feed_click.py,sha256=IzE_VwQ8IXmEgqe04afd-wE91JcV7pT3mZ5eYIT4MF4,30437
44
- slcli/file_click.py,sha256=5dpUgUc9ZuxG4cWO3pFjnoTyN8wB8RkndE7c5t5_x50,45841
45
- slcli/function_click.py,sha256=yU6oy76VV3zSSLkyjht_2VPD2GsSczPrCSO5tLOZsyY,54592
43
+ slcli/feed_click.py,sha256=dcOdS_fiKl8hkaX_LWNmhMMNxjl697EHdedLZeUcf-o,30583
44
+ slcli/file_click.py,sha256=C0-HQCQxCdNhKDh8pJ2I2yjrFdAzzOrJOd3gy_7X84w,45877
45
+ slcli/function_click.py,sha256=KroYWuvA_qwCLzigxfgulpEJy4Uy3cogVoveCnWdQkk,54634
46
46
  slcli/function_templates.py,sha256=GfmsBF0KrsIp2rBiO9ha5UAHv0O9g7yr7xcA4l8vbi8,3371
47
47
  slcli/main.py,sha256=f08hzrawa6ialKgIxE8H0fY65FZmlCbb1EmLHbt3VEE,29594
48
48
  slcli/managed_client/__init__.py,sha256=OBOqV5QisENmueusHloKye9CWldM1QvLBOTDSDiETVQ,1564
@@ -76,17 +76,17 @@ slcli/migration/testmonitor/discovery.py,sha256=AsNAI01svjzDh3KK1MA4pJZWdrNYC8J5
76
76
  slcli/migration/testmonitor/discovery_task.py,sha256=NUcpZ7QBS3iWJincwTTU7mEMzHxpwoC7nxKuW81q-8E,1353
77
77
  slcli/migration/testmonitor/models.py,sha256=kR8STukD6IcSqlbQI-iDzA6YvODOVlIKc7mFKb5ZVUs,1187
78
78
  slcli/migration/workspace_client.py,sha256=ur53BPIsdPw2QoXCfokMEVYA_XgGl5X8Eu7zHHRJNXE,1448
79
- slcli/notebook_click.py,sha256=lSPkjqz_F1xoE1h5OG_VaUuds7KLtOZKYbkt78hMxzw,71459
79
+ slcli/notebook_click.py,sha256=PHtwaeh7FS5i2vEHchcTdtvG_wZcMyuD_nZJs1MMYq8,71631
80
80
  slcli/paths.py,sha256=6buJ3dvvYFmHyj01W2d-p_bHDkYTYjJEZGe0CvykTdU,941
81
81
  slcli/pkce.py,sha256=MMc4958hqZYDrx96zNG3-TGpZG2NXX5Og6Tl9IXYyBg,22355
82
82
  slcli/platform.py,sha256=cJ3BtDsq7QTMa2uHc09PBYwE0Iw3od95Fo2YwhmpYHg,37161
83
- slcli/policy_click.py,sha256=7Ns1HGa4yn-tAEfDxsmbIbG-koEB75tY2kRVdux3tLM,29096
83
+ slcli/policy_click.py,sha256=WWXsx2hZe85QAQ3LOrweDm5vj8MN1x7hwaGWD7BTi9Q,29132
84
84
  slcli/policy_utils.py,sha256=WMn3mCcznAm2Z3Q3beVQPDhldP3-jSjVCKzTPk7FLVQ,13765
85
85
  slcli/profile_credentials.py,sha256=2H4aoOymn917QFkyyH4cAgLVBQHSEYIBTIEsBkrmAhA,16993
86
86
  slcli/profiles.py,sha256=tYnjvHfgpBtAkGL5u94IzTqdA8xMp7ORx9jcby0PigE,14245
87
87
  slcli/response_handlers.py,sha256=8nURxCwRgBMgED2AfM1GglcjUcceanBg4yQ-tPTUIek,12812
88
88
  slcli/rich_output.py,sha256=cl5B84-sZMvEO4pzuTtv6Vr4srW6LczbtEACBZ1eNFE,14929
89
- slcli/routine_click.py,sha256=kOWDmzEgvO8gIDlZw2CpYmGp-4vZQWre9v8i6RndgFM,25253
89
+ slcli/routine_click.py,sha256=jHFsfGBc0lVPVt-MC0EGi04AgQYlXVOR_TTKuuAj-NM,25271
90
90
  slcli/skill_click.py,sha256=AXmbxCObc3kWsw-k461mXGdHwhbGhpr0f4QB6FBosI0,12483
91
91
  slcli/skills/slcli/SKILL.md,sha256=aX-FVtSaS8sAFWEWPRrRcz5rQBEefMIF71RUMZNK8uc,13073
92
92
  slcli/skills/slcli/evals/COPILOT_BATCH_RUN_PROMPT.md,sha256=2V9Trv_JHX4Py8pQLyqhmD1PjqTVUSRcCFQQWPuWoHY,6925
@@ -129,23 +129,23 @@ slcli/skills/slcli/scripts/prepare_eval_prompts.py,sha256=yYoIsfzKct-lCtgl4FTDCP
129
129
  slcli/skills/slcli/scripts/prepare_eval_workspace.py,sha256=pBQz6-wCD9kzZx_GE3QrEj7h4pgCfSyu_dLW0oiBwU8,18721
130
130
  slcli/skills/slcli/scripts/render_eval_review.py,sha256=6qd7VutQT_KdpPCEW5TtidS_HRA1Bp_wXi58NCm7Kco,2171
131
131
  slcli/skills/slcli/scripts/spec_import_helper.py,sha256=p6npcjrFTK0OnAwPQRu4O211WLMJ4Fte9NtqU-73cog,11429
132
- slcli/spec_click.py,sha256=xDN7qZ90b4v73O94bzyeplUjJBdLpvrsj3D6Y9zMJs4,77305
132
+ slcli/spec_click.py,sha256=lESr81E7hDc3oeKgrM0go1NA6067Ae-V9SOvr7MdC3Q,77359
133
133
  slcli/ssl_trust.py,sha256=gSU004tHLkN8k9T4apYIzuX9hdmdXkRn0-Pmivcr6C4,24857
134
- slcli/state_click.py,sha256=dceJN-L4OMqouj83vOs-BeIzm_HscZzchTa2ZQ5S1_I,38617
135
- slcli/system_click.py,sha256=HoRTM-Sv5PqIB9YMm4PTUxUv7vMc9JH_byZ9ty-sTow,109572
134
+ slcli/state_click.py,sha256=u0uMfpCClPIamYMxfUX24ofTnXmAlFaOgE5LwjMLN04,38653
135
+ slcli/system_click.py,sha256=sLSsh02LxWLo7LT-NVXDxb6BBPHwvyyzj3U7gmO2xjY,109626
136
136
  slcli/system_query_utils.py,sha256=x4Fs5XXI4_3X4mhDQUsm_DLIsSX7efM1sRTF1Tcq8Lc,5156
137
137
  slcli/systemlink-logo.svg,sha256=5JhhLGuEMvYPI0tiBNnvmbRjA1EB5h-cH0e_iCYCT04,5819
138
138
  slcli/table_utils.py,sha256=zL6syWGk_GeELba-WZjJ4jkQFSnKhjq5tUNclAp9m7U,2522
139
- slcli/tag_click.py,sha256=2qoHU8H5LMdPTrotaknEl9Ury8Irer5DGfYFjc0w2bY,34696
140
- slcli/templates_click.py,sha256=6c-PcmZG1CLPin77Nj7SjW11W2chyi67LOjmasz37Ck,23481
141
- slcli/testmonitor_click.py,sha256=AUVMvnHu8xUTpzZP39YcPDlmDUQ7ESNOCZDxuV5Xbbg,62219
139
+ slcli/tag_click.py,sha256=DuXL843kiZ4XQlFC4e3dLhigTAQrns5CVSwS41cJl1I,35489
140
+ slcli/templates_click.py,sha256=cEwAnkorPr_icmx7yQkBtKrlbyO105wiCQHY3VJT9B8,23499
141
+ slcli/testmonitor_click.py,sha256=4BCupAmR5-QFxX9IZIhSMurby7kpC7wA4SxeRcS-Fi0,62255
142
142
  slcli/universal_handlers.py,sha256=bcmuDXWJP55urRxGB6xv8rQBzVaJLeQx5bSgZ_JlzJw,11670
143
- slcli/user_click.py,sha256=W6moazYg4c1YoM17wE6RD4Aj4410wg7hjpp4BPurwmM,48657
144
- slcli/utils.py,sha256=_x_-BlW6mEpZ6sGfCR2aM7mKAMXIq8Sz8NAp1ud3cC8,40780
143
+ slcli/user_click.py,sha256=721qalMXfxUSzAKGpKqhIS-vVFMApBWYparKZqXKoOU,48675
144
+ slcli/utils.py,sha256=SoRNIrlgPfPQbu6vGvLwn5MdWY3J8b6uI1KBObZxMSc,40694
145
145
  slcli/version_click.py,sha256=qo2VHOlvsEUiw2-Sw1L50pCo-tLBPCJvfTte02oXajY,6998
146
- slcli/web_editor.py,sha256=zypvcDmV7c4sikbZlw0_NFNfJo1QeQ5jihwlkzySNIc,17312
146
+ slcli/web_editor.py,sha256=2F6CLoD0sqfvXqtZa09bElhAySdYtbV3IJSKd9Fa_jA,17320
147
147
  slcli/webapp_bootstrap.py,sha256=EAf38OeRnGpF3YY6fCRqgFtFalva6eTw8JI5fRMQszU,56881
148
- slcli/webapp_click.py,sha256=oW28wubNAgnQFzBxaVjouuGYrttjluPNj_TLWygXKJk,70957
148
+ slcli/webapp_click.py,sha256=3hBLkYkDBqVFbZT1pWMsLRHbpLskanKP54JjG76wExw,70975
149
149
  slcli/webapp_templates/angular/blank/.gitignore,sha256=B4bZYaFkEMoZooOeUyaF3er0BKFS4rdFiCzo2Z6syv8,40
150
150
  slcli/webapp_templates/angular/blank/README.md,sha256=RZfq_F1LhNkaJVkMsVEKi0YrWoE3Mg72R8y00nEFHD0,6386
151
151
  slcli/webapp_templates/angular/blank/angular.json,sha256=KvlA9IJJnadk5TzUhhLO1Fnm0z-GrooPg3XxVzG6FEA,2847
@@ -207,12 +207,12 @@ slcli/webapp_templates/angular/blank/src/styles.scss,sha256=CX96EgVYRPcEXKZrbY97
207
207
  slcli/webapp_templates/angular/blank/tsconfig.app.json,sha256=_EiYMYv3AYYd5qQG7eN-foSKrTIsAi2qTNnpPsvMnqQ,175
208
208
  slcli/webapp_templates/angular/blank/tsconfig.json,sha256=ihGZtwMzkCDNAWIGID5Mdi5o2VWWyIXAmlkxyAm0FY4,765
209
209
  slcli/workflow_preview.py,sha256=yXvIC5HtpCC23AxeK8O3-gvZSrAT66qQegBuq95uJjs,12453
210
- slcli/workflows_click.py,sha256=Ymb69WCzxhAQZ5bv0jTcXWlXy1yskXhIuv7FbgRBSWk,40658
211
- slcli/workitem_click.py,sha256=hmWijNzAvzvNBN0Y1wXoZZbUStRyrVIqg7J2xfJBFxw,88444
212
- slcli/workspace_click.py,sha256=T5ZfIHh_AxgGYQshJFxY2bJpCG5LkewRE3ny-pdeFDw,20981
210
+ slcli/workflows_click.py,sha256=QzgqE511Mxh8lhDhmX0vvg5FWtzwGD88Fk9PLm6pIDM,40676
211
+ slcli/workitem_click.py,sha256=n6QW07Mt9ER7jI4YJQmv9oCqh7VOv6xpqKc5DL0wLSg,88498
212
+ slcli/workspace_click.py,sha256=J9GZb6DS6klTSurvB9wvshQbUWxGNmzIaqJKXNo97LM,20924
213
213
  slcli/workspace_utils.py,sha256=7QOtotmv3ghJs6a0fDQVojKxrBKPeq_GtE4F1SmZKnM,6872
214
- systemlink_cli-2.5.4.dist-info/METADATA,sha256=Ls97EF8hngy8kc02WlX12S-kaNd8-RRlx0SnE3yuiiY,1583
215
- systemlink_cli-2.5.4.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
216
- systemlink_cli-2.5.4.dist-info/entry_points.txt,sha256=V8IyRF-NYesTOTA_yB4-lVK1EsKZsSY5zOjzGbh5zdA,288
217
- systemlink_cli-2.5.4.dist-info/licenses/LICENSE,sha256=ioLAEBMHywwQkOr14pBIc7nenmWrc-bgcMrqsB_Uvq8,1077
218
- systemlink_cli-2.5.4.dist-info/RECORD,,
214
+ systemlink_cli-2.5.6.dist-info/METADATA,sha256=OIJDGh6IlDEiwCIB83LclF9XI5jliKpxvADZ5XX0dh8,1583
215
+ systemlink_cli-2.5.6.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
216
+ systemlink_cli-2.5.6.dist-info/entry_points.txt,sha256=V8IyRF-NYesTOTA_yB4-lVK1EsKZsSY5zOjzGbh5zdA,288
217
+ systemlink_cli-2.5.6.dist-info/licenses/LICENSE,sha256=ioLAEBMHywwQkOr14pBIc7nenmWrc-bgcMrqsB_Uvq8,1077
218
+ systemlink_cli-2.5.6.dist-info/RECORD,,