Update deps

This commit is contained in:
Anton Medvedev 2023-03-28 17:15:22 +02:00
commit 363bb1be96
126 changed files with 5743 additions and 2737 deletions

19
node_modules/zx/build/cli.js generated vendored
View file

@ -167,7 +167,11 @@ function transformMarkdown(buf) {
const source = buf.toString();
const output = [];
let state = 'root';
let codeBlockEnd = '';
let prevLineIsEmpty = true;
const jsCodeBlock = /^(```+|~~~+)(js|javascript)$/;
const shCodeBlock = /^(```+|~~~+)(sh|bash)$/;
const otherCodeBlock = /^(```+|~~~+)(.*)$/;
for (let line of source.split('\n')) {
switch (state) {
case 'root':
@ -175,17 +179,20 @@ function transformMarkdown(buf) {
output.push(line);
state = 'tab';
}
else if (/^```(js|javascript)$/.test(line)) {
else if (jsCodeBlock.test(line)) {
output.push('');
state = 'js';
codeBlockEnd = line.match(jsCodeBlock)[1];
}
else if (/^```(sh|bash)$/.test(line)) {
else if (shCodeBlock.test(line)) {
output.push('await $`');
state = 'bash';
codeBlockEnd = line.match(shCodeBlock)[1];
}
else if (/^```.*$/.test(line)) {
else if (otherCodeBlock.test(line)) {
output.push('');
state = 'other';
codeBlockEnd = line.match(otherCodeBlock)[1];
}
else {
prevLineIsEmpty = line === '';
@ -205,7 +212,7 @@ function transformMarkdown(buf) {
}
break;
case 'js':
if (/^```$/.test(line)) {
if (line === codeBlockEnd) {
output.push('');
state = 'root';
}
@ -214,7 +221,7 @@ function transformMarkdown(buf) {
}
break;
case 'bash':
if (/^```$/.test(line)) {
if (line === codeBlockEnd) {
output.push('`');
state = 'root';
}
@ -223,7 +230,7 @@ function transformMarkdown(buf) {
}
break;
case 'other':
if (/^```$/.test(line)) {
if (line === codeBlockEnd) {
output.push('');
state = 'root';
}