ApigeeAliases.

InstallNodePackagedModules(ICakeContext, string, ImportProxyResult, InstallNodePackagedModulesSettings) Method

Summary

Run "npm install" on NodeJS embedded as a resource in the proxy based on a previous import. 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, ImportProxyResult importResult, InstallNodePackagedModulesSettings settings = null)

Examples

Cake task:

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

 InstallNodePackagedModules(
                    orgName,
                    importResult,
                    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.
importResult ImportProxyResult The result of an import.
settings InstallNodePackagedModulesSettings Settings such as the authentication credentials.

Return Value

Type Description
NodePackagedModuleMetadata[] The list of modules and versions that were installed.