@abaplint/transpiler-cli 2.12.13 → 2.12.14

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/abap_transpile CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  require("./build/bundle");
package/build/bundle.js CHANGED
@@ -40110,7 +40110,12 @@ class CDSLexer {
40110
40110
  // string handling
40111
40111
  if (mode === Mode.String) {
40112
40112
  build += next;
40113
- if (next === "'") {
40113
+ if (next === "'" && nextNext === "'") {
40114
+ // escaped single quote, continue string
40115
+ build += stream.takeNext();
40116
+ col++;
40117
+ }
40118
+ else if (next === "'") {
40114
40119
  build = result.add(build, row, col, mode);
40115
40120
  mode = Mode.Default;
40116
40121
  }
@@ -41161,7 +41166,7 @@ class CDSString extends combi_1.Expression {
41161
41166
  getRunnable() {
41162
41167
  const abap = (0, combi_1.seq)("abap", ".", (0, combi_1.regex)(/^char'\w'$/));
41163
41168
  // https://stackoverflow.com/a/57754227
41164
- const reg = (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
41169
+ const reg = (0, combi_1.regex)(/^'([A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]|'')*'$/);
41165
41170
  return (0, combi_1.altPrio)(reg, abap);
41166
41171
  }
41167
41172
  }
@@ -53893,7 +53898,7 @@ class Registry {
53893
53898
  }
53894
53899
  static abaplintVersion() {
53895
53900
  // magic, see build script "version.sh"
53896
- return "2.114.4";
53901
+ return "2.114.5";
53897
53902
  }
53898
53903
  getDDICReferences() {
53899
53904
  return this.ddicReferences;
@@ -83225,27 +83230,28 @@ exports.HandleDataElement = HandleDataElement;
83225
83230
  Object.defineProperty(exports, "__esModule", ({ value: true }));
83226
83231
  exports.HandleEnqu = void 0;
83227
83232
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
83228
- // view, much like the tables
83229
83233
  class HandleEnqu {
83230
83234
  runObject(obj, _reg) {
83231
83235
  const filename = obj.getXMLFile()?.getFilename().replace(".xml", ".mjs").toLowerCase();
83232
83236
  if (filename === undefined) {
83233
83237
  return [];
83234
83238
  }
83239
+ const tableName = obj.getPrimaryTable();
83235
83240
  const chunk = new chunk_1.Chunk().appendString(`// enqueue object
83236
83241
  abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
83237
83242
  const lookup = abap.Classes["KERNEL_LOCK"];
83238
83243
  if (lookup === undefined) {
83239
83244
  throw new Error("Lock, kernel class missing");
83240
83245
  }
83241
- await lookup.enqueue(INPUT);
83246
+ await lookup.enqueue({TABLE_NAME: "${tableName}", ENQUEUE_NAME: "${obj.getName().toUpperCase()}", ...INPUT});
83242
83247
  };
83248
+
83243
83249
  abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
83244
83250
  const lookup = abap.Classes["KERNEL_LOCK"];
83245
83251
  if (lookup === undefined) {
83246
83252
  throw new Error("Lock, kernel class missing");
83247
83253
  }
83248
- await lookup.dequeue(INPUT);
83254
+ await lookup.dequeue({TABLE_NAME: "${tableName}", ENQUEUE_NAME: "${obj.getName().toUpperCase()}", ...INPUT});
83249
83255
  };`);
83250
83256
  const output = {
83251
83257
  object: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.12.13",
3
+ "version": "2.12.14",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.114.4",
31
- "@abaplint/transpiler": "^2.12.13",
30
+ "@abaplint/core": "^2.114.5",
31
+ "@abaplint/transpiler": "^2.12.14",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.10.1",
34
34
  "@types/progress": "^2.0.7",
package/schema.json DELETED
@@ -1,219 +0,0 @@
1
- {
2
- "$ref": "#/definitions/ITranspilerConfig",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "definitions": {
5
- "ITranspilerConfig": {
6
- "additionalProperties": false,
7
- "properties": {
8
- "exclude_filter": {
9
- "description": "list of regex, case insensitive",
10
- "items": {
11
- "type": "string"
12
- },
13
- "type": "array",
14
- "uniqueItems": true
15
- },
16
- "input_filter": {
17
- "description": "list of regex, case insensitive, empty gives all files, positive list",
18
- "items": {
19
- "type": "string"
20
- },
21
- "type": "array",
22
- "uniqueItems": true
23
- },
24
- "input_folder": {
25
- "anyOf": [
26
- {
27
- "type": "string"
28
- },
29
- {
30
- "items": {
31
- "type": "string"
32
- },
33
- "type": "array"
34
- }
35
- ]
36
- },
37
- "libs": {
38
- "items": {
39
- "additionalProperties": false,
40
- "properties": {
41
- "exclude_filter": {
42
- "description": "list of regex, case insensitive",
43
- "items": {
44
- "type": "string"
45
- },
46
- "type": "array",
47
- "uniqueItems": true
48
- },
49
- "files": {
50
- "anyOf": [
51
- {
52
- "type": "string"
53
- },
54
- {
55
- "items": {
56
- "type": "string"
57
- },
58
- "type": "array"
59
- }
60
- ]
61
- },
62
- "folder": {
63
- "type": "string"
64
- },
65
- "url": {
66
- "type": "string"
67
- }
68
- },
69
- "type": "object"
70
- },
71
- "type": "array"
72
- },
73
- "options": {
74
- "$ref": "#/definitions/ITranspilerOptions"
75
- },
76
- "output_folder": {
77
- "type": "string"
78
- },
79
- "write_source_map": {
80
- "type": "boolean"
81
- },
82
- "write_unit_tests": {
83
- "type": "boolean"
84
- }
85
- },
86
- "required": [
87
- "input_folder",
88
- "output_folder",
89
- "options"
90
- ],
91
- "type": "object"
92
- },
93
- "ITranspilerOptions": {
94
- "additionalProperties": false,
95
- "properties": {
96
- "addCommonJS": {
97
- "description": "adds common js modules",
98
- "type": "boolean"
99
- },
100
- "addFilenames": {
101
- "description": "adds filenames as comments in the output js",
102
- "type": "boolean"
103
- },
104
- "ignoreSourceMap": {
105
- "description": "ignore source map",
106
- "type": "boolean"
107
- },
108
- "ignoreSyntaxCheck": {
109
- "description": "ignore syntax check, used for internal testing",
110
- "type": "boolean"
111
- },
112
- "importProg": {
113
- "description": "import programs",
114
- "type": "boolean"
115
- },
116
- "keywords": {
117
- "description": "list of keywords to rename, if not supplied default will be used",
118
- "items": {
119
- "type": "string"
120
- },
121
- "type": "array"
122
- },
123
- "populateTables": {
124
- "additionalProperties": false,
125
- "description": "populate tables, all tables are populated if undefined and they exist",
126
- "properties": {
127
- "reposrc": {
128
- "description": "insert into REPOSRC, skips if equals false",
129
- "type": "boolean"
130
- },
131
- "seosubco": {
132
- "description": "insert into SEOSUBCO, skips if equals false",
133
- "type": "boolean"
134
- },
135
- "seosubcodf": {
136
- "description": "insert into SEOSUBCODF, skips if equals false",
137
- "type": "boolean"
138
- },
139
- "seosubcotx": {
140
- "description": "insert into SEOSUBCOTX, skips if equals false",
141
- "type": "boolean"
142
- }
143
- },
144
- "type": "object"
145
- },
146
- "setup": {
147
- "additionalProperties": false,
148
- "description": "extra setup script to be executed during initialization",
149
- "properties": {
150
- "filename": {
151
- "type": "string"
152
- },
153
- "postFunction": {
154
- "type": "string"
155
- },
156
- "preFunction": {
157
- "type": "string"
158
- }
159
- },
160
- "required": [
161
- "filename"
162
- ],
163
- "type": "object"
164
- },
165
- "skip": {
166
- "$ref": "#/definitions/TestMethodList",
167
- "description": "list of unit tests to skip"
168
- },
169
- "skipVersionCheck": {
170
- "description": "skips version check, not recommended",
171
- "type": "boolean"
172
- },
173
- "unknownTypes": {
174
- "$ref": "#/definitions/UnknownTypesEnum",
175
- "description": "sets behavior for unknown types, either fail at compile- or run-time"
176
- }
177
- },
178
- "type": "object"
179
- },
180
- "TestMethodList": {
181
- "items": {
182
- "additionalProperties": false,
183
- "properties": {
184
- "class": {
185
- "pattern": "^[a-zA-Z0-9_\\/]+$",
186
- "type": "string"
187
- },
188
- "method": {
189
- "pattern": "^[a-zA-Z0-9_\\/]+$",
190
- "type": "string"
191
- },
192
- "note": {
193
- "type": "string"
194
- },
195
- "object": {
196
- "pattern": "^[a-zA-Z0-9_\\/]+$",
197
- "type": "string"
198
- }
199
- },
200
- "required": [
201
- "object",
202
- "class",
203
- "method"
204
- ],
205
- "type": "object"
206
- },
207
- "type": "array",
208
- "uniqueItems": true
209
- },
210
- "UnknownTypesEnum": {
211
- "enum": [
212
- "compileError",
213
- "runtimeError"
214
- ],
215
- "type": "string"
216
- }
217
- }
218
- }
219
-