ApigeeAliases.

InstallNodePackagedModules(ICakeContext, string, string, string, InstallNodePackagedModulesSettings) Method

Summary

Run "npm install" on NodeJS embedded as a resource in the proxy. This can be useful if your proxy exceeds the 15MB limit imposed by Apigee.
Assembly
Cake.Apigee.dll
Namespace
Cake.Apigee
Containing Type
ApigeeAliases

Syntax

public static NodePackagedModuleMetadata[] InstallNodePackagedModules(this ICakeContext ctx, string orgName, string proxyName, string revisionNumber, InstallNodePackagedModulesSettings settings = null)

Examples

Cake task:

 var orgName = "myorg";
 var apigeeCredentials = new Credentials
 {
    Username = "[email protected]",
    Password = "mypassword"
 };

 InstallNodePackagedModules(
                    orgName,
                    "myapi",
                    "123",
                    new InstallNodePackagedModulesSettings { Credentials = apigeeCredentials
 });

Remarks

This runs the following API with the command "install": https://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/apis/%7Bapi_name%7D/revisions/%7Brevision_num%7D/npm-0

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
ctx ICakeContext The Cake context.
orgName string Your org name as shown in Apigee.
proxyName string Name of the proxy.
revisionNumber string The revision to deploy.
settings InstallNodePackagedModulesSettings The settings such as the authentication credentials.

Return Value

Type Description
NodePackagedModuleMetadata[] The list of installed modules.