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:
20
node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
generated
vendored
20
node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
generated
vendored
@@ -2,7 +2,7 @@ import { Scalar } from '../../nodes/Scalar.js';
|
||||
import { stringifyString } from '../../stringify/stringifyString.js';
|
||||
|
||||
const binary = {
|
||||
identify: value => value instanceof Uint8Array,
|
||||
identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array
|
||||
default: false,
|
||||
tag: 'tag:yaml.org,2002:binary',
|
||||
/**
|
||||
@@ -14,10 +14,7 @@ const binary = {
|
||||
* document.querySelector('#photo').src = URL.createObjectURL(blob)
|
||||
*/
|
||||
resolve(src, onError) {
|
||||
if (typeof Buffer === 'function') {
|
||||
return Buffer.from(src, 'base64');
|
||||
}
|
||||
else if (typeof atob === 'function') {
|
||||
if (typeof atob === 'function') {
|
||||
// On IE 11, atob() can't handle newlines
|
||||
const str = atob(src.replace(/[\n\r]/g, ''));
|
||||
const buffer = new Uint8Array(str.length);
|
||||
@@ -31,15 +28,11 @@ const binary = {
|
||||
}
|
||||
},
|
||||
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
|
||||
if (!value)
|
||||
return '';
|
||||
const buf = value; // checked earlier by binary.identify()
|
||||
let str;
|
||||
if (typeof Buffer === 'function') {
|
||||
str =
|
||||
buf instanceof Buffer
|
||||
? buf.toString('base64')
|
||||
: Buffer.from(buf.buffer).toString('base64');
|
||||
}
|
||||
else if (typeof btoa === 'function') {
|
||||
if (typeof btoa === 'function') {
|
||||
let s = '';
|
||||
for (let i = 0; i < buf.length; ++i)
|
||||
s += String.fromCharCode(buf[i]);
|
||||
@@ -48,8 +41,7 @@ const binary = {
|
||||
else {
|
||||
throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
|
||||
}
|
||||
if (!type)
|
||||
type = Scalar.BLOCK_LITERAL;
|
||||
type ?? (type = Scalar.BLOCK_LITERAL);
|
||||
if (type !== Scalar.QUOTE_DOUBLE) {
|
||||
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
||||
const n = Math.ceil(str.length / lineWidth);
|
||||
|
||||
Reference in New Issue
Block a user