snapctl 0.49.4__py3-none-any.whl → 0.49.5__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 snapctl might be problematic. Click here for more details.

@@ -22,7 +22,7 @@ from snapctl.config.constants import SERVER_CALL_TIMEOUT, SNAPCTL_INPUT_ERROR, \
22
22
  SNAPCTL_SNAPEND_APPLY_MANIFEST_MISMATCH_ERROR
23
23
  from snapctl.config.hashes import PROTOS_TYPES, CLIENT_SDK_TYPES, SERVER_SDK_TYPES, \
24
24
  SNAPEND_MANIFEST_TYPES, SDK_TYPES, SDK_ACCESS_AUTH_TYPE_LOOKUP
25
- from snapctl.utils.echo import error, success, info
25
+ from snapctl.utils.echo import error, success, info, warning
26
26
  from snapctl.utils.helper import snapctl_error, snapctl_success
27
27
 
28
28
 
@@ -84,17 +84,21 @@ class Snapend:
84
84
  self.manifest_path_filename: Union[str, None] = manifest_path_filename
85
85
  self.force: bool = force
86
86
  self.category: str = category
87
- self.portal_category: Union[str, None] = Snapend._make_portal_category(
88
- category_format)
89
87
  self.category_format: str = category_format
90
88
  self.category_type: Union[str, None] = category_type
91
89
  self.category_http_lib: Union[str, None] = category_http_lib
92
- self.download_types: Union[
93
- Dict[str, Dict[str, str]], None
94
- ] = Snapend._make_download_type(category)
95
90
  self.out_path: Union[str, None] = out_path
96
91
  self.snaps: Union[str, None] = snaps
92
+ self.blocking: bool = blocking
97
93
  # Values below are derived values
94
+ # portal_category: This is purely because we have simplified the input for the user
95
+ # Only used for a reverse lookup to pass the category to the portal server
96
+ self.portal_category: Union[str, None] = Snapend._make_portal_category(
97
+ category_format)
98
+ # download_types: This stores our own internal mapping of the category to the type
99
+ self.download_types: Union[
100
+ Dict[str, Dict[str, str]], None
101
+ ] = Snapend._make_download_type(category)
98
102
  self.manifest_file_name: Union[str, None] = Snapend._get_manifest_file_name(
99
103
  manifest_path_filename
100
104
  )
@@ -102,7 +106,6 @@ class Snapend:
102
106
  byosnaps) if byosnaps else None
103
107
  self.byogs_list: Union[str, None] = Snapend._make_byogs_list(
104
108
  byogs) if byogs else None
105
- self.blocking: bool = blocking
106
109
  # Validate input
107
110
  self.validate_input()
108
111
 
@@ -127,6 +130,10 @@ class Snapend:
127
130
  return 'client-sdk'
128
131
  if category_format in SERVER_SDK_TYPES:
129
132
  return 'server-sdk'
133
+ if category_format in PROTOS_TYPES:
134
+ return 'protos'
135
+ if category_format in SNAPEND_MANIFEST_TYPES:
136
+ return 'snapend-manifest'
130
137
  return None
131
138
 
132
139
  @staticmethod
@@ -240,6 +247,8 @@ class Snapend:
240
247
  # Customize snaps
241
248
  if self.snaps:
242
249
  url += f"&snaps={self.snaps}"
250
+ if "None" in url:
251
+ warning('Detecting a potential issue in the download URL.')
243
252
  res = requests.get(
244
253
  url, headers={'api-key': self.api_key}, timeout=SERVER_CALL_TIMEOUT
245
254
  )
@@ -391,8 +400,14 @@ class Snapend:
391
400
  code=SNAPCTL_INPUT_ERROR)
392
401
  if self.category not in Snapend.DOWNLOAD_TYPE_NOT_REQUIRED and \
393
402
  (self.download_types is None or self.category_format not in self.download_types):
403
+ message = "Invalid format. Valid formats are " + \
404
+ "(req: --category sdk|protos|snapend-manifest --format " + \
405
+ "sdk(" + ", ".join(SDK_TYPES.keys()) + \
406
+ ") | protos(" + ", ".join(PROTOS_TYPES.keys()) + ")" + \
407
+ ") | snapend-manifest(" + \
408
+ ", ".join(SNAPEND_MANIFEST_TYPES.keys()) + ")"
394
409
  snapctl_error(
395
- message="Invalid Download format.", code=SNAPCTL_INPUT_ERROR)
410
+ message=message, code=SNAPCTL_INPUT_ERROR)
396
411
  # Check the Protos category
397
412
  if self.category == 'protos' and self.category_type not in Snapend.CATEGORY_TYPE_PROTOS:
398
413
  snapctl_error(
@@ -3,7 +3,7 @@ Constants used by snapctl
3
3
  """
4
4
  COMPANY_NAME = 'Snapser'
5
5
  VERSION_PREFIX = 'beta-'
6
- VERSION = '0.49.4'
6
+ VERSION = '0.49.5'
7
7
  CONFIG_FILE_MAC = '~/.snapser/config'
8
8
  CONFIG_FILE_WIN = '%homepath%\\.snapser\\config'
9
9
 
@@ -0,0 +1,8 @@
1
+ ## beta-0.49.5
2
+ ##### May 22, 2025
3
+
4
+ ### Bug Fixes
5
+
6
+ #### Snapend Download
7
+ - Fixed a bug with snapend download manifest and apply manifest.
8
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snapctl
3
- Version: 0.49.4
3
+ Version: 0.49.5
4
4
  Summary: Snapser CLI Tool
5
5
  Author: Ajinkya Apte
6
6
  Author-email: aj@snapser.com
@@ -7,9 +7,9 @@ snapctl/commands/byows.py,sha256=xmvTsWGjp3CkIvMj3LdVJO02P5W0-HfWqsP2pf9tsXE,185
7
7
  snapctl/commands/game.py,sha256=lAABIWIibrwcqvpKvTy_7UzzLtbiP6gdk4_qPBHFKOI,5248
8
8
  snapctl/commands/generate.py,sha256=9-NlZVQllBT2LZT_t9S3ztwtHzTbM-C8_x0f6z70U3g,5606
9
9
  snapctl/commands/release_notes.py,sha256=QlhBlywLiRTKBs3SlaxHf-0E0OEU_47Xjld9gGtj4Zw,1943
10
- snapctl/commands/snapend.py,sha256=4hY4ffLtZ2mxbKRgwDPi8erc78nGl-6kxmCf56HODpk,39382
10
+ snapctl/commands/snapend.py,sha256=lcg9HlgQ9YedP-GmNEZQz8UeIPmfa49KtLRgeeHyaCo,40310
11
11
  snapctl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- snapctl/config/constants.py,sha256=CTUzo_jPrVtXe7MrhiNESTTyQ4nHdRmTg2VHhaSsTVA,3716
12
+ snapctl/config/constants.py,sha256=9A7Ktr2fZ4O8ugnLMKUnMV01znnrKlfXGlJU4SOpy3Q,3716
13
13
  snapctl/config/endpoints.py,sha256=jD0n5ocJBbIkrb97F2_r9hqAHzUuddAqzqqBAPUKDTI,477
14
14
  snapctl/config/hashes.py,sha256=3OKAyOxQPnn--_hvPIzFJnhC8NVfQK4WT-RH4PHEV1w,5242
15
15
  snapctl/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -29,14 +29,15 @@ snapctl/data/releases/beta-0.49.1.mdx,sha256=4EXupEegYffnL5bu_XWxGbzIPp9xOzl7t4x
29
29
  snapctl/data/releases/beta-0.49.2.mdx,sha256=Vv_OIQyPieEGI9FgTUT0v5Gm0PC2JWa2FqcCUhnvx6s,176
30
30
  snapctl/data/releases/beta-0.49.3.mdx,sha256=XmSfpiH-LqvKS2REJ5FGDcLgyEN-OcSzwrXNI_EhiGc,234
31
31
  snapctl/data/releases/beta-0.49.4.mdx,sha256=olSEvzwrBgp6TfVYehYslhGrjLXz1EcybTmbXUmtA18,161
32
+ snapctl/data/releases/beta-0.49.5.mdx,sha256=I_NdMkfxtFUOhUQgCUfcnY1YraFim4eAtRYq5g0dJqs,138
32
33
  snapctl/main.py,sha256=6EDEQlcF3GPSqH3-Ezl7bkI33ZKaFR_c55B0Dkt0pDM,25212
33
34
  snapctl/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
35
  snapctl/types/definitions.py,sha256=EQzLeiXkJ8ISRlCqHMviNVsWWpmhWjpKaOBLdlvOTmY,644
35
36
  snapctl/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
37
  snapctl/utils/echo.py,sha256=V0qgjqqGXRiueMkq31enmNmdqciC8S90qGRcK8UupXA,1090
37
38
  snapctl/utils/helper.py,sha256=7ugGs1GE7Rywf1-tQxrgqXUU97EQYFjS3JUDpk9SX_Q,6850
38
- snapctl-0.49.4.dist-info/LICENSE,sha256=6AcXm54KFSpmUI1ji9NIBd4Xl-DtjTqiyjBzfVb_CEk,2804
39
- snapctl-0.49.4.dist-info/METADATA,sha256=LDD9RPdA6elzjHoCx4qVnGl1YtVtOUtev61U2jvFU6k,36275
40
- snapctl-0.49.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
41
- snapctl-0.49.4.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
42
- snapctl-0.49.4.dist-info/RECORD,,
39
+ snapctl-0.49.5.dist-info/LICENSE,sha256=6AcXm54KFSpmUI1ji9NIBd4Xl-DtjTqiyjBzfVb_CEk,2804
40
+ snapctl-0.49.5.dist-info/METADATA,sha256=LTqz4qckGzXeP20E2jP_ZtiVxIrNyjoQGA4NKDGMN5Y,36275
41
+ snapctl-0.49.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
42
+ snapctl-0.49.5.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
43
+ snapctl-0.49.5.dist-info/RECORD,,