# @ragarwal06/cf-operations

> SAP BTP Operations library for node js applications

Latest version **1.0.0** (published 2023-09-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ragarwal06/cf-operations
pnpm add @ragarwal06/cf-operations
yarn add @ragarwal06/cf-operations
bun add @ragarwal06/cf-operations
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-09-24 |
| First published | 2023-09-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14.19 |
| Dependencies | 1 |
| Unpacked size | 80.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | ragarwal06 |
| Keywords | ssh, env, btp, cf, sap, nodejs, js, ts, typescript, javascript |

## Links

- npm: https://www.npmjs.com/package/@ragarwal06/cf-operations
- Repository: https://github.com/ragarwal06/cf-operations
- Homepage: https://github.com/ragarwal06/cf-operations#readme
- Issues: https://github.com/ragarwal06/cf-operations/issues
- npm.io page: https://npm.io/package/@ragarwal06/cf-operations

## Dependencies (1)

- [ssh2](https://npm.io/package/ssh2.md) ^1.13.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-09-24
- 0.0.1-beta — 2023-09-24

## README

@ragarwal06/cf-operations - SAP BTP SSH & Enviorment Generator Wrapper for NodeJS (with Typescipt Support)
==============================================

<a href="https://www.npmjs.com/package/@ragarwal06/cf-operations">
    <img src="https://img.shields.io/npm/v/@ragarwal06/cf-operations" alt="Version">
</a>
<a href="https://www.npmjs.com/package/@ragarwal06/cf-operations">
    <img src="https://img.shields.io/npm/dw/@ragarwal06/cf-operations" alt="Total Downloads">
</a>
<a href="https://www.npmjs.com/package/@ragarwal06/cf-operations">
    <img src="https://img.shields.io/npm/l/@ragarwal06/cf-operations" alt="License">
</a>

Table of contents
-------------

* [Install](#install)
* [Getting started](#getting-started)
* [Contact](#contact)

Install
-------

Install from npm:

```bash
npm install @ragarwal06/cf-operations
```

or clone from the [GitHub repository](https://github.com/ragarwal06/cf-operations) to run tests and examples locally:

```bash
git clone https://github.com/ragarwal06/cf-operations.git
cd cf-operations
npm install
```

Getting started
------------

### Loading Environment from SAP BTP
This is a very simple example showing how to use this module in Javascript:

```js
const operations = require("@ragarwal06/cf-operations");
operations
  .generateDotEnv({
    appName: "appName",
    isBGDeployment: true,
  })
  .then((e) => {
    console.log("env loaded");
  })
  .catch((e) => console.log(e));
```

This is a very simple example showing how to use this module in Typescript:

```ts
import { generateDotEnv } from "@ragarwal06/cf-operations";

generateDotEnv({
  appName: "appName",
  isBGDeployment: true,
})
  .then((e) => {
    console.log("env loaded");
  })
  .catch((e) => console.log(e));
```

### SSH Tunneling from SAP BTP to Local

This is a very simple example showing how to use this module in Javascript:

```ts
const operations = require("@ragarwal06/cf-operations");

operations
  .startTunneling({
    appName: "appName",
    isBGDeployment: true,
    outPort: 9094,
    serviceName: "serviceName",
    urlGenerator: (credentials) => {
      // make sure to generate & return the ssh format in
      // {url}:{port}
    },
  })
  .then((e) => {
    console.log("hi");
  });
```
This is a very simple example showing how to use this module in Typescript:

```ts
import { startTunneling } from "@ragarwal06/cf-operations";

startTunneling({
  appName: "appName",
  isBGDeployment: true,
  outPort: 9094,
  serviceName: "serviceName",
  urlGenerator: (creds) => {
    // make sure to generate & return the ssh format in
    // {url}:{port}
  },
}).then((e) => {
  console.log("hi");
});

```

Currently `kafka` & `postgresql-db` url generator is already available. So you can skip sending `urlGenerator` function

Contact
-------

If you face any issue please write to [owner](mailto:agarwal.rahul324@gmail.com) or create a [GitHub issue](https://github.com/ragarwal06/cf-operations/issues/new?assignees=&labels=bug&projects=&template=issue.md&title=)

For feature request please request [here](https://github.com/ragarwal06/cf-operations/issues/new?assignees=&labels=feature&projects=&template=feature.md&title=)

---
_Source: https://npm.io/package/@ragarwal06/cf-operations · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
