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/doc/Document.js
generated
vendored
22
node_modules/yaml/browser/dist/doc/Document.js
generated
vendored
@@ -1,10 +1,9 @@
|
||||
import { Alias } from '../nodes/Alias.js';
|
||||
import { isEmptyPath, collectionFromPath } from '../nodes/Collection.js';
|
||||
import { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/Node.js';
|
||||
import { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/identity.js';
|
||||
import { Pair } from '../nodes/Pair.js';
|
||||
import { toJS } from '../nodes/toJS.js';
|
||||
import { Schema } from '../schema/Schema.js';
|
||||
import { stringify } from '../stringify/stringify.js';
|
||||
import { stringifyDocument } from '../stringify/stringifyDocument.js';
|
||||
import { anchorNames, findNewAnchor, createNodeAnchors } from './anchors.js';
|
||||
import { applyReviver } from './applyReviver.js';
|
||||
@@ -49,11 +48,9 @@ class Document {
|
||||
else
|
||||
this.directives = new Directives({ version });
|
||||
this.setSchema(version, options);
|
||||
if (value === undefined)
|
||||
this.contents = null;
|
||||
else {
|
||||
this.contents = this.createNode(value, _replacer, options);
|
||||
}
|
||||
// @ts-expect-error We can't really know that this matches Contents.
|
||||
this.contents =
|
||||
value === undefined ? null : this.createNode(value, _replacer, options);
|
||||
}
|
||||
/**
|
||||
* Create a deep copy of this Document and its contents.
|
||||
@@ -72,6 +69,7 @@ class Document {
|
||||
if (this.directives)
|
||||
copy.directives = this.directives.clone();
|
||||
copy.schema = this.schema.clone();
|
||||
// @ts-expect-error We can't really know that this matches Contents.
|
||||
copy.contents = isNode(this.contents)
|
||||
? this.contents.clone(copy.schema)
|
||||
: this.contents;
|
||||
@@ -167,6 +165,7 @@ class Document {
|
||||
if (isEmptyPath(path)) {
|
||||
if (this.contents == null)
|
||||
return false;
|
||||
// @ts-expect-error Presumed impossible if Strict extends false
|
||||
this.contents = null;
|
||||
return true;
|
||||
}
|
||||
@@ -218,6 +217,7 @@ class Document {
|
||||
*/
|
||||
set(key, value) {
|
||||
if (this.contents == null) {
|
||||
// @ts-expect-error We can't really know that this matches Contents.
|
||||
this.contents = collectionFromPath(this.schema, [key], value);
|
||||
}
|
||||
else if (assertCollection(this.contents)) {
|
||||
@@ -229,9 +229,12 @@ class Document {
|
||||
* boolean to add/remove the item from the set.
|
||||
*/
|
||||
setIn(path, value) {
|
||||
if (isEmptyPath(path))
|
||||
if (isEmptyPath(path)) {
|
||||
// @ts-expect-error We can't really know that this matches Contents.
|
||||
this.contents = value;
|
||||
}
|
||||
else if (this.contents == null) {
|
||||
// @ts-expect-error We can't really know that this matches Contents.
|
||||
this.contents = collectionFromPath(this.schema, Array.from(path), value);
|
||||
}
|
||||
else if (assertCollection(this.contents)) {
|
||||
@@ -291,8 +294,7 @@ class Document {
|
||||
keep: !json,
|
||||
mapAsMap: mapAsMap === true,
|
||||
mapKeyWarned: false,
|
||||
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100,
|
||||
stringify
|
||||
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
|
||||
};
|
||||
const res = toJS(this.contents, jsonArg ?? '', ctx);
|
||||
if (typeof onAnchor === 'function')
|
||||
|
||||
2
node_modules/yaml/browser/dist/doc/anchors.js
generated
vendored
2
node_modules/yaml/browser/dist/doc/anchors.js
generated
vendored
@@ -1,4 +1,4 @@
|
||||
import { isScalar, isCollection } from '../nodes/Node.js';
|
||||
import { isScalar, isCollection } from '../nodes/identity.js';
|
||||
import { visit } from '../visit.js';
|
||||
|
||||
/**
|
||||
|
||||
8
node_modules/yaml/browser/dist/doc/createNode.js
generated
vendored
8
node_modules/yaml/browser/dist/doc/createNode.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
import { Alias } from '../nodes/Alias.js';
|
||||
import { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/Node.js';
|
||||
import { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/identity.js';
|
||||
import { Scalar } from '../nodes/Scalar.js';
|
||||
|
||||
const defaultTagPrefix = 'tag:yaml.org,2002:';
|
||||
@@ -74,9 +74,13 @@ function createNode(value, tagName, ctx) {
|
||||
}
|
||||
const node = tagObj?.createNode
|
||||
? tagObj.createNode(ctx.schema, value, ctx)
|
||||
: new Scalar(value);
|
||||
: typeof tagObj?.nodeClass?.from === 'function'
|
||||
? tagObj.nodeClass.from(ctx.schema, value, ctx)
|
||||
: new Scalar(value);
|
||||
if (tagName)
|
||||
node.tag = tagName;
|
||||
else if (!tagObj.default)
|
||||
node.tag = tagObj.tag;
|
||||
if (ref)
|
||||
ref.node = node;
|
||||
return node;
|
||||
|
||||
15
node_modules/yaml/browser/dist/doc/directives.js
generated
vendored
15
node_modules/yaml/browser/dist/doc/directives.js
generated
vendored
@@ -1,4 +1,4 @@
|
||||
import { isNode } from '../nodes/Node.js';
|
||||
import { isNode } from '../nodes/identity.js';
|
||||
import { visit } from '../visit.js';
|
||||
|
||||
const escapeChars = {
|
||||
@@ -116,12 +116,19 @@ class Directives {
|
||||
onError('Verbatim tags must end with a >');
|
||||
return verbatim;
|
||||
}
|
||||
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/);
|
||||
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
|
||||
if (!suffix)
|
||||
onError(`The ${source} tag has no suffix`);
|
||||
const prefix = this.tags[handle];
|
||||
if (prefix)
|
||||
return prefix + decodeURIComponent(suffix);
|
||||
if (prefix) {
|
||||
try {
|
||||
return prefix + decodeURIComponent(suffix);
|
||||
}
|
||||
catch (error) {
|
||||
onError(String(error));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (handle === '!')
|
||||
return source; // local tag
|
||||
onError(`Could not resolve tag: ${source}`);
|
||||
|
||||
Reference in New Issue
Block a user