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:
51
node_modules/yaml/dist/schema/yaml-1.1/set.js
generated
vendored
51
node_modules/yaml/dist/schema/yaml-1.1/set.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var Node = require('../../nodes/Node.js');
|
||||
var identity = require('../../nodes/identity.js');
|
||||
var Pair = require('../../nodes/Pair.js');
|
||||
var YAMLMap = require('../../nodes/YAMLMap.js');
|
||||
|
||||
@@ -11,7 +11,7 @@ class YAMLSet extends YAMLMap.YAMLMap {
|
||||
}
|
||||
add(key) {
|
||||
let pair;
|
||||
if (Node.isPair(key))
|
||||
if (identity.isPair(key))
|
||||
pair = key;
|
||||
else if (key &&
|
||||
typeof key === 'object' &&
|
||||
@@ -31,8 +31,8 @@ class YAMLSet extends YAMLMap.YAMLMap {
|
||||
*/
|
||||
get(key, keepPair) {
|
||||
const pair = YAMLMap.findPair(this.items, key);
|
||||
return !keepPair && Node.isPair(pair)
|
||||
? Node.isScalar(pair.key)
|
||||
return !keepPair && identity.isPair(pair)
|
||||
? identity.isScalar(pair.key)
|
||||
? pair.key.value
|
||||
: pair.key
|
||||
: pair;
|
||||
@@ -59,28 +59,9 @@ class YAMLSet extends YAMLMap.YAMLMap {
|
||||
else
|
||||
throw new Error('Set items must all have null values');
|
||||
}
|
||||
}
|
||||
YAMLSet.tag = 'tag:yaml.org,2002:set';
|
||||
const set = {
|
||||
collection: 'map',
|
||||
identify: value => value instanceof Set,
|
||||
nodeClass: YAMLSet,
|
||||
default: false,
|
||||
tag: 'tag:yaml.org,2002:set',
|
||||
resolve(map, onError) {
|
||||
if (Node.isMap(map)) {
|
||||
if (map.hasAllNullValues(true))
|
||||
return Object.assign(new YAMLSet(), map);
|
||||
else
|
||||
onError('Set items must all have null values');
|
||||
}
|
||||
else
|
||||
onError('Expected a mapping for this tag');
|
||||
return map;
|
||||
},
|
||||
createNode(schema, iterable, ctx) {
|
||||
static from(schema, iterable, ctx) {
|
||||
const { replacer } = ctx;
|
||||
const set = new YAMLSet(schema);
|
||||
const set = new this(schema);
|
||||
if (iterable && Symbol.iterator in Object(iterable))
|
||||
for (let value of iterable) {
|
||||
if (typeof replacer === 'function')
|
||||
@@ -89,6 +70,26 @@ const set = {
|
||||
}
|
||||
return set;
|
||||
}
|
||||
}
|
||||
YAMLSet.tag = 'tag:yaml.org,2002:set';
|
||||
const set = {
|
||||
collection: 'map',
|
||||
identify: value => value instanceof Set,
|
||||
nodeClass: YAMLSet,
|
||||
default: false,
|
||||
tag: 'tag:yaml.org,2002:set',
|
||||
createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
|
||||
resolve(map, onError) {
|
||||
if (identity.isMap(map)) {
|
||||
if (map.hasAllNullValues(true))
|
||||
return Object.assign(new YAMLSet(), map);
|
||||
else
|
||||
onError('Set items must all have null values');
|
||||
}
|
||||
else
|
||||
onError('Expected a mapping for this tag');
|
||||
return map;
|
||||
}
|
||||
};
|
||||
|
||||
exports.YAMLSet = YAMLSet;
|
||||
|
||||
Reference in New Issue
Block a user