apm-cli 0.8.8__tar.gz → 0.8.9__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.
- {apm_cli-0.8.8/src/apm_cli.egg-info → apm_cli-0.8.9}/PKG-INFO +1 -1
- {apm_cli-0.8.8 → apm_cli-0.8.9}/pyproject.toml +1 -1
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/marketplace/models.py +10 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/marketplace/resolver.py +24 -2
- {apm_cli-0.8.8 → apm_cli-0.8.9/src/apm_cli.egg-info}/PKG-INFO +1 -1
- {apm_cli-0.8.8 → apm_cli-0.8.9}/AUTHORS +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/LICENSE +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/README.md +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/setup.cfg +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/base.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/codex.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/copilot.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/cursor.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/opencode.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/client/vscode.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/package_manager/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/package_manager/base.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/adapters/package_manager/default_manager.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/bundle/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/bundle/lockfile_enrichment.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/bundle/packer.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/bundle/plugin_exporter.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/bundle/unpacker.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/cli.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/_helpers.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/audit.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/compile/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/compile/cli.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/compile/watcher.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/config.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/deps/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/deps/_utils.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/deps/cli.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/init.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/install.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/list_cmd.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/marketplace.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/mcp.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/pack.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/prune.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/run.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/runtime.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/uninstall/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/uninstall/cli.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/uninstall/engine.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/commands/update.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/agents_compiler.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/claude_formatter.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/constants.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/constitution.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/constitution_block.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/context_optimizer.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/distributed_compiler.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/injector.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/link_resolver.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/compilation/template_builder.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/config.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/constants.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/auth.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/command_logger.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/conflict_detector.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/docker_args.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/operations.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/safe_installer.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/scope.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/script_runner.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/target_detection.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/core/token_manager.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/aggregator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/apm_resolver.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/collection_parser.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/dependency_graph.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/github_downloader.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/installed_package.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/lockfile.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/package_validator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/plugin_parser.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/registry_proxy.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/deps/verifier.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/drift.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/factory.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/agent_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/base_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/command_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/hook_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/instruction_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/mcp_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/prompt_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/skill_integrator.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/skill_transformer.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/targets.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/integration/utils.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/marketplace/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/marketplace/client.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/marketplace/errors.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/marketplace/registry.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/apm_package.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/dependency/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/dependency/mcp.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/dependency/reference.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/dependency/types.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/plugin.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/results.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/models/validation.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/output/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/output/formatters.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/output/models.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/output/script_formatters.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/ci_checks.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/discovery.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/inheritance.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/matcher.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/models.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/parser.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/policy_checks.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/policy/schema.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/primitives/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/primitives/discovery.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/primitives/models.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/primitives/parser.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/registry/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/registry/client.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/registry/integration.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/registry/operations.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/base.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/codex_runtime.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/copilot_runtime.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/factory.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/llm_runtime.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/runtime/manager.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/security/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/security/audit_report.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/security/content_scanner.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/security/file_scanner.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/security/gate.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/console.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/content_hash.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/diagnostics.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/file_ops.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/github_host.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/helpers.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/path_security.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/paths.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/version_checker.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/utils/yaml_io.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/version.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/workflow/__init__.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/workflow/discovery.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/workflow/parser.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli/workflow/runner.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli.egg-info/SOURCES.txt +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli.egg-info/dependency_links.txt +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli.egg-info/entry_points.txt +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli.egg-info/requires.txt +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/src/apm_cli.egg-info/top_level.txt +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_apm_package_models.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_apm_resolver.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_codex_docker_args_fix.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_codex_empty_string_and_defaults.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_collision_integration.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_console.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_distributed_compilation.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_empty_string_and_defaults.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_enhanced_discovery.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_github_downloader.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_github_downloader_token_precedence.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_lockfile.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_runnable_prompts.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_runtime_manager_token_precedence.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_token_manager.py +0 -0
- {apm_cli-0.8.8 → apm_cli-0.8.9}/tests/test_virtual_package_multi_install.py +0 -0
|
@@ -82,6 +82,7 @@ class MarketplaceManifest:
|
|
|
82
82
|
plugins: Tuple[MarketplacePlugin, ...] = ()
|
|
83
83
|
owner_name: str = ""
|
|
84
84
|
description: str = ""
|
|
85
|
+
plugin_root: str = "" # metadata.pluginRoot - base path for bare-name sources
|
|
85
86
|
|
|
86
87
|
def find_plugin(self, plugin_name: str) -> Optional[MarketplacePlugin]:
|
|
87
88
|
"""Find a plugin by exact name (case-insensitive)."""
|
|
@@ -195,6 +196,14 @@ def parse_marketplace_json(
|
|
|
195
196
|
data.get("owner"), dict
|
|
196
197
|
) else data.get("owner", "")
|
|
197
198
|
|
|
199
|
+
# Extract pluginRoot from metadata (base path for bare-name sources)
|
|
200
|
+
metadata = data.get("metadata", {})
|
|
201
|
+
plugin_root = ""
|
|
202
|
+
if isinstance(metadata, dict):
|
|
203
|
+
raw_root = metadata.get("pluginRoot", "")
|
|
204
|
+
if isinstance(raw_root, str):
|
|
205
|
+
plugin_root = raw_root.strip()
|
|
206
|
+
|
|
198
207
|
raw_plugins = data.get("plugins", [])
|
|
199
208
|
if not isinstance(raw_plugins, list):
|
|
200
209
|
logger.warning(
|
|
@@ -216,4 +225,5 @@ def parse_marketplace_json(
|
|
|
216
225
|
plugins=tuple(plugins),
|
|
217
226
|
owner_name=owner_name,
|
|
218
227
|
description=description,
|
|
228
|
+
plugin_root=plugin_root,
|
|
219
229
|
)
|
|
@@ -111,16 +111,33 @@ def _resolve_git_subdir_source(source: dict) -> str:
|
|
|
111
111
|
return base
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
def _resolve_relative_source(
|
|
114
|
+
def _resolve_relative_source(
|
|
115
|
+
source: str,
|
|
116
|
+
marketplace_owner: str,
|
|
117
|
+
marketplace_repo: str,
|
|
118
|
+
plugin_root: str = "",
|
|
119
|
+
) -> str:
|
|
115
120
|
"""Resolve a relative path source to ``owner/repo[/subdir]``.
|
|
116
121
|
|
|
117
122
|
Relative sources point to subdirectories within the marketplace repo itself.
|
|
123
|
+
When *plugin_root* is set (from ``metadata.pluginRoot`` in the manifest),
|
|
124
|
+
bare names (no ``/``) are resolved under that directory.
|
|
118
125
|
"""
|
|
119
126
|
# Normalize the relative path (strip leading ./ and trailing /)
|
|
120
127
|
rel = source.strip("/")
|
|
121
128
|
if rel.startswith("./"):
|
|
122
129
|
rel = rel[2:]
|
|
123
130
|
rel = rel.strip("/")
|
|
131
|
+
|
|
132
|
+
# If plugin_root is set and source is a bare name, prepend it
|
|
133
|
+
if plugin_root and rel and rel != "." and "/" not in rel:
|
|
134
|
+
root = plugin_root.strip("/")
|
|
135
|
+
if root.startswith("./"):
|
|
136
|
+
root = root[2:]
|
|
137
|
+
root = root.strip("/")
|
|
138
|
+
if root:
|
|
139
|
+
rel = f"{root}/{rel}"
|
|
140
|
+
|
|
124
141
|
if rel and rel != ".":
|
|
125
142
|
try:
|
|
126
143
|
validate_path_segments(rel, context="relative source path")
|
|
@@ -134,6 +151,7 @@ def resolve_plugin_source(
|
|
|
134
151
|
plugin: MarketplacePlugin,
|
|
135
152
|
marketplace_owner: str = "",
|
|
136
153
|
marketplace_repo: str = "",
|
|
154
|
+
plugin_root: str = "",
|
|
137
155
|
) -> str:
|
|
138
156
|
"""Resolve a plugin's source to a canonical ``owner/repo[#ref]`` string.
|
|
139
157
|
|
|
@@ -144,6 +162,7 @@ def resolve_plugin_source(
|
|
|
144
162
|
plugin: The marketplace plugin to resolve.
|
|
145
163
|
marketplace_owner: Owner of the marketplace repo (for relative sources).
|
|
146
164
|
marketplace_repo: Repo name of the marketplace (for relative sources).
|
|
165
|
+
plugin_root: Base path for bare-name sources (from metadata.pluginRoot).
|
|
147
166
|
|
|
148
167
|
Returns:
|
|
149
168
|
Canonical ``owner/repo[#ref]`` string.
|
|
@@ -157,7 +176,9 @@ def resolve_plugin_source(
|
|
|
157
176
|
|
|
158
177
|
# String source = relative path
|
|
159
178
|
if isinstance(source, str):
|
|
160
|
-
return _resolve_relative_source(
|
|
179
|
+
return _resolve_relative_source(
|
|
180
|
+
source, marketplace_owner, marketplace_repo, plugin_root=plugin_root
|
|
181
|
+
)
|
|
161
182
|
|
|
162
183
|
if not isinstance(source, dict):
|
|
163
184
|
raise ValueError(
|
|
@@ -217,6 +238,7 @@ def resolve_marketplace_plugin(
|
|
|
217
238
|
plugin,
|
|
218
239
|
marketplace_owner=source.owner,
|
|
219
240
|
marketplace_repo=source.repo,
|
|
241
|
+
plugin_root=manifest.plugin_root,
|
|
220
242
|
)
|
|
221
243
|
|
|
222
244
|
logger.debug(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|