mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-12-09 22:30:41 -07:00
node_modules: upgrade
This commit is contained in:
22
node_modules/yaml/browser/dist/compose/compose-collection.js
generated
vendored
22
node_modules/yaml/browser/dist/compose/compose-collection.js
generated
vendored
@@ -23,10 +23,23 @@ function resolveCollection(CN, ctx, token, onError, tagName, tag) {
|
||||
coll.tag = tagName;
|
||||
return coll;
|
||||
}
|
||||
function composeCollection(CN, ctx, token, tagToken, onError) {
|
||||
function composeCollection(CN, ctx, token, props, onError) {
|
||||
const tagToken = props.tag;
|
||||
const tagName = !tagToken
|
||||
? null
|
||||
: ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));
|
||||
if (token.type === 'block-seq') {
|
||||
const { anchor, newlineAfterProp: nl } = props;
|
||||
const lastProp = anchor && tagToken
|
||||
? anchor.offset > tagToken.offset
|
||||
? anchor
|
||||
: tagToken
|
||||
: (anchor ?? tagToken);
|
||||
if (lastProp && (!nl || nl.offset < lastProp.offset)) {
|
||||
const message = 'Missing newline after block sequence props';
|
||||
onError(lastProp, 'MISSING_CHAR', message);
|
||||
}
|
||||
}
|
||||
const expType = token.type === 'block-map'
|
||||
? 'map'
|
||||
: token.type === 'block-seq'
|
||||
@@ -40,8 +53,7 @@ function composeCollection(CN, ctx, token, tagToken, onError) {
|
||||
!tagName ||
|
||||
tagName === '!' ||
|
||||
(tagName === YAMLMap.tagName && expType === 'map') ||
|
||||
(tagName === YAMLSeq.tagName && expType === 'seq') ||
|
||||
!expType) {
|
||||
(tagName === YAMLSeq.tagName && expType === 'seq')) {
|
||||
return resolveCollection(CN, ctx, token, onError, tagName);
|
||||
}
|
||||
let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);
|
||||
@@ -52,8 +64,8 @@ function composeCollection(CN, ctx, token, tagToken, onError) {
|
||||
tag = kt;
|
||||
}
|
||||
else {
|
||||
if (kt?.collection) {
|
||||
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
|
||||
if (kt) {
|
||||
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);
|
||||
}
|
||||
else {
|
||||
onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);
|
||||
|
||||
Reference in New Issue
Block a user