@rspress/shared 2.1.0-beta.2 → 2.1.1

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.
Files changed (2) hide show
  1. package/dist/gray-matter.js +119 -107
  2. package/package.json +2 -2
@@ -157,7 +157,7 @@ moduleFactories.add({
157
157
  }
158
158
  },
159
159
  "../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.js" (module, exports) {
160
- const yaml = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/index.js");
160
+ const yaml = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/index.js");
161
161
  const engines = exports = module.exports;
162
162
  engines.yaml = {
163
163
  parse: yaml.safeLoad.bind(yaml),
@@ -319,41 +319,41 @@ moduleFactories.add({
319
319
  return null != val && ('object' == typeof val || 'function' == typeof val);
320
320
  };
321
321
  },
322
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/index.js" (module) {
323
- var yaml = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml.js");
322
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/index.js" (module) {
323
+ var yaml = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml.js");
324
324
  module.exports = yaml;
325
325
  },
326
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml.js" (module) {
327
- var loader = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/loader.js");
328
- var dumper = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/dumper.js");
326
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml.js" (module) {
327
+ var loader = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/loader.js");
328
+ var dumper = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/dumper.js");
329
329
  function deprecated(name) {
330
330
  return function() {
331
331
  throw new Error('Function ' + name + ' is deprecated and cannot be used.');
332
332
  };
333
333
  }
334
- module.exports.Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
335
- module.exports.Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js");
336
- module.exports.FAILSAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js");
337
- module.exports.JSON_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.js");
338
- module.exports.CORE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.js");
339
- module.exports.DEFAULT_SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
340
- module.exports.DEFAULT_FULL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
334
+ module.exports.Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
335
+ module.exports.Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js");
336
+ module.exports.FAILSAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js");
337
+ module.exports.JSON_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/json.js");
338
+ module.exports.CORE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/core.js");
339
+ module.exports.DEFAULT_SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
340
+ module.exports.DEFAULT_FULL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
341
341
  module.exports.load = loader.load;
342
342
  module.exports.loadAll = loader.loadAll;
343
343
  module.exports.safeLoad = loader.safeLoad;
344
344
  module.exports.safeLoadAll = loader.safeLoadAll;
345
345
  module.exports.dump = dumper.dump;
346
346
  module.exports.safeDump = dumper.safeDump;
347
- module.exports.YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js");
348
- module.exports.MINIMAL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js");
349
- module.exports.SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
350
- module.exports.DEFAULT_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
347
+ module.exports.YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js");
348
+ module.exports.MINIMAL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js");
349
+ module.exports.SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
350
+ module.exports.DEFAULT_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
351
351
  module.exports.scan = deprecated('scan');
352
352
  module.exports.parse = deprecated('parse');
353
353
  module.exports.compose = deprecated('compose');
354
354
  module.exports.addConstructor = deprecated('addConstructor');
355
355
  },
356
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js" (module) {
356
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js" (module) {
357
357
  function isNothing(subject) {
358
358
  return null == subject;
359
359
  }
@@ -393,11 +393,11 @@ moduleFactories.add({
393
393
  module.exports.isNegativeZero = isNegativeZero;
394
394
  module.exports.extend = extend;
395
395
  },
396
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/dumper.js" (module) {
397
- var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js");
398
- var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js");
399
- var DEFAULT_FULL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
400
- var DEFAULT_SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
396
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/dumper.js" (module) {
397
+ var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js");
398
+ var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js");
399
+ var DEFAULT_FULL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
400
+ var DEFAULT_SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
401
401
  var _toString = Object.prototype.toString;
402
402
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
403
403
  var CHAR_TAB = 0x09;
@@ -845,7 +845,7 @@ moduleFactories.add({
845
845
  module.exports.dump = dump;
846
846
  module.exports.safeDump = safeDump;
847
847
  },
848
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js" (module) {
848
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js" (module) {
849
849
  function YAMLException(reason, mark) {
850
850
  Error.call(this);
851
851
  this.name = 'YAMLException';
@@ -865,12 +865,12 @@ moduleFactories.add({
865
865
  };
866
866
  module.exports = YAMLException;
867
867
  },
868
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/loader.js" (module) {
869
- var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js");
870
- var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js");
871
- var Mark = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/mark.js");
872
- var DEFAULT_SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
873
- var DEFAULT_FULL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
868
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/loader.js" (module) {
869
+ var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js");
870
+ var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js");
871
+ var Mark = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/mark.js");
872
+ var DEFAULT_SAFE_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js");
873
+ var DEFAULT_FULL_SCHEMA = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js");
874
874
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
875
875
  var CONTEXT_FLOW_IN = 1;
876
876
  var CONTEXT_FLOW_OUT = 2;
@@ -946,6 +946,7 @@ moduleFactories.add({
946
946
  this.legacy = options['legacy'] || false;
947
947
  this.json = options['json'] || false;
948
948
  this.listener = options['listener'] || null;
949
+ this.maxTotalMergeKeys = 'number' == typeof options['maxTotalMergeKeys'] ? options['maxTotalMergeKeys'] : 10000;
949
950
  this.implicitTypes = this.schema.compiledImplicit;
950
951
  this.typeMap = this.schema.compiledTypeMap;
951
952
  this.length = input.length;
@@ -953,6 +954,7 @@ moduleFactories.add({
953
954
  this.line = 0;
954
955
  this.lineStart = 0;
955
956
  this.lineIndent = 0;
957
+ this.totalMergeKeys = 0;
956
958
  this.documents = [];
957
959
  }
958
960
  function generateError(state, message) {
@@ -1001,12 +1003,18 @@ moduleFactories.add({
1001
1003
  state.result += _result;
1002
1004
  }
1003
1005
  }
1006
+ function chargeMergeWork(state) {
1007
+ state.totalMergeKeys += 1;
1008
+ if (-1 !== state.maxTotalMergeKeys && state.totalMergeKeys > state.maxTotalMergeKeys) throwError(state, 'merge keys exceeded maxTotalMergeKeys (' + state.maxTotalMergeKeys + ')');
1009
+ }
1004
1010
  function mergeMappings(state, destination, source, overridableKeys) {
1005
1011
  var sourceKeys, key, index, quantity;
1006
1012
  if (!common.isObject(source)) throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
1013
+ chargeMergeWork(state);
1007
1014
  sourceKeys = Object.keys(source);
1008
1015
  for(index = 0, quantity = sourceKeys.length; index < quantity; index += 1){
1009
1016
  key = sourceKeys[index];
1017
+ chargeMergeWork(state);
1010
1018
  if (!_hasOwnProperty.call(destination, key)) {
1011
1019
  setProperty(destination, key, source[key]);
1012
1020
  overridableKeys[key] = true;
@@ -1025,8 +1033,10 @@ moduleFactories.add({
1025
1033
  if ('object' == typeof keyNode && '[object Object]' === _class(keyNode)) keyNode = '[object Object]';
1026
1034
  keyNode = String(keyNode);
1027
1035
  if (null === _result) _result = {};
1028
- if ('tag:yaml.org,2002:merge' === keyTag) if (Array.isArray(valueNode)) for(index = 0, quantity = valueNode.length; index < quantity; index += 1)mergeMappings(state, _result, valueNode[index], overridableKeys);
1029
- else mergeMappings(state, _result, valueNode, overridableKeys);
1036
+ if ('tag:yaml.org,2002:merge' === keyTag) if (Array.isArray(valueNode)) {
1037
+ if (valueNode.length > 100) throwError(state, 'abnormal merge sequence size');
1038
+ for(index = 0, quantity = valueNode.length; index < quantity; index += 1)mergeMappings(state, _result, valueNode[index], overridableKeys);
1039
+ } else mergeMappings(state, _result, valueNode, overridableKeys);
1030
1040
  else {
1031
1041
  if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
1032
1042
  state.line = startLine || state.line;
@@ -1680,8 +1690,8 @@ moduleFactories.add({
1680
1690
  module.exports.safeLoadAll = safeLoadAll;
1681
1691
  module.exports.safeLoad = safeLoad;
1682
1692
  },
1683
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/mark.js" (module) {
1684
- var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js");
1693
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/mark.js" (module) {
1694
+ var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js");
1685
1695
  function Mark(name, buffer, position, line, column) {
1686
1696
  this.name = name;
1687
1697
  this.buffer = buffer;
@@ -1729,10 +1739,10 @@ moduleFactories.add({
1729
1739
  };
1730
1740
  module.exports = Mark;
1731
1741
  },
1732
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js" (module) {
1733
- var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js");
1734
- var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js");
1735
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
1742
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js" (module) {
1743
+ var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js");
1744
+ var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js");
1745
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
1736
1746
  function compileList(schema, name, result) {
1737
1747
  var exclude = [];
1738
1748
  schema.include.forEach(function(includedSchema) {
@@ -1802,71 +1812,71 @@ moduleFactories.add({
1802
1812
  };
1803
1813
  module.exports = Schema;
1804
1814
  },
1805
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.js" (module) {
1806
- var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1815
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/core.js" (module) {
1816
+ var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1807
1817
  module.exports = new Schema({
1808
1818
  include: [
1809
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.js")
1819
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/json.js")
1810
1820
  ]
1811
1821
  });
1812
1822
  },
1813
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js" (module) {
1814
- var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1823
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js" (module) {
1824
+ var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1815
1825
  module.exports = Schema.DEFAULT = new Schema({
1816
1826
  include: [
1817
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js")
1827
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js")
1818
1828
  ],
1819
1829
  explicit: [
1820
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"),
1821
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"),
1822
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js")
1830
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"),
1831
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"),
1832
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js")
1823
1833
  ]
1824
1834
  });
1825
1835
  },
1826
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js" (module) {
1827
- var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1836
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js" (module) {
1837
+ var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1828
1838
  module.exports = new Schema({
1829
1839
  include: [
1830
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.js")
1840
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/core.js")
1831
1841
  ],
1832
1842
  implicit: [
1833
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"),
1834
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/merge.js")
1843
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"),
1844
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/merge.js")
1835
1845
  ],
1836
1846
  explicit: [
1837
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/binary.js"),
1838
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/omap.js"),
1839
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js"),
1840
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/set.js")
1847
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/binary.js"),
1848
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/omap.js"),
1849
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js"),
1850
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/set.js")
1841
1851
  ]
1842
1852
  });
1843
1853
  },
1844
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js" (module) {
1845
- var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1854
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js" (module) {
1855
+ var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1846
1856
  module.exports = new Schema({
1847
1857
  explicit: [
1848
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/str.js"),
1849
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/seq.js"),
1850
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/map.js")
1858
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/str.js"),
1859
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/seq.js"),
1860
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/map.js")
1851
1861
  ]
1852
1862
  });
1853
1863
  },
1854
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.js" (module) {
1855
- var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1864
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/json.js" (module) {
1865
+ var Schema = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js");
1856
1866
  module.exports = new Schema({
1857
1867
  include: [
1858
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js")
1868
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js")
1859
1869
  ],
1860
1870
  implicit: [
1861
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/null.js"),
1862
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/bool.js"),
1863
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/int.js"),
1864
- rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/float.js")
1871
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/null.js"),
1872
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/bool.js"),
1873
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/int.js"),
1874
+ rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/float.js")
1865
1875
  ]
1866
1876
  });
1867
1877
  },
1868
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js" (module) {
1869
- var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js");
1878
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js" (module) {
1879
+ var YAMLException = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js");
1870
1880
  var TYPE_CONSTRUCTOR_OPTIONS = [
1871
1881
  'kind',
1872
1882
  'resolve',
@@ -1913,13 +1923,13 @@ moduleFactories.add({
1913
1923
  }
1914
1924
  module.exports = Type;
1915
1925
  },
1916
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/binary.js" (module) {
1926
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/binary.js" (module) {
1917
1927
  var NodeBuffer;
1918
1928
  try {
1919
1929
  var _require = require;
1920
1930
  NodeBuffer = _require('buffer').Buffer;
1921
1931
  } catch (__) {}
1922
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
1932
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
1923
1933
  var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
1924
1934
  function resolveYamlBinary(data) {
1925
1935
  if (null === data) return false;
@@ -1996,8 +2006,8 @@ moduleFactories.add({
1996
2006
  represent: representYamlBinary
1997
2007
  });
1998
2008
  },
1999
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/bool.js" (module) {
2000
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2009
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/bool.js" (module) {
2010
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2001
2011
  function resolveYamlBoolean(data) {
2002
2012
  if (null === data) return false;
2003
2013
  var max = data.length;
@@ -2028,9 +2038,9 @@ moduleFactories.add({
2028
2038
  defaultStyle: 'lowercase'
2029
2039
  });
2030
2040
  },
2031
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/float.js" (module) {
2032
- var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js");
2033
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2041
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/float.js" (module) {
2042
+ var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js");
2043
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2034
2044
  var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
2035
2045
  function resolveYamlFloat(data) {
2036
2046
  if (null === data) return false;
@@ -2102,9 +2112,9 @@ moduleFactories.add({
2102
2112
  defaultStyle: 'lowercase'
2103
2113
  });
2104
2114
  },
2105
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/int.js" (module) {
2106
- var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js");
2107
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2115
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/int.js" (module) {
2116
+ var common = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js");
2117
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2108
2118
  function isHexCode(c) {
2109
2119
  return 0x30 <= c && c <= 0x39 || 0x41 <= c && c <= 0x46 || 0x61 <= c && c <= 0x66;
2110
2120
  }
@@ -2239,7 +2249,7 @@ moduleFactories.add({
2239
2249
  }
2240
2250
  });
2241
2251
  },
2242
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js" (module) {
2252
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js" (module) {
2243
2253
  var esprima;
2244
2254
  try {
2245
2255
  var _require = require;
@@ -2247,7 +2257,7 @@ moduleFactories.add({
2247
2257
  } catch (_) {
2248
2258
  if ("u" > typeof window) esprima = window.esprima;
2249
2259
  }
2250
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2260
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2251
2261
  function resolveJavascriptFunction(data) {
2252
2262
  if (null === data) return false;
2253
2263
  try {
@@ -2286,8 +2296,8 @@ moduleFactories.add({
2286
2296
  represent: representJavascriptFunction
2287
2297
  });
2288
2298
  },
2289
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js" (module) {
2290
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2299
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js" (module) {
2300
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2291
2301
  function resolveJavascriptRegExp(data) {
2292
2302
  if (null === data) return false;
2293
2303
  if (0 === data.length) return false;
@@ -2325,8 +2335,8 @@ moduleFactories.add({
2325
2335
  represent: representJavascriptRegExp
2326
2336
  });
2327
2337
  },
2328
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js" (module) {
2329
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2338
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js" (module) {
2339
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2330
2340
  function resolveJavascriptUndefined() {
2331
2341
  return true;
2332
2342
  }
@@ -2345,8 +2355,8 @@ moduleFactories.add({
2345
2355
  represent: representJavascriptUndefined
2346
2356
  });
2347
2357
  },
2348
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/map.js" (module) {
2349
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2358
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/map.js" (module) {
2359
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2350
2360
  module.exports = new Type('tag:yaml.org,2002:map', {
2351
2361
  kind: 'mapping',
2352
2362
  construct: function(data) {
@@ -2354,8 +2364,8 @@ moduleFactories.add({
2354
2364
  }
2355
2365
  });
2356
2366
  },
2357
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/merge.js" (module) {
2358
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2367
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/merge.js" (module) {
2368
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2359
2369
  function resolveYamlMerge(data) {
2360
2370
  return '<<' === data || null === data;
2361
2371
  }
@@ -2364,8 +2374,8 @@ moduleFactories.add({
2364
2374
  resolve: resolveYamlMerge
2365
2375
  });
2366
2376
  },
2367
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/null.js" (module) {
2368
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2377
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/null.js" (module) {
2378
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2369
2379
  function resolveYamlNull(data) {
2370
2380
  if (null === data) return true;
2371
2381
  var max = data.length;
@@ -2399,13 +2409,13 @@ moduleFactories.add({
2399
2409
  defaultStyle: 'lowercase'
2400
2410
  });
2401
2411
  },
2402
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/omap.js" (module) {
2403
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2412
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/omap.js" (module) {
2413
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2404
2414
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
2405
2415
  var _toString = Object.prototype.toString;
2406
2416
  function resolveYamlOmap(data) {
2407
2417
  if (null === data) return true;
2408
- var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
2418
+ var objectKeys = {}, index, length, pair, pairKey, pairHasKey, object = data;
2409
2419
  for(index = 0, length = object.length; index < length; index += 1){
2410
2420
  pair = object[index];
2411
2421
  pairHasKey = false;
@@ -2413,8 +2423,10 @@ moduleFactories.add({
2413
2423
  for(pairKey in pair)if (_hasOwnProperty.call(pair, pairKey)) if (pairHasKey) return false;
2414
2424
  else pairHasKey = true;
2415
2425
  if (!pairHasKey) return false;
2416
- if (-1 !== objectKeys.indexOf(pairKey)) return false;
2417
- else objectKeys.push(pairKey);
2426
+ if (_hasOwnProperty.call(objectKeys, pairKey)) return false;
2427
+ Object.defineProperty(objectKeys, pairKey, {
2428
+ value: true
2429
+ });
2418
2430
  }
2419
2431
  return true;
2420
2432
  }
@@ -2427,8 +2439,8 @@ moduleFactories.add({
2427
2439
  construct: constructYamlOmap
2428
2440
  });
2429
2441
  },
2430
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js" (module) {
2431
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2442
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js" (module) {
2443
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2432
2444
  var _toString = Object.prototype.toString;
2433
2445
  function resolveYamlPairs(data) {
2434
2446
  if (null === data) return true;
@@ -2466,8 +2478,8 @@ moduleFactories.add({
2466
2478
  construct: constructYamlPairs
2467
2479
  });
2468
2480
  },
2469
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/seq.js" (module) {
2470
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2481
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/seq.js" (module) {
2482
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2471
2483
  module.exports = new Type('tag:yaml.org,2002:seq', {
2472
2484
  kind: 'sequence',
2473
2485
  construct: function(data) {
@@ -2475,8 +2487,8 @@ moduleFactories.add({
2475
2487
  }
2476
2488
  });
2477
2489
  },
2478
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/set.js" (module) {
2479
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2490
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/set.js" (module) {
2491
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2480
2492
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
2481
2493
  function resolveYamlSet(data) {
2482
2494
  if (null === data) return true;
@@ -2495,8 +2507,8 @@ moduleFactories.add({
2495
2507
  construct: constructYamlSet
2496
2508
  });
2497
2509
  },
2498
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/str.js" (module) {
2499
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2510
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/str.js" (module) {
2511
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2500
2512
  module.exports = new Type('tag:yaml.org,2002:str', {
2501
2513
  kind: 'scalar',
2502
2514
  construct: function(data) {
@@ -2504,8 +2516,8 @@ moduleFactories.add({
2504
2516
  }
2505
2517
  });
2506
2518
  },
2507
- "../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js" (module) {
2508
- var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js");
2519
+ "../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js" (module) {
2520
+ var Type = rspackRequire("../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js");
2509
2521
  var YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
2510
2522
  var YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
2511
2523
  function resolveYamlTimestamp(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "2.1.0-beta.2",
3
+ "version": "2.1.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/web-infra-dev/rspress.git",
@@ -58,7 +58,7 @@
58
58
  "github-slugger": "^2.0.0",
59
59
  "gray-matter": "4.0.3",
60
60
  "lodash-es": "^4.18.1",
61
- "medium-zoom": "1.1.0",
61
+ "medium-zoom": "1.1.2",
62
62
  "rimraf": "^6.1.3",
63
63
  "rsbuild-plugin-publint": "^1.0.0",
64
64
  "typescript": "^6.0.3"