Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature Request]: Allow relative paths in repository json spec #1329

Closed
ismell opened this issue Feb 5, 2018 · 1 comment
Closed

[Feature Request]: Allow relative paths in repository json spec #1329

ismell opened this issue Feb 5, 2018 · 1 comment

Comments

@ismell
Copy link

ismell commented Feb 5, 2018

The repositories.json spec allows the url for a specific release to be defined. Would it be possible to allow that url to be a relative url that is relative to the repository.json?

Use case:
We host a custom repository.json that is accessible via two different vhosts: internal.foo.com/repository.json and roaming.foo.com/repository.json. Ideally the repository.json would allow for the release url for a plugin to be defined as ./my-plugin-v1.0.0.zip. This would than translate to internal.foo.com/my-plugin-v1.0.0.zip if the internal vhost repository.json was added to package control.

deathaxe added a commit that referenced this issue Mar 19, 2023
Fixes #1329

This commit enables RepositoryProvider to resolve relative URLs in
- package-level `details` keys
- release-level `base` and `url` keys

using the repository's location as root.

Example:

A repository https://github.com/user/repository/repository.json with
following content:

{
   "name": "my-package",
   "details": "../my-package"
   "releases": [
      {
         "url": "./downloads/my-package.sublime-package"
      }
   ]
}

is resolved to...

{
   "name": "my-package",
   "details": "https://github.com/user/my-package"
   "releases": [
      {
         "url": "https://github.com/user/repository/downloads/my-package.sublime-package"
      }
   ]
}
deathaxe added a commit that referenced this issue Mar 19, 2023
Fixes #1329

This commit enables RepositoryProvider to resolve relative URLs in
- package-level `details` keys
- release-level `base` and `url` keys

using the repository's location as root.

Example:

A repository https://github.com/user/repository/repository.json with
following content:

{
   "name": "my-package",
   "details": "../my-package"
   "releases": [
      {
         "url": "./downloads/my-package.sublime-package"
      }
   ]
}

is resolved to...

{
   "name": "my-package",
   "details": "https://github.com/user/my-package"
   "releases": [
      {
         "url": "https://github.com/user/repository/downloads/my-package.sublime-package"
      }
   ]
}
deathaxe added a commit that referenced this issue Mar 20, 2023
Fixes #1329

This commit enables RepositoryProvider to resolve relative URLs in
- package-level `details` keys
- release-level `base` and `url` keys

using the repository's location as root.

Example:

A repository https://github.com/user/repository/repository.json with
following content:

{
   "name": "my-package",
   "details": "../my-package"
   "releases": [
      {
         "url": "./downloads/my-package.sublime-package"
      }
   ]
}

is resolved to...

{
   "name": "my-package",
   "details": "https://github.com/user/my-package"
   "releases": [
      {
         "url": "https://github.com/user/repository/downloads/my-package.sublime-package"
      }
   ]
}
deathaxe added a commit that referenced this issue Mar 20, 2023
Fixes #1329

This commit enables RepositoryProvider to resolve relative URLs in
- package-level `details` keys
- release-level `base` and `url` keys

using the repository's location as root.

Example:

A repository https://github.com/user/repository/repository.json with
following content:

{
   "name": "my-package",
   "details": "../my-package"
   "releases": [
      {
         "url": "./downloads/my-package.sublime-package"
      }
   ]
}

is resolved to...

{
   "name": "my-package",
   "details": "https://github.com/user/my-package"
   "releases": [
      {
         "url": "https://github.com/user/repository/downloads/my-package.sublime-package"
      }
   ]
}
@deathaxe deathaxe added this to the Package Control 4.0 milestone Nov 26, 2023
@ismell
Copy link
Author

ismell commented Dec 2, 2023 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants