Giter VIP home page Giter VIP logo

Comments (7)

shemgp avatar shemgp commented on June 13, 2024 1

Hello,

Yes, I can confirm that with 0.0.1-alpha3 I am able to push to nexus composer repository and the packages have the type and not just the type but the rest of the fields.

Thank you for your work.

from composer-push.

shemgp avatar shemgp commented on June 13, 2024

Upon more testing, it seems the commit that puts the repository in a folder in the zip file makes nexus composer repository not pick up the composer.json values, so the type and the other fields are not placed in the json file. Maybe this should be fixed in the nexus composer plugin?

from composer-push.

Elendev avatar Elendev commented on June 13, 2024

Hello @shemgp,

It looks like the release 0.0.1-alpha2 related to the issue #1 was buggy. I've deleted this release and the corresponding tag.

Your issue is probably related to the Composer Nexus plugin since nexus-composer-push doesn't modify the composer.json at all: it only creates an archive with the content of the current directory and push it to a Nexus.

Can you try to upload an archive that you've got from Packagist using the curl command (documented here: https://github.com/sonatype-nexus-community/nexus-repository-composer/blob/master/docs/COMPOSER_USER_DOCUMENTATION.md#publishing-composer-packages) to see if the issue is related to this project or to the Nexus Composer plugin ?

from composer-push.

shemgp avatar shemgp commented on June 13, 2024

So I uploaded the zip downloaded from https://github.com/AsgardCms/Blog and also my manually zipped up my package, with a folder inside, and both of them were able to display the contents of composer.json properly:

{
  "packages": {
    "asgardcms/blog": {
      "0.0.1": {
        "name": "asgardcms/blog",
        "version": "0.0.1",
        "dist": {
          "url": "https://development.aiias.edu:8081/repository/aiias/asgardcms/blog/0.0.1/asgardcms-blog-0.0.1.zip",
          "type": "zip",
          "reference": "fc83539eff4b61887107644d2b243e5e8073b7eb",
          "shasum": "fc83539eff4b61887107644d2b243e5e8073b7eb"
        },
        "time": "2018-12-12T00:53:45+00:00",
        "uid": 2908969719,
        "autoload-dev": {
          "psr-4": {
            "Modules\\Blog\\": ".",
            "Modules\\": "Modules/"
          }
        },
        "require": {
          "php": ">=7.0.0",
          "composer/installers": "~1.0",
          "idavoll/core-module": "~3.0",
          "idavoll/media-module": "~3.0",
          "idavoll/tag-module": "~3.0",
          "doctrine/dbal": "^2.5"
        },
        "require-dev": {
          "phpunit/phpunit": "^6.3",
          "orchestra/testbench": "3.5.*",
          "fzaninotto/faker": "~1.5",
          "friendsofphp/php-cs-fixer": "^2.7"
        },
        "authors": [
          {
            "name": "Nicolas Widart",
            "email": "[email protected]",
            "role": "Developer"
          }
        ],
        "description": "A blog module for AsgardCMS.",
        "extra": {
          "branch-alias": {
            "dev-2.0": "2.0.x-dev"
          }
        },
        "keywords": [
          "blog",
          "asgardcms",
          "journal"
        ],
        "license": "MIT",
        "support": {
          "email": "[email protected]",
          "issues": "https://github.com/AsgardCms/Blog/issues",
          "source": "https://github.com/AsgardCms/Blog"
        },
        "type": "asgard-module"
      }
    }
  }
}

and

{
  "packages": {
    "test/theme": {
      "0.0.1": {
        "name": "test/theme",
        "version": "0.0.1",
        "dist": {
          "url": "https://development.aiias.edu:8081/repository/aiias/test/theme/0.0.1/test-theme-0.0.1.zip",
          "type": "zip",
          "reference": "64b280d5c6a3baeae370a2e33ea85939589eb2b2",
          "shasum": "64b280d5c6a3baeae370a2e33ea85939589eb2b2"
        },
        "time": "2018-12-12T00:55:55+00:00",
        "uid": 1701284185,
        "autoload": {
          "psr-4": {
            "Modules\\Theme\\": ""
          }
        },
        "require": {
          "components/font-awesome": "*",
          "elendev/nexus-composer-push": "0.0.1-alpha2",
          "nwidart/laravel-modules": "*",
          "joshbrw/laravel-module-installer": "*"
        },
        "authors": [
          {
            "name": "Shem Pasamba",
            "email": "[email protected]"
          }
        ],
        "description": "",
        "extra": {
          "laravel": {
            "providers": [
              "Modules\\Theme\\Providers\\ThemeServiceProvider"
            ],
            "aliases": {}
          }
        },
        "type": "laravel-module"
      }
    }
  }
}

So investigated more: I got the zip generated by 0.0.1-alpha2 and compared it with my manually zipped up theme version (both are from the same source code). And I think there's a bug with how the 0.0.1-alpha2 zips the files as when I try to extract it it says:

unzip ../nexus-pushsmBTUk.zip 
Archive:  ../nexus-pushsmBTUk.zip
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Database/Seeders/ThemeDatabaseSeeder.php
  inflating: shemgp-theme-module-0-0-7/Database/Seeders/ThemeDatabaseSeeder.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/composer.json
  inflating: shemgp-theme-module-0-0-7/composer.json  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/auth.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/auth.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/components/content_header.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/components/content_header.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/components/breadcrumb.blade.php
 extracting: shemgp-theme-module-0-0-7/Resources/views/components/breadcrumb.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/sidebar-user.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/partials/sidebar-user.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/sidebar.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/partials/sidebar.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/footer.blade.php
 extracting: shemgp-theme-module-0-0-7/Resources/views/partials/footer.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/app-nav.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/partials/app-nav.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/user-menu.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/partials/user-menu.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/head.blade.php
 extracting: shemgp-theme-module-0-0-7/Resources/views/partials/head.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/partials/notification.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/partials/notification.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/layouts/outside.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/layouts/outside.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/layouts/master.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/layouts/master.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/views/index.blade.php
  inflating: shemgp-theme-module-0-0-7/Resources/views/index.blade.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/css/custom.css
  inflating: shemgp-theme-module-0-0-7/Resources/assets/css/custom.css  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/css/main.css
  inflating: shemgp-theme-module-0-0-7/Resources/assets/css/main.css  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/main.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/main.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/fullcalendar.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/fullcalendar.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/dataTables.bootstrap.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/dataTables.bootstrap.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery-ui.custom.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery-ui.custom.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/sweetalert.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/sweetalert.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/bootstrap-datepicker.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/bootstrap-datepicker.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/pace.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/pace.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.vmap.sampledata.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.vmap.sampledata.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/chart.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/chart.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/bootstrap-notify.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/bootstrap-notify.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/select2.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/select2.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/moment.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/moment.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.dataTables.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.dataTables.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.vmap.world.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.vmap.world.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.vmap.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/plugins/jquery.vmap.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/jquery-3.2.1.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/jquery-3.2.1.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/popper.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/popper.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/bootstrap.min.js
  inflating: shemgp-theme-module-0-0-7/Resources/assets/js/bootstrap.min.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Resources/assets/js/custom.js
 extracting: shemgp-theme-module-0-0-7/Resources/assets/js/custom.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/webpack.mix.js
  inflating: shemgp-theme-module-0-0-7/webpack.mix.js  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Console/Pull.php
  inflating: shemgp-theme-module-0-0-7/Console/Pull.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/module.json
  inflating: shemgp-theme-module-0-0-7/module.json  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Http/Controllers/ThemeController.php
  inflating: shemgp-theme-module-0-0-7/Http/Controllers/ThemeController.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Routes/web.php
  inflating: shemgp-theme-module-0-0-7/Routes/web.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Routes/api.php
  inflating: shemgp-theme-module-0-0-7/Routes/api.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/composer.lock
  inflating: shemgp-theme-module-0-0-7/composer.lock  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Config/config.php
  inflating: shemgp-theme-module-0-0-7/Config/config.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Providers/ThemeServiceProvider.php
  inflating: shemgp-theme-module-0-0-7/Providers/ThemeServiceProvider.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/Providers/RouteServiceProvider.php
  inflating: shemgp-theme-module-0-0-7/Providers/RouteServiceProvider.php  
warning:  stripped absolute path spec from /shemgp-theme-module-0-0-7/package.json
  inflating: shemgp-theme-module-0-0-7/package.json

while my manually created zip doesn't show the warnings. Also when I try to open it in mc (midnight commander) in the command line, it doesn't let me open the composer.json inside the sub folder, nor any file in the zip. Uploading the 0.0.1-alpha2 compressed zip file had the bug too.

So maybe the bug is in it's the way the zip is compressed, since when uploading a manually compressed file or composer based zip to the nexus-repository, it is able read even a subfoldered zip.

I've attached the following files so you can test. The first one is from the 0.0.1-alpha2 and the Theme.zip is the manually compressed one.
nexus-pushecTDo2.zip
Theme.zip

from composer-push.

shemgp avatar shemgp commented on June 13, 2024

Sorry I didn't mention it above, but when uploading a zip file, of course I use curl to do it, as you have requested.

from composer-push.

Elendev avatar Elendev commented on June 13, 2024

Thank you for all this investigation.

There is a bug with 0.0.1-alpha2, I removed the release and I'll investigate why the generated archive doesn't works as expected and fix it.

In the meantime, can you downgrade to 0.0.1-alpha and try with this version ? It might resolve your issue.

I'll come back to you as soon as I've fixed the issue with 0.0.1-alpha2 and the subdirectory of the zip archive.

from composer-push.

Elendev avatar Elendev commented on June 13, 2024

I've released v0.0.1.alpha3 that fix the type issue. The type is now correctly set (at least on my configuration).

@shemgp can you test on our side and confirm if the issue is fixed ?

from composer-push.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.