robotcode 2.9.0.dev214__py3-none-any.whl → 2.9.0.dev264__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.
robotcode/cli/__init__.py CHANGED
@@ -8,6 +8,7 @@ from typing import IO, Any, List, Literal, Mapping, Optional
8
8
 
9
9
  import click
10
10
 
11
+ from robotcode.core.uri import PathMapping, set_path_mappings
11
12
  from robotcode.core.utils.cli import show_hidden_arguments
12
13
  from robotcode.core.utils.logging import LoggingDescriptor
13
14
  from robotcode.plugin import (
@@ -66,6 +67,16 @@ def _warn_about_ignored_wrapper(ctx: click.Context, app: Application) -> None:
66
67
  app.warning(f"Ignoring --wrapper: '{ctx.invoked_subcommand}' does not execute Robot Framework.")
67
68
 
68
69
 
70
+ def _parse_path_mappings(ctx: click.Context, param: click.Parameter, values: tuple[str, ...]) -> List[PathMapping]:
71
+ result = []
72
+ for value in values:
73
+ client_root, sep, local_root = value.partition("=")
74
+ if not sep or not client_root or not local_root:
75
+ raise click.BadParameter(f"'{value}' is not of the form CLIENT_URI_ROOT=LOCAL_PATH_ROOT.", ctx, param)
76
+ result.append(PathMapping(client_root, local_root))
77
+ return result
78
+
79
+
69
80
  def _set_output_options(app: Application, color: Optional[bool], pager: Optional[bool]) -> None:
70
81
  """Set the colour and pager choice of `app` from `--color/--no-color` and `--pager/--no-pager`."""
71
82
  if color is None:
@@ -372,6 +383,16 @@ class RobotCodeGroup(AliasedGroup):
372
383
  type=str,
373
384
  help="Path to the launcher script. This is an internal option.",
374
385
  )
386
+ @click.option(
387
+ "--path-mapping",
388
+ "path_mappings",
389
+ metavar="CLIENT_URI_ROOT=LOCAL_PATH_ROOT",
390
+ multiple=True,
391
+ hidden=show_hidden_arguments(),
392
+ callback=_parse_path_mappings,
393
+ help="Maps the file URIs of the client below CLIENT_URI_ROOT to the local paths below LOCAL_PATH_ROOT, and back. "
394
+ "**This is an internal option for IDE clients**",
395
+ )
375
396
  @click.option(
376
397
  "--debugpy",
377
398
  is_flag=True,
@@ -422,6 +443,7 @@ def robotcode(
422
443
  wrapper: Optional[str] = None,
423
444
  no_wrapper: bool = False,
424
445
  launcher_script: Optional[str] = None,
446
+ path_mappings: Optional[List[PathMapping]] = None,
425
447
  debugpy: bool = False,
426
448
  debugpy_port: int = 5678,
427
449
  debugpy_wait_for_client: bool = False,
@@ -447,6 +469,7 @@ def robotcode(
447
469
  app.config.output_format = format
448
470
  app.config.launcher_script = launcher_script
449
471
  app.config.default_paths = default_path
472
+ set_path_mappings(path_mappings or [])
450
473
  app.config.log_enabled = log
451
474
  app.config.log_level = log_level
452
475
  app.config.log_calls = log_calls
@@ -1 +1 @@
1
- __version__ = "2.9.0-dev.214"
1
+ __version__ = "2.9.0-dev.264"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: robotcode
3
- Version: 2.9.0-dev.214
3
+ Version: 2.9.0-dev.264
4
4
  Summary: Command line interface for RobotCode
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -34,35 +34,35 @@ Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
34
34
  Classifier: Topic :: Utilities
35
35
  Classifier: Typing :: Typed
36
36
  Requires-Python: >=3.10
37
- Requires-Dist: robotcode-core==2.9.0-dev.214
38
- Requires-Dist: robotcode-plugin==2.9.0-dev.214
39
- Requires-Dist: robotcode-robot==2.9.0-dev.214
37
+ Requires-Dist: robotcode-core==2.9.0-dev.264
38
+ Requires-Dist: robotcode-plugin==2.9.0-dev.264
39
+ Requires-Dist: robotcode-robot==2.9.0-dev.264
40
40
  Provides-Extra: all
41
41
  Requires-Dist: docutils; extra == 'all'
42
42
  Requires-Dist: pyyaml>=5.4; extra == 'all'
43
- Requires-Dist: robotcode-analyze==2.9.0-dev.214; extra == 'all'
44
- Requires-Dist: robotcode-debugger==2.9.0-dev.214; extra == 'all'
45
- Requires-Dist: robotcode-language-server==2.9.0-dev.214; extra == 'all'
46
- Requires-Dist: robotcode-repl-server==2.9.0-dev.214; extra == 'all'
47
- Requires-Dist: robotcode-repl==2.9.0-dev.214; extra == 'all'
48
- Requires-Dist: robotcode-runner==2.9.0-dev.214; extra == 'all'
43
+ Requires-Dist: robotcode-analyze==2.9.0-dev.264; extra == 'all'
44
+ Requires-Dist: robotcode-debugger==2.9.0-dev.264; extra == 'all'
45
+ Requires-Dist: robotcode-language-server==2.9.0-dev.264; extra == 'all'
46
+ Requires-Dist: robotcode-repl-server==2.9.0-dev.264; extra == 'all'
47
+ Requires-Dist: robotcode-repl==2.9.0-dev.264; extra == 'all'
48
+ Requires-Dist: robotcode-runner==2.9.0-dev.264; extra == 'all'
49
49
  Requires-Dist: robotframework-robocop>=6.0.0; extra == 'all'
50
50
  Provides-Extra: analyze
51
- Requires-Dist: robotcode-analyze==2.9.0-dev.214; extra == 'analyze'
51
+ Requires-Dist: robotcode-analyze==2.9.0-dev.264; extra == 'analyze'
52
52
  Provides-Extra: debugger
53
- Requires-Dist: robotcode-debugger==2.9.0-dev.214; extra == 'debugger'
53
+ Requires-Dist: robotcode-debugger==2.9.0-dev.264; extra == 'debugger'
54
54
  Provides-Extra: languageserver
55
- Requires-Dist: robotcode-language-server==2.9.0-dev.214; extra == 'languageserver'
55
+ Requires-Dist: robotcode-language-server==2.9.0-dev.264; extra == 'languageserver'
56
56
  Provides-Extra: lint
57
57
  Requires-Dist: robotframework-robocop>=2.0.0; extra == 'lint'
58
58
  Provides-Extra: repl
59
- Requires-Dist: robotcode-repl==2.9.0-dev.214; extra == 'repl'
59
+ Requires-Dist: robotcode-repl==2.9.0-dev.264; extra == 'repl'
60
60
  Provides-Extra: replserver
61
- Requires-Dist: robotcode-repl-server==2.9.0-dev.214; extra == 'replserver'
61
+ Requires-Dist: robotcode-repl-server==2.9.0-dev.264; extra == 'replserver'
62
62
  Provides-Extra: rest
63
63
  Requires-Dist: docutils; extra == 'rest'
64
64
  Provides-Extra: runner
65
- Requires-Dist: robotcode-runner==2.9.0-dev.214; extra == 'runner'
65
+ Requires-Dist: robotcode-runner==2.9.0-dev.264; extra == 'runner'
66
66
  Provides-Extra: yaml
67
67
  Requires-Dist: pyyaml>=5.4; extra == 'yaml'
68
68
  Description-Content-Type: text/markdown
@@ -1,12 +1,12 @@
1
- robotcode/cli/__init__.py,sha256=53X6XQi_a570eDK3-LxjshROpPVpz0sR5spLVY7dMKc,17550
1
+ robotcode/cli/__init__.py,sha256=TET1QkNr3oPxvSTWBcbwk8D-NwTLtUnVHwLf-bnwCiE,18549
2
2
  robotcode/cli/__main__.py,sha256=hX3nwROMTnsYGT1KS0rXUYrslu9sFzctYdAh66Rcckw,153
3
- robotcode/cli/__version__.py,sha256=uSd_IGr6ERx2haC8I41GwovkJcLQLJkFPK2nCwdiFEc,30
3
+ robotcode/cli/__version__.py,sha256=VN16WdRl9zxi7GbqkKoJDxt27F6zUDxjqn8r4zFJsGs,30
4
4
  robotcode/cli/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
5
5
  robotcode/cli/commands/__init__.py,sha256=XJHRt_YwMO2Ni2EfL2aj4jkJXMVG6NGFTpzvSVgIRnQ,92
6
6
  robotcode/cli/commands/config.py,sha256=2B7Z5dnfHQ2eqKcgVpZF8_7YOpgLG6RmxscD9HKi0uE,10505
7
7
  robotcode/cli/commands/profiles.py,sha256=uUZ0xzlQOZVNyVKAh17O70Q6GVAf9ijyuME6ezLd4qE,6798
8
- robotcode-2.9.0.dev214.dist-info/METADATA,sha256=SqnvJJMenx_phCQhIFa3E4O34qM6pAEt8GYKpsJcC_c,15607
9
- robotcode-2.9.0.dev214.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
10
- robotcode-2.9.0.dev214.dist-info/entry_points.txt,sha256=Pb4DKVVdJb5PboVl48njwk3DkKQHBJOL1A8KkpemqA8,58
11
- robotcode-2.9.0.dev214.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
12
- robotcode-2.9.0.dev214.dist-info/RECORD,,
8
+ robotcode-2.9.0.dev264.dist-info/METADATA,sha256=WGQjb5jMz2k45p75DYxTnsWi81hIbEn-qCvkGMq91ow,15607
9
+ robotcode-2.9.0.dev264.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
10
+ robotcode-2.9.0.dev264.dist-info/entry_points.txt,sha256=Pb4DKVVdJb5PboVl48njwk3DkKQHBJOL1A8KkpemqA8,58
11
+ robotcode-2.9.0.dev264.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
12
+ robotcode-2.9.0.dev264.dist-info/RECORD,,