@hpcc-js/marshaller 2.28.6 → 2.28.8

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/dist/index.js CHANGED
@@ -5,8 +5,8 @@
5
5
  })(this, (function (exports, comms, common, util$1, chart, dgrid, form, graph, map, layout, phosphor, codemirror, other) { 'use strict';
6
6
 
7
7
  var PKG_NAME$1 = "@hpcc-js/marshaller";
8
- var PKG_VERSION$1 = "2.28.6";
9
- var BUILD_VERSION = "2.108.6";
8
+ var PKG_VERSION$1 = "2.28.8";
9
+ var BUILD_VERSION = "2.108.8";
10
10
 
11
11
  /******************************************************************************
12
12
  Copyright (c) Microsoft Corporation.
@@ -2338,7 +2338,7 @@
2338
2338
  }
2339
2339
 
2340
2340
  var PKG_NAME = "@hpcc-js/ddl-shim";
2341
- var PKG_VERSION = "2.25.0";
2341
+ var PKG_VERSION = "2.25.1";
2342
2342
 
2343
2343
  function isWorkunitDatasource(ref) {
2344
2344
  return ref.WUID !== undefined;
@@ -3397,10 +3397,10 @@
3397
3397
  function requireUri_all () {
3398
3398
  if (hasRequiredUri_all) return uri_all$1.exports;
3399
3399
  hasRequiredUri_all = 1;
3400
- (function (module, exports) {
3400
+ (function (module, exports$1) {
3401
3401
  (function (global, factory) {
3402
- factory(exports) ;
3403
- }(uri_all, (function (exports) {
3402
+ factory(exports$1) ;
3403
+ }(uri_all, (function (exports$1) {
3404
3404
  function merge() {
3405
3405
  for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
3406
3406
  sets[_key] = arguments[_key];
@@ -4782,20 +4782,20 @@
4782
4782
  SCHEMES[handler$5.scheme] = handler$5;
4783
4783
  SCHEMES[handler$6.scheme] = handler$6;
4784
4784
 
4785
- exports.SCHEMES = SCHEMES;
4786
- exports.pctEncChar = pctEncChar;
4787
- exports.pctDecChars = pctDecChars;
4788
- exports.parse = parse;
4789
- exports.removeDotSegments = removeDotSegments;
4790
- exports.serialize = serialize;
4791
- exports.resolveComponents = resolveComponents;
4792
- exports.resolve = resolve;
4793
- exports.normalize = normalize;
4794
- exports.equal = equal;
4795
- exports.escapeComponent = escapeComponent;
4796
- exports.unescapeComponent = unescapeComponent;
4797
-
4798
- Object.defineProperty(exports, '__esModule', { value: true });
4785
+ exports$1.SCHEMES = SCHEMES;
4786
+ exports$1.pctEncChar = pctEncChar;
4787
+ exports$1.pctDecChars = pctDecChars;
4788
+ exports$1.parse = parse;
4789
+ exports$1.removeDotSegments = removeDotSegments;
4790
+ exports$1.serialize = serialize;
4791
+ exports$1.resolveComponents = resolveComponents;
4792
+ exports$1.resolve = resolve;
4793
+ exports$1.normalize = normalize;
4794
+ exports$1.equal = equal;
4795
+ exports$1.escapeComponent = escapeComponent;
4796
+ exports$1.unescapeComponent = unescapeComponent;
4797
+
4798
+ Object.defineProperty(exports$1, '__esModule', { value: true });
4799
4799
 
4800
4800
  })));
4801
4801
 
@@ -6173,6 +6173,11 @@
6173
6173
  , defaultsHash = {}
6174
6174
  , customRules = [];
6175
6175
 
6176
+ function patternCode(i, patterns) {
6177
+ var regExpCode = opts.regExp ? 'regExp' : 'new RegExp';
6178
+ return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');';
6179
+ }
6180
+
6176
6181
  root = root || { schema: schema, refVal: refVal, refs: refs };
6177
6182
 
6178
6183
  var c = checkCompiling.call(this, schema, root, baseId);
@@ -6259,6 +6264,7 @@
6259
6264
  'equal',
6260
6265
  'ucs2length',
6261
6266
  'ValidationError',
6267
+ 'regExp',
6262
6268
  sourceCode
6263
6269
  );
6264
6270
 
@@ -6272,7 +6278,8 @@
6272
6278
  customRules,
6273
6279
  equal,
6274
6280
  ucs2length,
6275
- ValidationError
6281
+ ValidationError,
6282
+ opts.regExp
6276
6283
  );
6277
6284
 
6278
6285
  refVal[0] = validate;
@@ -6489,11 +6496,6 @@
6489
6496
  }
6490
6497
 
6491
6498
 
6492
- function patternCode(i, patterns) {
6493
- return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
6494
- }
6495
-
6496
-
6497
6499
  function defaultCode(i) {
6498
6500
  return 'var default' + i + ' = defaults[' + i + '];';
6499
6501
  }
@@ -8517,6 +8519,7 @@
8517
8519
  var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
8518
8520
  var $breakOnError = !it.opts.allErrors;
8519
8521
  var $data = 'data' + ($dataLvl || '');
8522
+ var $valid = 'valid' + $lvl;
8520
8523
  var $isData = it.opts.$data && $schema && $schema.$data,
8521
8524
  $schemaValue;
8522
8525
  if ($isData) {
@@ -8525,12 +8528,21 @@
8525
8528
  } else {
8526
8529
  $schemaValue = $schema;
8527
8530
  }
8528
- var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
8529
- out += 'if ( ';
8531
+ var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp';
8530
8532
  if ($isData) {
8531
- out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
8533
+ out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( ';
8534
+ if ($isData) {
8535
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
8536
+ }
8537
+ out += ' !' + ($valid) + ') {';
8538
+ } else {
8539
+ var $regexp = it.usePattern($schema);
8540
+ out += ' if ( ';
8541
+ if ($isData) {
8542
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
8543
+ }
8544
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {';
8532
8545
  }
8533
- out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
8534
8546
  var $$outStack = $$outStack || [];
8535
8547
  $$outStack.push(out);
8536
8548
  out = ''; /* istanbul ignore else */