@sap/xsodata 7.4.4 → 7.4.5
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/CHANGELOG.md +8 -0
- package/lib/db/connect.js +8 -3
- package/lib/db/dbSegment.js +2 -2
- package/lib/grammars/xsodata.peg +10 -1
- package/lib/model/annotationFactory.js +3 -0
- package/lib/model/metadataReader.js +13 -0
- package/lib/parsers/peg_xsodata_parser.js +192 -146
- package/lib/sql/dataCollector2.js +11 -0
- package/lib/uri/oDataUriParser.js +8 -1
- package/lib/uri/resourcePathParser.js +3 -0
- package/lib/xsodata.js +15 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
|
8
8
|
|
|
9
9
|
## Unreleased
|
|
10
10
|
|
|
11
|
+
## [7.4.5] - 2021-12-15
|
|
12
|
+
|
|
13
|
+
* Suppress $metadata annotation <code>sap:aggregation-role="dimension"</code> on calculation view property if it is used as description property referenced by annotation <code>sap:text</code> by another property of the calulation view. The annotation is only supressed if the corresponding xsodata-file has <code>settings</code> containing this: <code>noDimensionAnnoOnTextProperty true;</code>
|
|
14
|
+
* Improvements on URI parsing errors:
|
|
15
|
+
* reporting URI resource path character position on parsing error, if possible
|
|
16
|
+
* Invalid navigation property on <code>$expand</code> system query option returns 400 (Bad Request) instead of 500 (Internal Server Error)
|
|
17
|
+
* Removed support for NodeJS version 10
|
|
18
|
+
|
|
11
19
|
## [7.4.4] - 2021-07-20
|
|
12
20
|
|
|
13
21
|
* HANA client API usage changed: 'execQuery' used for read requests, change requests remain on 'exec'
|
package/lib/db/connect.js
CHANGED
|
@@ -238,10 +238,10 @@ function _connectInternal(context, asyncDone) {
|
|
|
238
238
|
exports.connect = function (context, asyncDone) {
|
|
239
239
|
context.db = context.db || {};
|
|
240
240
|
if (context.db.client && (context.db.connectionInitialized === true)) {
|
|
241
|
-
context.logger.
|
|
241
|
+
context.logger.info('connect - db', 'connect already done');
|
|
242
242
|
return asyncDone(null, context);
|
|
243
243
|
}
|
|
244
|
-
context.logger.
|
|
244
|
+
context.logger.info('connect - db', 'connect');
|
|
245
245
|
|
|
246
246
|
return _connectInternal(context, function (err) {
|
|
247
247
|
if (err) {
|
|
@@ -268,7 +268,12 @@ exports.disconnect = function (context, cb) {
|
|
|
268
268
|
if (context.db.openedConnection) {
|
|
269
269
|
context.logger.info('connect - db', 'disconnect done');
|
|
270
270
|
if (context.db.client) {
|
|
271
|
-
context.db.client.end()
|
|
271
|
+
context.db.client.end((err) => {
|
|
272
|
+
if (err) {
|
|
273
|
+
context.logger.error('connect - db', `disconnect failed (callback): ${err}`);
|
|
274
|
+
}
|
|
275
|
+
context.logger.info('connect - db', 'disconnect done (callback)');
|
|
276
|
+
});
|
|
272
277
|
}
|
|
273
278
|
context.db.openedConnection = false;
|
|
274
279
|
return cb();
|
package/lib/db/dbSegment.js
CHANGED
|
@@ -247,7 +247,7 @@ DbSegment.prototype.setRecordFromPostPayload = function (context, record) {
|
|
|
247
247
|
(modifyBy && key === 'MODIFIED_BY') ||
|
|
248
248
|
(modifyAt && key === 'MODIFIED_AT'))
|
|
249
249
|
) {
|
|
250
|
-
throw new BadRequest('The serialized resource has
|
|
250
|
+
throw new BadRequest('The serialized resource has a missing value for member ' + key);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
dbValue = null;
|
|
@@ -336,7 +336,7 @@ DbSegment.prototype.setRecordFromPutPayload = function (context, record) {
|
|
|
336
336
|
// skip optional calc view parameters
|
|
337
337
|
(this.entityType.propertiesMap[property] && this.entityType.propertiesMap[property].MANDATORY === 0)
|
|
338
338
|
)) {
|
|
339
|
-
throw new BadRequest('The serialized resource has
|
|
339
|
+
throw new BadRequest('The serialized resource has a missing value for member ' + property);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
}
|
package/lib/grammars/xsodata.peg
CHANGED
|
@@ -613,7 +613,7 @@ settingscontent = sl:( OWS settingsconfig OWS ";")*
|
|
|
613
613
|
return ret;
|
|
614
614
|
}
|
|
615
615
|
settingsconfig = s:(settings_meta_cache / settings_content / settings_enable / settings_support /
|
|
616
|
-
settings_hints / settings_admindata / settings_limits )
|
|
616
|
+
settings_hints / settings_admindata / settings_limits / settings_noDimensionAnnoOnTextProperty )
|
|
617
617
|
{ return s; }
|
|
618
618
|
settings_meta_cache = "metadata" MWS ( "cache.control" / "cache-control") MWS qs:quotedstring
|
|
619
619
|
{ return {
|
|
@@ -635,6 +635,15 @@ settings_enable = "enable" MWS string
|
|
|
635
635
|
{ return { name : "enable", value : s }; }
|
|
636
636
|
settings_support = "support" MWS s:string
|
|
637
637
|
{ return { name : "support", value : s }; }
|
|
638
|
+
|
|
639
|
+
settings_noDimensionAnnoOnTextProperty = "noDimensionAnnoOnTextProperty" MWS s:string
|
|
640
|
+
{
|
|
641
|
+
return {
|
|
642
|
+
name : "noDimensionAnnoOnTextProperty",
|
|
643
|
+
value : s
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
|
|
638
647
|
settings_hints = "hints" MWS hl:("null" / hintlist)
|
|
639
648
|
{
|
|
640
649
|
var value = hl === 'null' ? [] : hl
|
|
@@ -120,6 +120,9 @@ function setPropertyAggregationRole(entityType, property, propertyAnnotations) {
|
|
|
120
120
|
(entityType.kind !== EntityType.entityKind.inputParameters &&
|
|
121
121
|
(entityType.hasAggregates() || entityType.hasMeasureProperties())
|
|
122
122
|
) && entityType.isInBimcDimensionView(property.COLUMN_NAME)) {
|
|
123
|
+
if (property.suppressAnnotationDimension && property.suppressAnnotationDimension === true) {
|
|
124
|
+
return; // property is used as description text for other property: do not add annotation
|
|
125
|
+
}
|
|
123
126
|
propertyAnnotations["sap:aggregation-role"] = "dimension";
|
|
124
127
|
}
|
|
125
128
|
}
|
|
@@ -189,6 +189,19 @@ function loadCalcViewInfo(context, entityType, cb) {
|
|
|
189
189
|
entityType.setCalculationViewDimensionData(rows, { cube: cubeName }, context.logger); // e.g. sap:label is fill with calculation view dimension data
|
|
190
190
|
entityType.resolveAggregates();
|
|
191
191
|
|
|
192
|
+
entityType.properties.forEach((property) => {
|
|
193
|
+
|
|
194
|
+
// suppressing annotation "sap:aggregation-role" depends on xsodata-file "setting"
|
|
195
|
+
if (entityType._settings.noDimensionAnnoOnTextProperty && entityType._settings.noDimensionAnnoOnTextProperty === 'true') {
|
|
196
|
+
if (property.DESC_NAME && property.DESC_NAME !== property.COLUMN_NAME) {
|
|
197
|
+
for (let i = 0; i < entityType.properties.length; i++) {
|
|
198
|
+
if (entityType.properties[i].COLUMN_NAME === property.DESC_NAME) {
|
|
199
|
+
entityType.properties[i].suppressAnnotationDimension = true;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
192
205
|
|
|
193
206
|
var parameters = entityType.getParameters();
|
|
194
207
|
if (!parameters) {
|
|
@@ -765,11 +765,19 @@ function peg$parse(input, options) {
|
|
|
765
765
|
peg$c216 = "support",
|
|
766
766
|
peg$c217 = peg$literalExpectation("support", false),
|
|
767
767
|
peg$c218 = function(s) { return { name : "support", value : s }; },
|
|
768
|
-
peg$c219 = "
|
|
769
|
-
peg$c220 = peg$literalExpectation("
|
|
770
|
-
peg$c221 =
|
|
771
|
-
|
|
772
|
-
|
|
768
|
+
peg$c219 = "noDimensionAnnoOnTextProperty",
|
|
769
|
+
peg$c220 = peg$literalExpectation("noDimensionAnnoOnTextProperty", false),
|
|
770
|
+
peg$c221 = function(s) {
|
|
771
|
+
return {
|
|
772
|
+
name : "noDimensionAnnoOnTextProperty",
|
|
773
|
+
value : s
|
|
774
|
+
};
|
|
775
|
+
},
|
|
776
|
+
peg$c222 = "hints",
|
|
777
|
+
peg$c223 = peg$literalExpectation("hints", false),
|
|
778
|
+
peg$c224 = "null",
|
|
779
|
+
peg$c225 = peg$literalExpectation("null", false),
|
|
780
|
+
peg$c226 = function(hl) {
|
|
773
781
|
var value = hl === 'null' ? [] : hl
|
|
774
782
|
|
|
775
783
|
return {
|
|
@@ -777,9 +785,9 @@ function peg$parse(input, options) {
|
|
|
777
785
|
value : value
|
|
778
786
|
};
|
|
779
787
|
},
|
|
780
|
-
peg$
|
|
781
|
-
peg$
|
|
782
|
-
peg$
|
|
788
|
+
peg$c227 = "limits",
|
|
789
|
+
peg$c228 = peg$literalExpectation("limits", false),
|
|
790
|
+
peg$c229 = function(qs, qsl) {
|
|
783
791
|
var value = { [qs.name] : qs.value };
|
|
784
792
|
for (var i = 0; i < qsl.length; i++) {
|
|
785
793
|
value[qsl[i][2].name] = qsl[i][2].value;
|
|
@@ -790,23 +798,23 @@ function peg$parse(input, options) {
|
|
|
790
798
|
value : value
|
|
791
799
|
};
|
|
792
800
|
},
|
|
793
|
-
peg$
|
|
794
|
-
peg$
|
|
795
|
-
peg$
|
|
796
|
-
peg$
|
|
797
|
-
peg$
|
|
798
|
-
peg$
|
|
799
|
-
peg$
|
|
800
|
-
peg$
|
|
801
|
-
peg$
|
|
801
|
+
peg$c230 = "max_records",
|
|
802
|
+
peg$c231 = peg$literalExpectation("max_records", false),
|
|
803
|
+
peg$c232 = "max_expanded_records",
|
|
804
|
+
peg$c233 = peg$literalExpectation("max_expanded_records", false),
|
|
805
|
+
peg$c234 = "max_body_size",
|
|
806
|
+
peg$c235 = peg$literalExpectation("max_body_size", false),
|
|
807
|
+
peg$c236 = "=",
|
|
808
|
+
peg$c237 = peg$literalExpectation("=", false),
|
|
809
|
+
peg$c238 = function(as, a) {
|
|
802
810
|
return {
|
|
803
811
|
name : as,
|
|
804
812
|
value: a
|
|
805
813
|
};
|
|
806
814
|
},
|
|
807
|
-
peg$
|
|
808
|
-
peg$
|
|
809
|
-
peg$
|
|
815
|
+
peg$c239 = "admindata",
|
|
816
|
+
peg$c240 = peg$literalExpectation("admindata", false),
|
|
817
|
+
peg$c241 = function(qs, qsl) {
|
|
810
818
|
var value = [qs];
|
|
811
819
|
for (var i = 0; i < qsl.length; i++) {
|
|
812
820
|
value.push(qsl[i][2]);
|
|
@@ -817,11 +825,11 @@ function peg$parse(input, options) {
|
|
|
817
825
|
value : value
|
|
818
826
|
};
|
|
819
827
|
},
|
|
820
|
-
peg$
|
|
821
|
-
peg$
|
|
822
|
-
peg$
|
|
823
|
-
peg$
|
|
824
|
-
peg$
|
|
828
|
+
peg$c242 = "add",
|
|
829
|
+
peg$c243 = peg$literalExpectation("add", false),
|
|
830
|
+
peg$c244 = "skip",
|
|
831
|
+
peg$c245 = peg$literalExpectation("skip", false),
|
|
832
|
+
peg$c246 = function(as, a) {
|
|
825
833
|
if ( as === "add") {
|
|
826
834
|
a.value = 'add';
|
|
827
835
|
} else {
|
|
@@ -830,48 +838,48 @@ function peg$parse(input, options) {
|
|
|
830
838
|
|
|
831
839
|
return a;
|
|
832
840
|
},
|
|
833
|
-
peg$
|
|
834
|
-
peg$
|
|
835
|
-
peg$
|
|
836
|
-
peg$
|
|
837
|
-
peg$
|
|
838
|
-
peg$
|
|
839
|
-
peg$
|
|
840
|
-
peg$
|
|
841
|
-
peg$
|
|
841
|
+
peg$c247 = "created",
|
|
842
|
+
peg$c248 = peg$literalExpectation("created", false),
|
|
843
|
+
peg$c249 = "modified",
|
|
844
|
+
peg$c250 = peg$literalExpectation("modified", false),
|
|
845
|
+
peg$c251 = "by",
|
|
846
|
+
peg$c252 = peg$literalExpectation("by", false),
|
|
847
|
+
peg$c253 = "at",
|
|
848
|
+
peg$c254 = peg$literalExpectation("at", false),
|
|
849
|
+
peg$c255 = function(w, o) {
|
|
842
850
|
return {
|
|
843
851
|
operation : w === "created" ? "create" : "modify",
|
|
844
852
|
property : o,
|
|
845
853
|
};
|
|
846
854
|
},
|
|
847
|
-
peg$
|
|
855
|
+
peg$c256 = function(qs, qsl) {
|
|
848
856
|
var items = [qs];
|
|
849
857
|
for (var i = 0; i < qsl.length; i++) {
|
|
850
858
|
items.push(qsl[i][2]);
|
|
851
859
|
}
|
|
852
860
|
return items;
|
|
853
861
|
},
|
|
854
|
-
peg$
|
|
855
|
-
peg$
|
|
856
|
-
peg$
|
|
857
|
-
peg$
|
|
858
|
-
peg$
|
|
859
|
-
peg$
|
|
860
|
-
peg$
|
|
861
|
-
peg$
|
|
862
|
-
peg$
|
|
863
|
-
peg$
|
|
864
|
-
peg$
|
|
865
|
-
peg$
|
|
866
|
-
peg$
|
|
867
|
-
peg$
|
|
868
|
-
peg$
|
|
869
|
-
peg$
|
|
870
|
-
peg$
|
|
871
|
-
peg$
|
|
872
|
-
peg$
|
|
873
|
-
peg$
|
|
874
|
-
peg$
|
|
862
|
+
peg$c257 = function(c) { return c.join(''); },
|
|
863
|
+
peg$c258 = "\\",
|
|
864
|
+
peg$c259 = peg$literalExpectation("\\", false),
|
|
865
|
+
peg$c260 = peg$anyExpectation(),
|
|
866
|
+
peg$c261 = "'",
|
|
867
|
+
peg$c262 = peg$literalExpectation("'", false),
|
|
868
|
+
peg$c263 = "\"",
|
|
869
|
+
peg$c264 = peg$literalExpectation("\"", false),
|
|
870
|
+
peg$c265 = function(n) { return n.join(''); },
|
|
871
|
+
peg$c266 = function(a) { return a.join(''); },
|
|
872
|
+
peg$c267 = function(char) {return char},
|
|
873
|
+
peg$c268 = /^[\t\x0B\f \xA0\uFEFF]/,
|
|
874
|
+
peg$c269 = peg$classExpectation(["\t", "\x0B", "\f", " ", "\xA0", "\uFEFF"], false, false),
|
|
875
|
+
peg$c270 = /^[\n\r]/,
|
|
876
|
+
peg$c271 = peg$classExpectation(["\n", "\r"], false, false),
|
|
877
|
+
peg$c272 = "/*",
|
|
878
|
+
peg$c273 = peg$literalExpectation("/*", false),
|
|
879
|
+
peg$c274 = "*/",
|
|
880
|
+
peg$c275 = peg$literalExpectation("*/", false),
|
|
881
|
+
peg$c276 = "//",
|
|
882
|
+
peg$c277 = peg$literalExpectation("//", false),
|
|
875
883
|
|
|
876
884
|
peg$currPos = 0,
|
|
877
885
|
peg$savedPos = 0,
|
|
@@ -5305,6 +5313,9 @@ function peg$parse(input, options) {
|
|
|
5305
5313
|
s1 = peg$parsesettings_admindata();
|
|
5306
5314
|
if (s1 === peg$FAILED) {
|
|
5307
5315
|
s1 = peg$parsesettings_limits();
|
|
5316
|
+
if (s1 === peg$FAILED) {
|
|
5317
|
+
s1 = peg$parsesettings_noDimensionAnnoOnTextProperty();
|
|
5318
|
+
}
|
|
5308
5319
|
}
|
|
5309
5320
|
}
|
|
5310
5321
|
}
|
|
@@ -5514,13 +5525,13 @@ function peg$parse(input, options) {
|
|
|
5514
5525
|
return s0;
|
|
5515
5526
|
}
|
|
5516
5527
|
|
|
5517
|
-
function peg$
|
|
5528
|
+
function peg$parsesettings_noDimensionAnnoOnTextProperty() {
|
|
5518
5529
|
var s0, s1, s2, s3;
|
|
5519
5530
|
|
|
5520
5531
|
s0 = peg$currPos;
|
|
5521
|
-
if (input.substr(peg$currPos,
|
|
5532
|
+
if (input.substr(peg$currPos, 29) === peg$c219) {
|
|
5522
5533
|
s1 = peg$c219;
|
|
5523
|
-
peg$currPos +=
|
|
5534
|
+
peg$currPos += 29;
|
|
5524
5535
|
} else {
|
|
5525
5536
|
s1 = peg$FAILED;
|
|
5526
5537
|
if (peg$silentFails === 0) { peg$fail(peg$c220); }
|
|
@@ -5528,19 +5539,54 @@ function peg$parse(input, options) {
|
|
|
5528
5539
|
if (s1 !== peg$FAILED) {
|
|
5529
5540
|
s2 = peg$parseMWS();
|
|
5530
5541
|
if (s2 !== peg$FAILED) {
|
|
5531
|
-
|
|
5532
|
-
|
|
5542
|
+
s3 = peg$parsestring();
|
|
5543
|
+
if (s3 !== peg$FAILED) {
|
|
5544
|
+
peg$savedPos = s0;
|
|
5545
|
+
s1 = peg$c221(s3);
|
|
5546
|
+
s0 = s1;
|
|
5547
|
+
} else {
|
|
5548
|
+
peg$currPos = s0;
|
|
5549
|
+
s0 = peg$FAILED;
|
|
5550
|
+
}
|
|
5551
|
+
} else {
|
|
5552
|
+
peg$currPos = s0;
|
|
5553
|
+
s0 = peg$FAILED;
|
|
5554
|
+
}
|
|
5555
|
+
} else {
|
|
5556
|
+
peg$currPos = s0;
|
|
5557
|
+
s0 = peg$FAILED;
|
|
5558
|
+
}
|
|
5559
|
+
|
|
5560
|
+
return s0;
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
function peg$parsesettings_hints() {
|
|
5564
|
+
var s0, s1, s2, s3;
|
|
5565
|
+
|
|
5566
|
+
s0 = peg$currPos;
|
|
5567
|
+
if (input.substr(peg$currPos, 5) === peg$c222) {
|
|
5568
|
+
s1 = peg$c222;
|
|
5569
|
+
peg$currPos += 5;
|
|
5570
|
+
} else {
|
|
5571
|
+
s1 = peg$FAILED;
|
|
5572
|
+
if (peg$silentFails === 0) { peg$fail(peg$c223); }
|
|
5573
|
+
}
|
|
5574
|
+
if (s1 !== peg$FAILED) {
|
|
5575
|
+
s2 = peg$parseMWS();
|
|
5576
|
+
if (s2 !== peg$FAILED) {
|
|
5577
|
+
if (input.substr(peg$currPos, 4) === peg$c224) {
|
|
5578
|
+
s3 = peg$c224;
|
|
5533
5579
|
peg$currPos += 4;
|
|
5534
5580
|
} else {
|
|
5535
5581
|
s3 = peg$FAILED;
|
|
5536
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5582
|
+
if (peg$silentFails === 0) { peg$fail(peg$c225); }
|
|
5537
5583
|
}
|
|
5538
5584
|
if (s3 === peg$FAILED) {
|
|
5539
5585
|
s3 = peg$parsehintlist();
|
|
5540
5586
|
}
|
|
5541
5587
|
if (s3 !== peg$FAILED) {
|
|
5542
5588
|
peg$savedPos = s0;
|
|
5543
|
-
s1 = peg$
|
|
5589
|
+
s1 = peg$c226(s3);
|
|
5544
5590
|
s0 = s1;
|
|
5545
5591
|
} else {
|
|
5546
5592
|
peg$currPos = s0;
|
|
@@ -5562,12 +5608,12 @@ function peg$parse(input, options) {
|
|
|
5562
5608
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
5563
5609
|
|
|
5564
5610
|
s0 = peg$currPos;
|
|
5565
|
-
if (input.substr(peg$currPos, 6) === peg$
|
|
5566
|
-
s1 = peg$
|
|
5611
|
+
if (input.substr(peg$currPos, 6) === peg$c227) {
|
|
5612
|
+
s1 = peg$c227;
|
|
5567
5613
|
peg$currPos += 6;
|
|
5568
5614
|
} else {
|
|
5569
5615
|
s1 = peg$FAILED;
|
|
5570
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5616
|
+
if (peg$silentFails === 0) { peg$fail(peg$c228); }
|
|
5571
5617
|
}
|
|
5572
5618
|
if (s1 !== peg$FAILED) {
|
|
5573
5619
|
s2 = peg$parseMWS();
|
|
@@ -5648,7 +5694,7 @@ function peg$parse(input, options) {
|
|
|
5648
5694
|
}
|
|
5649
5695
|
if (s5 !== peg$FAILED) {
|
|
5650
5696
|
peg$savedPos = s0;
|
|
5651
|
-
s1 = peg$
|
|
5697
|
+
s1 = peg$c229(s3, s5);
|
|
5652
5698
|
s0 = s1;
|
|
5653
5699
|
} else {
|
|
5654
5700
|
peg$currPos = s0;
|
|
@@ -5678,28 +5724,28 @@ function peg$parse(input, options) {
|
|
|
5678
5724
|
var s0, s1, s2, s3, s4, s5;
|
|
5679
5725
|
|
|
5680
5726
|
s0 = peg$currPos;
|
|
5681
|
-
if (input.substr(peg$currPos, 11) === peg$
|
|
5682
|
-
s1 = peg$
|
|
5727
|
+
if (input.substr(peg$currPos, 11) === peg$c230) {
|
|
5728
|
+
s1 = peg$c230;
|
|
5683
5729
|
peg$currPos += 11;
|
|
5684
5730
|
} else {
|
|
5685
5731
|
s1 = peg$FAILED;
|
|
5686
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5732
|
+
if (peg$silentFails === 0) { peg$fail(peg$c231); }
|
|
5687
5733
|
}
|
|
5688
5734
|
if (s1 === peg$FAILED) {
|
|
5689
|
-
if (input.substr(peg$currPos, 20) === peg$
|
|
5690
|
-
s1 = peg$
|
|
5735
|
+
if (input.substr(peg$currPos, 20) === peg$c232) {
|
|
5736
|
+
s1 = peg$c232;
|
|
5691
5737
|
peg$currPos += 20;
|
|
5692
5738
|
} else {
|
|
5693
5739
|
s1 = peg$FAILED;
|
|
5694
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5740
|
+
if (peg$silentFails === 0) { peg$fail(peg$c233); }
|
|
5695
5741
|
}
|
|
5696
5742
|
if (s1 === peg$FAILED) {
|
|
5697
|
-
if (input.substr(peg$currPos, 13) === peg$
|
|
5698
|
-
s1 = peg$
|
|
5743
|
+
if (input.substr(peg$currPos, 13) === peg$c234) {
|
|
5744
|
+
s1 = peg$c234;
|
|
5699
5745
|
peg$currPos += 13;
|
|
5700
5746
|
} else {
|
|
5701
5747
|
s1 = peg$FAILED;
|
|
5702
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5748
|
+
if (peg$silentFails === 0) { peg$fail(peg$c235); }
|
|
5703
5749
|
}
|
|
5704
5750
|
}
|
|
5705
5751
|
}
|
|
@@ -5707,11 +5753,11 @@ function peg$parse(input, options) {
|
|
|
5707
5753
|
s2 = peg$parseOWS();
|
|
5708
5754
|
if (s2 !== peg$FAILED) {
|
|
5709
5755
|
if (input.charCodeAt(peg$currPos) === 61) {
|
|
5710
|
-
s3 = peg$
|
|
5756
|
+
s3 = peg$c236;
|
|
5711
5757
|
peg$currPos++;
|
|
5712
5758
|
} else {
|
|
5713
5759
|
s3 = peg$FAILED;
|
|
5714
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5760
|
+
if (peg$silentFails === 0) { peg$fail(peg$c237); }
|
|
5715
5761
|
}
|
|
5716
5762
|
if (s3 !== peg$FAILED) {
|
|
5717
5763
|
s4 = peg$parseOWS();
|
|
@@ -5719,7 +5765,7 @@ function peg$parse(input, options) {
|
|
|
5719
5765
|
s5 = peg$parsestring_no_comma();
|
|
5720
5766
|
if (s5 !== peg$FAILED) {
|
|
5721
5767
|
peg$savedPos = s0;
|
|
5722
|
-
s1 = peg$
|
|
5768
|
+
s1 = peg$c238(s1, s5);
|
|
5723
5769
|
s0 = s1;
|
|
5724
5770
|
} else {
|
|
5725
5771
|
peg$currPos = s0;
|
|
@@ -5749,12 +5795,12 @@ function peg$parse(input, options) {
|
|
|
5749
5795
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
5750
5796
|
|
|
5751
5797
|
s0 = peg$currPos;
|
|
5752
|
-
if (input.substr(peg$currPos, 9) === peg$
|
|
5753
|
-
s1 = peg$
|
|
5798
|
+
if (input.substr(peg$currPos, 9) === peg$c239) {
|
|
5799
|
+
s1 = peg$c239;
|
|
5754
5800
|
peg$currPos += 9;
|
|
5755
5801
|
} else {
|
|
5756
5802
|
s1 = peg$FAILED;
|
|
5757
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5803
|
+
if (peg$silentFails === 0) { peg$fail(peg$c240); }
|
|
5758
5804
|
}
|
|
5759
5805
|
if (s1 !== peg$FAILED) {
|
|
5760
5806
|
s2 = peg$parseMWS();
|
|
@@ -5835,7 +5881,7 @@ function peg$parse(input, options) {
|
|
|
5835
5881
|
}
|
|
5836
5882
|
if (s5 !== peg$FAILED) {
|
|
5837
5883
|
peg$savedPos = s0;
|
|
5838
|
-
s1 = peg$
|
|
5884
|
+
s1 = peg$c241(s3, s5);
|
|
5839
5885
|
s0 = s1;
|
|
5840
5886
|
} else {
|
|
5841
5887
|
peg$currPos = s0;
|
|
@@ -5865,20 +5911,20 @@ function peg$parse(input, options) {
|
|
|
5865
5911
|
var s0, s1, s2, s3;
|
|
5866
5912
|
|
|
5867
5913
|
s0 = peg$currPos;
|
|
5868
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
5869
|
-
s1 = peg$
|
|
5914
|
+
if (input.substr(peg$currPos, 3) === peg$c242) {
|
|
5915
|
+
s1 = peg$c242;
|
|
5870
5916
|
peg$currPos += 3;
|
|
5871
5917
|
} else {
|
|
5872
5918
|
s1 = peg$FAILED;
|
|
5873
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5919
|
+
if (peg$silentFails === 0) { peg$fail(peg$c243); }
|
|
5874
5920
|
}
|
|
5875
5921
|
if (s1 === peg$FAILED) {
|
|
5876
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
5877
|
-
s1 = peg$
|
|
5922
|
+
if (input.substr(peg$currPos, 4) === peg$c244) {
|
|
5923
|
+
s1 = peg$c244;
|
|
5878
5924
|
peg$currPos += 4;
|
|
5879
5925
|
} else {
|
|
5880
5926
|
s1 = peg$FAILED;
|
|
5881
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5927
|
+
if (peg$silentFails === 0) { peg$fail(peg$c245); }
|
|
5882
5928
|
}
|
|
5883
5929
|
}
|
|
5884
5930
|
if (s1 !== peg$FAILED) {
|
|
@@ -5887,7 +5933,7 @@ function peg$parse(input, options) {
|
|
|
5887
5933
|
s3 = peg$parseadmindata_set();
|
|
5888
5934
|
if (s3 !== peg$FAILED) {
|
|
5889
5935
|
peg$savedPos = s0;
|
|
5890
|
-
s1 = peg$
|
|
5936
|
+
s1 = peg$c246(s1, s3);
|
|
5891
5937
|
s0 = s1;
|
|
5892
5938
|
} else {
|
|
5893
5939
|
peg$currPos = s0;
|
|
@@ -5909,44 +5955,44 @@ function peg$parse(input, options) {
|
|
|
5909
5955
|
var s0, s1, s2, s3;
|
|
5910
5956
|
|
|
5911
5957
|
s0 = peg$currPos;
|
|
5912
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
5913
|
-
s1 = peg$
|
|
5958
|
+
if (input.substr(peg$currPos, 7) === peg$c247) {
|
|
5959
|
+
s1 = peg$c247;
|
|
5914
5960
|
peg$currPos += 7;
|
|
5915
5961
|
} else {
|
|
5916
5962
|
s1 = peg$FAILED;
|
|
5917
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5963
|
+
if (peg$silentFails === 0) { peg$fail(peg$c248); }
|
|
5918
5964
|
}
|
|
5919
5965
|
if (s1 === peg$FAILED) {
|
|
5920
|
-
if (input.substr(peg$currPos, 8) === peg$
|
|
5921
|
-
s1 = peg$
|
|
5966
|
+
if (input.substr(peg$currPos, 8) === peg$c249) {
|
|
5967
|
+
s1 = peg$c249;
|
|
5922
5968
|
peg$currPos += 8;
|
|
5923
5969
|
} else {
|
|
5924
5970
|
s1 = peg$FAILED;
|
|
5925
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5971
|
+
if (peg$silentFails === 0) { peg$fail(peg$c250); }
|
|
5926
5972
|
}
|
|
5927
5973
|
}
|
|
5928
5974
|
if (s1 !== peg$FAILED) {
|
|
5929
5975
|
s2 = peg$parseMWS();
|
|
5930
5976
|
if (s2 !== peg$FAILED) {
|
|
5931
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5932
|
-
s3 = peg$
|
|
5977
|
+
if (input.substr(peg$currPos, 2) === peg$c251) {
|
|
5978
|
+
s3 = peg$c251;
|
|
5933
5979
|
peg$currPos += 2;
|
|
5934
5980
|
} else {
|
|
5935
5981
|
s3 = peg$FAILED;
|
|
5936
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5982
|
+
if (peg$silentFails === 0) { peg$fail(peg$c252); }
|
|
5937
5983
|
}
|
|
5938
5984
|
if (s3 === peg$FAILED) {
|
|
5939
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
5940
|
-
s3 = peg$
|
|
5985
|
+
if (input.substr(peg$currPos, 2) === peg$c253) {
|
|
5986
|
+
s3 = peg$c253;
|
|
5941
5987
|
peg$currPos += 2;
|
|
5942
5988
|
} else {
|
|
5943
5989
|
s3 = peg$FAILED;
|
|
5944
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
5990
|
+
if (peg$silentFails === 0) { peg$fail(peg$c254); }
|
|
5945
5991
|
}
|
|
5946
5992
|
}
|
|
5947
5993
|
if (s3 !== peg$FAILED) {
|
|
5948
5994
|
peg$savedPos = s0;
|
|
5949
|
-
s1 = peg$
|
|
5995
|
+
s1 = peg$c255(s1, s3);
|
|
5950
5996
|
s0 = s1;
|
|
5951
5997
|
} else {
|
|
5952
5998
|
peg$currPos = s0;
|
|
@@ -6044,7 +6090,7 @@ function peg$parse(input, options) {
|
|
|
6044
6090
|
}
|
|
6045
6091
|
if (s3 !== peg$FAILED) {
|
|
6046
6092
|
peg$savedPos = s0;
|
|
6047
|
-
s1 = peg$
|
|
6093
|
+
s1 = peg$c256(s1, s3);
|
|
6048
6094
|
s0 = s1;
|
|
6049
6095
|
} else {
|
|
6050
6096
|
peg$currPos = s0;
|
|
@@ -6078,7 +6124,7 @@ function peg$parse(input, options) {
|
|
|
6078
6124
|
s3 = peg$parsequote();
|
|
6079
6125
|
if (s3 !== peg$FAILED) {
|
|
6080
6126
|
peg$savedPos = s0;
|
|
6081
|
-
s1 = peg$
|
|
6127
|
+
s1 = peg$c257(s2);
|
|
6082
6128
|
s0 = s1;
|
|
6083
6129
|
} else {
|
|
6084
6130
|
peg$currPos = s0;
|
|
@@ -6105,11 +6151,11 @@ function peg$parse(input, options) {
|
|
|
6105
6151
|
s2 = peg$parsequote();
|
|
6106
6152
|
if (s2 === peg$FAILED) {
|
|
6107
6153
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
6108
|
-
s2 = peg$
|
|
6154
|
+
s2 = peg$c258;
|
|
6109
6155
|
peg$currPos++;
|
|
6110
6156
|
} else {
|
|
6111
6157
|
s2 = peg$FAILED;
|
|
6112
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6158
|
+
if (peg$silentFails === 0) { peg$fail(peg$c259); }
|
|
6113
6159
|
}
|
|
6114
6160
|
}
|
|
6115
6161
|
peg$silentFails--;
|
|
@@ -6125,7 +6171,7 @@ function peg$parse(input, options) {
|
|
|
6125
6171
|
peg$currPos++;
|
|
6126
6172
|
} else {
|
|
6127
6173
|
s2 = peg$FAILED;
|
|
6128
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6174
|
+
if (peg$silentFails === 0) { peg$fail(peg$c260); }
|
|
6129
6175
|
}
|
|
6130
6176
|
if (s2 !== peg$FAILED) {
|
|
6131
6177
|
peg$savedPos = s0;
|
|
@@ -6142,11 +6188,11 @@ function peg$parse(input, options) {
|
|
|
6142
6188
|
if (s0 === peg$FAILED) {
|
|
6143
6189
|
s0 = peg$currPos;
|
|
6144
6190
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
6145
|
-
s1 = peg$
|
|
6191
|
+
s1 = peg$c258;
|
|
6146
6192
|
peg$currPos++;
|
|
6147
6193
|
} else {
|
|
6148
6194
|
s1 = peg$FAILED;
|
|
6149
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6195
|
+
if (peg$silentFails === 0) { peg$fail(peg$c259); }
|
|
6150
6196
|
}
|
|
6151
6197
|
if (s1 !== peg$FAILED) {
|
|
6152
6198
|
s2 = peg$parseescapable();
|
|
@@ -6171,27 +6217,27 @@ function peg$parse(input, options) {
|
|
|
6171
6217
|
var s0;
|
|
6172
6218
|
|
|
6173
6219
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
6174
|
-
s0 = peg$
|
|
6220
|
+
s0 = peg$c261;
|
|
6175
6221
|
peg$currPos++;
|
|
6176
6222
|
} else {
|
|
6177
6223
|
s0 = peg$FAILED;
|
|
6178
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6224
|
+
if (peg$silentFails === 0) { peg$fail(peg$c262); }
|
|
6179
6225
|
}
|
|
6180
6226
|
if (s0 === peg$FAILED) {
|
|
6181
6227
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
6182
|
-
s0 = peg$
|
|
6228
|
+
s0 = peg$c263;
|
|
6183
6229
|
peg$currPos++;
|
|
6184
6230
|
} else {
|
|
6185
6231
|
s0 = peg$FAILED;
|
|
6186
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6232
|
+
if (peg$silentFails === 0) { peg$fail(peg$c264); }
|
|
6187
6233
|
}
|
|
6188
6234
|
if (s0 === peg$FAILED) {
|
|
6189
6235
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
6190
|
-
s0 = peg$
|
|
6236
|
+
s0 = peg$c258;
|
|
6191
6237
|
peg$currPos++;
|
|
6192
6238
|
} else {
|
|
6193
6239
|
s0 = peg$FAILED;
|
|
6194
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6240
|
+
if (peg$silentFails === 0) { peg$fail(peg$c259); }
|
|
6195
6241
|
}
|
|
6196
6242
|
}
|
|
6197
6243
|
}
|
|
@@ -6215,7 +6261,7 @@ function peg$parse(input, options) {
|
|
|
6215
6261
|
s3 = peg$parsequote();
|
|
6216
6262
|
if (s3 !== peg$FAILED) {
|
|
6217
6263
|
peg$savedPos = s0;
|
|
6218
|
-
s1 = peg$
|
|
6264
|
+
s1 = peg$c265(s2);
|
|
6219
6265
|
s0 = s1;
|
|
6220
6266
|
} else {
|
|
6221
6267
|
peg$currPos = s0;
|
|
@@ -6245,7 +6291,7 @@ function peg$parse(input, options) {
|
|
|
6245
6291
|
}
|
|
6246
6292
|
if (s1 !== peg$FAILED) {
|
|
6247
6293
|
peg$savedPos = s0;
|
|
6248
|
-
s1 = peg$
|
|
6294
|
+
s1 = peg$c266(s1);
|
|
6249
6295
|
}
|
|
6250
6296
|
s0 = s1;
|
|
6251
6297
|
|
|
@@ -6264,7 +6310,7 @@ function peg$parse(input, options) {
|
|
|
6264
6310
|
}
|
|
6265
6311
|
if (s1 !== peg$FAILED) {
|
|
6266
6312
|
peg$savedPos = s0;
|
|
6267
|
-
s1 = peg$
|
|
6313
|
+
s1 = peg$c266(s1);
|
|
6268
6314
|
}
|
|
6269
6315
|
s0 = s1;
|
|
6270
6316
|
|
|
@@ -6300,11 +6346,11 @@ function peg$parse(input, options) {
|
|
|
6300
6346
|
peg$currPos++;
|
|
6301
6347
|
} else {
|
|
6302
6348
|
s2 = peg$FAILED;
|
|
6303
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6349
|
+
if (peg$silentFails === 0) { peg$fail(peg$c260); }
|
|
6304
6350
|
}
|
|
6305
6351
|
if (s2 !== peg$FAILED) {
|
|
6306
6352
|
peg$savedPos = s0;
|
|
6307
|
-
s1 = peg$
|
|
6353
|
+
s1 = peg$c267(s2);
|
|
6308
6354
|
s0 = s1;
|
|
6309
6355
|
} else {
|
|
6310
6356
|
peg$currPos = s0;
|
|
@@ -6356,11 +6402,11 @@ function peg$parse(input, options) {
|
|
|
6356
6402
|
peg$currPos++;
|
|
6357
6403
|
} else {
|
|
6358
6404
|
s2 = peg$FAILED;
|
|
6359
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6405
|
+
if (peg$silentFails === 0) { peg$fail(peg$c260); }
|
|
6360
6406
|
}
|
|
6361
6407
|
if (s2 !== peg$FAILED) {
|
|
6362
6408
|
peg$savedPos = s0;
|
|
6363
|
-
s1 = peg$
|
|
6409
|
+
s1 = peg$c267(s2);
|
|
6364
6410
|
s0 = s1;
|
|
6365
6411
|
} else {
|
|
6366
6412
|
peg$currPos = s0;
|
|
@@ -6496,12 +6542,12 @@ function peg$parse(input, options) {
|
|
|
6496
6542
|
function peg$parsewhiteSpace() {
|
|
6497
6543
|
var s0;
|
|
6498
6544
|
|
|
6499
|
-
if (peg$
|
|
6545
|
+
if (peg$c268.test(input.charAt(peg$currPos))) {
|
|
6500
6546
|
s0 = input.charAt(peg$currPos);
|
|
6501
6547
|
peg$currPos++;
|
|
6502
6548
|
} else {
|
|
6503
6549
|
s0 = peg$FAILED;
|
|
6504
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6550
|
+
if (peg$silentFails === 0) { peg$fail(peg$c269); }
|
|
6505
6551
|
}
|
|
6506
6552
|
|
|
6507
6553
|
return s0;
|
|
@@ -6510,12 +6556,12 @@ function peg$parse(input, options) {
|
|
|
6510
6556
|
function peg$parselineTerminator() {
|
|
6511
6557
|
var s0;
|
|
6512
6558
|
|
|
6513
|
-
if (peg$
|
|
6559
|
+
if (peg$c270.test(input.charAt(peg$currPos))) {
|
|
6514
6560
|
s0 = input.charAt(peg$currPos);
|
|
6515
6561
|
peg$currPos++;
|
|
6516
6562
|
} else {
|
|
6517
6563
|
s0 = peg$FAILED;
|
|
6518
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6564
|
+
if (peg$silentFails === 0) { peg$fail(peg$c271); }
|
|
6519
6565
|
}
|
|
6520
6566
|
|
|
6521
6567
|
return s0;
|
|
@@ -6525,11 +6571,11 @@ function peg$parse(input, options) {
|
|
|
6525
6571
|
var s0;
|
|
6526
6572
|
|
|
6527
6573
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
6528
|
-
s0 = peg$
|
|
6574
|
+
s0 = peg$c263;
|
|
6529
6575
|
peg$currPos++;
|
|
6530
6576
|
} else {
|
|
6531
6577
|
s0 = peg$FAILED;
|
|
6532
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6578
|
+
if (peg$silentFails === 0) { peg$fail(peg$c264); }
|
|
6533
6579
|
}
|
|
6534
6580
|
|
|
6535
6581
|
return s0;
|
|
@@ -6539,24 +6585,24 @@ function peg$parse(input, options) {
|
|
|
6539
6585
|
var s0, s1, s2, s3, s4, s5;
|
|
6540
6586
|
|
|
6541
6587
|
s0 = peg$currPos;
|
|
6542
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6543
|
-
s1 = peg$
|
|
6588
|
+
if (input.substr(peg$currPos, 2) === peg$c272) {
|
|
6589
|
+
s1 = peg$c272;
|
|
6544
6590
|
peg$currPos += 2;
|
|
6545
6591
|
} else {
|
|
6546
6592
|
s1 = peg$FAILED;
|
|
6547
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6593
|
+
if (peg$silentFails === 0) { peg$fail(peg$c273); }
|
|
6548
6594
|
}
|
|
6549
6595
|
if (s1 !== peg$FAILED) {
|
|
6550
6596
|
s2 = [];
|
|
6551
6597
|
s3 = peg$currPos;
|
|
6552
6598
|
s4 = peg$currPos;
|
|
6553
6599
|
peg$silentFails++;
|
|
6554
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6555
|
-
s5 = peg$
|
|
6600
|
+
if (input.substr(peg$currPos, 2) === peg$c274) {
|
|
6601
|
+
s5 = peg$c274;
|
|
6556
6602
|
peg$currPos += 2;
|
|
6557
6603
|
} else {
|
|
6558
6604
|
s5 = peg$FAILED;
|
|
6559
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6605
|
+
if (peg$silentFails === 0) { peg$fail(peg$c275); }
|
|
6560
6606
|
}
|
|
6561
6607
|
peg$silentFails--;
|
|
6562
6608
|
if (s5 === peg$FAILED) {
|
|
@@ -6583,12 +6629,12 @@ function peg$parse(input, options) {
|
|
|
6583
6629
|
s3 = peg$currPos;
|
|
6584
6630
|
s4 = peg$currPos;
|
|
6585
6631
|
peg$silentFails++;
|
|
6586
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6587
|
-
s5 = peg$
|
|
6632
|
+
if (input.substr(peg$currPos, 2) === peg$c274) {
|
|
6633
|
+
s5 = peg$c274;
|
|
6588
6634
|
peg$currPos += 2;
|
|
6589
6635
|
} else {
|
|
6590
6636
|
s5 = peg$FAILED;
|
|
6591
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6637
|
+
if (peg$silentFails === 0) { peg$fail(peg$c275); }
|
|
6592
6638
|
}
|
|
6593
6639
|
peg$silentFails--;
|
|
6594
6640
|
if (s5 === peg$FAILED) {
|
|
@@ -6612,12 +6658,12 @@ function peg$parse(input, options) {
|
|
|
6612
6658
|
}
|
|
6613
6659
|
}
|
|
6614
6660
|
if (s2 !== peg$FAILED) {
|
|
6615
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6616
|
-
s3 = peg$
|
|
6661
|
+
if (input.substr(peg$currPos, 2) === peg$c274) {
|
|
6662
|
+
s3 = peg$c274;
|
|
6617
6663
|
peg$currPos += 2;
|
|
6618
6664
|
} else {
|
|
6619
6665
|
s3 = peg$FAILED;
|
|
6620
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6666
|
+
if (peg$silentFails === 0) { peg$fail(peg$c275); }
|
|
6621
6667
|
}
|
|
6622
6668
|
if (s3 !== peg$FAILED) {
|
|
6623
6669
|
s1 = [s1, s2, s3];
|
|
@@ -6642,12 +6688,12 @@ function peg$parse(input, options) {
|
|
|
6642
6688
|
var s0, s1, s2, s3, s4, s5;
|
|
6643
6689
|
|
|
6644
6690
|
s0 = peg$currPos;
|
|
6645
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
6646
|
-
s1 = peg$
|
|
6691
|
+
if (input.substr(peg$currPos, 2) === peg$c276) {
|
|
6692
|
+
s1 = peg$c276;
|
|
6647
6693
|
peg$currPos += 2;
|
|
6648
6694
|
} else {
|
|
6649
6695
|
s1 = peg$FAILED;
|
|
6650
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6696
|
+
if (peg$silentFails === 0) { peg$fail(peg$c277); }
|
|
6651
6697
|
}
|
|
6652
6698
|
if (s1 !== peg$FAILED) {
|
|
6653
6699
|
s2 = [];
|
|
@@ -6725,7 +6771,7 @@ function peg$parse(input, options) {
|
|
|
6725
6771
|
peg$currPos++;
|
|
6726
6772
|
} else {
|
|
6727
6773
|
s0 = peg$FAILED;
|
|
6728
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6774
|
+
if (peg$silentFails === 0) { peg$fail(peg$c260); }
|
|
6729
6775
|
}
|
|
6730
6776
|
|
|
6731
6777
|
return s0;
|
|
@@ -6741,7 +6787,7 @@ function peg$parse(input, options) {
|
|
|
6741
6787
|
peg$currPos++;
|
|
6742
6788
|
} else {
|
|
6743
6789
|
s1 = peg$FAILED;
|
|
6744
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
6790
|
+
if (peg$silentFails === 0) { peg$fail(peg$c260); }
|
|
6745
6791
|
}
|
|
6746
6792
|
peg$silentFails--;
|
|
6747
6793
|
if (s1 === peg$FAILED) {
|
|
@@ -45,6 +45,8 @@ const executeSqlAsPreparedStatement = (context, sql, parameters, rowCb) => {
|
|
|
45
45
|
context.logger.logSqlTime('execQuery', startTime, sql);
|
|
46
46
|
const rs = [];
|
|
47
47
|
|
|
48
|
+
global.execCounter += 1;
|
|
49
|
+
|
|
48
50
|
if (resultSet && !errExec) {
|
|
49
51
|
while (resultSet.next()) {
|
|
50
52
|
rs.push(resultSet.getValues());
|
|
@@ -60,6 +62,9 @@ const executeSqlAsPreparedStatement = (context, sql, parameters, rowCb) => {
|
|
|
60
62
|
// try dropping the statement always; report exec error in CB
|
|
61
63
|
startTime = context.logger.getStartTimeSql();
|
|
62
64
|
statement.drop((errDrop) => {
|
|
65
|
+
|
|
66
|
+
global.dropCounter += 1;
|
|
67
|
+
|
|
63
68
|
context.logger.logSqlTime('drop', startTime, sql);
|
|
64
69
|
if (errDrop) {
|
|
65
70
|
// don't hide any execution error, just log
|
|
@@ -80,6 +85,9 @@ const executeSqlAsPreparedStatement = (context, sql, parameters, rowCb) => {
|
|
|
80
85
|
// all other statements use exec
|
|
81
86
|
startTime = context.logger.getStartTimeSql();
|
|
82
87
|
statement.exec(parameters, (errExec, rows) => {
|
|
88
|
+
|
|
89
|
+
global.execCounter += 1;
|
|
90
|
+
|
|
83
91
|
context.logger.logSqlTime('exec', startTime, sql);
|
|
84
92
|
if (rows) {
|
|
85
93
|
context.logger.logSqlData(rows);
|
|
@@ -88,6 +96,9 @@ const executeSqlAsPreparedStatement = (context, sql, parameters, rowCb) => {
|
|
|
88
96
|
// try dropping the statement always; report exec error in CB
|
|
89
97
|
startTime = context.logger.getStartTimeSql();
|
|
90
98
|
statement.drop((errDrop) => {
|
|
99
|
+
|
|
100
|
+
global.dropCounter += 1;
|
|
101
|
+
|
|
91
102
|
context.logger.logSqlTime('drop', startTime, sql);
|
|
92
103
|
if (errDrop) {
|
|
93
104
|
// don't hide any execution error, just log
|
|
@@ -22,6 +22,8 @@ exports.URI_KIND_MetaData = 8;
|
|
|
22
22
|
exports.URI_KIND_Batch = 9;
|
|
23
23
|
exports.URI_KIND_Resource = 4;
|
|
24
24
|
|
|
25
|
+
// unknown position indicator on URI parsing failure
|
|
26
|
+
const UNKNOWN_POSITION = -1;
|
|
25
27
|
|
|
26
28
|
function parseODataSegments(segments) {
|
|
27
29
|
var segmentsParsed = [];
|
|
@@ -33,7 +35,12 @@ function parseODataSegments(segments) {
|
|
|
33
35
|
var tmp = oDataSegmentParser.parse(segments.decoded[i]);
|
|
34
36
|
segmentsParsed.push(tmp);
|
|
35
37
|
} catch (err) {
|
|
36
|
-
|
|
38
|
+
let position = (err.hash && err.hash.loc && err.hash.loc.last_column && Number.isInteger(err.hash.loc.last_column)) ? err.hash.loc.last_column : UNKNOWN_POSITION;
|
|
39
|
+
if (position === UNKNOWN_POSITION) {
|
|
40
|
+
throw new BadRequest(`Syntax error in resource path. Character position could not be determined.`, err);
|
|
41
|
+
} else {
|
|
42
|
+
throw new BadRequest(`Syntax error in resource path at position ${position+1}`, err);
|
|
43
|
+
}
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
}
|
|
@@ -442,6 +442,9 @@ ResourcePathReader.prototype.addExpand = function (dbSeg, expandNavName, expandI
|
|
|
442
442
|
*/
|
|
443
443
|
ResourcePathReader.prototype._createNavigationSegment = function (dbSeg, expandNavName) {
|
|
444
444
|
var navigation = dbSeg.entityType.getNavigation(expandNavName);
|
|
445
|
+
if (!navigation) {
|
|
446
|
+
throw new Http400_BadRequest(`Unknown navigation property '${expandNavName}' in entity type '${dbSeg.entityType.name}'`);
|
|
447
|
+
}
|
|
445
448
|
var association = this.getAssociation(navigation);
|
|
446
449
|
|
|
447
450
|
var endTo = this.getTargetEnd(navigation, association, dbSeg);
|
package/lib/xsodata.js
CHANGED
|
@@ -39,6 +39,18 @@ var Measurement = require('./utils/measurement');
|
|
|
39
39
|
var HttpErrorDebugInfo = require('./utils/errors/debugInfo');
|
|
40
40
|
var InternalError = require('./utils/errors/internalError');
|
|
41
41
|
|
|
42
|
+
// segmentation fault check
|
|
43
|
+
// var SegfaultHandler = require('segfault-handler');
|
|
44
|
+
// SegfaultHandler.registerHandler('crash.log');
|
|
45
|
+
// SegfaultHandler.causeSegfault();
|
|
46
|
+
|
|
47
|
+
global.execCounter = 0;
|
|
48
|
+
global.dropCounter = 0;
|
|
49
|
+
|
|
50
|
+
// process.on('exit', () => {
|
|
51
|
+
// console.log(`global.execCounter: ${global.execCounter}`);
|
|
52
|
+
// console.log(`global.dropCounter: ${global.dropCounter}`);
|
|
53
|
+
// });
|
|
42
54
|
|
|
43
55
|
exports.testExits = {
|
|
44
56
|
afterConnectDb: 1,
|
|
@@ -212,6 +224,8 @@ exports.ODataHandler.prototype.processRequest = function process(request, respon
|
|
|
212
224
|
networkContext = new NetworkContext(this.handlerConfiguration, requestOptions);
|
|
213
225
|
context = new RequestContext(networkContext, requestOptions || {});
|
|
214
226
|
|
|
227
|
+
context.execCounter = 0;
|
|
228
|
+
|
|
215
229
|
context.registeredCallBacks = this._registeredCallBacks;
|
|
216
230
|
context.callRegisteredStep = checkRegisteredSteps;
|
|
217
231
|
|
|
@@ -270,6 +284,7 @@ exports.ODataHandler.prototype.processRequest = function process(request, respon
|
|
|
270
284
|
}.bind(this));
|
|
271
285
|
}.bind(this)
|
|
272
286
|
);
|
|
287
|
+
|
|
273
288
|
} catch (exception) {
|
|
274
289
|
var err = new InternalError('InternalError', context, exception);
|
|
275
290
|
tableCleanup.assertCleanTempTables(context, function (error, context) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/xsodata",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.5",
|
|
4
4
|
"description": "Expose data from a HANA database as OData V2 service with help of .xsodata files.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "SEE LICENSE IN developer-license-3.1.txt",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"xml-writer": "1.7.0"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
|
-
"node": "^
|
|
64
|
+
"node": "^12 || ^14"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@sap/hana-client": "2.
|
|
67
|
+
"@sap/hana-client": "2.10.20",
|
|
68
68
|
"chai": "4.2.0",
|
|
69
69
|
"expect": "1.20.2",
|
|
70
70
|
"filter-node-package": "=2.2.0",
|