@abaplint/runtime 2.3.3 → 2.3.4
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.
package/build/src/compare/cp.js
CHANGED
|
@@ -19,14 +19,18 @@ function cp(left, right) {
|
|
|
19
19
|
r = r.replace(/\\/g, "\\\\");
|
|
20
20
|
r = r.replace(/\[/g, "\\[");
|
|
21
21
|
r = r.replace(/\]/g, "\\]");
|
|
22
|
+
r = r.replace(/\}/g, "\\}");
|
|
23
|
+
r = r.replace(/\{/g, "\\{");
|
|
22
24
|
r = r.replace(/\?/g, "\\?");
|
|
23
25
|
r = r.replace(/\(/g, "\\(");
|
|
24
26
|
r = r.replace(/\)/g, "\\)");
|
|
25
27
|
r = r.replace(/\./g, "\\.");
|
|
26
28
|
r = r.replace(/\|/g, "\\|");
|
|
29
|
+
r = r.replace(/#\*/g, "\\u{002A}");
|
|
30
|
+
r = r.replace(/#\+/g, "\\u{002B}");
|
|
27
31
|
r = r.replace(/\*/g, "[\\s\\S]*");
|
|
28
32
|
r = r.replace(/\+/g, "[\\s\\S]");
|
|
29
|
-
const reg = new RegExp("^" + r + "$", "
|
|
33
|
+
const reg = new RegExp("^" + r + "$", "iu");
|
|
30
34
|
return l.match(reg) !== null;
|
|
31
35
|
}
|
|
32
36
|
exports.cp = cp;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collect = void 0;
|
|
4
|
+
const compare_1 = require("../compare");
|
|
5
|
+
const insert_internal_1 = require("./insert_internal");
|
|
6
|
+
const read_table_1 = require("./read_table");
|
|
7
|
+
function collect(source, target) {
|
|
8
|
+
const read = (0, read_table_1.readTable)(target, { withKey: (i) => { return (0, compare_1.eq)(i.table_line, source); } });
|
|
9
|
+
if (read.subrc === 4) {
|
|
10
|
+
(0, insert_internal_1.insertInternal)({ table: target, data: source });
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.collect = collect;
|
|
14
|
+
//# sourceMappingURL=collect.js.map
|
|
@@ -10,6 +10,7 @@ import { createData } from "./create_data";
|
|
|
10
10
|
import { deleteInternal } from "./delete_internal";
|
|
11
11
|
import { describe } from "./describe";
|
|
12
12
|
import { find } from "./find";
|
|
13
|
+
import { collect } from "./collect";
|
|
13
14
|
import { overlay } from "./overlay";
|
|
14
15
|
import { cast } from "./cast";
|
|
15
16
|
import { getBit } from "./get_bit";
|
|
@@ -49,6 +50,7 @@ export declare class Statements {
|
|
|
49
50
|
cast: typeof cast;
|
|
50
51
|
clear: typeof clear;
|
|
51
52
|
commit: typeof commit;
|
|
53
|
+
collect: typeof collect;
|
|
52
54
|
concatenate: typeof concatenate;
|
|
53
55
|
condense: typeof condense;
|
|
54
56
|
convert: typeof convert;
|
|
@@ -13,6 +13,7 @@ const create_data_1 = require("./create_data");
|
|
|
13
13
|
const delete_internal_1 = require("./delete_internal");
|
|
14
14
|
const describe_1 = require("./describe");
|
|
15
15
|
const find_1 = require("./find");
|
|
16
|
+
const collect_1 = require("./collect");
|
|
16
17
|
const overlay_1 = require("./overlay");
|
|
17
18
|
const cast_1 = require("./cast");
|
|
18
19
|
const get_bit_1 = require("./get_bit");
|
|
@@ -51,6 +52,7 @@ class Statements {
|
|
|
51
52
|
this.cast = cast_1.cast;
|
|
52
53
|
this.clear = clear_1.clear;
|
|
53
54
|
this.commit = commit_1.commit;
|
|
55
|
+
this.collect = collect_1.collect;
|
|
54
56
|
this.concatenate = concatenate_1.concatenate;
|
|
55
57
|
this.condense = condense_1.condense;
|
|
56
58
|
this.convert = convert_1.convert;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "Transpiler - Runtime",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/chai": "^4.3.3",
|
|
32
32
|
"@types/mocha": "^10.0.0",
|
|
33
33
|
"chai": "^4.3.6",
|
|
34
|
-
"mocha": "^10.
|
|
34
|
+
"mocha": "^10.1.0",
|
|
35
35
|
"source-map-support": "^0.5.21",
|
|
36
36
|
"typescript": "^4.8.4"
|
|
37
37
|
},
|