centrifuge 5.3.2 → 5.3.3

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.
@@ -1593,7 +1593,6 @@ class HttpStreamTransport {
1593
1593
  body: body,
1594
1594
  mode: 'cors',
1595
1595
  credentials: 'same-origin',
1596
- cache: 'no-cache'
1597
1596
  };
1598
1597
  fetchFunc(this.options.emulationEndpoint, fetchOptions);
1599
1598
  }
@@ -1678,7 +1677,6 @@ class SseTransport {
1678
1677
  body: body,
1679
1678
  mode: 'cors',
1680
1679
  credentials: 'same-origin',
1681
- cache: 'no-cache'
1682
1680
  };
1683
1681
  fetchFunc(this.options.emulationEndpoint, fetchOptions);
1684
1682
  }
@@ -2589,7 +2587,7 @@ class Centrifuge extends EventEmitter$2 {
2589
2587
  websocket: websocket
2590
2588
  });
2591
2589
  if (!this._transport.supported()) {
2592
- throw new Error('WebSocket not available');
2590
+ throw new Error('WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options');
2593
2591
  }
2594
2592
  }
2595
2593
  }
@@ -3728,7 +3726,7 @@ var indexMinimal = {};
3728
3726
 
3729
3727
  var minimal = {};
3730
3728
 
3731
- var aspromise = asPromise;
3729
+ var aspromise = asPromise$1;
3732
3730
 
3733
3731
  /**
3734
3732
  * Callback as used by {@link util.asPromise}.
@@ -3747,7 +3745,7 @@ var aspromise = asPromise;
3747
3745
  * @param {...*} params Function arguments
3748
3746
  * @returns {Promise<*>} Promisified function
3749
3747
  */
3750
- function asPromise(fn, ctx/*, varargs */) {
3748
+ function asPromise$1(fn, ctx/*, varargs */) {
3751
3749
  var params = new Array(arguments.length - 1),
3752
3750
  offset = 0,
3753
3751
  index = 2,
@@ -4333,7 +4331,7 @@ function readUintBE(buf, pos) {
4333
4331
  | buf[pos + 3]) >>> 0;
4334
4332
  }
4335
4333
 
4336
- var inquire_1 = inquire;
4334
+ var inquire_1 = inquire$1;
4337
4335
 
4338
4336
  /**
4339
4337
  * Requires a module only if available.
@@ -4341,7 +4339,7 @@ var inquire_1 = inquire;
4341
4339
  * @param {string} moduleName Module to require
4342
4340
  * @returns {?Object} Required module if available and not empty, otherwise `null`
4343
4341
  */
4344
- function inquire(moduleName) {
4342
+ function inquire$1(moduleName) {
4345
4343
  try {
4346
4344
  var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
4347
4345
  if (mod && (mod.length || Object.keys(mod).length))
@@ -6403,311 +6401,288 @@ var roots = {};
6403
6401
 
6404
6402
  var util$1 = {exports: {}};
6405
6403
 
6406
- var codegen_1;
6407
- var hasRequiredCodegen;
6408
-
6409
- function requireCodegen () {
6410
- if (hasRequiredCodegen) return codegen_1;
6411
- hasRequiredCodegen = 1;
6412
- codegen_1 = codegen;
6404
+ var codegen_1 = codegen;
6413
6405
 
6414
- /**
6415
- * Begins generating a function.
6416
- * @memberof util
6417
- * @param {string[]} functionParams Function parameter names
6418
- * @param {string} [functionName] Function name if not anonymous
6419
- * @returns {Codegen} Appender that appends code to the function's body
6420
- */
6421
- function codegen(functionParams, functionName) {
6406
+ /**
6407
+ * Begins generating a function.
6408
+ * @memberof util
6409
+ * @param {string[]} functionParams Function parameter names
6410
+ * @param {string} [functionName] Function name if not anonymous
6411
+ * @returns {Codegen} Appender that appends code to the function's body
6412
+ */
6413
+ function codegen(functionParams, functionName) {
6422
6414
 
6423
- /* istanbul ignore if */
6424
- if (typeof functionParams === "string") {
6425
- functionName = functionParams;
6426
- functionParams = undefined;
6427
- }
6415
+ /* istanbul ignore if */
6416
+ if (typeof functionParams === "string") {
6417
+ functionName = functionParams;
6418
+ functionParams = undefined;
6419
+ }
6428
6420
 
6429
- var body = [];
6421
+ var body = [];
6430
6422
 
6431
- /**
6432
- * Appends code to the function's body or finishes generation.
6433
- * @typedef Codegen
6434
- * @type {function}
6435
- * @param {string|Object.<string,*>} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
6436
- * @param {...*} [formatParams] Format parameters
6437
- * @returns {Codegen|Function} Itself or the generated function if finished
6438
- * @throws {Error} If format parameter counts do not match
6439
- */
6423
+ /**
6424
+ * Appends code to the function's body or finishes generation.
6425
+ * @typedef Codegen
6426
+ * @type {function}
6427
+ * @param {string|Object.<string,*>} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
6428
+ * @param {...*} [formatParams] Format parameters
6429
+ * @returns {Codegen|Function} Itself or the generated function if finished
6430
+ * @throws {Error} If format parameter counts do not match
6431
+ */
6440
6432
 
6441
- function Codegen(formatStringOrScope) {
6442
- // note that explicit array handling below makes this ~50% faster
6433
+ function Codegen(formatStringOrScope) {
6434
+ // note that explicit array handling below makes this ~50% faster
6443
6435
 
6444
- // finish the function
6445
- if (typeof formatStringOrScope !== "string") {
6446
- var source = toString();
6447
- if (codegen.verbose)
6448
- console.log("codegen: " + source); // eslint-disable-line no-console
6449
- source = "return " + source;
6450
- if (formatStringOrScope) {
6451
- var scopeKeys = Object.keys(formatStringOrScope),
6452
- scopeParams = new Array(scopeKeys.length + 1),
6453
- scopeValues = new Array(scopeKeys.length),
6454
- scopeOffset = 0;
6455
- while (scopeOffset < scopeKeys.length) {
6456
- scopeParams[scopeOffset] = scopeKeys[scopeOffset];
6457
- scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];
6458
- }
6459
- scopeParams[scopeOffset] = source;
6460
- return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func
6461
- }
6462
- return Function(source)(); // eslint-disable-line no-new-func
6463
- }
6436
+ // finish the function
6437
+ if (typeof formatStringOrScope !== "string") {
6438
+ var source = toString();
6439
+ if (codegen.verbose)
6440
+ console.log("codegen: " + source); // eslint-disable-line no-console
6441
+ source = "return " + source;
6442
+ if (formatStringOrScope) {
6443
+ var scopeKeys = Object.keys(formatStringOrScope),
6444
+ scopeParams = new Array(scopeKeys.length + 1),
6445
+ scopeValues = new Array(scopeKeys.length),
6446
+ scopeOffset = 0;
6447
+ while (scopeOffset < scopeKeys.length) {
6448
+ scopeParams[scopeOffset] = scopeKeys[scopeOffset];
6449
+ scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];
6450
+ }
6451
+ scopeParams[scopeOffset] = source;
6452
+ return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func
6453
+ }
6454
+ return Function(source)(); // eslint-disable-line no-new-func
6455
+ }
6464
6456
 
6465
- // otherwise append to body
6466
- var formatParams = new Array(arguments.length - 1),
6467
- formatOffset = 0;
6468
- while (formatOffset < formatParams.length)
6469
- formatParams[formatOffset] = arguments[++formatOffset];
6470
- formatOffset = 0;
6471
- formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {
6472
- var value = formatParams[formatOffset++];
6473
- switch ($1) {
6474
- case "d": case "f": return String(Number(value));
6475
- case "i": return String(Math.floor(value));
6476
- case "j": return JSON.stringify(value);
6477
- case "s": return String(value);
6478
- }
6479
- return "%";
6480
- });
6481
- if (formatOffset !== formatParams.length)
6482
- throw Error("parameter count mismatch");
6483
- body.push(formatStringOrScope);
6484
- return Codegen;
6485
- }
6457
+ // otherwise append to body
6458
+ var formatParams = new Array(arguments.length - 1),
6459
+ formatOffset = 0;
6460
+ while (formatOffset < formatParams.length)
6461
+ formatParams[formatOffset] = arguments[++formatOffset];
6462
+ formatOffset = 0;
6463
+ formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {
6464
+ var value = formatParams[formatOffset++];
6465
+ switch ($1) {
6466
+ case "d": case "f": return String(Number(value));
6467
+ case "i": return String(Math.floor(value));
6468
+ case "j": return JSON.stringify(value);
6469
+ case "s": return String(value);
6470
+ }
6471
+ return "%";
6472
+ });
6473
+ if (formatOffset !== formatParams.length)
6474
+ throw Error("parameter count mismatch");
6475
+ body.push(formatStringOrScope);
6476
+ return Codegen;
6477
+ }
6486
6478
 
6487
- function toString(functionNameOverride) {
6488
- return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}";
6489
- }
6479
+ function toString(functionNameOverride) {
6480
+ return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}";
6481
+ }
6490
6482
 
6491
- Codegen.toString = toString;
6492
- return Codegen;
6493
- }
6483
+ Codegen.toString = toString;
6484
+ return Codegen;
6485
+ }
6494
6486
 
6495
- /**
6496
- * Begins generating a function.
6497
- * @memberof util
6498
- * @function codegen
6499
- * @param {string} [functionName] Function name if not anonymous
6500
- * @returns {Codegen} Appender that appends code to the function's body
6501
- * @variation 2
6502
- */
6487
+ /**
6488
+ * Begins generating a function.
6489
+ * @memberof util
6490
+ * @function codegen
6491
+ * @param {string} [functionName] Function name if not anonymous
6492
+ * @returns {Codegen} Appender that appends code to the function's body
6493
+ * @variation 2
6494
+ */
6503
6495
 
6504
- /**
6505
- * When set to `true`, codegen will log generated code to console. Useful for debugging.
6506
- * @name util.codegen.verbose
6507
- * @type {boolean}
6508
- */
6509
- codegen.verbose = false;
6510
- return codegen_1;
6511
- }
6512
-
6513
- var fetch_1;
6514
- var hasRequiredFetch;
6496
+ /**
6497
+ * When set to `true`, codegen will log generated code to console. Useful for debugging.
6498
+ * @name util.codegen.verbose
6499
+ * @type {boolean}
6500
+ */
6501
+ codegen.verbose = false;
6515
6502
 
6516
- function requireFetch () {
6517
- if (hasRequiredFetch) return fetch_1;
6518
- hasRequiredFetch = 1;
6519
- fetch_1 = fetch;
6503
+ var fetch_1 = fetch;
6520
6504
 
6521
- var asPromise = aspromise,
6522
- inquire = inquire_1;
6505
+ var asPromise = aspromise,
6506
+ inquire = inquire_1;
6523
6507
 
6524
- var fs = inquire("fs");
6508
+ var fs = inquire("fs");
6525
6509
 
6526
- /**
6527
- * Node-style callback as used by {@link util.fetch}.
6528
- * @typedef FetchCallback
6529
- * @type {function}
6530
- * @param {?Error} error Error, if any, otherwise `null`
6531
- * @param {string} [contents] File contents, if there hasn't been an error
6532
- * @returns {undefined}
6533
- */
6510
+ /**
6511
+ * Node-style callback as used by {@link util.fetch}.
6512
+ * @typedef FetchCallback
6513
+ * @type {function}
6514
+ * @param {?Error} error Error, if any, otherwise `null`
6515
+ * @param {string} [contents] File contents, if there hasn't been an error
6516
+ * @returns {undefined}
6517
+ */
6534
6518
 
6535
- /**
6536
- * Options as used by {@link util.fetch}.
6537
- * @typedef FetchOptions
6538
- * @type {Object}
6539
- * @property {boolean} [binary=false] Whether expecting a binary response
6540
- * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest
6541
- */
6519
+ /**
6520
+ * Options as used by {@link util.fetch}.
6521
+ * @typedef FetchOptions
6522
+ * @type {Object}
6523
+ * @property {boolean} [binary=false] Whether expecting a binary response
6524
+ * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest
6525
+ */
6542
6526
 
6543
- /**
6544
- * Fetches the contents of a file.
6545
- * @memberof util
6546
- * @param {string} filename File path or url
6547
- * @param {FetchOptions} options Fetch options
6548
- * @param {FetchCallback} callback Callback function
6549
- * @returns {undefined}
6550
- */
6551
- function fetch(filename, options, callback) {
6552
- if (typeof options === "function") {
6553
- callback = options;
6554
- options = {};
6555
- } else if (!options)
6556
- options = {};
6527
+ /**
6528
+ * Fetches the contents of a file.
6529
+ * @memberof util
6530
+ * @param {string} filename File path or url
6531
+ * @param {FetchOptions} options Fetch options
6532
+ * @param {FetchCallback} callback Callback function
6533
+ * @returns {undefined}
6534
+ */
6535
+ function fetch(filename, options, callback) {
6536
+ if (typeof options === "function") {
6537
+ callback = options;
6538
+ options = {};
6539
+ } else if (!options)
6540
+ options = {};
6557
6541
 
6558
- if (!callback)
6559
- return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this
6542
+ if (!callback)
6543
+ return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this
6560
6544
 
6561
- // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.
6562
- if (!options.xhr && fs && fs.readFile)
6563
- return fs.readFile(filename, function fetchReadFileCallback(err, contents) {
6564
- return err && typeof XMLHttpRequest !== "undefined"
6565
- ? fetch.xhr(filename, options, callback)
6566
- : err
6567
- ? callback(err)
6568
- : callback(null, options.binary ? contents : contents.toString("utf8"));
6569
- });
6545
+ // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.
6546
+ if (!options.xhr && fs && fs.readFile)
6547
+ return fs.readFile(filename, function fetchReadFileCallback(err, contents) {
6548
+ return err && typeof XMLHttpRequest !== "undefined"
6549
+ ? fetch.xhr(filename, options, callback)
6550
+ : err
6551
+ ? callback(err)
6552
+ : callback(null, options.binary ? contents : contents.toString("utf8"));
6553
+ });
6570
6554
 
6571
- // use the XHR version otherwise.
6572
- return fetch.xhr(filename, options, callback);
6573
- }
6555
+ // use the XHR version otherwise.
6556
+ return fetch.xhr(filename, options, callback);
6557
+ }
6574
6558
 
6575
- /**
6576
- * Fetches the contents of a file.
6577
- * @name util.fetch
6578
- * @function
6579
- * @param {string} path File path or url
6580
- * @param {FetchCallback} callback Callback function
6581
- * @returns {undefined}
6582
- * @variation 2
6583
- */
6559
+ /**
6560
+ * Fetches the contents of a file.
6561
+ * @name util.fetch
6562
+ * @function
6563
+ * @param {string} path File path or url
6564
+ * @param {FetchCallback} callback Callback function
6565
+ * @returns {undefined}
6566
+ * @variation 2
6567
+ */
6584
6568
 
6585
- /**
6586
- * Fetches the contents of a file.
6587
- * @name util.fetch
6588
- * @function
6589
- * @param {string} path File path or url
6590
- * @param {FetchOptions} [options] Fetch options
6591
- * @returns {Promise<string|Uint8Array>} Promise
6592
- * @variation 3
6593
- */
6569
+ /**
6570
+ * Fetches the contents of a file.
6571
+ * @name util.fetch
6572
+ * @function
6573
+ * @param {string} path File path or url
6574
+ * @param {FetchOptions} [options] Fetch options
6575
+ * @returns {Promise<string|Uint8Array>} Promise
6576
+ * @variation 3
6577
+ */
6594
6578
 
6595
- /**/
6596
- fetch.xhr = function fetch_xhr(filename, options, callback) {
6597
- var xhr = new XMLHttpRequest();
6598
- xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {
6579
+ /**/
6580
+ fetch.xhr = function fetch_xhr(filename, options, callback) {
6581
+ var xhr = new XMLHttpRequest();
6582
+ xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {
6599
6583
 
6600
- if (xhr.readyState !== 4)
6601
- return undefined;
6584
+ if (xhr.readyState !== 4)
6585
+ return undefined;
6602
6586
 
6603
- // local cors security errors return status 0 / empty string, too. afaik this cannot be
6604
- // reliably distinguished from an actually empty file for security reasons. feel free
6605
- // to send a pull request if you are aware of a solution.
6606
- if (xhr.status !== 0 && xhr.status !== 200)
6607
- return callback(Error("status " + xhr.status));
6587
+ // local cors security errors return status 0 / empty string, too. afaik this cannot be
6588
+ // reliably distinguished from an actually empty file for security reasons. feel free
6589
+ // to send a pull request if you are aware of a solution.
6590
+ if (xhr.status !== 0 && xhr.status !== 200)
6591
+ return callback(Error("status " + xhr.status));
6608
6592
 
6609
- // if binary data is expected, make sure that some sort of array is returned, even if
6610
- // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.
6611
- if (options.binary) {
6612
- var buffer = xhr.response;
6613
- if (!buffer) {
6614
- buffer = [];
6615
- for (var i = 0; i < xhr.responseText.length; ++i)
6616
- buffer.push(xhr.responseText.charCodeAt(i) & 255);
6617
- }
6618
- return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer);
6619
- }
6620
- return callback(null, xhr.responseText);
6621
- };
6593
+ // if binary data is expected, make sure that some sort of array is returned, even if
6594
+ // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.
6595
+ if (options.binary) {
6596
+ var buffer = xhr.response;
6597
+ if (!buffer) {
6598
+ buffer = [];
6599
+ for (var i = 0; i < xhr.responseText.length; ++i)
6600
+ buffer.push(xhr.responseText.charCodeAt(i) & 255);
6601
+ }
6602
+ return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer);
6603
+ }
6604
+ return callback(null, xhr.responseText);
6605
+ };
6622
6606
 
6623
- if (options.binary) {
6624
- // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers
6625
- if ("overrideMimeType" in xhr)
6626
- xhr.overrideMimeType("text/plain; charset=x-user-defined");
6627
- xhr.responseType = "arraybuffer";
6628
- }
6607
+ if (options.binary) {
6608
+ // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers
6609
+ if ("overrideMimeType" in xhr)
6610
+ xhr.overrideMimeType("text/plain; charset=x-user-defined");
6611
+ xhr.responseType = "arraybuffer";
6612
+ }
6629
6613
 
6630
- xhr.open("GET", filename);
6631
- xhr.send();
6632
- };
6633
- return fetch_1;
6634
- }
6614
+ xhr.open("GET", filename);
6615
+ xhr.send();
6616
+ };
6635
6617
 
6636
6618
  var path = {};
6637
6619
 
6638
- var hasRequiredPath;
6639
-
6640
- function requirePath () {
6641
- if (hasRequiredPath) return path;
6642
- hasRequiredPath = 1;
6643
- (function (exports) {
6620
+ (function (exports) {
6644
6621
 
6645
- /**
6646
- * A minimal path module to resolve Unix, Windows and URL paths alike.
6647
- * @memberof util
6648
- * @namespace
6649
- */
6650
- var path = exports;
6622
+ /**
6623
+ * A minimal path module to resolve Unix, Windows and URL paths alike.
6624
+ * @memberof util
6625
+ * @namespace
6626
+ */
6627
+ var path = exports;
6651
6628
 
6652
- var isAbsolute =
6653
- /**
6654
- * Tests if the specified path is absolute.
6655
- * @param {string} path Path to test
6656
- * @returns {boolean} `true` if path is absolute
6657
- */
6658
- path.isAbsolute = function isAbsolute(path) {
6659
- return /^(?:\/|\w+:)/.test(path);
6660
- };
6629
+ var isAbsolute =
6630
+ /**
6631
+ * Tests if the specified path is absolute.
6632
+ * @param {string} path Path to test
6633
+ * @returns {boolean} `true` if path is absolute
6634
+ */
6635
+ path.isAbsolute = function isAbsolute(path) {
6636
+ return /^(?:\/|\w+:)/.test(path);
6637
+ };
6661
6638
 
6662
- var normalize =
6663
- /**
6664
- * Normalizes the specified path.
6665
- * @param {string} path Path to normalize
6666
- * @returns {string} Normalized path
6667
- */
6668
- path.normalize = function normalize(path) {
6669
- path = path.replace(/\\/g, "/")
6670
- .replace(/\/{2,}/g, "/");
6671
- var parts = path.split("/"),
6672
- absolute = isAbsolute(path),
6673
- prefix = "";
6674
- if (absolute)
6675
- prefix = parts.shift() + "/";
6676
- for (var i = 0; i < parts.length;) {
6677
- if (parts[i] === "..") {
6678
- if (i > 0 && parts[i - 1] !== "..")
6679
- parts.splice(--i, 2);
6680
- else if (absolute)
6681
- parts.splice(i, 1);
6682
- else
6683
- ++i;
6684
- } else if (parts[i] === ".")
6685
- parts.splice(i, 1);
6686
- else
6687
- ++i;
6688
- }
6689
- return prefix + parts.join("/");
6690
- };
6639
+ var normalize =
6640
+ /**
6641
+ * Normalizes the specified path.
6642
+ * @param {string} path Path to normalize
6643
+ * @returns {string} Normalized path
6644
+ */
6645
+ path.normalize = function normalize(path) {
6646
+ path = path.replace(/\\/g, "/")
6647
+ .replace(/\/{2,}/g, "/");
6648
+ var parts = path.split("/"),
6649
+ absolute = isAbsolute(path),
6650
+ prefix = "";
6651
+ if (absolute)
6652
+ prefix = parts.shift() + "/";
6653
+ for (var i = 0; i < parts.length;) {
6654
+ if (parts[i] === "..") {
6655
+ if (i > 0 && parts[i - 1] !== "..")
6656
+ parts.splice(--i, 2);
6657
+ else if (absolute)
6658
+ parts.splice(i, 1);
6659
+ else
6660
+ ++i;
6661
+ } else if (parts[i] === ".")
6662
+ parts.splice(i, 1);
6663
+ else
6664
+ ++i;
6665
+ }
6666
+ return prefix + parts.join("/");
6667
+ };
6691
6668
 
6692
- /**
6693
- * Resolves the specified include path against the specified origin path.
6694
- * @param {string} originPath Path to the origin file
6695
- * @param {string} includePath Include path relative to origin path
6696
- * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized
6697
- * @returns {string} Path to the include file
6698
- */
6699
- path.resolve = function resolve(originPath, includePath, alreadyNormalized) {
6700
- if (!alreadyNormalized)
6701
- includePath = normalize(includePath);
6702
- if (isAbsolute(includePath))
6703
- return includePath;
6704
- if (!alreadyNormalized)
6705
- originPath = normalize(originPath);
6706
- return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath;
6707
- };
6708
- } (path));
6709
- return path;
6710
- }
6669
+ /**
6670
+ * Resolves the specified include path against the specified origin path.
6671
+ * @param {string} originPath Path to the origin file
6672
+ * @param {string} includePath Include path relative to origin path
6673
+ * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized
6674
+ * @returns {string} Path to the include file
6675
+ */
6676
+ path.resolve = function resolve(originPath, includePath, alreadyNormalized) {
6677
+ if (!alreadyNormalized)
6678
+ includePath = normalize(includePath);
6679
+ if (isAbsolute(includePath))
6680
+ return includePath;
6681
+ if (!alreadyNormalized)
6682
+ originPath = normalize(originPath);
6683
+ return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath;
6684
+ };
6685
+ } (path));
6711
6686
 
6712
6687
  var types = {};
6713
6688
 
@@ -10297,9 +10272,9 @@ function requireUtil () {
10297
10272
  var Type, // cyclic
10298
10273
  Enum;
10299
10274
 
10300
- util.codegen = requireCodegen();
10301
- util.fetch = requireFetch();
10302
- util.path = requirePath();
10275
+ util.codegen = codegen_1;
10276
+ util.fetch = fetch_1;
10277
+ util.path = path;
10303
10278
 
10304
10279
  /**
10305
10280
  * Node's fs module if available.