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/dist/doc/createNode.js
generated
vendored
22
node_modules/yaml/dist/doc/createNode.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var Alias = require('../nodes/Alias.js');
|
||||
var Node = require('../nodes/Node.js');
|
||||
var identity = require('../nodes/identity.js');
|
||||
var Scalar = require('../nodes/Scalar.js');
|
||||
|
||||
const defaultTagPrefix = 'tag:yaml.org,2002:';
|
||||
@@ -16,12 +16,12 @@ function findTagObject(value, tagName, tags) {
|
||||
return tags.find(t => t.identify?.(value) && !t.format);
|
||||
}
|
||||
function createNode(value, tagName, ctx) {
|
||||
if (Node.isDocument(value))
|
||||
if (identity.isDocument(value))
|
||||
value = value.contents;
|
||||
if (Node.isNode(value))
|
||||
if (identity.isNode(value))
|
||||
return value;
|
||||
if (Node.isPair(value)) {
|
||||
const map = ctx.schema[Node.MAP].createNode?.(ctx.schema, null, ctx);
|
||||
if (identity.isPair(value)) {
|
||||
const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);
|
||||
map.items.push(value);
|
||||
return map;
|
||||
}
|
||||
@@ -65,10 +65,10 @@ function createNode(value, tagName, ctx) {
|
||||
}
|
||||
tagObj =
|
||||
value instanceof Map
|
||||
? schema[Node.MAP]
|
||||
? schema[identity.MAP]
|
||||
: Symbol.iterator in Object(value)
|
||||
? schema[Node.SEQ]
|
||||
: schema[Node.MAP];
|
||||
? schema[identity.SEQ]
|
||||
: schema[identity.MAP];
|
||||
}
|
||||
if (onTagObj) {
|
||||
onTagObj(tagObj);
|
||||
@@ -76,9 +76,13 @@ function createNode(value, tagName, ctx) {
|
||||
}
|
||||
const node = tagObj?.createNode
|
||||
? tagObj.createNode(ctx.schema, value, ctx)
|
||||
: new Scalar.Scalar(value);
|
||||
: typeof tagObj?.nodeClass?.from === 'function'
|
||||
? tagObj.nodeClass.from(ctx.schema, value, ctx)
|
||||
: new Scalar.Scalar(value);
|
||||
if (tagName)
|
||||
node.tag = tagName;
|
||||
else if (!tagObj.default)
|
||||
node.tag = tagObj.tag;
|
||||
if (ref)
|
||||
ref.node = node;
|
||||
return node;
|
||||
|
||||
Reference in New Issue
Block a user