Git Product home page Git Product logo

gulp-nuget's People

Contributors

ahelmberger avatar alistairmgreen avatar annadodson avatar bdukes avatar mckn avatar nielsdm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gulp-nuget's Issues

Gulp-util is deprecated

Problem
Within the company we use Gulp-nuget to publish our packages.
When we install Gulp-nuget security issues are raised because of the reference to Gulp-util.
Solution
If I went trought this code I saw some easy fixes to lose the dependency to Gulp-util.
I want to update this code.
But I'm quite hesitant because the last update to this project is from 2018.
I want to verify if you would look into the pull request and publish to npmjs.com?

nuget.pack doesn't read input src files

When running nuget.pack the src files aren't being taken into account.

The example given in the readme:

gulp.src(['./*.js', './package.json'])
        .pipe(nuget.pack({ nuspec: 'project.nuspec', nuget: nugetPath, version: '1.0.0' }))
        .pipe(gulp.dest('project.1.0.0.nupkg'));

implies that the files specified in src will be passed to nuget.pack and also that the output of nuget.pack (i.e. the package stream) will be passed to gulp.dest.

Perhaps I've misunderstood how this works but the result I get is quite different.

In my case, a package is created based on project.nuspec such that the output file project.nupkg is created during nuget.pack rather than by gulp.dest. The files specified in gulp.src are ignored and only files supplied in the .nuspec config are taken into account.

This means that to correctly create a package I need to specify my files in my project.nuspec and do the following:

gulp.src('')
.pipe(nuget.pack({ nuspec: 'project.nuspec', nuget: nugetPath, version: '1.0.0' }))

This generates the package correctly but the whole thing feels a bit odd. Like I say, I'm probably missing something obvious.

Delete command

Would be nice to add the functionality for delete command

Update

I am running gulp script on windows.
I have a private nuget repository where packages get updated periodically.
I tried to update the nuget packages in my visual studio solution using gulp-nuget.
But update command could not be found with gulp-nuget.

Run nuget.exe from PATH

Would you be open to a PR that allows you to run nuget from the PATH so that the path does not need to be explicitly configured?

Expose more command line options

It would be nice if I could specify other options for nuget pack and push commands through the plugin (-IncludeReferencedProjects etc).
In order to not wrap each available option in the 'options' object, you could just allow users to specify any additional options via an array and then concat it in your createArgs functions.

File doesn't exist during push

I have a problem with nuget.push on Jenkins. I get an error:

c:\jenkins\workspace\my_project\node_modules\gulp-nuget\lib\push.js:22
            if(err) throw new gutil.PluginError('gulp-nuget', err);
                          ^
Error: Command failed: File does not exist (c:\jenkins\workspace\my_project\stage\project.3.5.1.32.nupkg).


    at ChildProcess.exithandler (child_process.js:647:15)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)

I've checked current location before running nuget.push:

> pwd
/c/jenkins/workspace/my_project

I've checked the content of the c:\jenkins\workspace\my_project\stage directory:

> ls stage/
app.bundle.js
app.bundle.js.map
index.html
project.3.5.1.32.nupkg
vendor.bundle.js
vendor.bundle.js.map
web.config

It seems like the file is there, but nuget.push doesn't see it. What else can cause that ? For example nupkg can be invalid and the error is misleading ?

nuget.pack creates 2 output .nupkg files

I am using the following command, but it creates 2 .nupkg files - one at the location I specify and another one in the root directory of my project. Both files have the same name (which corresponds to {basename}.nupkg). I checked and it doesn't seem to have anything to do with the location of the .nuspec file or the location of nuget.exe.

Here is the code that I am using. It uses gulp-out.

var distributionFolder = './dist/';
var nuspecFile = './project.nuspec';
var nugetPath = '/nuget.exe';
var version = '1.0.0';

gulp.src('', { base: './' })
    .pipe(nuget.pack({ nuspec: nuspecFile, nuget: nugetPath, version: version }))
    .pipe(out(distributionFolder + '{basename}.nupkg'));

Gulp-nuget depends on a deleted NPM package

The shrink wrap file for gulp-nuget specifies a dependency on [email protected].

That particular version has just disappeared from npm, so it is no longer possible to run npm install on any project that uses gulp-nuget. Consequently, my build which was working fine yesterday is now broken.

This can be fixed by upgrading to [email protected] which is still valid.

Unable to install gulp-nuget from internal repository

Your package-lock file is part of th epackage and in the resolved fields there are absolute URLs to npmjs.org. With this setting I am unable to install this package using an internal repository behind a firewall , as npm goes directly to npmjs.org to download the dependencies.
I guess it would be fine to use relative path in resolved fields.

Handling nuget push errors

If nuget push fails with an error, the following stack trace is shown and no error information is visible:

Error: no writecb in Transform class
at afterTransform (_stream_transform.js:90:33)
at TransformState.afterTransform (_stream_transform.js:74:12)
at \node_modules\gulp-nuget\lib\push.js:38:3
at \node_modules\gulp-nuget\lib\push-cmd.js:24:3
at ChildProcess.exithandler (child_process.js:652:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

I assume this because push-cmd calls the callback twice in case of an error.

Max Buffer Issue

I am looping through lots of proejcts and generating nuget packages. its throwing halfway statng Process ```
terminated with code 1.
if(err) throw new gutil.PluginError('gulp-nuget', err);
^
Error: stdout maxBuffer exceeded
at Socket. (child_process.js:266:14)

Can you please add support to provide max-buffer parameter.

Pack & Push not working

Hi,

I'm trying to pack and push a package to a nuget server. Pack command creates the package but deletes the file before completion, so the push command cannot find the file specified. Is there any configuration that I am missing? Thanks

gulp.task('nuget-pack-n-push-website', function() {
    return gulp.src(config.release.website)
        .pipe(nuget.pack({
            nuget: nugetExecutable,
            version: version
        }))
        .pipe(nuget.push({
            nuget: nugetExecutable,
            source: 'http://example.com/nuget/nuget',
            apiKey: '00000000-0000-0000-0000-000000000000'
        }));
});

[15:19:21] MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Attempting to build package from 'Example.nuspec'.
Successfully created package './.gulp-nuget\Example.1.0.nupkg'.

c:\example\node_modules\gulp-nuget\lib\push.js:22
                        if(err) throw new gutil.PluginError('gulp-nuget', err);
                                ^
Error: Command failed: c:/Example/nuget/nuget.exe push ./.gulp-nuget\Example.1.0.nupkg -source http://example.com/nuget/nuget -apiKey 00000000-0000-0000-0000-000000000000 -noninteractive
Could not find a part of the path 'c:\Example\.gulp-nuget'.

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

OS: Windows 7
gulp: 3.9.1
node: 4.1.2
npm: 3.7.5
gulp-nuget: 1.0.0

Documentation

The README.md is near-empty, you should provide some examples or actually document how gulp-nuget is used and what its capabilities are.

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.