@abaplint/runtime 1.8.9 → 1.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -8,12 +8,23 @@ import { Console } from "./console";
8
8
  import { UnitTestResult } from "./unit_test";
9
9
  import { OffsetLength } from "./offset_length";
10
10
  import { templateFormatting } from "./template_formatting";
11
- export { UnitTestResult, RFC };
11
+ export { UnitTestResult, RFC, types };
12
12
  export declare class ABAP {
13
- FunctionModules: {};
14
- Classes: {};
15
- Interfaces: {};
16
- DDIC: {};
13
+ FunctionModules: {
14
+ [name: string]: any;
15
+ };
16
+ Classes: {
17
+ [name: string]: any;
18
+ };
19
+ Interfaces: {
20
+ [name: string]: any;
21
+ };
22
+ DDIC: {
23
+ [name: string]: any;
24
+ };
25
+ RFCDestinations: {
26
+ [name: string]: RFC.RFCClient;
27
+ };
17
28
  statements: Statements;
18
29
  types: typeof types;
19
30
  builtin: typeof builtin;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ABAP = exports.RFC = exports.UnitTestResult = void 0;
3
+ exports.ABAP = exports.types = exports.RFC = exports.UnitTestResult = void 0;
4
4
  const types = require("./types");
5
+ exports.types = types;
5
6
  const builtin = require("./builtin");
6
7
  const compare = require("./compare");
7
8
  const operators = require("./operators");
@@ -21,6 +22,8 @@ class ABAP {
21
22
  this.Classes = {};
22
23
  this.Interfaces = {};
23
24
  this.DDIC = {};
25
+ // RFC Destinations
26
+ this.RFCDestinations = {};
24
27
  this.types = types;
25
28
  this.builtin = builtin;
26
29
  this.operators = operators;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -2,7 +2,7 @@ import { FieldSymbol, Structure, Table } from "./types";
2
2
  import { ICharacter } from "./types/_character";
3
3
  import { INumeric } from "./types/_numeric";
4
4
  declare type TypeType = INumeric | Table | ICharacter | Structure | FieldSymbol;
5
- export declare type RFCCallInput = {
5
+ export declare type RFCCallSignature = {
6
6
  exporting?: {
7
7
  [name: string]: TypeType;
8
8
  };
@@ -20,6 +20,6 @@ export declare type RFCCallInput = {
20
20
  };
21
21
  };
22
22
  export interface RFCClient {
23
- call(name: string, input?: RFCCallInput): Promise<void>;
23
+ call(name: string, signature: RFCCallSignature): Promise<void>;
24
24
  }
25
25
  export {};
@@ -5,5 +5,6 @@ export interface ICallFunctionOptions {
5
5
  importing?: any;
6
6
  tables?: any;
7
7
  changing?: any;
8
+ exceptions?: any;
8
9
  }
9
- export declare function callFunction(_options: ICallFunctionOptions): void;
10
+ export declare function callFunction(options: ICallFunctionOptions): Promise<void>;
@@ -1,10 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.callFunction = void 0;
4
- function callFunction(_options) {
5
- // note: this is only called if DESTNIATION is supplied
6
- // todo
7
- return;
4
+ // note: this is only called if DESTNIATION is supplied
5
+ async function callFunction(options) {
6
+ // @ts-ignore
7
+ const dest = abap.RFCDestinations[options.destination];
8
+ if (dest === undefined) {
9
+ throw new Error(`RFC destination ${options.destination} does not exist`);
10
+ }
11
+ await dest.call(options.name, {
12
+ exporting: options.exporting,
13
+ importing: options.importing,
14
+ tables: options.tables,
15
+ changing: options.changing,
16
+ exceptions: options.exceptions,
17
+ });
8
18
  }
9
19
  exports.callFunction = callFunction;
10
20
  //# sourceMappingURL=call_function.js.map
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "@abaplint/runtime",
3
- "version": "1.8.9",
4
- "description": "Transpiler - Runtime",
5
- "main": "build/src/index.js",
6
- "typings": "build/src/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/abaplint/transpiler.git"
10
- },
11
- "scripts": {
12
- "compile": "tsc",
13
- "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
14
- "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
15
- "test": "npm run compile && mocha"
16
- },
17
- "mocha": {
18
- "recursive": true,
19
- "reporter": "progress",
20
- "spec": "build/test/**/*.js",
21
- "require": "source-map-support/register"
22
- },
23
- "keywords": [
24
- "ABAP",
25
- "abaplint"
26
- ],
27
- "author": "abaplint",
28
- "license": "MIT",
29
- "dependencies": {
30
- "hdb": "^0.19.1",
31
- "sql.js": "^1.6.2"
32
- },
33
- "devDependencies": {
34
- "@types/chai": "^4.3.0",
35
- "@types/mocha": "^9.1.0",
36
- "@types/sql.js": "^1.4.3",
37
- "chai": "^4.3.6",
38
- "mocha": "^9.2.0",
39
- "source-map-support": "^0.5.21",
40
- "typescript": "^4.5.5"
41
- }
42
- }
1
+ {
2
+ "name": "@abaplint/runtime",
3
+ "version": "1.8.12",
4
+ "description": "Transpiler - Runtime",
5
+ "main": "build/src/index.js",
6
+ "typings": "build/src/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/abaplint/transpiler.git"
10
+ },
11
+ "scripts": {
12
+ "compile": "tsc",
13
+ "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
14
+ "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
15
+ "test": "npm run compile && mocha"
16
+ },
17
+ "mocha": {
18
+ "recursive": true,
19
+ "reporter": "progress",
20
+ "spec": "build/test/**/*.js",
21
+ "require": "source-map-support/register"
22
+ },
23
+ "keywords": [
24
+ "ABAP",
25
+ "abaplint"
26
+ ],
27
+ "author": "abaplint",
28
+ "license": "MIT",
29
+ "dependencies": {
30
+ "hdb": "^0.19.1",
31
+ "sql.js": "^1.6.2"
32
+ },
33
+ "devDependencies": {
34
+ "@types/chai": "^4.3.0",
35
+ "@types/mocha": "^9.1.0",
36
+ "@types/sql.js": "^1.4.3",
37
+ "chai": "^4.3.6",
38
+ "mocha": "^9.2.1",
39
+ "source-map-support": "^0.5.21",
40
+ "typescript": "^4.6.2"
41
+ }
42
+ }