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:
14
node_modules/yaml/dist/compose/compose-scalar.js
generated
vendored
14
node_modules/yaml/dist/compose/compose-scalar.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var Node = require('../nodes/Node.js');
|
||||
var identity = require('../nodes/identity.js');
|
||||
var Scalar = require('../nodes/Scalar.js');
|
||||
var resolveBlockScalar = require('./resolve-block-scalar.js');
|
||||
var resolveFlowScalar = require('./resolve-flow-scalar.js');
|
||||
@@ -16,11 +16,11 @@ function composeScalar(ctx, token, tagToken, onError) {
|
||||
? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError)
|
||||
: token.type === 'scalar'
|
||||
? findScalarTagByTest(ctx, value, token, onError)
|
||||
: ctx.schema[Node.SCALAR];
|
||||
: ctx.schema[identity.SCALAR];
|
||||
let scalar;
|
||||
try {
|
||||
const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);
|
||||
scalar = Node.isScalar(res) ? res : new Scalar.Scalar(res);
|
||||
scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);
|
||||
}
|
||||
catch (error) {
|
||||
const msg = error instanceof Error ? error.message : String(error);
|
||||
@@ -41,7 +41,7 @@ function composeScalar(ctx, token, tagToken, onError) {
|
||||
}
|
||||
function findScalarTagByName(schema, value, tagName, tagToken, onError) {
|
||||
if (tagName === '!')
|
||||
return schema[Node.SCALAR]; // non-specific tag
|
||||
return schema[identity.SCALAR]; // non-specific tag
|
||||
const matchWithTest = [];
|
||||
for (const tag of schema.tags) {
|
||||
if (!tag.collection && tag.tag === tagName) {
|
||||
@@ -62,13 +62,13 @@ function findScalarTagByName(schema, value, tagName, tagToken, onError) {
|
||||
return kt;
|
||||
}
|
||||
onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');
|
||||
return schema[Node.SCALAR];
|
||||
return schema[identity.SCALAR];
|
||||
}
|
||||
function findScalarTagByTest({ directives, schema }, value, token, onError) {
|
||||
const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[Node.SCALAR];
|
||||
const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[identity.SCALAR];
|
||||
if (schema.compat) {
|
||||
const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??
|
||||
schema[Node.SCALAR];
|
||||
schema[identity.SCALAR];
|
||||
if (tag.tag !== compat.tag) {
|
||||
const ts = directives.tagString(tag.tag);
|
||||
const cs = directives.tagString(compat.tag);
|
||||
|
||||
Reference in New Issue
Block a user