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:
18
node_modules/yaml/dist/schema/yaml-1.1/binary.js
generated
vendored
18
node_modules/yaml/dist/schema/yaml-1.1/binary.js
generated
vendored
@@ -1,10 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var node_buffer = require('buffer');
|
||||
var Scalar = require('../../nodes/Scalar.js');
|
||||
var stringifyString = require('../../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',
|
||||
/**
|
||||
@@ -16,8 +17,8 @@ const binary = {
|
||||
* document.querySelector('#photo').src = URL.createObjectURL(blob)
|
||||
*/
|
||||
resolve(src, onError) {
|
||||
if (typeof Buffer === 'function') {
|
||||
return Buffer.from(src, 'base64');
|
||||
if (typeof node_buffer.Buffer === 'function') {
|
||||
return node_buffer.Buffer.from(src, 'base64');
|
||||
}
|
||||
else if (typeof atob === 'function') {
|
||||
// On IE 11, atob() can't handle newlines
|
||||
@@ -33,13 +34,15 @@ 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') {
|
||||
if (typeof node_buffer.Buffer === 'function') {
|
||||
str =
|
||||
buf instanceof Buffer
|
||||
buf instanceof node_buffer.Buffer
|
||||
? buf.toString('base64')
|
||||
: Buffer.from(buf.buffer).toString('base64');
|
||||
: node_buffer.Buffer.from(buf.buffer).toString('base64');
|
||||
}
|
||||
else if (typeof btoa === 'function') {
|
||||
let s = '';
|
||||
@@ -50,8 +53,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.Scalar.BLOCK_LITERAL;
|
||||
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
||||
if (type !== Scalar.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