fastapi-cloud-cli 0.22.0__py3-none-any.whl → 0.22.1__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.
@@ -1 +1 @@
1
- __version__ = "0.22.0"
1
+ __version__ = "0.22.1"
@@ -40,6 +40,8 @@ LOG_LEVEL_COLORS = {
40
40
  }
41
41
 
42
42
  SINCE_PATTERN = re.compile(r"^\d+[smhd]$")
43
+ MIN_LOG_TAIL = 1
44
+ MAX_LOG_TAIL = 1000
43
45
 
44
46
 
45
47
  class AppLogsOutput(BaseModel):
@@ -57,6 +59,15 @@ def _validate_since(value: str) -> str:
57
59
  return value
58
60
 
59
61
 
62
+ def _validate_tail(value: int) -> int:
63
+ if not MIN_LOG_TAIL <= value <= MAX_LOG_TAIL:
64
+ raise typer.BadParameter(
65
+ f"Invalid value. Use a number between {MIN_LOG_TAIL} and {MAX_LOG_TAIL}."
66
+ )
67
+
68
+ return value
69
+
70
+
60
71
  def _get_log_bullet(log: AppLogEntry) -> str:
61
72
  """Colored indicator rendered in the emoji bullet column.
62
73
 
@@ -214,8 +225,9 @@ def logs(
214
225
  100,
215
226
  "--tail",
216
227
  "-t",
217
- help="Number of log lines to show before streaming.",
228
+ help=f"Number of log lines to show before streaming (max {MAX_LOG_TAIL}).",
218
229
  show_default=True,
230
+ callback=_validate_tail,
219
231
  ),
220
232
  since: str = typer.Option(
221
233
  "5m",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi-cloud-cli
3
- Version: 0.22.0
3
+ Version: 0.22.1
4
4
  Summary: Deploy and manage FastAPI Cloud apps from the command line 🚀
5
5
  Author-Email: Patrick Arminio <patrick@fastapilabs.com>
6
6
  License: MIT
@@ -1,8 +1,8 @@
1
- fastapi_cloud_cli-0.22.0.dist-info/METADATA,sha256=YqFPsOIfmKcQC5DiF-jrSvsa_8LB6l0qyvEABzskP6M,3071
2
- fastapi_cloud_cli-0.22.0.dist-info/WHEEL,sha256=VP-D4TPS230sME9Z3vb3INXvo1yt0924YRm5AOsk_dE,90
3
- fastapi_cloud_cli-0.22.0.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- fastapi_cloud_cli-0.22.0.dist-info/licenses/LICENSE,sha256=FqD5B4VbXJnefprQseE0U8llL6FxojC-i8muZy7YmSU,1086
5
- fastapi_cloud_cli/__init__.py,sha256=0kk8efeJF41FZIYweGTJylbizaWrp9W3qN78RClCWIU,23
1
+ fastapi_cloud_cli-0.22.1.dist-info/METADATA,sha256=fb2ci_WNEUkWh8qNUlICcFANm6DDdGicZo3a6mPXHy4,3071
2
+ fastapi_cloud_cli-0.22.1.dist-info/WHEEL,sha256=VP-D4TPS230sME9Z3vb3INXvo1yt0924YRm5AOsk_dE,90
3
+ fastapi_cloud_cli-0.22.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ fastapi_cloud_cli-0.22.1.dist-info/licenses/LICENSE,sha256=FqD5B4VbXJnefprQseE0U8llL6FxojC-i8muZy7YmSU,1086
5
+ fastapi_cloud_cli/__init__.py,sha256=mjWPUw5WSKjOdLE532eMicR6Gvc0AStLxFjzYGRWcns,23
6
6
  fastapi_cloud_cli/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
7
7
  fastapi_cloud_cli/cli.py,sha256=YF9pBQ__vkbzNJ95cgOzJ93ynAITKEVg1-oCMuG3I1I,2170
8
8
  fastapi_cloud_cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -34,7 +34,7 @@ fastapi_cloud_cli/commands/env/list.py,sha256=MCXZ_uAbXsFijUM2eJylF8FlLXVEe9S_Al
34
34
  fastapi_cloud_cli/commands/env/set.py,sha256=BX2XhyoaJ9Teq1kvBQSss-vTp-4mTNO9lkKQK0Q0np0,6242
35
35
  fastapi_cloud_cli/commands/login.py,sha256=VgYdAbEY0-NPuYqVeyCfvTbaED4awaU3t3uERhZXSQo,3890
36
36
  fastapi_cloud_cli/commands/logout.py,sha256=7ARjGyZjrjN-5iVzHi6EyJvv9S8HowJlF4R6N1DRPhU,857
37
- fastapi_cloud_cli/commands/logs.py,sha256=MaYoDlhPDx2iP1yPzgRbpiofLKVO8mEWI0nNcCl1gkA,7852
37
+ fastapi_cloud_cli/commands/logs.py,sha256=4vRmghe15tEgMLvlf9t-EhUH8Uc-X8fqWBPI28isvUU,8183
38
38
  fastapi_cloud_cli/commands/setup_ci.py,sha256=YSwqzvmqPypvxADFFWt__q5UkMw2R50nA5Xdyaz65e8,18335
39
39
  fastapi_cloud_cli/commands/teams/__init__.py,sha256=_PVDhN0H7e6Wd-sphQV4vCiCVE3PJftPes-WjI2InbM,3490
40
40
  fastapi_cloud_cli/commands/teams/get.py,sha256=rGqTMwlBwHScJ2MGEos7DgUIcZ897YAUSrNfpYJYYc4,2497
@@ -59,4 +59,4 @@ fastapi_cloud_cli/utils/execution.py,sha256=oyxRLUlvdBIqZyiYkyP9OR7J7WBJuZL5Pp4N
59
59
  fastapi_cloud_cli/utils/progress_file.py,sha256=GMK-OgS1pr2IgfBpJgwPqkb2k37W0b2Crsu_r3WSEWo,988
60
60
  fastapi_cloud_cli/utils/sentry.py,sha256=C_KlTV8JCtB3slrCJLNoTo6beM87rWjxAr92uwmWLR0,599
61
61
  fastapi_cloud_cli/utils/version_check.py,sha256=-iOus8nWNsQn9FnC5tZD0iCftjUdeCj-RFskPLz1KZE,5209
62
- fastapi_cloud_cli-0.22.0.dist-info/RECORD,,
62
+ fastapi_cloud_cli-0.22.1.dist-info/RECORD,,