The `kudu-api` package provides a Node.js wrapper for interacting with the Kudu REST API, a service primarily used within Azure App Service environments for managing deployments, executing commands, and accessing the file system. With its current stable version at 1.4.1, the package simplifies programmatic interactions by offering distinct modules for source control, command execution, virtual file system operations, zip archive handling, and deployment management. It abstracts away direct HTTP request handling, providing a callback-based interface for common Kudu operations. As indicated by its last publish date approximately ten years ago and lack of recent activity on its GitHub repository, the project appears to be abandoned, with no active development or planned releases. This means it primarily targets CommonJS environments and older Node.js versions, and users should be aware of potential compatibility issues with modern JavaScript ecosystems.
npm install kudu-apiVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Kudu API client and perform basic operations like getting SCM info, executing a command, and listing files in the virtual file system.
Use `const kudu = require('kudu-api')` for Node.js projects, or a CommonJS-compatible bundler for browser environments. Consider using a modern HTTP client to interact directly with the Kudu REST API for new projects.For new projects, consider implementing direct HTTP calls to the Kudu REST API using a modern HTTP client library (e.g., `axios`, `node-fetch`), which allows for promise-based syntax.
Always use environment variables or a secure configuration management system to pass sensitive credentials. Ensure the `website` URL includes the `scm` subdomain for Kudu API endpoints.
When calling `kudu.vfs.uploadFile`, be mindful of the ETag parameter. If you need to conditionally update a file, first retrieve its ETag using `getFile` or `listFiles`.
Ensure you are using `const kudu = require('kudu-api')({ website: '...', username: '...', password: '...' });`. The `require` statement immediately returns a factory function that needs to be invoked with the configuration object.Ensure your Node.js environment has up-to-date CA certificates. You might temporarily or for testing purposes set `process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';`, but this is not recommended for production due to security implications.
Verify that the Kudu environment for your Azure App Service has Node.js and npm correctly configured and accessible in the system's PATH. For custom deployments, you might need to explicitly specify the full path to `npm` or ensure the command is executed in an appropriate directory.
No dependency data recorded yet.