Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@octopusdeploy/octopackjs
Advanced tools
A nodejs tool for packaging and pushing projects to an Octopus Deploy instance.
A nodejs tool for packaging and pushing projects to an Octopus Deploy instance.
Install with npm
npm install @octopusdeploy/octopackjs --save-dev
Optional parameter to define the package type. Valid values are targz
, tar
or zip
. If not provided this defaults to targz
.
Path to the package.json
containing project information used to provide required package metadata.
Defines the Id
component of the created package. By default it will extract the name out of package.json
if present.
Defines the version
component of the created package. By default it will extract the version out of package.json
if present.
Adds the buff
Buffer instance to the package named using the provided filePath
parameter as a relative path from the root of the archive.
Adds the stream
Stream instance to the package named using the provided filePath
parameter as a relative path from the root of the archive.
Adds the file
from disk to the package named using the provided filePath
parameter as a relative path from the root of the archive.
If the filePath
parameter is missing, the provided path to the file on disk will be used as the filePath in the archive.
If the filePath
is a glob pattern, then the glob is used to append files to the package and the other arguments will be ignored.
Supplying a folder path without being a glob will be ignored.
Adds the sub-directory dir
to the archive. Adds the contents of dir
to the root of the archive if toRoot
is true (defaults to false).
Completes the packaging of the files and invokes the provided callback, returning an object containing the stream instance and name.
Completes the packaging of the files, saves it to disk at the provided directory location and invokes the provided callback, returning an object containing the package path, name and size.
Package file that is to be pushed to server. This can be an instance of a Stream, Buffer or file path string.
Required property that points to the Octopus Server instance the package should be pushed to.
Flag to force overwrite of existing package if one already exists with the same ID and version.
Key linked to account with BuiltInFeedPush
permissions.
If options.replace
is set to true and a package with the same ID and version already exists then the BuiltInFeedAdminister
permission is required.
If a Stream or Buffer object is provided in the file
parameter, the package name needs is required to properly store and use in Octopus Deploy. If this value is not provided and a path has been provided in the file
parameter then the name of the file itself will be used.
Invoked when the HTTP request has completed. The data
object contains the HTTP response body that was returned as a result of a successful push.
var octo = require('@octopusdeploy/octopackjs');
octo.pack()
.append('buffer files/hello.txt', Buffer.from('hello world'), {date: new Date(2011, 11, 11)})
.append('stream.txt', fs.createReadStream('./package.json'))
.append('lib/myfile.js')
.appendSubDir('dist/', true)
.toFile('./bin', function (err, data) {
console.log("Package Saved: "+ data.name);
});
var octo = require('@octopusdeploy/octopackjs');
octo.push('./bin/Sample.Web.3.2.1.tar.gz', {
host: 'http://octopus-server/',
apikey: 'API-XXXXXXXXX',
replace: true
}, function(err, result) {
if(!err) {
console.log("Package Pushed:" + body.Title + " v"+ body.Version +" (" + fileSizeString(body.PackageSizeBytes) +"nytes)");
}
});
var octo = require('@octopusdeploy/octopackjs');
octo.push('./bin/Sample.Web.3.2.1.tar.gz', {
host: 'http://octopus-server/',
apikey: 'API-XXXXXXXXX',
replace: true,
spaceId: 'Spaces-1'
}, function(err, result) {
if(!err) {
console.log("Package Pushed:" + body.Title + " v"+ body.Version +" (" + fileSizeString(body.PackageSizeBytes) +"nytes)");
}
});
npm test
FAQs
A nodejs tool for packaging and pushing projects to an Octopus Deploy instance.
The npm package @octopusdeploy/octopackjs receives a total of 380 weekly downloads. As such, @octopusdeploy/octopackjs popularity was classified as not popular.
We found that @octopusdeploy/octopackjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.