@@ -116116,7 +116116,7 @@ function isInterestingFile(path) {
116116116116}
116117116117
116118116118;// CONCATENATED MODULE: ./node_modules/js-yaml/dist/js-yaml.mjs
116119- /*! js-yaml 5.1 .0 https://github.com/nodeca/js-yaml @license MIT */
116119+ /*! js-yaml 5.2 .0 https://github.com/nodeca/js-yaml @license MIT */
116120116120//#region src/tag.ts
116121116121var NOT_RESOLVED = Symbol("NOT_RESOLVED");
116122116122var MERGE_KEY = Symbol("MERGE_KEY");
@@ -116358,7 +116358,7 @@ var intCoreTag = defineScalarTag("tag:yaml.org,2002:int", {
116358116358 ..."0123456789"
116359116359 ],
116360116360 resolve: resolveYamlInteger$2,
116361- identify: (object) => Object.prototype.toString.call (object) === "[object Number]" && object % 1 === 0 && !Object.is(object, -0),
116361+ identify: (object) => Number.isInteger (object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0 ,
116362116362 represent: (object) => object.toString(10)
116363116363});
116364116364//#endregion
@@ -116388,7 +116388,7 @@ var intJsonTag = defineScalarTag("tag:yaml.org,2002:int", {
116388116388 implicit: true,
116389116389 implicitFirstChars: ["-", ..."0123456789"],
116390116390 resolve: resolveYamlInteger$1,
116391- identify: (object) => Object.prototype.toString.call (object) === "[object Number]" && object % 1 === 0 && !Object.is(object, -0),
116391+ identify: (object) => Number.isInteger (object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0 ,
116392116392 represent: (object) => object.toString(10)
116393116393});
116394116394//#endregion
@@ -116424,7 +116424,7 @@ var intYaml11Tag = defineScalarTag("tag:yaml.org,2002:int", {
116424116424 ..."0123456789"
116425116425 ],
116426116426 resolve: resolveYamlInteger,
116427- identify: (object) => Object.prototype.toString.call (object) === "[object Number]" && object % 1 === 0 && !Object.is(object, -0),
116427+ identify: (object) => Number.isInteger (object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0 ,
116428116428 represent: (object) => object.toString(10)
116429116429});
116430116430//#endregion
@@ -116459,7 +116459,7 @@ var floatCoreTag = defineScalarTag("tag:yaml.org,2002:float", {
116459116459 ..."0123456789"
116460116460 ],
116461116461 resolve: resolveYamlFloat$2,
116462- identify: (object) => Object.prototype.toString.call( object) === "[object Number] " && (object % 1 !== 0 || Object.is(object, -0)),
116462+ identify: (object) => typeof object === "number " && (!Number.isInteger( object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0 ),
116463116463 represent: representYamlFloat$2
116464116464});
116465116465//#endregion
@@ -116494,7 +116494,7 @@ var floatJsonTag = defineScalarTag("tag:yaml.org,2002:float", {
116494116494 implicit: true,
116495116495 implicitFirstChars: ["-", ..."0123456789"],
116496116496 resolve: resolveYamlFloat$1,
116497- identify: (object) => Object.prototype.toString.call( object) === "[object Number] " && (object % 1 !== 0 || Object.is(object, -0)),
116497+ identify: (object) => typeof object === "number " && (!Number.isInteger( object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0 ),
116498116498 represent: representYamlFloat$1
116499116499});
116500116500//#endregion
@@ -116533,7 +116533,7 @@ var floatYaml11Tag = defineScalarTag("tag:yaml.org,2002:float", {
116533116533 ..."0123456789"
116534116534 ],
116535116535 resolve: resolveYamlFloat,
116536- identify: (object) => Object.prototype.toString.call( object) === "[object Number] " && (object % 1 !== 0 || Object.is(object, -0)),
116536+ identify: (object) => typeof object === "number " && (!Number.isInteger( object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0 ),
116537116537 represent: representYamlFloat
116538116538});
116539116539//#endregion
@@ -117254,7 +117254,8 @@ var DEFAULT_CONSTRUCTOR_OPTIONS = {
117254117254 filename: "",
117255117255 schema: CORE_SCHEMA,
117256117256 json: false,
117257- maxMergeSeqLength: 20
117257+ maxTotalMergeKeys: 1e4,
117258+ maxAliases: -1
117258117259};
117259117260function eventPosition$1(event) {
117260117261 if ("tagStart" in event && event.tagStart !== NO_RANGE$2) return event.tagStart;
@@ -117342,6 +117343,7 @@ function isMappingTag(tag) {
117342117343}
117343117344function mergeKeys(state, frame, source, sourceTag) {
117344117345 for (const sourceKey of sourceTag.keys(source)) {
117346+ if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`);
117345117347 if (frame.tag.has(frame.value, sourceKey)) continue;
117346117348 const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey));
117347117349 if (err) throwError$1(state, err);
@@ -117351,14 +117353,8 @@ function mergeKeys(state, frame, source, sourceTag) {
117351117353function mergeSource(state, frame, source, sourceTag) {
117352117354 state.position = frame.keyPosition;
117353117355 if (isMappingTag(sourceTag)) mergeKeys(state, frame, source, sourceTag);
117354- else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) {
117355- const seen = /* @__PURE__ */ new Set();
117356- for (const element of source) {
117357- if (seen.has(element)) continue;
117358- seen.add(element);
117359- mergeKeys(state, frame, element, frame.tag);
117360- }
117361- } else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
117356+ else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) for (const element of source) mergeKeys(state, frame, element, frame.tag);
117357+ else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
117362117358}
117363117359function addMappingValue(state, frame, key, value, tag) {
117364117360 state.position = frame.keyPosition;
@@ -117379,7 +117375,6 @@ function addValue(state, value, tag) {
117379117375 } else if (frame.kind === "sequence") {
117380117376 if (frame.merge) {
117381117377 if (!isMappingTag(tag)) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
117382- if (frame.index >= state.maxMergeSeqLength) throwError$1(state, `merge sequence length exceeded maxMergeSeqLength (${state.maxMergeSeqLength})`);
117383117378 }
117384117379 const err = frame.tag.addItem(frame.value, value, frame.index++);
117385117380 if (err) throwError$1(state, err);
@@ -117416,14 +117411,17 @@ function constructFromEvents(events, options) {
117416117411 position: 0,
117417117412 frames: [],
117418117413 anchors: /* @__PURE__ */ new Map(),
117419- tagHandlers: Object.create(null)
117414+ tagHandlers: Object.create(null),
117415+ totalMergeKeys: 0,
117416+ aliasCount: 0
117420117417 };
117421117418 while (state.eventIndex < state.events.length) {
117422117419 const event = state.events[state.eventIndex++];
117423117420 state.position = eventPosition$1(event);
117424117421 switch (event.type) {
117425117422 case 1:
117426117423 state.anchors = /* @__PURE__ */ new Map();
117424+ state.aliasCount = 0;
117427117425 state.tagHandlers = Object.create(null);
117428117426 for (const directive of event.directives) if (directive.kind === "tag") state.tagHandlers[directive.handle] = directive.prefix;
117429117427 state.frames.push({
@@ -117474,6 +117472,7 @@ function constructFromEvents(events, options) {
117474117472 break;
117475117473 }
117476117474 case 5: {
117475+ if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) throwError$1(state, `aliases exceeded maxAliases (${state.maxAliases})`);
117477117476 const name = state.source.slice(event.anchorStart, event.anchorEnd);
117478117477 const anchor = state.anchors.get(name);
117479117478 if (!anchor) throwError$1(state, `unidentified alias "${name}"`);
0 commit comments