viur-cli 2.3.2__tar.gz → 2.3.4__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 (29) hide show
  1. {viur_cli-2.3.2/src/viur_cli.egg-info → viur_cli-2.3.4}/PKG-INFO +1 -1
  2. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/scriptor/cli.py +15 -11
  3. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/version.py +1 -1
  4. {viur_cli-2.3.2 → viur_cli-2.3.4/src/viur_cli.egg-info}/PKG-INFO +1 -1
  5. {viur_cli-2.3.2 → viur_cli-2.3.4}/LICENSE +0 -0
  6. {viur_cli-2.3.2 → viur_cli-2.3.4}/README.md +0 -0
  7. {viur_cli-2.3.2 → viur_cli-2.3.4}/pyproject.toml +0 -0
  8. {viur_cli-2.3.2 → viur_cli-2.3.4}/setup.cfg +0 -0
  9. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/__init__.py +0 -0
  10. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/build.py +0 -0
  11. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/cli.py +0 -0
  12. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/cloud.py +0 -0
  13. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/conf.py +0 -0
  14. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/deprecated.py +0 -0
  15. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/local.py +0 -0
  16. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/package.py +0 -0
  17. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/scriptor/__init__.py +0 -0
  18. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/scriptor/login.py +0 -0
  19. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/scripts/__init__.py +0 -0
  20. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/scripts/get_pyodide.py +0 -0
  21. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/setup.py +0 -0
  22. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/tool.py +0 -0
  23. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/update.py +0 -0
  24. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli/utils.py +0 -0
  25. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli.egg-info/SOURCES.txt +0 -0
  26. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli.egg-info/dependency_links.txt +0 -0
  27. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli.egg-info/entry_points.txt +0 -0
  28. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli.egg-info/requires.txt +0 -0
  29. {viur_cli-2.3.2 → viur_cli-2.3.4}/src/viur_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viur-cli
3
- Version: 2.3.2
3
+ Version: 2.3.4
4
4
  Summary: Command-line interface for ViUR application maintenance.
5
5
  Author-email: "Andreas H. Kelch" <ak@mausbrand.de>
6
6
  License-Expression: MIT
@@ -23,7 +23,7 @@ def get_modules():
23
23
  global _modules
24
24
  if _modules is None:
25
25
  _modules = Modules(scriptor_config["base_url"], cookies=scriptor_config["cookies"])
26
- asyncio.new_event_loop().run_until_complete(_modules.init())
26
+ asyncio.run(_modules.init())
27
27
 
28
28
  return _modules
29
29
 
@@ -107,8 +107,9 @@ def check_session(ctx: click.Context):
107
107
  click.echo("Invalid session, please run `viur script setup` again. okay ?")
108
108
  ctx.invoke(setup)
109
109
  ctx.close()
110
+ # init modules
111
+ get_modules()
110
112
 
111
-
112
113
  @script.command()
113
114
  @click.option('--force', default=False, help='Force replace files from server in local working directory')
114
115
  @click.pass_context
@@ -125,7 +126,7 @@ def pull(ctx: click.Context, force: bool):
125
126
  working_dir = scriptor_config.get("working_dir")
126
127
 
127
128
  async def process_entry(entry: dict, is_node: bool):
128
- _path = os.path.join(working_dir, entry["path"])
129
+ _path = os.path.join(working_dir, entry["path"].lstrip("/"))
129
130
 
130
131
  if is_node:
131
132
  if not os.path.exists(_path):
@@ -145,9 +146,12 @@ def pull(ctx: click.Context, force: bool):
145
146
  with open(_path, "r") as f:
146
147
  if hashlib.sha256(entry["script"].encode()).digest() \
147
148
  != hashlib.sha256(f.read().encode()).digest():
148
- if click.confirm(f"There is a difference with {entry['path']}. Overwrite?"):
149
- os.remove(_path)
150
- create_file()
149
+ try:
150
+ if click.confirm(f"There is a difference with {entry['path']}. Overwrite?"):
151
+ os.remove(_path)
152
+ create_file()
153
+ except click.exceptions.Abort:
154
+ click.echo("\nSkipping...")
151
155
 
152
156
  else:
153
157
  create_file()
@@ -160,7 +164,7 @@ def pull(ctx: click.Context, force: bool):
160
164
  async for leaf in tree.list(skel_type="leaf"):
161
165
  await process_entry(leaf, False)
162
166
 
163
- asyncio.new_event_loop().run_until_complete(main())
167
+ asyncio.run(main())
164
168
 
165
169
 
166
170
  @script.command()
@@ -312,7 +316,7 @@ def push(ctx: click.Context, force: bool, watch: bool):
312
316
  elif os.path.getmtime(event.src_path) == modified_files[event.src_path]:
313
317
  return
314
318
  modified_files[event.src_path] = os.path.getmtime(event.src_path)
315
- asyncio.new_event_loop().run_until_complete(main(event.src_path))
319
+ asyncio.run(main(event.src_path))
316
320
  except Exception as e:
317
321
  import traceback
318
322
  print(f"Error: on file {event.src_path} {e}")
@@ -340,9 +344,9 @@ def push(ctx: click.Context, force: bool, watch: bool):
340
344
  observer.stop()
341
345
  observer.join()
342
346
 
343
- asyncio.new_event_loop().run_until_complete(watch_loop())
347
+ watch_loop()
344
348
  return
345
- asyncio.new_event_loop().run_until_complete(main())
349
+ asyncio.run(main())
346
350
 
347
351
 
348
352
  @script.command()
@@ -375,4 +379,4 @@ def run(ctx: click.Context, path: str, args=None):
375
379
 
376
380
  await module.main()
377
381
 
378
- asyncio.new_event_loop().run_until_complete(main())
382
+ asyncio.run(main())
@@ -1,2 +1,2 @@
1
- __version__ = "2.3.2"
1
+ __version__ = "2.3.4"
2
2
  MINIMAL_PIPENV = "2023.11.15"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viur-cli
3
- Version: 2.3.2
3
+ Version: 2.3.4
4
4
  Summary: Command-line interface for ViUR application maintenance.
5
5
  Author-email: "Andreas H. Kelch" <ak@mausbrand.de>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes