Skip to content

Commit

Permalink
setIniFileDirectory method added at addon level, to set the sapnwrfc.…
Browse files Browse the repository at this point in the history
…ini file directory
  • Loading branch information
bsrdjan committed Oct 21, 2020
1 parent 8e7bb8f commit 85ec105
Show file tree
Hide file tree
Showing 21 changed files with 422 additions and 678 deletions.
5 changes: 3 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Change log
==========

2.2.1 (XXXX-XX-XX)
2.3.0 (XXXX-XX-XX)
------------------

- NAPI v7
- The client parameter set to optional in RfcConnectionParameters interface
- The client parameter set to optional in RfcConnectionParameters interface 8e7bb8f
- setIniFileDirectory method added at addon level, to set the sapnwrfc.ini file directory

2.2.0 (2020-10-13)
------------------
Expand Down
12 changes: 12 additions & 0 deletions doc/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- **[addon](#addon)**
- [setIniFileDirectory](#setinifiledirectory)
- **[Client](#client)**
- [Properties](#client-properties)
- [Constructor](#client-constructor)
Expand All @@ -15,6 +17,16 @@
- [Constructor](#throughput-constructor)
- [API](#throughput-api)

## Addon

### setIniFileDirectory

Usage: [usage/addon](usage.md#addon)

```ts
setIniFileDirectory(iniFileDirectory: string)
```

## Client

Usage: [usage/client](usage.md#client)
Expand Down
18 changes: 18 additions & 0 deletions doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
- [Date/Time types](#datetime-types)
- [UTCLONG](#utclong)
- **[ABAP Function Module](#abap-function-module)**
- **[Addon](#addon)**

- [setIniFileDirectory](#setinifiledirectory)

<a name="client-toc"></a>

- **[Client](#client)**

- [Using `sapnwrfc.ini` file](api.md/#setIniPath)
Expand Down Expand Up @@ -116,6 +121,19 @@ Using ABAP transaction SE37 in ABAP backend system, you can enter the input data

To consume this function module from NodeJS, first the node-rfc client connection shall be instantiated, using ABAP backend system connection parameters.

## Addon

API: [api/addon](api.md#addon)

### setIniFileDirectory

Sets the directory in which the NWRFC SDK shall search for the `sapnwrfc.ini` file, exposing the `RfcSetIniPath` NWRFC SDK method. The default is the current working directory of the process. After the directory is set, the NW RFC lib automatically loads the contents of the new `sapnwrfc.ini` file from that directory. The exception is thrown if `sapnwrfc.ini` not found in the new directory.

```ts
const noderfc = require("node-rfc");
noderfc.setIniFileDirectory("/some/folder");
```

## Client

API: [api/client](api.md#client)
Expand Down
1 change: 1 addition & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from "./wrapper/sapnwrfc-client";
export * from "./wrapper/sapnwrfc-pool";
export * from "./wrapper/sapnwrfc-throughput";
export * from "./wrapper/sapnwrfc-server";
export declare function setIniFileDirectory(iniFileDirectory: string): void;
11 changes: 11 additions & 0 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/wrapper/noderfc-bindings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ export interface NWRfcBinding {
Pool: RfcPoolBinding;
Throughput: RfcThroughputBinding;
Server: RfcServerBinding;
verbose(): this;
bindingVersions: NodeRfcBindingVersions;
environment: NodeRfcEnvironment;
setIniFileDirectory(iniFileDirectory: string): any | undefined;
verbose(): this;
}
declare let noderfc_binding: NWRfcBinding;
declare const environment: {
Expand Down
2 changes: 1 addition & 1 deletion lib/wrapper/noderfc-bindings.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions lib/wrapper/sapnwrfc-client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface RfcConnectionParameters {
trace?: EnumTrace;
user?: string;
passwd?: string;
client: string;
client?: string;
lang?: string;
mysapsso2?: string;
getsso2?: string;
Expand Down Expand Up @@ -104,7 +104,6 @@ export interface RfcClientBinding {
close(callback: Function): void;
resetServerContext(callback: Function): void;
ping(callback: Function): void;
setIniPath(pathName: string): void;
invoke(rfmName: string, rfmParams: RfcObject, callback: Function, callOptions?: object): void;
release(oneClientBinding: [RfcClientBinding], callback: Function): void;
}
Expand All @@ -121,9 +120,8 @@ export declare class Client {
get config(): Object;
get _id(): string;
get connectionInfo(): RfcConnectionInfo;
checkCallbackArg(method: string, callback?: Function): void;
static checkCallbackArg(method: string, callback?: Function): void;
connect(callback?: Function): void | Promise<Client>;
setIniPath(pathName: string, callback?: Function): void | Promise<void>;
open(callback?: Function): void | Promise<Client>;
ping(callback?: Function): void | Promise<boolean>;
close(callback?: Function): void | Promise<void>;
Expand Down
31 changes: 7 additions & 24 deletions lib/wrapper/sapnwrfc-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 85ec105

Please sign in to comment.