vortex-cli 4.18.1__tar.gz → 4.18.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {vortex_cli-4.18.1/vortex_cli.egg-info → vortex_cli-4.18.3}/PKG-INFO +2 -2
  2. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/pyproject.toml +1 -1
  3. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/new.py +2 -3
  4. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/watch.py +3 -2
  5. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/workspace.py +38 -30
  6. {vortex_cli-4.18.1 → vortex_cli-4.18.3/vortex_cli.egg-info}/PKG-INFO +2 -2
  7. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex_cli.egg-info/SOURCES.txt +0 -1
  8. vortex_cli-4.18.1/vortex/lib/puakma-6.0.37.jar +0 -0
  9. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/LICENSE +0 -0
  10. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/README.md +0 -0
  11. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/setup.cfg +0 -0
  12. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/__init__.py +0 -0
  13. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/__main__.py +0 -0
  14. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/cli.py +0 -0
  15. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/colour.py +0 -0
  16. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/__init__.py +0 -0
  17. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/clean.py +0 -0
  18. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/clone.py +0 -0
  19. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/code.py +0 -0
  20. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/config.py +0 -0
  21. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/copy.py +0 -0
  22. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/db.py +0 -0
  23. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/delete.py +0 -0
  24. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/docs.py +0 -0
  25. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/execute.py +0 -0
  26. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/export.py +0 -0
  27. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/find.py +0 -0
  28. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/grep.py +7 -7
  29. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/import_.py +0 -0
  30. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/list.py +0 -0
  31. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/commands/log.py +0 -0
  32. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/constants.py +0 -0
  33. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/docs/Blackbook.pdf +0 -0
  34. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/logging.py +0 -0
  35. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/main.py +0 -0
  36. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/models.py +0 -0
  37. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/soap.py +0 -0
  38. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/spinner.py +0 -0
  39. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex/util.py +0 -0
  40. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex_cli.egg-info/dependency_links.txt +0 -0
  41. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex_cli.egg-info/entry_points.txt +0 -0
  42. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex_cli.egg-info/requires.txt +0 -0
  43. {vortex_cli-4.18.1 → vortex_cli-4.18.3}/vortex_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: vortex_cli
3
- Version: 4.18.1
3
+ Version: 4.18.3
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "vortex_cli"
8
- version = "4.18.1"
8
+ version = "4.18.3"
9
9
  description = "Vortex CLI"
10
10
  requires-python = ">=3.10"
11
11
  readme = { file = "README.md", content-type = "text/markdown" }
@@ -336,7 +336,6 @@ def _new_keyword(
336
336
  values: list[str],
337
337
  ) -> int:
338
338
  app = workspace.lookup_app(server, app_id)
339
-
340
339
  with server as s:
341
340
  keyword_id = s.app_designer.save_keyword(app.id, -1, name, values)
342
341
  logger.info(f"Created Keyword '{name}' [{keyword_id}]")
@@ -344,7 +343,7 @@ def _new_keyword(
344
343
 
345
344
 
346
345
  def new(workspace: Workspace, server: PuakmaServer, args: argparse.Namespace) -> int:
347
- if args.subcommand == "object":
346
+ if args.subcommand in ("obj", "object"):
348
347
  if args.update_ids:
349
348
  return _update_objects(
350
349
  workspace,
@@ -382,7 +381,7 @@ def new(workspace: Workspace, server: PuakmaServer, args: argparse.Namespace) ->
382
381
  args.template,
383
382
  args.description,
384
383
  )
385
- elif args.subcommand == "keyword":
384
+ elif args.subcommand in ("kw", "keyword"):
386
385
  return _new_keyword(
387
386
  workspace,
388
387
  server,
@@ -80,7 +80,7 @@ class WorkspaceWatcher:
80
80
  self.server = server
81
81
  self.spinner = spinner
82
82
  self.filter = _WorkspaceFilter(workspace, server)
83
- self._func_dispatch = {
83
+ self._dispatch_change = {
84
84
  Change.modified: self._update_design,
85
85
  Change.added: self._create_design,
86
86
  Change.deleted: self._delete_design,
@@ -158,7 +158,7 @@ class WorkspaceWatcher:
158
158
  # Do this synchronously since we will be prompting the user for confirmation
159
159
  for args in changes:
160
160
  change, design_path, _ = args
161
- task = asyncio.create_task(self._func_dispatch[change](*args))
161
+ task = asyncio.create_task(self._dispatch_change[change](*args))
162
162
  try:
163
163
  await task
164
164
  except asyncio.CancelledError as e:
@@ -235,6 +235,7 @@ class WorkspaceWatcher:
235
235
  # design_source = base64.b64encode(design_type.source_template(name)).decode()
236
236
  obj = DesignObject(-1, name, app, design_type, content_type, "", "")
237
237
 
238
+ upload_source = False
238
239
  if design_type.is_java_type:
239
240
  obj.design_source = design_type.source_template(name)
240
241
  obj.save(self.workspace)
@@ -272,31 +272,9 @@ class Workspace:
272
272
  except (configparser.Error, ValueError) as e:
273
273
  _error(f"Error reading server from config: {str(e)}")
274
274
 
275
- def update_vscode_settings(
276
- self, server: PuakmaServer | None = None, reset: bool = False
277
- ) -> None:
278
- """
279
- Updates or creates the vortex.code-workspace file inside the .vscode directory
280
- """
281
-
282
- def _reset() -> dict[Any, Any]:
283
- if not self.vscode_dir.exists():
284
- self.vscode_dir.mkdir()
285
- return {}
286
-
287
- if reset:
288
- workspace_settings = _reset()
289
- else:
290
- try:
291
- with open(self.code_workspace_file) as f:
292
- workspace_settings = json.load(f)
293
- except FileNotFoundError:
294
- workspace_settings = _reset()
295
- except json.JSONDecodeError as e:
296
- logger.error(f"Error parsing {self.code_workspace_file}: {e}")
297
- return
298
-
299
- # Folder settings
275
+ def _get_vscode_folder_settings(
276
+ self, server: PuakmaServer | None = None
277
+ ) -> dict[str, list[dict[str, str]]]:
300
278
  vortex_dirs = [self.vscode_dir, self.config_dir, self.exports_dir]
301
279
  if self.logs_dir.is_dir():
302
280
  vortex_dirs.append(self.logs_dir)
@@ -310,10 +288,12 @@ class Workspace:
310
288
  for dir_ in self.listdir(server)
311
289
  ]
312
290
  )
313
- folder_settings = {"folders": folders}
291
+ return {"folders": folders}
314
292
 
315
- # Java project settings
316
- settings: dict[str, Any] = workspace_settings.get("settings", {})
293
+ def _get_vscode_java_settings(
294
+ self,
295
+ server: PuakmaServer | None = None,
296
+ ) -> dict[str, Any]:
317
297
  # Get the packaged puakma-*.jar file
318
298
  # Assumes only 1 file in the /lib directory
319
299
  lib_dir = os.path.join(os.path.dirname(__file__), "lib")
@@ -337,13 +317,41 @@ class Workspace:
337
317
  java_runtimes = [
338
318
  {"default": True, "path": java_home, "name": java_environment_name}
339
319
  ]
340
-
341
- java_project_settings = {
320
+ return {
342
321
  "java.project.sourcePaths": DesignType.source_dirs(),
343
322
  "java.project.outputPath": "zbin",
344
323
  "java.project.referencedLibraries": referenced_libs,
345
324
  "java.configuration.runtimes": java_runtimes,
346
325
  }
326
+
327
+ def update_vscode_settings(
328
+ self, server: PuakmaServer | None = None, reset: bool = False
329
+ ) -> None:
330
+ """
331
+ Updates or creates the vortex.code-workspace file inside the .vscode directory
332
+ """
333
+
334
+ def _reset() -> dict[Any, Any]:
335
+ if not self.vscode_dir.exists():
336
+ self.vscode_dir.mkdir()
337
+ return {}
338
+
339
+ if reset:
340
+ workspace_settings = _reset()
341
+ else:
342
+ try:
343
+ with open(self.code_workspace_file) as f:
344
+ workspace_settings = json.load(f)
345
+ except FileNotFoundError:
346
+ workspace_settings = _reset()
347
+ except json.JSONDecodeError as e:
348
+ logger.error(f"Error parsing {self.code_workspace_file}: {e}")
349
+ return
350
+
351
+ folder_settings = self._get_vscode_folder_settings(server)
352
+
353
+ settings: dict[str, Any] = workspace_settings.get("settings", {})
354
+ java_project_settings = self._get_vscode_java_settings(server)
347
355
  settings.update(java_project_settings)
348
356
 
349
357
  # Extension reccommendation settings
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: vortex_cli
3
- Version: 4.18.1
3
+ Version: 4.18.3
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -32,7 +32,6 @@ vortex/commands/log.py
32
32
  vortex/commands/new.py
33
33
  vortex/commands/watch.py
34
34
  vortex/docs/Blackbook.pdf
35
- vortex/lib/puakma-6.0.37.jar
36
35
  vortex_cli.egg-info/PKG-INFO
37
36
  vortex_cli.egg-info/SOURCES.txt
38
37
  vortex_cli.egg-info/dependency_links.txt
File without changes
File without changes
File without changes
File without changes
@@ -24,13 +24,6 @@ def grep(
24
24
  output_paths: bool = False,
25
25
  include_resources: bool = False,
26
26
  ) -> int:
27
- if design_types is None:
28
- design_types = [
29
- t
30
- for t in DesignType
31
- if t != DesignType.ERROR and (t != DesignType.RESOURCE or include_resources)
32
- ]
33
-
34
27
  if app_ids:
35
28
  apps = [workspace.lookup_app(server, id_) for id_ in app_ids]
36
29
  else:
@@ -42,6 +35,13 @@ def grep(
42
35
  )
43
36
  return 0
44
37
 
38
+ if design_types is None:
39
+ design_types = [
40
+ t
41
+ for t in DesignType
42
+ if t != DesignType.ERROR and (t != DesignType.RESOURCE or include_resources)
43
+ ]
44
+
45
45
  objs = [
46
46
  obj
47
47
  for app in apps
File without changes
File without changes
File without changes