@sap/cf-tools
TypeScript icon, indicating that this package has built-in type declarations

3.2.2 • Public • Published

GitHub package.json version CircleCI Coverage Status Language grade: JavaScript Commitizen friendly REUSE status dependentbot

Overview

This package provides a set of APIs to help you develop applications in Cloud Foundry. You can use these APIs to manage apps, service instances, orgs, spaces, and users in your environment. Mostly, this is a wrapper of the CF command line client, which runs a particular command and parses the output to the suitable JSON file. If an error or failure occurs, the runtime exception throws with relevant problem information.

API Reference Guide

API guide

Prerequisite

from version v1.0.0 and above:

Make sure you have installed the CF CLI v7 tool in your environment.

below version v1.0.0:

Make sure you have installed the CF CLI v6 tool in your environment.

Examples of usage

Example 1

try {
	const result = await cfLogin("https://api.cf.....com", "user", "password");
	if (result === "OK") {
		// successful
	}
} catch (e) {
	// display or/and log error
}

Example 2

try {
	const spaces = await cfGetAvailableSpaces("myOrg");
	for (const space of spaces) {
		console.log("Space label is " + space.label + " guid is " + space.guid);
	}
} catch (e) {
	// display or/and log error
}

Contributing

Contributing information can be found in the CONTRIBUTING.md file.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.2.280,829latest

Version History

VersionDownloads (Last 7 Days)Published
3.2.280,829
3.2.01,912
3.0.30
3.0.10
3.0.00
2.2.00
2.1.170,918
2.0.40
2.0.113,167
2.0.00
1.2.00
1.1.10
1.1.013,167
1.0.20
1.0.10
1.0.00
0.8.162,863
0.8.00
0.7.00
0.6.80
0.6.70
0.6.60
0.6.50
0.6.40
0.6.30
0.6.20
0.6.10
0.5.04,698

Package Sidebar

Install

npm i @sap/cf-tools

Weekly Downloads

247,554

Version

3.2.2

License

Apache-2.0

Unpacked Size

74.2 kB

Total Files

19

Last publish

Collaborators

  • sap_extncrepos