vtsykun / packeton

:package: Private, self-hosted Packagist/Composer/Satis repository with unlimited private repos.
https://demo.packeton.org
MIT License
403 stars 63 forks source link

help or clarification - cache and show mirrored packages into directory #236

Open moneef opened 7 months ago

moneef commented 7 months ago

Hello, when trying to mirror/proxy a repo it doesn't show in package directory when i click on Browse it doesn't show anything

1 2 3 4
vtsykun commented 7 months ago

Hi

By default mirror packages are automatically mirrored and shown to your Mirror page the first time they are accessed through composer update.

For example https://demo.packeton.org/proxies/firegento

curl -u admin:oR5sY2Vv3Dcg4v2EXHxf https://demo.packeton.org/mirror/firegento/packages.json

curl -u admin:oR5sY2Vv3Dcg4v2EXHxf https://demo.packeton.org/mirror/firegento/p2/adobe/aep-launch.json

Selection_1913

moneef commented 7 months ago

is there away to just add the mirrored repo and get all packages into main page of packeton as if it was submitted

vtsykun commented 7 months ago

No, this feature is not supported yet. (as I know the paid packagist.com has this feature - union all mirrored and submitted packages together). For mirrored and submitted packages you must use two different repository URLs in composer.json.

moneef commented 7 months ago

is there a plan to implement this feature? i would like to help but i don't know how and where to start. any advice will be appreciated

vtsykun commented 6 months ago

is there a plan to implement this feature?

you can use multiple repositories in composer.json. I'd like to keep separate url for minorring packages and for main repository. It seems difficult to merge the metadata together of two repositories without performance degradation.

    "repositories": [
        {
            "type": "composer",
            "url": "https://example.com"
        },
        {
            "type": "composer",
            "url": "https://example.com/mirror/amasty"
        }
    ],
jg-development commented 2 weeks ago

I kind of added a "proxy submit" for repos from proxy like magento and so on. maybe this can help u: https://github.com/jg-development/packeton/commit/fdf5d8608b4b33c843c1a470a240f74a779a017d