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

@@ -1350,7 +1350,7 @@ class ByoSnap:
1350
1350
  if self.path is not None or self.resources_path is not None:
1351
1351
  self.upload_docs(no_exit=True)
1352
1352
  snapctl_success(
1353
- message='BYOSNAP publish successful', no_exit=no_exit)
1353
+ message='BYOSNAP publish image successful', no_exit=no_exit)
1354
1354
 
1355
1355
  def publish_version(self, no_exit: bool = False) -> None:
1356
1356
  """
@@ -230,6 +230,7 @@ class Snapend:
230
230
 
231
231
  def _execute_download(self) -> bool:
232
232
  try:
233
+ final_http_lib = None
233
234
  url = (
234
235
  f"{self.base_url}/v1/snapser-api/snapends/{self.snapend_id}/"
235
236
  f"download?category={self.portal_category}"
@@ -248,10 +249,19 @@ class Snapend:
248
249
  if 'auth_type' in SDK_ACCESS_AUTH_TYPE_LOOKUP[self.category_type] and \
249
250
  SDK_ACCESS_AUTH_TYPE_LOOKUP[self.category_type]['auth_type'] != '':
250
251
  url += f"&auth_type={SDK_ACCESS_AUTH_TYPE_LOOKUP[self.category_type]['auth_type']}"
251
- if self.category_http_lib:
252
- # First check if the format supports http-lib
253
- if self.category_format in Snapend.get_formats_supporting_http_lib():
254
- url += f"&http_lib={self.category_http_lib}"
252
+ if self.category_format in Snapend.get_formats_supporting_http_lib():
253
+ http_libs = Snapend.get_http_lib_for_sdk(
254
+ self.category_format
255
+ )
256
+ if self.category_http_lib:
257
+ if self.category_http_lib in http_libs:
258
+ final_http_lib = self.category_http_lib
259
+ else:
260
+ if len(http_libs) > 0:
261
+ info(f"Using default `--http-lib {http_libs[0]}`")
262
+ final_http_lib = http_libs[0]
263
+ if final_http_lib:
264
+ url += f"&http_lib={final_http_lib}"
255
265
  # Customize snaps
256
266
  if self.snaps:
257
267
  url += f"&snaps={self.snaps}"
@@ -261,16 +271,18 @@ class Snapend:
261
271
  )
262
272
  if not res.ok:
263
273
  # Handle known conflict case
274
+ response = res.json()
264
275
  if res.status_code == HTTP_CONFLICT:
265
- response = res.json()
266
276
  if (
267
277
  response.get(
268
278
  "api_error_code") == HTTP_ERROR_CLUSTER_UPDATE_IN_PROGRESS
269
279
  ):
270
280
  raise SnapendDownloadException(
271
281
  "Snapend update is in progress. Please try again later.")
272
- return False
273
-
282
+ raise SnapendDownloadException(
283
+ f"Unable to download {self.category}. " +
284
+ f"Reason: {response.get('message', '')}"
285
+ )
274
286
  fn: str = ''
275
287
  if self.category == 'admin-settings':
276
288
  fn = f"snapser-{self.snapend_id}-admin-settings.json"
@@ -289,8 +301,8 @@ class Snapend:
289
301
  fn += f"-{SDK_ACCESS_AUTH_TYPE_LOOKUP[self.category_type]['auth_type']}"
290
302
  if self.category_http_lib:
291
303
  # First check if the format supports http-lib
292
- if self.category_format in Snapend.get_formats_supporting_http_lib():
293
- fn += f"-{self.category_http_lib}"
304
+ if final_http_lib:
305
+ fn += f"-{final_http_lib}"
294
306
  fn += ".zip"
295
307
  if self.out_path is not None:
296
308
  file_save_path = os.path.join(self.out_path, fn)
@@ -321,6 +333,15 @@ class Snapend:
321
333
  format_list.append(key)
322
334
  return format_list
323
335
 
336
+ @staticmethod
337
+ def get_http_lib_for_sdk(sdk_format: str) -> list:
338
+ '''
339
+ Get the list of http-lib supported for a sdk format
340
+ '''
341
+ if sdk_format in SDK_TYPES and 'http-lib' in SDK_TYPES[sdk_format]:
342
+ return SDK_TYPES[sdk_format]['http-lib']
343
+ return []
344
+
324
345
  @staticmethod
325
346
  def get_http_formats_str() -> str:
326
347
  '''
@@ -557,10 +578,12 @@ class Snapend:
557
578
  # code=SNAPCTL_INPUT_ERROR
558
579
  # )
559
580
  if self.category_http_lib:
560
- # First check if the format supports http-lib
581
+ # First check if the format supports http-lib TODO
561
582
  if self.category_format in Snapend.get_formats_supporting_http_lib():
562
583
  # Check if the http-lib is supported for the format
563
- valid_http_libs = SDK_TYPES[self.category_format]['http-lib']
584
+ valid_http_libs = Snapend.get_http_lib_for_sdk(
585
+ self.category_format
586
+ )
564
587
  if self.category_http_lib not in valid_http_libs:
565
588
  snapctl_error(
566
589
  message="Invalid HTTP Library. Valid libraries are " +
@@ -661,47 +684,55 @@ class Snapend:
661
684
  url, headers={'api-key': self.api_key},
662
685
  files=files, data=payload, timeout=SERVER_CALL_TIMEOUT
663
686
  )
664
- if res.ok:
665
- # extract the cluster ID
687
+ if not res.ok:
666
688
  response = res.json()
667
- if 'cluster' not in response or 'id' not in response['cluster']:
668
- snapctl_error(
669
- message='Server Error. Unable to get a Snapend ID. ' +
670
- 'Please try again in sometime.',
671
- code=SNAPCTL_SNAPEND_CREATE_SERVER_ERROR,
672
- progress=progress
673
- )
674
- self._assign_snapend_id(response['cluster']['id'])
675
- info(f"Cluster ID assigned: {response['cluster']['id']}")
676
- if self.blocking:
677
- snapctl_success(
678
- message='Snapend create initiated.',
679
- progress=progress,
680
- no_exit=True
681
- )
682
- status = self._blocking_get_status()
683
- # Fetch the new manifest
684
- if status is True:
685
- # TODO: Uncomment this if we want to do an auto download
686
- # self._setup_for_download(
687
- # self.manifest_file_name.split('.')[-1])
688
- # self._execute_download()
689
- snapctl_success(
690
- message='Snapend create successful. Do not forget to download the latest manifest.',
691
- progress=progress)
692
- snapctl_error(
693
- message='Snapend create has been initiated but the Snapend is not up yet.' +
694
- 'Please try checking the status of the Snapend in some time',
695
- code=SNAPCTL_SNAPEND_CREATE_TIMEOUT_ERROR,
696
- progress=progress
697
- )
689
+ if 'details' in response:
690
+ response = response['details']
691
+ snapctl_error(
692
+ message=response,
693
+ code=SNAPCTL_SNAPEND_CREATE_ERROR,
694
+ progress=progress
695
+ )
696
+ # extract the cluster ID
697
+ response = res.json()
698
+ if 'cluster' not in response or 'id' not in response['cluster']:
699
+ snapctl_error(
700
+ message='Server Error. Unable to get a Snapend ID. ' +
701
+ 'Please try again in sometime.',
702
+ code=SNAPCTL_SNAPEND_CREATE_SERVER_ERROR,
703
+ progress=progress
704
+ )
705
+ self._assign_snapend_id(response['cluster']['id'])
706
+ info(f"Cluster ID assigned: {response['cluster']['id']}")
707
+ if self.blocking:
698
708
  snapctl_success(
699
- message="Snapend create has been initiated. " +
700
- "You can check the status using " +
701
- "`snapctl snapend state --snapend-id" +
702
- f"{response['cluster']['id']}`",
709
+ message='Snapend create initiated.',
710
+ progress=progress,
711
+ no_exit=True
712
+ )
713
+ status = self._blocking_get_status()
714
+ # Fetch the new manifest
715
+ if status is True:
716
+ # TODO: Uncomment this if we want to do an auto download
717
+ # self._setup_for_download(
718
+ # self.manifest_file_name.split('.')[-1])
719
+ # self._execute_download()
720
+ snapctl_success(
721
+ message='Snapend create successful. Do not forget to download the latest manifest.',
722
+ progress=progress)
723
+ snapctl_error(
724
+ message='Snapend create has been initiated but the Snapend is not up yet.' +
725
+ 'Please try checking the status of the Snapend in some time',
726
+ code=SNAPCTL_SNAPEND_CREATE_TIMEOUT_ERROR,
703
727
  progress=progress
704
728
  )
729
+ snapctl_success(
730
+ message="Snapend create has been initiated. " +
731
+ "You can check the status using " +
732
+ "`snapctl snapend state --snapend-id" +
733
+ f"{response['cluster']['id']}`",
734
+ progress=progress
735
+ )
705
736
  except RequestException as e:
706
737
  snapctl_error(
707
738
  message=f"Unable to create a snapend from a manifest. {e}",
@@ -75,7 +75,7 @@ class SnapendManifest:
75
75
  ) from e
76
76
  return yaml.safe_load(s)
77
77
 
78
- if not self.manifest_path_filename:
78
+ if not self.manifest_path_filename or not os.path.isfile(self.manifest_path_filename):
79
79
  return False
80
80
  with open(self.manifest_path_filename, "r", encoding="utf-8") as f:
81
81
  text = f.read()
@@ -196,6 +196,10 @@ class SnapendManifest:
196
196
  snapctl_error(
197
197
  message="Manifest path is required for sync command.",
198
198
  code=SNAPCTL_INPUT_ERROR)
199
+ if not os.path.isfile(self.manifest_path_filename):
200
+ snapctl_error(
201
+ message="Manifest path filename `--manifest-path-filename` does not exist.",
202
+ code=SNAPCTL_INPUT_ERROR)
199
203
  if (not self.snaps or self.snaps == '') and \
200
204
  (not self.features or self.features == ''):
201
205
  snapctl_error(
@@ -257,6 +261,10 @@ class SnapendManifest:
257
261
  snapctl_error(
258
262
  message="Manifest path is required for upgrade command.",
259
263
  code=SNAPCTL_INPUT_ERROR)
264
+ if not os.path.isfile(self.manifest_path_filename):
265
+ snapctl_error(
266
+ message="Manifest path filename `--manifest-path-filename` does not exist.",
267
+ code=SNAPCTL_INPUT_ERROR)
260
268
  if self.snaps and self.snaps != '':
261
269
  input_snaps_list = self.snaps.split(',')
262
270
  repeat_snaps = check_duplicates_in_list(input_snaps_list)
@@ -307,6 +315,10 @@ class SnapendManifest:
307
315
  snapctl_error(
308
316
  message="Manifest path is required for update command.",
309
317
  code=SNAPCTL_INPUT_ERROR)
318
+ if not os.path.isfile(self.manifest_path_filename):
319
+ snapctl_error(
320
+ message="Manifest path filename `--manifest-path-filename` does not exist.",
321
+ code=SNAPCTL_INPUT_ERROR)
310
322
  if (not self.add_snaps or self.add_snaps == '') and \
311
323
  (not self.remove_snaps or self.remove_snaps == '') and \
312
324
  (not self.add_features or self.add_features == '') and \
@@ -404,8 +416,12 @@ class SnapendManifest:
404
416
  snapctl_error(
405
417
  message="Manifest path is required for validate command.",
406
418
  code=SNAPCTL_INPUT_ERROR)
419
+ if not os.path.isfile(self.manifest_path_filename):
420
+ snapctl_error(
421
+ message="Manifest path filename `--manifest-path-filename` does not exist.",
422
+ code=SNAPCTL_INPUT_ERROR)
407
423
 
408
- def _get_snap_sd(self, snap_id) -> dict:
424
+ def _get_snap_sd(self, snap_id, sanitize_dd: bool = True) -> dict:
409
425
  """
410
426
  Get snap service definition
411
427
  """
@@ -424,6 +440,25 @@ class SnapendManifest:
424
440
  if versions['version'] == snap['latest_version']:
425
441
  snap_sd['data_dependencies'] = \
426
442
  versions['data_dependencies']
443
+ if not sanitize_dd:
444
+ return snap_sd
445
+ # Sanitize data dependencies
446
+ sanitized_data_dependencies = []
447
+ for data_dep in snap_sd['data_dependencies']:
448
+ new_obj = {}
449
+ if data_dep['type'] == 'POSTGRES':
450
+ new_obj['type'] = 'POSTGRES'
451
+ new_obj['postgres'] = {
452
+ 'database': data_dep['postgres']['database']
453
+ }
454
+ elif data_dep['type'] == 'REDIS':
455
+ new_obj['type'] = 'REDIS'
456
+ new_obj['redis'] = {}
457
+ elif data_dep['type'] == 'COUCHBASE':
458
+ new_obj['type'] = 'COUCHBASE'
459
+ new_obj['couchbase'] = {}
460
+ sanitized_data_dependencies.append(new_obj)
461
+ snap_sd['data_dependencies'] = sanitized_data_dependencies
427
462
  return snap_sd
428
463
  raise ValueError(
429
464
  f"Snap service definition with id '{snap_id}' not found")
@@ -524,7 +559,7 @@ class SnapendManifest:
524
559
  """
525
560
  Sync with a snapend manifest
526
561
  @test -
527
- `python -m snapctl snapend-manifest sync --manifest-path-filename ./snapend-manifest.json --snaps analytics,auth --features WEB_SOCKETS --out-path-filename ./snapend-updated-manifest.json`
562
+ `python -m snapctl snapend-manifest sync --manifest-path-filename ./snapend-create-manifest.json --snaps analytics,auth --features WEB_SOCKETS --out-path-filename ./snapend-synced-manifest.json`
528
563
  """
529
564
  progress = Progress(
530
565
  SpinnerColumn(),
@@ -3,13 +3,14 @@ Constants used by snapctl
3
3
  """
4
4
  COMPANY_NAME = 'Snapser'
5
5
  VERSION_PREFIX = ''
6
- VERSION = '1.1.2'
6
+ VERSION = '1.1.4'
7
7
  CONFIG_FILE_MAC = '~/.snapser/config'
8
8
  CONFIG_FILE_WIN = '%homepath%\\.snapser\\config'
9
9
 
10
10
  DEFAULT_PROFILE = 'default'
11
11
  API_KEY = 'SNAPSER_API_KEY'
12
12
  URL_KEY = 'SNAPSER_URL_KEY'
13
+ TEST_MODE = 'SNAPSER_TEST_MODE'
13
14
  CONFIG_PATH_KEY = 'SNAPSER_CONFIG_PATH'
14
15
  SERVER_CALL_TIMEOUT = 300
15
16
 
snapctl/config/hashes.py CHANGED
@@ -57,13 +57,18 @@ CLIENT_SDK_TYPES: Dict[str, Dict[str, str]] = {
57
57
  'web-ts': {
58
58
  'type': 'typescript',
59
59
  'subtype': 'web',
60
- 'http-lib': ['axios', 'fetch'],
60
+ 'http-lib': ['fetch', 'axios'],
61
61
  },
62
62
  'web-js': {
63
63
  'type': 'javascript',
64
64
  'subtype': 'web',
65
65
  'http-lib': [],
66
66
  },
67
+ 'flutter-dart': {
68
+ 'type': 'dart',
69
+ 'subtype': 'flutter',
70
+ 'http-lib': ['http', 'dio'],
71
+ },
67
72
  }
68
73
 
69
74
  SERVER_SDK_TYPES: Dict[str, Dict[str, str]] = {
@@ -85,7 +90,7 @@ SERVER_SDK_TYPES: Dict[str, Dict[str, str]] = {
85
90
  'ts': {
86
91
  'type': 'typescript',
87
92
  'subtype': '',
88
- 'http-lib': ['axios', 'fetch'],
93
+ 'http-lib': ['fetch', 'axios'],
89
94
  },
90
95
  'go': {
91
96
  'type': 'go',
@@ -147,6 +152,11 @@ SERVER_SDK_TYPES: Dict[str, Dict[str, str]] = {
147
152
  'subtype': '',
148
153
  'http-lib': [],
149
154
  },
155
+ 'dart': {
156
+ 'type': 'dart',
157
+ 'subtype': '',
158
+ 'http-lib': ['http', 'dio'],
159
+ },
150
160
  }
151
161
 
152
162
  SDK_TYPES: Dict[str, Dict[str, str]] = {**CLIENT_SDK_TYPES, **SERVER_SDK_TYPES}
@@ -182,10 +192,11 @@ SNAPEND_MANIFEST_TYPES: Dict[str, Dict[str, str]] = {
182
192
  }
183
193
 
184
194
  SERVICE_IDS: List[str] = [
185
- 'analytics', 'auth', 'client-logs', 'events', 'experiments', 'gdpr', 'guilds', 'hades', 'iap',
186
- 'inventory', 'leaderboards', 'matchmaking', 'notifications', 'parties', 'profiles', 'quests',
187
- 'relay', 'remote-config', 'scheduler', 'sequencer', 'social-graph', 'statistics', 'storage',
188
- 'trackables', 'xp'
195
+ 'analytics', 'assets', 'auth', 'chat', 'client-logs', 'decorators', 'event-bus', 'experiments',
196
+ 'gdpr', 'game-server-fleets', 'guilds', 'iap', 'inbox', 'inventory', 'kws', 'leaderboards',
197
+ 'events', 'lobbies', 'matchmaking', 'notifications', 'parties', 'photon', 'profiles', 'quago',
198
+ 'quests', 'relay', 'remote-config', 'scheduler', 'sequencer', 'social-graph', 'statistics',
199
+ 'storage', 'trackables'
189
200
  ]
190
201
 
191
202
  SDK_ACCESS_AUTH_TYPE_LOOKUP: Dict[str, Dict[str, str]] = {
@@ -0,0 +1,5 @@
1
+ ## Release 1.1.3
2
+ ##### Oct 17, 2025
3
+
4
+ ### Bug Fixes
5
+ 1. Updated help text for various command options to improve clarity and correctness.
@@ -0,0 +1,14 @@
1
+ ## Release 1.1.4
2
+ ##### Oct 24, 2025
3
+
4
+ ### Features
5
+ 1. We added SDK support for `flutter-dart` and `dart`. You can download SDKs using the `snapend download` command.
6
+
7
+ ### Fixes
8
+ 1. Snapend-Manifest create, update, upgrade and sync was adding some extra fields in the `data_definitions` (this was already backward compatible, but still unnecessary). This has been fixed.
9
+ 2. Snapend-manifest sync, update, upgrade now validate if the manifest file is a valid.
10
+ 3. Snapend creation failures due to duplicate cluster names now show proper error messages.
11
+ 4. Snapend download command now smartly picks a default `http-lib` if the user does not provide one, based on the SDK selected.
12
+
13
+ ### Documentation
14
+ 1. Updated the README.md to reflect correct parameter names for commands.
snapctl/main.py CHANGED
@@ -262,10 +262,12 @@ def common(
262
262
  def validate(
263
263
  ctx: typer.Context,
264
264
  api_key: Union[str, None] = typer.Option(
265
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
265
+ None, "--api-key",
266
+ help="API Key override.", callback=api_key_context_callback
266
267
  ),
267
268
  profile: Union[str, None] = typer.Option(
268
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
269
+ None, "--profile",
270
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
269
271
  ),
270
272
  ) -> None:
271
273
  """
@@ -285,13 +287,16 @@ def release_notes(
285
287
  ..., help="Release Notes Subcommands: " + ", ".join(ReleaseNotes.SUBCOMMANDS) + "."
286
288
  ),
287
289
  version: str = typer.Option(
288
- VERSION_PREFIX + VERSION, help="(optional: show-version) If not passed will show the latest version."
290
+ VERSION_PREFIX + VERSION,
291
+ help="(optional: show-version) If not passed will show the latest version."
289
292
  ),
290
293
  api_key: Union[str, None] = typer.Option(
291
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
294
+ None, "--api-key",
295
+ help="API Key override.", callback=api_key_context_callback
292
296
  ),
293
297
  profile: Union[str, None] = typer.Option(
294
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
298
+ None, "--profile",
299
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
295
300
  ),
296
301
  ) -> None:
297
302
  """
@@ -316,28 +321,37 @@ def byogs(
316
321
  ),
317
322
  tag: str = typer.Option(
318
323
  None, "--tag",
319
- help="(req: build, push, publish) Tag for your snap"
324
+ help="(required: build, push, publish) Tag for your snap."
320
325
  ),
321
326
  # publish and publish-image
322
327
  path: Union[str, None] = typer.Option(
323
- None, "--path", help="(req: build, publish) Path to your snap code"
328
+ None, "--path",
329
+ help="(required: build, publish) Path to your snap code."
324
330
  ),
325
331
  resources_path: Union[str, None] = typer.Option(
326
- None, "--resources-path", help="(optional: publish) Path to resources such as your Dockerfile, swagger.json or README.md"
332
+ None, "--resources-path",
333
+ help=(
334
+ "(optional: publish) Path to resources such as your Dockerfile, "
335
+ "swagger.json or README.md."
336
+ )
327
337
  ),
328
338
  docker_filename: str = typer.Option(
329
- "Dockerfile", help="(optional: publish) Dockerfile name to use"
339
+ "Dockerfile", help="(optional: publish) Dockerfile name to use."
330
340
  ),
331
341
  skip_build: bool = typer.Option(
332
- False, "--skip-build", help="(optional: publish) Skip the build step. You have to pass the image tag you used during the build step."
342
+ False, "--skip-build",
343
+ help=(
344
+ "(optional: publish) Skip the build step. You have to pass the image tag you "
345
+ "used during the build step."
346
+ )
333
347
  ),
334
348
  snapend_id: str = typer.Option(
335
349
  None, "--snapend-id",
336
- help=("(req: sync) Snapend Id.")
350
+ help=("(required: sync) Snapend Id.")
337
351
  ),
338
352
  fleet_names: str = typer.Option(
339
353
  None, "--fleet-names",
340
- help=("(req: sync) Comma separated fleet names.")
354
+ help=("(required: sync) Comma separated fleet names.")
341
355
  ),
342
356
  blocking: bool = typer.Option(
343
357
  False, "--blocking",
@@ -348,10 +362,12 @@ def byogs(
348
362
  ),
349
363
  # overrides
350
364
  api_key: Union[str, None] = typer.Option(
351
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
365
+ None, "--api-key",
366
+ help="API Key override.", callback=api_key_context_callback
352
367
  ),
353
368
  profile: Union[str, None] = typer.Option(
354
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
369
+ None, "--profile",
370
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
355
371
  ),
356
372
  ) -> None:
357
373
  """
@@ -382,27 +398,45 @@ def byosnap(
382
398
  ctx: typer.Context,
383
399
  # Required fields
384
400
  subcommand: str = typer.Argument(
385
- ..., help="BYOSnap Subcommands: " + ", ".join(ByoSnap.SHOW_SUBCOMMANDS) + ". Commands to be deprecated soon: " + ", ".join(ByoSnap.TO_DEPRECATE_SUBCOMMANDS) + "."
401
+ ...,
402
+ help=(
403
+ "BYOSnap Subcommands: " +
404
+ ", ".join(ByoSnap.SHOW_SUBCOMMANDS) + ". Commands to be deprecated soon: " +
405
+ ", ".join(ByoSnap.TO_DEPRECATE_SUBCOMMANDS) + "."
406
+ )
386
407
  ),
387
408
  byosnap_id: Union[str, None] = typer.Option(
388
- None, "--byosnap-id", help="(req: 'publish', 'sync', 'upload-docs', 'create', 'publish-image', 'publish-version', 'update-version') BYOSnap Id. Should start with byosnap-"
409
+ None, "--byosnap-id",
410
+ help=(
411
+ "(required: publish, sync, upload-docs, create, publish-image, publish-version, "
412
+ "update-version) BYOSnap Id. Should start with `byosnap-`."
413
+ )
389
414
  ),
390
415
  # publish
391
416
  path: Union[str, None] = typer.Option(
392
- None, "--path", help="(req: publish, sync, publish-image, publish-version) Path to your snap code"
417
+ None, "--path",
418
+ help="(required: publish, sync, publish-image, publish-version) Path to your snap code."
393
419
  ),
394
420
  resources_path: Union[str, None] = typer.Option(
395
- None, "--resources-path", help="(optional: publish, sync, publish-image, publish-version; req: upload-docs) Path to resources such as your Dockerfile, snapser-byosnap-profile.json, snapser-tool-*.json, swagger.json or README.md"
421
+ None, "--resources-path",
422
+ help=(
423
+ "(required: upload-docs) (optional: publish, sync, publish-image, publish-version) "
424
+ "Path to resources such as your Dockerfile, snapser-byosnap-profile.json, "
425
+ "snapser-tool-*.json, swagger.json or README.md."
426
+ )
396
427
  ),
397
428
  # publish, sync and publish-version
398
429
  version: Union[str, None] = typer.Option(
399
430
  None, "--version",
400
- help="(req: publish, sync, publish-version) Snap version. Should start with v. Example vX.X.X"
431
+ help=(
432
+ "(required: publish, sync, publish-version) Snap semantic version. "
433
+ "Should start with `v`. Example `vX.X.X`."
434
+ )
401
435
  ),
402
436
  # sync
403
437
  snapend_id: str = typer.Option(
404
438
  None, "--snapend-id",
405
- help=("(req: sync) Snapend Id. NOTE: Development Snapends only.")
439
+ help=("(required: sync) Snapend Id. NOTE: Development Snapends only.")
406
440
  ),
407
441
  blocking: bool = typer.Option(
408
442
  False, "--blocking",
@@ -413,47 +447,64 @@ def byosnap(
413
447
  ),
414
448
  # create
415
449
  name: str = typer.Option(
416
- None, "--name", help="(req: create) Name for your snap."
450
+ None, "--name", help="(required: create) Name for your snap."
417
451
  ),
418
452
  desc: str = typer.Option(
419
- None, "--desc", help="(req: create) Description for your snap"
453
+ None, "--desc", help="(required: create) Description for your snap."
420
454
  ),
421
455
  platform_type: str = typer.Option(
422
456
  None, "--platform",
423
- help="(req: create) Platform for your snap - " +
424
- ", ".join(ByoSnap.PLATFORMS) + "."
457
+ help=(
458
+ "(required: create) Platform for your snap - " +
459
+ ", ".join(ByoSnap.PLATFORMS) + "."
460
+ )
425
461
  ),
426
462
  language: str = typer.Option(
427
463
  None, "--language",
428
- help="(req: create) Language of your snap - " +
429
- ", ".join(ByoSnap.LANGUAGES) + "."
464
+ help=(
465
+ "(required: create) Language of your snap - " +
466
+ ", ".join(ByoSnap.LANGUAGES) + "."
467
+ )
430
468
  ),
431
469
  # publish-image, publish-version, publish, sync, upload-docs
432
470
  tag: str = typer.Option(
433
- None, "--tag", help=(
434
- "(req: publish-image, publish-version, upload-docs) (optional: publish, sync) Tag for your snap"
471
+ None, "--tag",
472
+ help=(
473
+ "(required: publish-image, publish-version, upload-docs) (optional: publish, sync) "
474
+ "Tag for your snap."
435
475
  )
436
476
  ),
437
477
  # overrides
438
478
  skip_build: bool = typer.Option(
439
- False, "--skip-build", help="(optional: publish-image, publish, sync) Skip the build step. You have to pass the image tag you used during the build step."
479
+ False, "--skip-build",
480
+ help=(
481
+ "(optional: publish-image, publish, sync) Skip the build step. You have to pass "
482
+ "the image tag you used during the build step."
483
+ )
440
484
  ),
441
485
  docker_filename: str = typer.Option(
442
- "Dockerfile", help="(optional override: publish, sync) Dockerfile name to use"
486
+ "Dockerfile", help="(optional: publish, sync) Dockerfile name to use."
443
487
  ),
444
488
  profile_filename: str = typer.Option(
445
- "snapser-byosnap-profile.json", "--profile-filename", help="(req: generate-profile, validate-profile) (optional override: publish, publish-version) BYOSnap Profile is picked up via the --path or the --resources-path. This allows you to override the default profile filename."
489
+ "snapser-byosnap-profile.json", "--profile-filename",
490
+ help=(
491
+ "(required: generate-profile, validate-profile) (optional override: publish, "
492
+ "publish-version) BYOSnap Profile is picked up via the --path or the "
493
+ "--resources-path. This allows you to override the default profile filename."
494
+ )
446
495
  ),
447
496
  out_path: Union[str, None] = typer.Option(
448
497
  None, "--out-path", help=(
449
- "(req: generate-profile) Path to output the byosnap profile"
498
+ "(required: generate-profile) Path to output the byosnap profile."
450
499
  )
451
500
  ),
452
501
  api_key: Union[str, None] = typer.Option(
453
- None, "--api-key", help="(optional override) API Key override.", callback=api_key_context_callback
502
+ None, "--api-key",
503
+ help="API Key override.", callback=api_key_context_callback
454
504
  ),
455
505
  profile: Union[str, None] = typer.Option(
456
- None, "--profile", help="(optional override) Profile from the Snapser config to use.", callback=profile_context_callback
506
+ None, "--profile",
507
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
457
508
  ),
458
509
  ) -> None:
459
510
  """
@@ -496,14 +547,16 @@ def game(
496
547
  # name
497
548
  name: str = typer.Option(
498
549
  None, "--name",
499
- help=("(req: create) Name of your game: ")
550
+ help=("(required: create) Name of your game.")
500
551
  ),
501
552
  # overrides
502
553
  api_key: Union[str, None] = typer.Option(
503
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
554
+ None, "--api-key",
555
+ help="API Key override.", callback=api_key_context_callback
504
556
  ),
505
557
  profile: Union[str, None] = typer.Option(
506
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
558
+ None, "--profile",
559
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
507
560
  ),
508
561
  ) -> None:
509
562
  """
@@ -534,14 +587,16 @@ def application(
534
587
  # name
535
588
  name: str = typer.Option(
536
589
  None, "--name",
537
- help=("(req: create) Name of your application: ")
590
+ help=("(required: create) Name of your application.")
538
591
  ),
539
592
  # overrides
540
593
  api_key: Union[str, None] = typer.Option(
541
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
594
+ None, "--api-key",
595
+ help="API Key override.", callback=api_key_context_callback
542
596
  ),
543
597
  profile: Union[str, None] = typer.Option(
544
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
598
+ None, "--profile",
599
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
545
600
  ),
546
601
  ) -> None:
547
602
  """
@@ -573,21 +628,24 @@ def generate(
573
628
  category: Union[str, None] = typer.Option(
574
629
  None, "--category",
575
630
  help=(
576
- "(req: token) (token: " +
577
- ", ".join(Generate.CATEGORIES['credentials']) + ')'
631
+ "(required: token) Supported category - " +
632
+ ", ".join(Generate.CATEGORIES['credentials']) + "."
578
633
  )
579
634
  ),
580
635
  out_path: Union[str, None] = typer.Option(
581
- None, "--out-path", help=(
582
- "(req: token) Path to output the byosnap profile"
636
+ None, "--out-path",
637
+ help=(
638
+ "(required: token) Path to output the byosnap profile."
583
639
  )
584
640
  ),
585
641
  # overrides
586
642
  api_key: Union[str, None] = typer.Option(
587
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
643
+ None, "--api-key",
644
+ help="API Key override.", callback=api_key_context_callback
588
645
  ),
589
646
  profile: Union[str, None] = typer.Option(
590
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
647
+ None, "--profile",
648
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
591
649
  ),
592
650
  ) -> None:
593
651
  """
@@ -614,96 +672,105 @@ def snapend(
614
672
  subcommand: str = typer.Argument(
615
673
  ..., help="Snapend Subcommands: " + ", ".join(Snapend.SUBCOMMANDS) + "."
616
674
  ),
617
- # snapend_id: str = typer.Argument(..., help="Snapend Id"),
618
675
  snapend_id: str = typer.Option(
619
676
  None, "--snapend-id",
620
- help=("(req: state, update, download) Snapend Id")
677
+ help=("(required: state, update, download) Snapend Id.")
621
678
  ),
622
679
  # enumerate
623
680
  game_id: str = typer.Option(
624
681
  None, "--game-id",
625
- help="(DEPRECATED: Use --application-id instead) Game Id"
682
+ help="(DEPRECATED: Use --application-id instead) Game Id."
626
683
  ),
627
684
  application_id: str = typer.Option(
628
685
  None, "--application-id",
629
- help="(req: enumerate, create, clone) Application Id"
686
+ help="(required: enumerate, create, clone) Application Id."
630
687
  ),
631
688
  # apply, clone
632
689
  manifest_path_filename: str = typer.Option(
633
690
  None, "--manifest-path-filename",
634
- help="(req: create|apply|clone) Full Path to the manifest file including the filename."
691
+ help=(
692
+ "(required: create, apply, clone) Full Path to the manifest file "
693
+ "including the filename."
694
+ )
635
695
  ),
636
696
  force: bool = typer.Option(
637
697
  False, "--force",
638
- help="(optional: apply) If true, Snapser will ignore the configuration diff validation and allow to force apply the manifest."
698
+ help=(
699
+ "(optional: apply) If true, Snapser will ignore the configuration diff validation "
700
+ "and allow to force apply the manifest."
701
+ )
639
702
  ),
640
703
  # download
641
704
  category: str = typer.Option(
642
705
  None, "--category",
643
706
  help=(
644
- "(req: download) Category of the Download: " +
707
+ "(required: download) Supported Download Categories - " +
645
708
  ", ".join(Snapend.DOWNLOAD_CATEGORY) + "."
646
709
  )
647
710
  ),
648
711
  category_format: str = typer.Option(
649
712
  None, "--format",
650
713
  help=(
651
- "(req: --category sdk|protos|snapend-manifest --format "
714
+ "(required: --category sdk|protos|snapend-manifest --format " +
652
715
  "sdk(" + ", ".join(SDK_TYPES.keys()) +
653
716
  ") | protos(" + ", ".join(PROTOS_TYPES.keys()) + ")" +
654
717
  ") | snapend-manifest(" +
655
- ", ".join(SNAPEND_MANIFEST_TYPES.keys()) + ")"
718
+ ", ".join(SNAPEND_MANIFEST_TYPES.keys()) + ")."
656
719
  )
657
720
  ),
658
721
  category_type: str = typer.Option(
659
722
  None, "--type",
660
723
  help=(
661
- "(optional: download) Only applicable for --category sdk|protos --type "
662
- "sdk(" + ", ".join(Snapend.CATEGORY_TYPE_SDK) + ")"
663
- " | protos(" + ", ".join(Snapend.CATEGORY_TYPE_PROTOS) + ")"
724
+ "(optional: download) Only applicable for --category sdk|protos --type " +
725
+ "sdk(" + ", ".join(Snapend.CATEGORY_TYPE_SDK) + ")" +
726
+ " | protos(" + ", ".join(Snapend.CATEGORY_TYPE_PROTOS) + ")."
664
727
  )
665
728
  ),
666
729
  category_http_lib: str = typer.Option(
667
730
  None, "--http-lib",
668
731
  help=(
669
- "(optional: download) Only applicable for --category sdk "
732
+ "(optional: download) Only applicable for --category sdk " +
670
733
  "--format " + '|'.join(Snapend.get_formats_supporting_http_lib()) + ' ' +
671
- "--type user|server|internal|app "
672
- "--http-lib " + Snapend.get_http_formats_str()
734
+ "--type user|server|internal|app " +
735
+ "--http-lib " + Snapend.get_http_formats_str() + "."
673
736
  )
674
737
  ),
675
738
  snaps_list_str: Union[str, None] = typer.Option(
676
739
  None, "--snaps",
677
740
  help=(
678
- "(optional: download) Comma separated list of snap ids to customize the "
679
- "SDKs, protos or admin settings. "
680
- "snaps(" + ", ".join(SERVICE_IDS)
741
+ "(optional: download) Comma separated list of snap ids to customize the " +
742
+ "SDKs, protos or admin settings. " +
743
+ "snaps(" + ", ".join(SERVICE_IDS) + ")."
681
744
  )
682
745
  ),
683
746
  # Clone
684
747
  name: Union[str, None] = typer.Option(
685
- None, "--name", help="(req: clone, optional: create) Snapend name"),
748
+ None, "--name",
749
+ help="(required: clone, optional: create) Snapend name."),
686
750
  env: Union[str, None] = typer.Option(
687
- None, "--env", help=(
688
- "(req: clone, optional: create) Snapend environment"
689
- "Environments: (" + ", ".join(Snapend.ENV_TYPES) + ")"
751
+ None, "--env",
752
+ help=(
753
+ "(required: clone, optional: create) Snapend environments " +
754
+ " - " + ", ".join(Snapend.ENV_TYPES) + "."
690
755
  )),
691
756
  # Download, Apply, Clone
692
757
  out_path: Union[str, None] = typer.Option(
693
- None, "--out-path", help="(optional: create|download|apply|clone) Path to save the output file"),
758
+ None, "--out-path",
759
+ help="(optional: create, download, apply, clone) Path to save the output file."
760
+ ),
694
761
  # update
695
762
  byosnaps_list: str = typer.Option(
696
763
  None, "--byosnaps",
697
764
  help=(
698
765
  "(optional: update) Comma separated list of BYOSnap ids and versions. "
699
- "Eg: service-1:v1.0.0,service-2:v1.0.0"
766
+ "Eg: `service-1:v1.0.0,service-2:v1.0.0`."
700
767
  )
701
768
  ),
702
769
  byogs_list: str = typer.Option(
703
770
  None, "--byogs",
704
771
  help=(
705
772
  "(optional: update) Comma separated list of BYOGs fleet_name:tag. "
706
- "Eg: fleet-1:v1.0.0,fleet-2:v1.0.0"
773
+ "Eg: `fleet-1:v1.0.0,fleet-2:v1.0.0`."
707
774
  )
708
775
  ),
709
776
  # create, update, promote, apply, clone
@@ -716,10 +783,12 @@ def snapend(
716
783
  ),
717
784
  # overrides
718
785
  api_key: Union[str, None] = typer.Option(
719
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
786
+ None, "--api-key",
787
+ help="API Key override.", callback=api_key_context_callback
720
788
  ),
721
789
  profile: Union[str, None] = typer.Option(
722
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
790
+ None, "--profile",
791
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
723
792
  ),
724
793
  ) -> None:
725
794
  """
@@ -765,26 +834,33 @@ def byows(
765
834
  # attach
766
835
  snapend_id: str = typer.Option(
767
836
  None, "--snapend-id",
768
- help=("(req: attach, reset) Your Snapend Id")
837
+ help=("(required: attach, reset) Snapend Id.")
769
838
  ),
770
839
  byosnap_id: str = typer.Option(
771
840
  None, "--byosnap-id",
772
- help=("(req: attach) Your BYOSnap Id")
841
+ help=("(required: attach) BYOSnap Id. Should start with `byosnap-`.")
773
842
  ),
774
843
  http_port: str = typer.Option(
775
844
  None, "--http-port",
776
- help=("(oneof: attach) HTTP port of your local server. One of --http-port or --grpc-port is required.")
845
+ help=(
846
+ "(use: attach) HTTP port of your local server. "
847
+ "One of --http-port or --grpc-port is required."
848
+ )
777
849
  ),
778
850
  grpc_port: str = typer.Option(
779
851
  None, "--grpc-port",
780
- help=("(oneof: attach) gRPC port of your local server. One of --http-port or --grpc-port is required.")
852
+ help=(
853
+ "(use: attach) gRPC port of your local server. "
854
+ "One of --http-port or --grpc-port is required."
855
+ )
781
856
  ),
782
857
  # overrides
783
858
  api_key: Union[str, None] = typer.Option(
784
859
  None, "--api-key", help="API Key override.", callback=api_key_context_callback
785
860
  ),
786
861
  profile: Union[str, None] = typer.Option(
787
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
862
+ None, "--profile",
863
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
788
864
  ),
789
865
  ) -> None:
790
866
  """
@@ -815,8 +891,10 @@ def snaps(
815
891
  ..., help="Snaps Subcommands: " + ", ".join(Snaps.SUBCOMMANDS) + "."
816
892
  ),
817
893
  out_path_filename: Union[str, None] = typer.Option(
818
- None, "--out-path-filename", help=(
819
- "(optional: enumerate) Path and filename to output the snaps list. The filename should end with .json."
894
+ None, "--out-path-filename",
895
+ help=(
896
+ "(optional: enumerate) Path and filename to output the snaps list. "
897
+ "The filename should end with `.json`."
820
898
  )
821
899
  ),
822
900
  # overrides
@@ -824,7 +902,8 @@ def snaps(
824
902
  None, "--api-key", help="API Key override.", callback=api_key_context_callback
825
903
  ),
826
904
  profile: Union[str, None] = typer.Option(
827
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
905
+ None, "--profile",
906
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
828
907
  ),
829
908
  ) -> None:
830
909
  """
@@ -851,61 +930,81 @@ def snapend_manifest(
851
930
  ..., help="Snapend Manifest Subcommands: " + ", ".join(SnapendManifest.SUBCOMMANDS) + "."
852
931
  ),
853
932
  name: Union[str, None] = typer.Option(
854
- None, "--name", help="(req: create) Name for your snapend."
933
+ None, "--name",
934
+ help="(required: create) Name for your snapend."
855
935
  ),
856
936
  env: Union[str, None] = typer.Option(
857
- None, "--env", help=(
858
- "(req: create) Environment for your snapend - " +
937
+ None, "--env",
938
+ help=(
939
+ "(required: create) Environment for your snapend - " +
859
940
  ", ".join(SnapendManifest.ENVIRONMENTS) + "."
860
941
  )
861
942
  ),
862
943
  manifest_path_filename: Union[str, None] = typer.Option(
863
- None, "--manifest-path-filename", help=(
864
- "(req: sync, upgrade) Full Path to the manifest file including the filename."
944
+ None, "--manifest-path-filename",
945
+ help=(
946
+ "(required: sync, upgrade, update) Full Path to the manifest file "
947
+ "including the filename."
865
948
  )
866
949
  ),
867
950
  snaps_list_str: str = typer.Option(
868
- None, "--snaps", help=(
869
- "(use: create, sync, upgrade) Comma separated list of snap ids to add, sync or upgrade. "
951
+ None, "--snaps",
952
+ help=(
953
+ "(use: create, sync, upgrade) Comma separated list of snap ids to add, " +
954
+ "sync or upgrade. snaps(" + ", ".join(SERVICE_IDS) + ")."
870
955
  )
871
956
  ),
872
957
  features: str = typer.Option(
873
- None, "--features", help=(
874
- "(use: create, sync) Comma separated list of feature flags to add, sync. "
875
- "Features: " + ", ".join(SnapendManifest.FEATURES)
958
+ None, "--features",
959
+ help=(
960
+ "(use: create, sync) Comma separated list of feature flags to add, sync. " +
961
+ "features(" + ", ".join(SnapendManifest.FEATURES) + ")."
876
962
  )
877
963
  ),
878
964
  add_snaps: str = typer.Option(
879
- None, "--add-snaps", help=(
880
- "(use: update) Comma separated list of snap ids to add. "
965
+ None, "--add-snaps",
966
+ help=(
967
+ "(use: update) Comma separated list of snap ids to add. " +
968
+ "snaps(" + ", ".join(SERVICE_IDS) + ")."
881
969
  )
882
970
  ),
883
971
  remove_snaps: str = typer.Option(
884
- None, "--remove-snaps", help=(
885
- "(use: update) Comma separated list of snap ids to remove. "
972
+ None, "--remove-snaps",
973
+ help=(
974
+ "(use: update) Comma separated list of snap ids to remove. snaps(" +
975
+ ", ".join([s for s in SERVICE_IDS if s.lower() != SnapendManifest.AUTH_SNAP_ID]) +
976
+ ")."
886
977
  )
887
978
  ),
888
979
  add_features: str = typer.Option(
889
- None, "--add-features", help=(
890
- "(use: update) Comma separated list of features to add. "
980
+ None, "--add-features",
981
+ help=(
982
+ "(use: update) Comma separated list of features to add. " +
983
+ "features(" + ", ".join(SnapendManifest.FEATURES) + ")."
891
984
  )
892
985
  ),
893
986
  remove_features: str = typer.Option(
894
- None, "--remove-features", help=(
895
- "(use: update) Comma separated list of features to remove. "
987
+ None, "--remove-features",
988
+ help=(
989
+ "(use: update) Comma separated list of features to remove. " +
990
+ "features(" + ", ".join(SnapendManifest.FEATURES) + ")."
896
991
  )
897
992
  ),
898
993
  out_path_filename: Union[str, None] = typer.Option(
899
- None, "--out-path-filename", help=(
900
- "(optional: enumerate) Path and filename to output the manifest. The filename should end with .json or .yaml"
994
+ None, "--out-path-filename",
995
+ help=(
996
+ "(required: create, sync, upgrade, update) (optional: enumerate) Path and filename to "
997
+ "output the manifest. The filename should end with .json or .yaml"
901
998
  )
902
999
  ),
903
1000
  # overrides
904
1001
  api_key: Union[str, None] = typer.Option(
905
- None, "--api-key", help="API Key override.", callback=api_key_context_callback
1002
+ None, "--api-key",
1003
+ help="API Key override.", callback=api_key_context_callback
906
1004
  ),
907
1005
  profile: Union[str, None] = typer.Option(
908
- None, "--profile", help="Profile from the Snapser config to use.", callback=profile_context_callback
1006
+ None, "--profile",
1007
+ help="Profile from the Snapser config to use.", callback=profile_context_callback
909
1008
  ),
910
1009
  ) -> None:
911
1010
  """
@@ -3,13 +3,14 @@ Telemetry utilities for snapctl
3
3
  '''
4
4
  from __future__ import annotations
5
5
  from typing import Any, Dict, Optional
6
+ import os
6
7
  import functools
7
8
  import platform
8
9
  import uuid
9
10
  import hashlib
10
11
  import requests
11
12
  import typer
12
- from snapctl.config.constants import AMPLITUDE_HTTP_US, AMPLITUDE_HTTP_EU
13
+ from snapctl.config.constants import AMPLITUDE_HTTP_US, AMPLITUDE_HTTP_EU, TEST_MODE
13
14
  from snapctl.utils.helper import get_config_value
14
15
  from snapctl.utils.echo import info
15
16
 
@@ -65,6 +66,10 @@ def _is_active(ctx: Optional[typer.Context]) -> tuple[bool, bool, Optional[str]]
65
66
  if not api_key or api_key == '':
66
67
  return (False, False, None)
67
68
  telemetry_active = get_config_value(env, "TELEMETRY_ACTIVE") == "true"
69
+ # If we are running unit test; disable tracking
70
+ is_test = os.getenv(TEST_MODE) == "true"
71
+ if is_test:
72
+ telemetry_active = False
68
73
  dry_run = get_config_value(env, "TELEMETRY_DRY_RUN") == "true"
69
74
  return (telemetry_active, dry_run, api_key)
70
75
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snapctl
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Snapser CLI Tool
5
5
  Author: Ajinkya Apte
6
6
  Author-email: aj@snapser.com
@@ -248,8 +248,8 @@ See all the supported commands.
248
248
 
249
249
  ```bash
250
250
  # Enumerate details for all the available snaps
251
- # $output_path = Optional path to where you want snapctl to save snap details
252
- snapctl snaps enumerate --out-path
251
+ # $output_path = Optional path and filename ending in JSON, where you want snapctl to save snap details
252
+ snapctl snaps enumerate --out-path-filename
253
253
  ```
254
254
 
255
255
  ### 2. BYO Snap - Bring your own Snap
@@ -651,11 +651,11 @@ The output manifest file can then be used with the `snapend create` or `snapend
651
651
  # $env = One of DEVELOPMENT, STAGING or PRODUCTION
652
652
  # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
653
653
  # $snaps = Comma separated list of snap ids you want to add. You can get the snap ids from the
654
- # `snapctl snaps enumerate --out-path ./snaps.json` command
654
+ # `snapctl snaps enumerate --out-path-filename ./snaps.json` command
655
655
  # $features = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
656
656
  # Note: One of snaps or features is required
657
657
  # Example:
658
- # snapend-manifest create --name my-dev-snapend --env DEVELOPMENT --snaps auth,analytics --add-features WEB_SOCKETS --out-path ./snapend-manifest.json
658
+ # snapend-manifest create --name my-dev-snapend --env DEVELOPMENT --snaps auth,analytics --add-features WEB_SOCKETS --out-path-filename ./snapend-manifest.json
659
659
 
660
660
  snapctl snapend-manifest create --name $name --env $env --snaps $snaps --features $features --out-path-filename $output_path_filename
661
661
  ```
@@ -673,13 +673,13 @@ Sync with an existing Snapend manifest. This command is idempotent and destructi
673
673
  # Sync a Snapend manifest file
674
674
  # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
675
675
  # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
676
- # $snaps = Comma separated list of snap ids you want to have at the end. You can get the snap ids from # the `snapctl snaps enumerate --out-path ./snaps.json` command.
676
+ # $snaps = Comma separated list of snap ids you want to have at the end. You can get the snap ids from # the `snapctl snaps enumerate --out-path-filename ./snaps.json` command.
677
677
  # IMPORTANT: If your manifest has a snap but your --snaps does not. It will be removed.
678
678
  # $features = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
679
679
  # IMPORTANT: If your manifest has a feature but your --features does not. It will be removed.
680
680
  # Note: One of snaps, and features is required
681
681
  # Example:
682
- # snapctl snapend-manifest sync --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --add-snaps game-server-fleets --remove-snaps analytics --remove-features WEB_SOCKETS --out-path ./snapend-updated-manifest.yaml
682
+ # snapctl snapend-manifest sync --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --add-snaps game-server-fleets --remove-snaps analytics --remove-features WEB_SOCKETS --out-path-filename ./snapend-updated-manifest.yaml
683
683
 
684
684
  snapctl snapend-manifest sync --manifest-path-filename $input_manifest --snaps $snaps --features $features--out-path-filename $output_path_filename
685
685
  ```
@@ -693,11 +693,11 @@ Upgrade all snaps or a list of snaps to the latest version of the snap available
693
693
  # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
694
694
  # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
695
695
  # $snaps = (Optional) Comma separated list of snap ids you want to upgrade. You can get the snap ids
696
- # from the `snapctl snaps enumerate --out-path ./snaps.json` command
696
+ # from the `snapctl snaps enumerate --out-path-filename ./snaps.json` command
697
697
  # IMPORTANT: If the --snaps parameter is not provided then all snaps in the manifest will be upgraded
698
698
  # Example:
699
- # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --snaps game-server-fleets --out-path ./snapend-updated-manifest.yaml
700
- # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --out-path ./snapend-updated-manifest.yaml
699
+ # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --snaps game-server-fleets --out-path-filename ./snapend-updated-manifest.yaml
700
+ # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --out-path-filename ./snapend-updated-manifest.yaml
701
701
 
702
702
  snapctl snapend-manifest upgrade --manifest-path-filename $input_manifest --out-path-filename $output_path_filename
703
703
 
@@ -716,13 +716,13 @@ Update your manifest. This command is additive and subtractive. It allows you to
716
716
  # Update a Snapend manifest file
717
717
  # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
718
718
  # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
719
- # $addSnaps = Comma separated list of snap ids you want to add to your manifest. You can get the snap ids from # the `snapctl snaps enumerate --out-path ./snaps.json` command.
720
- # $removeSnaps = Comma separated list of snap ids you want to remove from your manifest. You can get the snap ids from # the `snapctl snaps enumerate --out-path ./snaps.json` command.
719
+ # $addSnaps = Comma separated list of snap ids you want to add to your manifest. You can get the snap ids from # the `snapctl snaps enumerate --out-path-filename ./snaps.json` command.
720
+ # $removeSnaps = Comma separated list of snap ids you want to remove from your manifest. You can get the snap ids from # the `snapctl snaps enumerate --out-path-filename ./snaps.json` command.
721
721
  # $addFeatures = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
722
722
  # $removeFeatures = Pass `WEB_SOCKETS` if you want to disable web sockets for your backend.
723
723
  # Note: One of add-snaps, remove-snaps, add-features or remove-features is required
724
724
  # Example:
725
- # snapctl snapend-manifest update --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --add-snaps game-server-fleets --remove-snaps analytics --remove-features WEB_SOCKETS --out-path ./snapend-updated-manifest.yaml
725
+ # snapctl snapend-manifest update --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --add-snaps game-server-fleets --remove-snaps analytics --remove-features WEB_SOCKETS --out-path-filename ./snapend-updated-manifest.yaml
726
726
 
727
727
  snapctl snapend-manifest update --manifest-path-filename $input_manifest --add-snaps $addSnaps --remove-snaps $removeSnaps --add-features $addFeatures --remove-features $removeFeatures --out-path-filename $output_path_filename
728
728
  ```
@@ -753,8 +753,8 @@ snapctl snapend download --help
753
753
  # $category = snapend-manifest, sdk, protos
754
754
  # $format = One of the supported formats:
755
755
  # snapend-manifest(yaml, json)
756
- # sdk(unity, unreal, roblox, godot, cocos, ios-objc, ios-swift, android-java, android-kotlin, web-ts, web-js),
757
- # sdk(csharp, cpp, lua, ts, go, python, kotlin, java, c, node, js, perl, php, closure, ruby, rust),
756
+ # sdk(unity, unreal, roblox, godot, cocos, ios-objc, ios-swift, android-java, android-kotlin, web-ts, web-js, flutter-dart),
757
+ # sdk(csharp, cpp, lua, ts, go, python, kotlin, java, c, node, js, perl, php, closure, ruby, rust, dart),
758
758
  # protos(go, csharp, cpp, raw)
759
759
  # $type = One of the supported types:
760
760
  # For category=sdk type=(user, server, internal, app)
@@ -783,14 +783,14 @@ Create a Snapend from an existing manifest. Passing the blocking flag ensures yo
783
783
  snapctl snapend create --help
784
784
 
785
785
  # Create a Snapend
786
- # $app_id = App Id
786
+ # $application_id = Application Id
787
787
  # $path_to_manifest = Path to the manifest file; should include the file name
788
788
  # Optionally override name and environment by passing the --name and --environment overrides
789
789
  # Example:
790
- # snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
791
- snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id
792
- snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
793
- snapctl snapend create --name $name --env $env --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
790
+ # snapctl snapend create --manifest-path-filename $path_to_manifest --application-id $application_id --blocking
791
+ snapctl snapend create --manifest-path-filename $path_to_manifest --application-id $application_id
792
+ snapctl snapend create --manifest-path-filename $path_to_manifest --application-id $application_id --blocking
793
+ snapctl snapend create --name $name --env $env --manifest-path-filename $path_to_manifest --application-id $application_id --blocking
794
794
  ```
795
795
 
796
796
  #### 4. snapend clone
@@ -802,14 +802,14 @@ Clone a Snapend from an existing manifest. Passing the blocking flag ensures you
802
802
  snapctl snapend clone --help
803
803
 
804
804
  # Clone your Snapend
805
- # $app_id = App Id
805
+ # $application_id = Application Id
806
806
  # $snapend_name = Name of your new Snapend
807
807
  # $env = One of development, staging
808
808
  # $path_to_manifest = Path to the manifest file; should include the file name
809
809
  # Example:
810
- # snapctl snapend clone --app-id 2581d802-aca-496c-8a76-1953ad0db165 --name new-snapend --env development --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
811
- snapctl snapend clone --app-id $app_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest"
812
- snapctl snapend clone --app-id $app_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
810
+ # snapctl snapend clone --application-id 2581d802-aca-496c-8a76-1953ad0db165 --name new-snapend --env development --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
811
+ snapctl snapend clone --application-id $application_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest"
812
+ snapctl snapend clone --application-id $application_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
813
813
  ```
814
814
 
815
815
  #### 5. snapend apply
@@ -3,19 +3,19 @@ snapctl/__main__.py,sha256=43jKoTk8b85hk_MT6499N3ruHdEfM8WBImd_-3VzjI8,116
3
3
  snapctl/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  snapctl/commands/application.py,sha256=hG5_llFKpm-PrP_8NOMz_5Ks9IvC_lzdbCBWtSUzmhQ,5342
5
5
  snapctl/commands/byogs.py,sha256=bomIucEEftlIsCB369cYyfxXStSrW7OgjAcaEUPteGI,20193
6
- snapctl/commands/byosnap.py,sha256=pWzh0myELb2qefnerA3tIFmp5R_uk3JQs74zetiXYw4,78204
6
+ snapctl/commands/byosnap.py,sha256=8AknaioqtPEgvIt5sGvPkl0mVrCmrOVpu2eCq95KO8c,78210
7
7
  snapctl/commands/byows.py,sha256=91bpV-LXOIbDDx3vNj9Xl_vRBTQeedyzl6fHZcpG6ig,18978
8
8
  snapctl/commands/game.py,sha256=F6TL5T3i8yZAQxfsx0uma2tbLHCQ_gqA1wj6oxkAgGk,5236
9
9
  snapctl/commands/generate.py,sha256=9-NlZVQllBT2LZT_t9S3ztwtHzTbM-C8_x0f6z70U3g,5606
10
10
  snapctl/commands/release_notes.py,sha256=EMl-NK9-MSdRxiVyA0MLX4CBG0zijOctddEODQa5PZ4,2151
11
- snapctl/commands/snapend.py,sha256=DuzqpVRiQzTI1LAJICDRAjoFNKhyhbMkfaBsmsjuxO4,50307
12
- snapctl/commands/snapend_manifest.py,sha256=F4Ql-jkfPvkTrrQ5RfTXp8Jk5s4EFSkWtoOvzxdcacQ,43255
11
+ snapctl/commands/snapend.py,sha256=fc2S3m3u8sp_0RP8VGV_p9Fn7OaUCWTc-dwiRbWw36Y,51435
12
+ snapctl/commands/snapend_manifest.py,sha256=xoF156xpGeqXT7w1NHbNHZoF71q2kBVyhzBmGMpeDdk,45256
13
13
  snapctl/commands/snaps.py,sha256=VI7B1FtrYAyJTxtQcOU6BgImwRND0ZXJGTWSpCXKzW0,4103
14
14
  snapctl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  snapctl/config/app.py,sha256=U9Mm0BbGJoqcmBBam2tN7F-oTf_u9dK6EJsiB-yVvKg,888
16
- snapctl/config/constants.py,sha256=FEKC3XjoEMAwAjWmLkemeH_Ek2F5BTn5_giNz_eANm0,4373
16
+ snapctl/config/constants.py,sha256=h5lFBzzMsFz8A-qk_uNbmUFzpgcHD5jw2NRwZQNh3y4,4405
17
17
  snapctl/config/endpoints.py,sha256=jD0n5ocJBbIkrb97F2_r9hqAHzUuddAqzqqBAPUKDTI,477
18
- snapctl/config/hashes.py,sha256=3OKAyOxQPnn--_hvPIzFJnhC8NVfQK4WT-RH4PHEV1w,5242
18
+ snapctl/config/hashes.py,sha256=HpaQOcEpz5oX_kOqcowu2ggJW35COPSWFxeiFP0AbmE,5569
19
19
  snapctl/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  snapctl/data/profiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  snapctl/data/profiles/snapser-byosnap-profile.json,sha256=c7oIzMJewVQaoLaXCBPXlH-k5cL9DCz6q4IixsWWD9c,2404
@@ -27,6 +27,8 @@ snapctl/data/releases/1.0.3.mdx,sha256=Ifm6kRQQghCWx_OJ3shNOxozUP3hH_yt8dMap7B-1
27
27
  snapctl/data/releases/1.0.4.mdx,sha256=hKwi0tormf0gvKAY5W4G1BY7L6fgwOzlw3R-WGSH49g,243
28
28
  snapctl/data/releases/1.1.0.mdx,sha256=w_X9SsMH-ghex8UYQn9b1AcQT9i3eeAlQWP2YCVU_kY,1303
29
29
  snapctl/data/releases/1.1.2.mdx,sha256=_hHvOSR5O9QJBwgqhglxazcpR3rBiJE2WZn5wzGEFSA,244
30
+ snapctl/data/releases/1.1.3.mdx,sha256=qil7MseqvmIDgfwjEFwCOBTD3yYN3xQ-n3zc71Cysdg,136
31
+ snapctl/data/releases/1.1.4.mdx,sha256=tP42ukg5dk9wD8P3eIWew4tGF3KeoCHGdxMcM6MLXhs,768
30
32
  snapctl/data/releases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
33
  snapctl/data/releases/beta-0.46.0.mdx,sha256=_MJA7TnnJjAnNm_EOvoBiz7FjHwl4c49sYtZ9r4KZQE,2386
32
34
  snapctl/data/releases/beta-0.46.4.mdx,sha256=3-ojdCyvax27sdd8nKmcP0zfCWEzi_edPbSlkFqla4o,173
@@ -41,16 +43,16 @@ snapctl/data/releases/beta-0.49.3.mdx,sha256=XmSfpiH-LqvKS2REJ5FGDcLgyEN-OcSzwrX
41
43
  snapctl/data/releases/beta-0.50.0.mdx,sha256=_w9f1HjHqukQ8IaTfUdk2W3gBcSwjMyMA8-rjuUxYTo,399
42
44
  snapctl/data/releases/beta-0.51.0.mdx,sha256=5_xY29NJtH3Qa92UycCudrwDkSlUHRVNnP4GE4hF7-Y,93
43
45
  snapctl/data/releases/beta-0.53.1.mdx,sha256=b__2LPkDhU3cTw5UC19Hxv1rDz6BsSLeI6fhHjOCP08,149
44
- snapctl/main.py,sha256=ZTHmYAW_np3ojTGO7l6eBu2Anbm84uWt9ry0HGQ8K4M,32478
46
+ snapctl/main.py,sha256=t1iBPOjLw774D9NbHCpHwt1whyYOj9GmD9jODbqK8jk,34036
45
47
  snapctl/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
48
  snapctl/types/definitions.py,sha256=EQzLeiXkJ8ISRlCqHMviNVsWWpmhWjpKaOBLdlvOTmY,644
47
49
  snapctl/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
50
  snapctl/utils/echo.py,sha256=9fxrPW9kNJwiJvJBFy9RlAP4qGRcPTOHfQb3pQh3CMg,1446
49
51
  snapctl/utils/exceptions.py,sha256=deLs6sOKIUrhjKNgiMpNC1S6lkU0rpZ7Ml4Tx1CN_Ss,155
50
52
  snapctl/utils/helper.py,sha256=8PwlN8xcx4ivHhEudt-PwAl1IL4h1vR0ah7qPEdzWhU,7424
51
- snapctl/utils/telemetry.py,sha256=_VntKXUrKgJoLKCskH0Z5VhthiVo8CP572U0mcZIH4k,5028
52
- snapctl-1.1.2.dist-info/LICENSE,sha256=6AcXm54KFSpmUI1ji9NIBd4Xl-DtjTqiyjBzfVb_CEk,2804
53
- snapctl-1.1.2.dist-info/METADATA,sha256=QY8KxqDXcwjmJrne1m9UiBXlvzau41rDzsihNv4N6NY,46266
54
- snapctl-1.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
55
- snapctl-1.1.2.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
56
- snapctl-1.1.2.dist-info/RECORD,,
53
+ snapctl/utils/telemetry.py,sha256=kyzKnBoQlJaCSsNjm4bOA9Kh1TMBXWSlsk2hmSZF5ig,5195
54
+ snapctl-1.1.4.dist-info/LICENSE,sha256=6AcXm54KFSpmUI1ji9NIBd4Xl-DtjTqiyjBzfVb_CEk,2804
55
+ snapctl-1.1.4.dist-info/METADATA,sha256=0eF_nyXvOeDdb7IRbGskV8v6fUa13Ag0sD_X3oAS-fg,46547
56
+ snapctl-1.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
57
+ snapctl-1.1.4.dist-info/entry_points.txt,sha256=tkKW9MzmFdRs6Bgkv29G78i9WEBK4WIOWunPfe3t2Wg,44
58
+ snapctl-1.1.4.dist-info/RECORD,,