@diplodoc/cli 4.15.0 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +233 -218
- package/build/index.js.map +3 -3
- package/package.json +4 -4
- package/src/cmd/translate/compose.ts +1 -9
- package/src/cmd/translate/extract.ts +7 -10
- package/src/cmd/translate/handler.ts +5 -1
- package/src/cmd/translate/utils/fs.ts +46 -9
- package/src/cmd/translate/utils/index.ts +1 -5
package/build/index.js
CHANGED
|
@@ -14171,7 +14171,7 @@ var require_text_join = __commonJS({
|
|
|
14171
14171
|
"node_modules/markdown-it/lib/rules_core/text_join.js"(exports2, module2) {
|
|
14172
14172
|
"use strict";
|
|
14173
14173
|
module2.exports = function text_join(state) {
|
|
14174
|
-
var j, l, tokens, curr, max,
|
|
14174
|
+
var j, l, tokens, curr, max, last3, blockTokens = state.tokens;
|
|
14175
14175
|
for (j = 0, l = blockTokens.length; j < l; j++) {
|
|
14176
14176
|
if (blockTokens[j].type !== "inline")
|
|
14177
14177
|
continue;
|
|
@@ -14182,18 +14182,18 @@ var require_text_join = __commonJS({
|
|
|
14182
14182
|
tokens[curr].type = "text";
|
|
14183
14183
|
}
|
|
14184
14184
|
}
|
|
14185
|
-
for (curr =
|
|
14185
|
+
for (curr = last3 = 0; curr < max; curr++) {
|
|
14186
14186
|
if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") {
|
|
14187
14187
|
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
|
|
14188
14188
|
} else {
|
|
14189
|
-
if (curr !==
|
|
14190
|
-
tokens[
|
|
14189
|
+
if (curr !== last3) {
|
|
14190
|
+
tokens[last3] = tokens[curr];
|
|
14191
14191
|
}
|
|
14192
|
-
|
|
14192
|
+
last3++;
|
|
14193
14193
|
}
|
|
14194
14194
|
}
|
|
14195
|
-
if (curr !==
|
|
14196
|
-
tokens.length =
|
|
14195
|
+
if (curr !== last3) {
|
|
14196
|
+
tokens.length = last3;
|
|
14197
14197
|
}
|
|
14198
14198
|
}
|
|
14199
14199
|
};
|
|
@@ -14443,11 +14443,11 @@ var require_code2 = __commonJS({
|
|
|
14443
14443
|
"node_modules/markdown-it/lib/rules_block/code.js"(exports2, module2) {
|
|
14444
14444
|
"use strict";
|
|
14445
14445
|
module2.exports = function code3(state, startLine, endLine) {
|
|
14446
|
-
var nextLine,
|
|
14446
|
+
var nextLine, last3, token;
|
|
14447
14447
|
if (state.sCount[startLine] - state.blkIndent < 4) {
|
|
14448
14448
|
return false;
|
|
14449
14449
|
}
|
|
14450
|
-
|
|
14450
|
+
last3 = nextLine = startLine + 1;
|
|
14451
14451
|
while (nextLine < endLine) {
|
|
14452
14452
|
if (state.isEmpty(nextLine)) {
|
|
14453
14453
|
nextLine++;
|
|
@@ -14455,14 +14455,14 @@ var require_code2 = __commonJS({
|
|
|
14455
14455
|
}
|
|
14456
14456
|
if (state.sCount[nextLine] - state.blkIndent >= 4) {
|
|
14457
14457
|
nextLine++;
|
|
14458
|
-
|
|
14458
|
+
last3 = nextLine;
|
|
14459
14459
|
continue;
|
|
14460
14460
|
}
|
|
14461
14461
|
break;
|
|
14462
14462
|
}
|
|
14463
|
-
state.line =
|
|
14463
|
+
state.line = last3;
|
|
14464
14464
|
token = state.push("code_block", "code", 0);
|
|
14465
|
-
token.content = state.getLines(startLine,
|
|
14465
|
+
token.content = state.getLines(startLine, last3, 4 + state.blkIndent, false) + "\n";
|
|
14466
14466
|
token.map = [startLine, state.line];
|
|
14467
14467
|
return true;
|
|
14468
14468
|
};
|
|
@@ -15515,7 +15515,7 @@ var require_state_block = __commonJS({
|
|
|
15515
15515
|
return pos;
|
|
15516
15516
|
};
|
|
15517
15517
|
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
|
|
15518
|
-
var i, lineIndent, ch, first2,
|
|
15518
|
+
var i, lineIndent, ch, first2, last3, queue, lineStart, line = begin;
|
|
15519
15519
|
if (begin >= end) {
|
|
15520
15520
|
return "";
|
|
15521
15521
|
}
|
|
@@ -15524,11 +15524,11 @@ var require_state_block = __commonJS({
|
|
|
15524
15524
|
lineIndent = 0;
|
|
15525
15525
|
lineStart = first2 = this.bMarks[line];
|
|
15526
15526
|
if (line + 1 < end || keepLastLF) {
|
|
15527
|
-
|
|
15527
|
+
last3 = this.eMarks[line] + 1;
|
|
15528
15528
|
} else {
|
|
15529
|
-
|
|
15529
|
+
last3 = this.eMarks[line];
|
|
15530
15530
|
}
|
|
15531
|
-
while (first2 <
|
|
15531
|
+
while (first2 < last3 && lineIndent < indent) {
|
|
15532
15532
|
ch = this.src.charCodeAt(first2);
|
|
15533
15533
|
if (isSpace(ch)) {
|
|
15534
15534
|
if (ch === 9) {
|
|
@@ -15544,9 +15544,9 @@ var require_state_block = __commonJS({
|
|
|
15544
15544
|
first2++;
|
|
15545
15545
|
}
|
|
15546
15546
|
if (lineIndent > indent) {
|
|
15547
|
-
queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first2,
|
|
15547
|
+
queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first2, last3);
|
|
15548
15548
|
} else {
|
|
15549
|
-
queue[i] = this.src.slice(first2,
|
|
15549
|
+
queue[i] = this.src.slice(first2, last3);
|
|
15550
15550
|
}
|
|
15551
15551
|
}
|
|
15552
15552
|
return queue.join("");
|
|
@@ -16523,8 +16523,8 @@ var require_fragments_join = __commonJS({
|
|
|
16523
16523
|
"node_modules/markdown-it/lib/rules_inline/fragments_join.js"(exports2, module2) {
|
|
16524
16524
|
"use strict";
|
|
16525
16525
|
module2.exports = function fragments_join(state) {
|
|
16526
|
-
var curr,
|
|
16527
|
-
for (curr =
|
|
16526
|
+
var curr, last3, level = 0, tokens = state.tokens, max = state.tokens.length;
|
|
16527
|
+
for (curr = last3 = 0; curr < max; curr++) {
|
|
16528
16528
|
if (tokens[curr].nesting < 0)
|
|
16529
16529
|
level--;
|
|
16530
16530
|
tokens[curr].level = level;
|
|
@@ -16533,14 +16533,14 @@ var require_fragments_join = __commonJS({
|
|
|
16533
16533
|
if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") {
|
|
16534
16534
|
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
|
|
16535
16535
|
} else {
|
|
16536
|
-
if (curr !==
|
|
16537
|
-
tokens[
|
|
16536
|
+
if (curr !== last3) {
|
|
16537
|
+
tokens[last3] = tokens[curr];
|
|
16538
16538
|
}
|
|
16539
|
-
|
|
16539
|
+
last3++;
|
|
16540
16540
|
}
|
|
16541
16541
|
}
|
|
16542
|
-
if (curr !==
|
|
16543
|
-
tokens.length =
|
|
16542
|
+
if (curr !== last3) {
|
|
16543
|
+
tokens.length = last3;
|
|
16544
16544
|
}
|
|
16545
16545
|
};
|
|
16546
16546
|
}
|
|
@@ -18585,8 +18585,8 @@ var require_core3 = __commonJS({
|
|
|
18585
18585
|
compileMatch,
|
|
18586
18586
|
MultiClass,
|
|
18587
18587
|
beforeMatchExt
|
|
18588
|
-
].forEach((
|
|
18589
|
-
language.compilerExtensions.forEach((
|
|
18588
|
+
].forEach((ext3) => ext3(mode, parent));
|
|
18589
|
+
language.compilerExtensions.forEach((ext3) => ext3(mode, parent));
|
|
18590
18590
|
mode.__beforeBegin = null;
|
|
18591
18591
|
[
|
|
18592
18592
|
beginKeywords,
|
|
@@ -18595,7 +18595,7 @@ var require_core3 = __commonJS({
|
|
|
18595
18595
|
compileIllegal,
|
|
18596
18596
|
// default to 1 relevance if not specified
|
|
18597
18597
|
compileRelevance
|
|
18598
|
-
].forEach((
|
|
18598
|
+
].forEach((ext3) => ext3(mode, parent));
|
|
18599
18599
|
mode.isCompiled = true;
|
|
18600
18600
|
let keywordPattern = null;
|
|
18601
18601
|
if (typeof mode.keywords === "object" && mode.keywords.$pattern) {
|
|
@@ -68212,7 +68212,7 @@ var require_patterns = __commonJS({
|
|
|
68212
68212
|
const attrs = utils.getAttrs(content, content.lastIndexOf(options.leftDelimiter), options);
|
|
68213
68213
|
utils.addAttrs(attrs, tokens[i - 2]);
|
|
68214
68214
|
const trimmed2 = content.slice(0, content.lastIndexOf(options.leftDelimiter));
|
|
68215
|
-
token.content =
|
|
68215
|
+
token.content = last3(trimmed2) !== " " ? trimmed2 : trimmed2.slice(0, -1);
|
|
68216
68216
|
}
|
|
68217
68217
|
},
|
|
68218
68218
|
{
|
|
@@ -68313,12 +68313,12 @@ var require_patterns = __commonJS({
|
|
|
68313
68313
|
const openingToken = utils.getMatchingOpeningToken(tokens, ii);
|
|
68314
68314
|
utils.addAttrs(attrs, openingToken);
|
|
68315
68315
|
const trimmed2 = content.slice(0, content.lastIndexOf(options.leftDelimiter));
|
|
68316
|
-
token.content =
|
|
68316
|
+
token.content = last3(trimmed2) !== " " ? trimmed2 : trimmed2.slice(0, -1);
|
|
68317
68317
|
}
|
|
68318
68318
|
}
|
|
68319
68319
|
];
|
|
68320
68320
|
};
|
|
68321
|
-
function
|
|
68321
|
+
function last3(arr) {
|
|
68322
68322
|
return arr.slice(-1)[0];
|
|
68323
68323
|
}
|
|
68324
68324
|
}
|
|
@@ -68393,7 +68393,7 @@ var require_markdown_it_attrs = __commonJS({
|
|
|
68393
68393
|
if (childTests.every((tt) => tt.position !== void 0)) {
|
|
68394
68394
|
match2 = childTests.every((tt) => test(children, tt.position, tt).match);
|
|
68395
68395
|
if (match2) {
|
|
68396
|
-
const j =
|
|
68396
|
+
const j = last3(childTests).position;
|
|
68397
68397
|
res.j = j >= 0 ? j : children.length + j;
|
|
68398
68398
|
}
|
|
68399
68399
|
} else {
|
|
@@ -68447,7 +68447,7 @@ var require_markdown_it_attrs = __commonJS({
|
|
|
68447
68447
|
function get3(arr, n) {
|
|
68448
68448
|
return n >= 0 ? arr[n] : arr[arr.length + n];
|
|
68449
68449
|
}
|
|
68450
|
-
function
|
|
68450
|
+
function last3(arr) {
|
|
68451
68451
|
return arr.slice(-1)[0] || {};
|
|
68452
68452
|
}
|
|
68453
68453
|
}
|
|
@@ -73522,11 +73522,11 @@ var require_stringifier = __commonJS({
|
|
|
73522
73522
|
this.builder("}", node, "end");
|
|
73523
73523
|
}
|
|
73524
73524
|
body(node) {
|
|
73525
|
-
let
|
|
73526
|
-
while (
|
|
73527
|
-
if (node.nodes[
|
|
73525
|
+
let last3 = node.nodes.length - 1;
|
|
73526
|
+
while (last3 > 0) {
|
|
73527
|
+
if (node.nodes[last3].type !== "comment")
|
|
73528
73528
|
break;
|
|
73529
|
-
|
|
73529
|
+
last3 -= 1;
|
|
73530
73530
|
}
|
|
73531
73531
|
let semicolon = this.raw(node, "semicolon");
|
|
73532
73532
|
for (let i = 0; i < node.nodes.length; i++) {
|
|
@@ -73534,7 +73534,7 @@ var require_stringifier = __commonJS({
|
|
|
73534
73534
|
let before = this.raw(child, "before");
|
|
73535
73535
|
if (before)
|
|
73536
73536
|
this.builder(before);
|
|
73537
|
-
this.stringify(child,
|
|
73537
|
+
this.stringify(child, last3 !== i || semicolon);
|
|
73538
73538
|
}
|
|
73539
73539
|
}
|
|
73540
73540
|
comment(node) {
|
|
@@ -76518,7 +76518,7 @@ var require_map_generator = __commonJS({
|
|
|
76518
76518
|
original: { column: 0, line: 0 },
|
|
76519
76519
|
source: ""
|
|
76520
76520
|
};
|
|
76521
|
-
let lines,
|
|
76521
|
+
let lines, last3;
|
|
76522
76522
|
this.stringify(this.root, (str2, node, type2) => {
|
|
76523
76523
|
this.css += str2;
|
|
76524
76524
|
if (node && type2 !== "end") {
|
|
@@ -76539,8 +76539,8 @@ var require_map_generator = __commonJS({
|
|
|
76539
76539
|
lines = str2.match(/\n/g);
|
|
76540
76540
|
if (lines) {
|
|
76541
76541
|
line += lines.length;
|
|
76542
|
-
|
|
76543
|
-
column = str2.length -
|
|
76542
|
+
last3 = str2.lastIndexOf("\n");
|
|
76543
|
+
column = str2.length - last3;
|
|
76544
76544
|
} else {
|
|
76545
76545
|
column += str2.length;
|
|
76546
76546
|
}
|
|
@@ -77351,7 +77351,7 @@ var require_list2 = __commonJS({
|
|
|
77351
77351
|
let spaces = [" ", "\n", " "];
|
|
77352
77352
|
return list2.split(string, spaces);
|
|
77353
77353
|
},
|
|
77354
|
-
split(string, separators,
|
|
77354
|
+
split(string, separators, last3) {
|
|
77355
77355
|
let array = [];
|
|
77356
77356
|
let current = "";
|
|
77357
77357
|
let split = false;
|
|
@@ -77389,7 +77389,7 @@ var require_list2 = __commonJS({
|
|
|
77389
77389
|
current += letter;
|
|
77390
77390
|
}
|
|
77391
77391
|
}
|
|
77392
|
-
if (
|
|
77392
|
+
if (last3 || current !== "")
|
|
77393
77393
|
array.push(current.trim());
|
|
77394
77394
|
return array;
|
|
77395
77395
|
}
|
|
@@ -77470,7 +77470,7 @@ var require_parser = __commonJS({
|
|
|
77470
77470
|
let type2;
|
|
77471
77471
|
let prev;
|
|
77472
77472
|
let shift;
|
|
77473
|
-
let
|
|
77473
|
+
let last3 = false;
|
|
77474
77474
|
let open = false;
|
|
77475
77475
|
let params = [];
|
|
77476
77476
|
let brackets = [];
|
|
@@ -77514,7 +77514,7 @@ var require_parser = __commonJS({
|
|
|
77514
77514
|
params.push(token);
|
|
77515
77515
|
}
|
|
77516
77516
|
if (this.tokenizer.endOfFile()) {
|
|
77517
|
-
|
|
77517
|
+
last3 = true;
|
|
77518
77518
|
break;
|
|
77519
77519
|
}
|
|
77520
77520
|
}
|
|
@@ -77522,7 +77522,7 @@ var require_parser = __commonJS({
|
|
|
77522
77522
|
if (params.length) {
|
|
77523
77523
|
node.raws.afterName = this.spacesAndCommentsFromStart(params);
|
|
77524
77524
|
this.raw(node, "params", params);
|
|
77525
|
-
if (
|
|
77525
|
+
if (last3) {
|
|
77526
77526
|
token = params[params.length - 1];
|
|
77527
77527
|
node.source.end = this.getPosition(token[3] || token[2]);
|
|
77528
77528
|
node.source.end.offset++;
|
|
@@ -77605,13 +77605,13 @@ var require_parser = __commonJS({
|
|
|
77605
77605
|
decl(tokens, customProperty) {
|
|
77606
77606
|
let node = new Declaration();
|
|
77607
77607
|
this.init(node, tokens[0][2]);
|
|
77608
|
-
let
|
|
77609
|
-
if (
|
|
77608
|
+
let last3 = tokens[tokens.length - 1];
|
|
77609
|
+
if (last3[0] === ";") {
|
|
77610
77610
|
this.semicolon = true;
|
|
77611
77611
|
tokens.pop();
|
|
77612
77612
|
}
|
|
77613
77613
|
node.source.end = this.getPosition(
|
|
77614
|
-
|
|
77614
|
+
last3[3] || last3[2] || findLastWithPosition(tokens)
|
|
77615
77615
|
);
|
|
77616
77616
|
node.source.end.offset++;
|
|
77617
77617
|
while (tokens[0][0] !== "word") {
|
|
@@ -83529,10 +83529,10 @@ var require_traversing = __commonJS({
|
|
|
83529
83529
|
return this.length > 1 ? this._make(this[0]) : this;
|
|
83530
83530
|
}
|
|
83531
83531
|
exports2.first = first2;
|
|
83532
|
-
function
|
|
83532
|
+
function last3() {
|
|
83533
83533
|
return this.length > 0 ? this._make(this[this.length - 1]) : this;
|
|
83534
83534
|
}
|
|
83535
|
-
exports2.last =
|
|
83535
|
+
exports2.last = last3;
|
|
83536
83536
|
function eq(i) {
|
|
83537
83537
|
var _a2;
|
|
83538
83538
|
i = +i;
|
|
@@ -98211,7 +98211,7 @@ var require_minimatch = __commonJS({
|
|
|
98211
98211
|
return minimatch2(p, pattern, options);
|
|
98212
98212
|
};
|
|
98213
98213
|
}
|
|
98214
|
-
function
|
|
98214
|
+
function ext3(a, b) {
|
|
98215
98215
|
b = b || {};
|
|
98216
98216
|
var t = {};
|
|
98217
98217
|
Object.keys(a).forEach(function(k) {
|
|
@@ -98228,28 +98228,28 @@ var require_minimatch = __commonJS({
|
|
|
98228
98228
|
}
|
|
98229
98229
|
var orig = minimatch2;
|
|
98230
98230
|
var m = function minimatch3(p, pattern, options) {
|
|
98231
|
-
return orig(p, pattern,
|
|
98231
|
+
return orig(p, pattern, ext3(def, options));
|
|
98232
98232
|
};
|
|
98233
98233
|
m.Minimatch = function Minimatch3(pattern, options) {
|
|
98234
|
-
return new orig.Minimatch(pattern,
|
|
98234
|
+
return new orig.Minimatch(pattern, ext3(def, options));
|
|
98235
98235
|
};
|
|
98236
98236
|
m.Minimatch.defaults = function defaults3(options) {
|
|
98237
|
-
return orig.defaults(
|
|
98237
|
+
return orig.defaults(ext3(def, options)).Minimatch;
|
|
98238
98238
|
};
|
|
98239
98239
|
m.filter = function filter4(pattern, options) {
|
|
98240
|
-
return orig.filter(pattern,
|
|
98240
|
+
return orig.filter(pattern, ext3(def, options));
|
|
98241
98241
|
};
|
|
98242
98242
|
m.defaults = function defaults3(options) {
|
|
98243
|
-
return orig.defaults(
|
|
98243
|
+
return orig.defaults(ext3(def, options));
|
|
98244
98244
|
};
|
|
98245
98245
|
m.makeRe = function makeRe3(pattern, options) {
|
|
98246
|
-
return orig.makeRe(pattern,
|
|
98246
|
+
return orig.makeRe(pattern, ext3(def, options));
|
|
98247
98247
|
};
|
|
98248
98248
|
m.braceExpand = function braceExpand3(pattern, options) {
|
|
98249
|
-
return orig.braceExpand(pattern,
|
|
98249
|
+
return orig.braceExpand(pattern, ext3(def, options));
|
|
98250
98250
|
};
|
|
98251
98251
|
m.match = function(list2, pattern, options) {
|
|
98252
|
-
return orig.match(list2, pattern,
|
|
98252
|
+
return orig.match(list2, pattern, ext3(def, options));
|
|
98253
98253
|
};
|
|
98254
98254
|
return m;
|
|
98255
98255
|
};
|
|
@@ -99000,7 +99000,7 @@ var require_minimatch2 = __commonJS({
|
|
|
99000
99000
|
return minimatch2(p, pattern, options);
|
|
99001
99001
|
};
|
|
99002
99002
|
}
|
|
99003
|
-
function
|
|
99003
|
+
function ext3(a, b) {
|
|
99004
99004
|
b = b || {};
|
|
99005
99005
|
var t = {};
|
|
99006
99006
|
Object.keys(a).forEach(function(k) {
|
|
@@ -99017,28 +99017,28 @@ var require_minimatch2 = __commonJS({
|
|
|
99017
99017
|
}
|
|
99018
99018
|
var orig = minimatch2;
|
|
99019
99019
|
var m = function minimatch3(p, pattern, options) {
|
|
99020
|
-
return orig(p, pattern,
|
|
99020
|
+
return orig(p, pattern, ext3(def, options));
|
|
99021
99021
|
};
|
|
99022
99022
|
m.Minimatch = function Minimatch3(pattern, options) {
|
|
99023
|
-
return new orig.Minimatch(pattern,
|
|
99023
|
+
return new orig.Minimatch(pattern, ext3(def, options));
|
|
99024
99024
|
};
|
|
99025
99025
|
m.Minimatch.defaults = function defaults3(options) {
|
|
99026
|
-
return orig.defaults(
|
|
99026
|
+
return orig.defaults(ext3(def, options)).Minimatch;
|
|
99027
99027
|
};
|
|
99028
99028
|
m.filter = function filter4(pattern, options) {
|
|
99029
|
-
return orig.filter(pattern,
|
|
99029
|
+
return orig.filter(pattern, ext3(def, options));
|
|
99030
99030
|
};
|
|
99031
99031
|
m.defaults = function defaults3(options) {
|
|
99032
|
-
return orig.defaults(
|
|
99032
|
+
return orig.defaults(ext3(def, options));
|
|
99033
99033
|
};
|
|
99034
99034
|
m.makeRe = function makeRe3(pattern, options) {
|
|
99035
|
-
return orig.makeRe(pattern,
|
|
99035
|
+
return orig.makeRe(pattern, ext3(def, options));
|
|
99036
99036
|
};
|
|
99037
99037
|
m.braceExpand = function braceExpand3(pattern, options) {
|
|
99038
|
-
return orig.braceExpand(pattern,
|
|
99038
|
+
return orig.braceExpand(pattern, ext3(def, options));
|
|
99039
99039
|
};
|
|
99040
99040
|
m.match = function(list2, pattern, options) {
|
|
99041
|
-
return orig.match(list2, pattern,
|
|
99041
|
+
return orig.match(list2, pattern, ext3(def, options));
|
|
99042
99042
|
};
|
|
99043
99043
|
return m;
|
|
99044
99044
|
};
|
|
@@ -101452,21 +101452,21 @@ var require_html2 = __commonJS({
|
|
|
101452
101452
|
var stack = base_parse(data, options);
|
|
101453
101453
|
var root = stack[0];
|
|
101454
101454
|
var _loop_1 = function() {
|
|
101455
|
-
var
|
|
101455
|
+
var last3 = stack.pop();
|
|
101456
101456
|
var oneBefore = (0, back_1.default)(stack);
|
|
101457
|
-
if (
|
|
101458
|
-
if (
|
|
101457
|
+
if (last3.parentNode && last3.parentNode.parentNode) {
|
|
101458
|
+
if (last3.parentNode === oneBefore && last3.tagName === oneBefore.tagName) {
|
|
101459
101459
|
if (options.parseNoneClosedTags !== true) {
|
|
101460
|
-
oneBefore.removeChild(
|
|
101461
|
-
|
|
101460
|
+
oneBefore.removeChild(last3);
|
|
101461
|
+
last3.childNodes.forEach(function(child) {
|
|
101462
101462
|
oneBefore.parentNode.appendChild(child);
|
|
101463
101463
|
});
|
|
101464
101464
|
stack.pop();
|
|
101465
101465
|
}
|
|
101466
101466
|
} else {
|
|
101467
101467
|
if (options.parseNoneClosedTags !== true) {
|
|
101468
|
-
oneBefore.removeChild(
|
|
101469
|
-
|
|
101468
|
+
oneBefore.removeChild(last3);
|
|
101469
|
+
last3.childNodes.forEach(function(child) {
|
|
101470
101470
|
oneBefore.appendChild(child);
|
|
101471
101471
|
});
|
|
101472
101472
|
}
|
|
@@ -102029,7 +102029,7 @@ var require_minimatch3 = __commonJS({
|
|
|
102029
102029
|
var addPatternStartSet = charSet("[.(");
|
|
102030
102030
|
var slashSplit = /\/+/;
|
|
102031
102031
|
minimatch2.filter = (pattern, options = {}) => (p, i, list2) => minimatch2(p, pattern, options);
|
|
102032
|
-
var
|
|
102032
|
+
var ext3 = (a, b = {}) => {
|
|
102033
102033
|
const t = {};
|
|
102034
102034
|
Object.keys(a).forEach((k) => t[k] = a[k]);
|
|
102035
102035
|
Object.keys(b).forEach((k) => t[k] = b[k]);
|
|
@@ -102040,18 +102040,18 @@ var require_minimatch3 = __commonJS({
|
|
|
102040
102040
|
return minimatch2;
|
|
102041
102041
|
}
|
|
102042
102042
|
const orig = minimatch2;
|
|
102043
|
-
const m = (p, pattern, options) => orig(p, pattern,
|
|
102043
|
+
const m = (p, pattern, options) => orig(p, pattern, ext3(def, options));
|
|
102044
102044
|
m.Minimatch = class Minimatch extends orig.Minimatch {
|
|
102045
102045
|
constructor(pattern, options) {
|
|
102046
|
-
super(pattern,
|
|
102046
|
+
super(pattern, ext3(def, options));
|
|
102047
102047
|
}
|
|
102048
102048
|
};
|
|
102049
|
-
m.Minimatch.defaults = (options) => orig.defaults(
|
|
102050
|
-
m.filter = (pattern, options) => orig.filter(pattern,
|
|
102051
|
-
m.defaults = (options) => orig.defaults(
|
|
102052
|
-
m.makeRe = (pattern, options) => orig.makeRe(pattern,
|
|
102053
|
-
m.braceExpand = (pattern, options) => orig.braceExpand(pattern,
|
|
102054
|
-
m.match = (list2, pattern, options) => orig.match(list2, pattern,
|
|
102049
|
+
m.Minimatch.defaults = (options) => orig.defaults(ext3(def, options)).Minimatch;
|
|
102050
|
+
m.filter = (pattern, options) => orig.filter(pattern, ext3(def, options));
|
|
102051
|
+
m.defaults = (options) => orig.defaults(ext3(def, options));
|
|
102052
|
+
m.makeRe = (pattern, options) => orig.makeRe(pattern, ext3(def, options));
|
|
102053
|
+
m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext3(def, options));
|
|
102054
|
+
m.match = (list2, pattern, options) => orig.match(list2, pattern, ext3(def, options));
|
|
102055
102055
|
return m;
|
|
102056
102056
|
};
|
|
102057
102057
|
minimatch2.braceExpand = (pattern, options) => braceExpand2(pattern, options);
|
|
@@ -105201,7 +105201,7 @@ var require_lodash = __commonJS({
|
|
|
105201
105201
|
function baseInvoke(object, path2, args) {
|
|
105202
105202
|
path2 = castPath(path2, object);
|
|
105203
105203
|
object = parent(object, path2);
|
|
105204
|
-
var func = object == null ? object : object[toKey(
|
|
105204
|
+
var func = object == null ? object : object[toKey(last3(path2))];
|
|
105205
105205
|
return func == null ? undefined2 : apply(func, object, args);
|
|
105206
105206
|
}
|
|
105207
105207
|
function baseIsArguments(value) {
|
|
@@ -105734,7 +105734,7 @@ var require_lodash = __commonJS({
|
|
|
105734
105734
|
function baseUnset(object, path2) {
|
|
105735
105735
|
path2 = castPath(path2, object);
|
|
105736
105736
|
object = parent(object, path2);
|
|
105737
|
-
return object == null || delete object[toKey(
|
|
105737
|
+
return object == null || delete object[toKey(last3(path2))];
|
|
105738
105738
|
}
|
|
105739
105739
|
function baseUpdate(object, path2, updater, customizer) {
|
|
105740
105740
|
return baseSet(object, path2, updater(baseGet(object, path2)), customizer);
|
|
@@ -106971,14 +106971,14 @@ var require_lodash = __commonJS({
|
|
|
106971
106971
|
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
|
|
106972
106972
|
});
|
|
106973
106973
|
var differenceBy = baseRest(function(array, values2) {
|
|
106974
|
-
var iteratee2 =
|
|
106974
|
+
var iteratee2 = last3(values2);
|
|
106975
106975
|
if (isArrayLikeObject(iteratee2)) {
|
|
106976
106976
|
iteratee2 = undefined2;
|
|
106977
106977
|
}
|
|
106978
106978
|
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
|
|
106979
106979
|
});
|
|
106980
106980
|
var differenceWith = baseRest(function(array, values2) {
|
|
106981
|
-
var comparator =
|
|
106981
|
+
var comparator = last3(values2);
|
|
106982
106982
|
if (isArrayLikeObject(comparator)) {
|
|
106983
106983
|
comparator = undefined2;
|
|
106984
106984
|
}
|
|
@@ -107088,8 +107088,8 @@ var require_lodash = __commonJS({
|
|
|
107088
107088
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
|
|
107089
107089
|
});
|
|
107090
107090
|
var intersectionBy = baseRest(function(arrays) {
|
|
107091
|
-
var iteratee2 =
|
|
107092
|
-
if (iteratee2 ===
|
|
107091
|
+
var iteratee2 = last3(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|
107092
|
+
if (iteratee2 === last3(mapped)) {
|
|
107093
107093
|
iteratee2 = undefined2;
|
|
107094
107094
|
} else {
|
|
107095
107095
|
mapped.pop();
|
|
@@ -107097,7 +107097,7 @@ var require_lodash = __commonJS({
|
|
|
107097
107097
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
|
|
107098
107098
|
});
|
|
107099
107099
|
var intersectionWith = baseRest(function(arrays) {
|
|
107100
|
-
var comparator =
|
|
107100
|
+
var comparator = last3(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|
107101
107101
|
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
107102
107102
|
if (comparator) {
|
|
107103
107103
|
mapped.pop();
|
|
@@ -107107,7 +107107,7 @@ var require_lodash = __commonJS({
|
|
|
107107
107107
|
function join23(array, separator) {
|
|
107108
107108
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
107109
107109
|
}
|
|
107110
|
-
function
|
|
107110
|
+
function last3(array) {
|
|
107111
107111
|
var length = array == null ? 0 : array.length;
|
|
107112
107112
|
return length ? array[length - 1] : undefined2;
|
|
107113
107113
|
}
|
|
@@ -107245,14 +107245,14 @@ var require_lodash = __commonJS({
|
|
|
107245
107245
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
|
107246
107246
|
});
|
|
107247
107247
|
var unionBy = baseRest(function(arrays) {
|
|
107248
|
-
var iteratee2 =
|
|
107248
|
+
var iteratee2 = last3(arrays);
|
|
107249
107249
|
if (isArrayLikeObject(iteratee2)) {
|
|
107250
107250
|
iteratee2 = undefined2;
|
|
107251
107251
|
}
|
|
107252
107252
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
|
|
107253
107253
|
});
|
|
107254
107254
|
var unionWith = baseRest(function(arrays) {
|
|
107255
|
-
var comparator =
|
|
107255
|
+
var comparator = last3(arrays);
|
|
107256
107256
|
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
107257
107257
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined2, comparator);
|
|
107258
107258
|
});
|
|
@@ -107300,14 +107300,14 @@ var require_lodash = __commonJS({
|
|
|
107300
107300
|
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
|
107301
107301
|
});
|
|
107302
107302
|
var xorBy = baseRest(function(arrays) {
|
|
107303
|
-
var iteratee2 =
|
|
107303
|
+
var iteratee2 = last3(arrays);
|
|
107304
107304
|
if (isArrayLikeObject(iteratee2)) {
|
|
107305
107305
|
iteratee2 = undefined2;
|
|
107306
107306
|
}
|
|
107307
107307
|
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
|
|
107308
107308
|
});
|
|
107309
107309
|
var xorWith = baseRest(function(arrays) {
|
|
107310
|
-
var comparator =
|
|
107310
|
+
var comparator = last3(arrays);
|
|
107311
107311
|
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
107312
107312
|
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined2, comparator);
|
|
107313
107313
|
});
|
|
@@ -109025,7 +109025,7 @@ var require_lodash = __commonJS({
|
|
|
109025
109025
|
lodash.isWeakSet = isWeakSet;
|
|
109026
109026
|
lodash.join = join23;
|
|
109027
109027
|
lodash.kebabCase = kebabCase;
|
|
109028
|
-
lodash.last =
|
|
109028
|
+
lodash.last = last3;
|
|
109029
109029
|
lodash.lastIndexOf = lastIndexOf;
|
|
109030
109030
|
lodash.lowerCase = lowerCase;
|
|
109031
109031
|
lodash.lowerFirst = lowerFirst;
|
|
@@ -109323,12 +109323,12 @@ var require_fixed_size = __commonJS({
|
|
|
109323
109323
|
return true;
|
|
109324
109324
|
}
|
|
109325
109325
|
shift() {
|
|
109326
|
-
const
|
|
109327
|
-
if (
|
|
109326
|
+
const last3 = this.buffer[this.btm];
|
|
109327
|
+
if (last3 === void 0)
|
|
109328
109328
|
return void 0;
|
|
109329
109329
|
this.buffer[this.btm] = void 0;
|
|
109330
109330
|
this.btm = this.btm + 1 & this.mask;
|
|
109331
|
-
return
|
|
109331
|
+
return last3;
|
|
109332
109332
|
}
|
|
109333
109333
|
peek() {
|
|
109334
109334
|
return this.buffer[this.btm];
|
|
@@ -116278,9 +116278,9 @@ var require_uri_all = __commonJS({
|
|
|
116278
116278
|
var matches = host.match(protocol.IPV6ADDRESS) || [];
|
|
116279
116279
|
var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
|
|
116280
116280
|
if (address) {
|
|
116281
|
-
var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
|
|
116281
|
+
var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last3 = _address$toLowerCase$2[0], first2 = _address$toLowerCase$2[1];
|
|
116282
116282
|
var firstFields = first2 ? first2.split(":").map(_stripLeadingZeros) : [];
|
|
116283
|
-
var lastFields =
|
|
116283
|
+
var lastFields = last3.split(":").map(_stripLeadingZeros);
|
|
116284
116284
|
var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
|
116285
116285
|
var fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
|
116286
116286
|
var lastFieldsStart = lastFields.length - fieldCount;
|
|
@@ -133710,11 +133710,11 @@ var require_code5 = __commonJS({
|
|
|
133710
133710
|
"node_modules/markdownlint/node_modules/markdown-it/lib/rules_block/code.js"(exports2, module2) {
|
|
133711
133711
|
"use strict";
|
|
133712
133712
|
module2.exports = function code3(state, startLine, endLine) {
|
|
133713
|
-
var nextLine,
|
|
133713
|
+
var nextLine, last3, token;
|
|
133714
133714
|
if (state.sCount[startLine] - state.blkIndent < 4) {
|
|
133715
133715
|
return false;
|
|
133716
133716
|
}
|
|
133717
|
-
|
|
133717
|
+
last3 = nextLine = startLine + 1;
|
|
133718
133718
|
while (nextLine < endLine) {
|
|
133719
133719
|
if (state.isEmpty(nextLine)) {
|
|
133720
133720
|
nextLine++;
|
|
@@ -133722,14 +133722,14 @@ var require_code5 = __commonJS({
|
|
|
133722
133722
|
}
|
|
133723
133723
|
if (state.sCount[nextLine] - state.blkIndent >= 4) {
|
|
133724
133724
|
nextLine++;
|
|
133725
|
-
|
|
133725
|
+
last3 = nextLine;
|
|
133726
133726
|
continue;
|
|
133727
133727
|
}
|
|
133728
133728
|
break;
|
|
133729
133729
|
}
|
|
133730
|
-
state.line =
|
|
133730
|
+
state.line = last3;
|
|
133731
133731
|
token = state.push("code_block", "code", 0);
|
|
133732
|
-
token.content = state.getLines(startLine,
|
|
133732
|
+
token.content = state.getLines(startLine, last3, 4 + state.blkIndent, false) + "\n";
|
|
133733
133733
|
token.map = [startLine, state.line];
|
|
133734
133734
|
return true;
|
|
133735
133735
|
};
|
|
@@ -134823,7 +134823,7 @@ var require_state_block2 = __commonJS({
|
|
|
134823
134823
|
return pos;
|
|
134824
134824
|
};
|
|
134825
134825
|
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
|
|
134826
|
-
var i, lineIndent, ch, first2,
|
|
134826
|
+
var i, lineIndent, ch, first2, last3, queue, lineStart, line = begin;
|
|
134827
134827
|
if (begin >= end) {
|
|
134828
134828
|
return "";
|
|
134829
134829
|
}
|
|
@@ -134832,11 +134832,11 @@ var require_state_block2 = __commonJS({
|
|
|
134832
134832
|
lineIndent = 0;
|
|
134833
134833
|
lineStart = first2 = this.bMarks[line];
|
|
134834
134834
|
if (line + 1 < end || keepLastLF) {
|
|
134835
|
-
|
|
134835
|
+
last3 = this.eMarks[line] + 1;
|
|
134836
134836
|
} else {
|
|
134837
|
-
|
|
134837
|
+
last3 = this.eMarks[line];
|
|
134838
134838
|
}
|
|
134839
|
-
while (first2 <
|
|
134839
|
+
while (first2 < last3 && lineIndent < indent) {
|
|
134840
134840
|
ch = this.src.charCodeAt(first2);
|
|
134841
134841
|
if (isSpace(ch)) {
|
|
134842
134842
|
if (ch === 9) {
|
|
@@ -134852,9 +134852,9 @@ var require_state_block2 = __commonJS({
|
|
|
134852
134852
|
first2++;
|
|
134853
134853
|
}
|
|
134854
134854
|
if (lineIndent > indent) {
|
|
134855
|
-
queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first2,
|
|
134855
|
+
queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first2, last3);
|
|
134856
134856
|
} else {
|
|
134857
|
-
queue[i] = this.src.slice(first2,
|
|
134857
|
+
queue[i] = this.src.slice(first2, last3);
|
|
134858
134858
|
}
|
|
134859
134859
|
}
|
|
134860
134860
|
return queue.join("");
|
|
@@ -135752,8 +135752,8 @@ var require_text_collapse = __commonJS({
|
|
|
135752
135752
|
"node_modules/markdownlint/node_modules/markdown-it/lib/rules_inline/text_collapse.js"(exports2, module2) {
|
|
135753
135753
|
"use strict";
|
|
135754
135754
|
module2.exports = function text_collapse(state) {
|
|
135755
|
-
var curr,
|
|
135756
|
-
for (curr =
|
|
135755
|
+
var curr, last3, level = 0, tokens = state.tokens, max = state.tokens.length;
|
|
135756
|
+
for (curr = last3 = 0; curr < max; curr++) {
|
|
135757
135757
|
if (tokens[curr].nesting < 0)
|
|
135758
135758
|
level--;
|
|
135759
135759
|
tokens[curr].level = level;
|
|
@@ -135762,14 +135762,14 @@ var require_text_collapse = __commonJS({
|
|
|
135762
135762
|
if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") {
|
|
135763
135763
|
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
|
|
135764
135764
|
} else {
|
|
135765
|
-
if (curr !==
|
|
135766
|
-
tokens[
|
|
135765
|
+
if (curr !== last3) {
|
|
135766
|
+
tokens[last3] = tokens[curr];
|
|
135767
135767
|
}
|
|
135768
|
-
|
|
135768
|
+
last3++;
|
|
135769
135769
|
}
|
|
135770
135770
|
}
|
|
135771
|
-
if (curr !==
|
|
135772
|
-
tokens.length =
|
|
135771
|
+
if (curr !== last3) {
|
|
135772
|
+
tokens.length = last3;
|
|
135773
135773
|
}
|
|
135774
135774
|
};
|
|
135775
135775
|
}
|
|
@@ -155233,13 +155233,13 @@ var require_dist_cjs36 = __commonJS({
|
|
|
155233
155233
|
},
|
|
155234
155234
|
__spreadValues({}, data.default && { default: data.default })
|
|
155235
155235
|
), "getConfigData");
|
|
155236
|
-
var
|
|
155236
|
+
var import_path36 = require("path");
|
|
155237
155237
|
var import_getHomeDir = require_getHomeDir();
|
|
155238
155238
|
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
155239
|
-
var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0,
|
|
155239
|
+
var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path36.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath");
|
|
155240
155240
|
var import_getHomeDir2 = require_getHomeDir();
|
|
155241
155241
|
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
155242
|
-
var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0,
|
|
155242
|
+
var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path36.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath");
|
|
155243
155243
|
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
155244
155244
|
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
155245
155245
|
var parseIni = /* @__PURE__ */ __name((iniData) => {
|
|
@@ -187553,7 +187553,7 @@ var require_mime_types = __commonJS({
|
|
|
187553
187553
|
"node_modules/mime-types/index.js"(exports2) {
|
|
187554
187554
|
"use strict";
|
|
187555
187555
|
var db = require_mime_db();
|
|
187556
|
-
var
|
|
187556
|
+
var extname11 = require("path").extname;
|
|
187557
187557
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
187558
187558
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
187559
187559
|
exports2.charset = charset;
|
|
@@ -187608,7 +187608,7 @@ var require_mime_types = __commonJS({
|
|
|
187608
187608
|
if (!path2 || typeof path2 !== "string") {
|
|
187609
187609
|
return false;
|
|
187610
187610
|
}
|
|
187611
|
-
var extension2 =
|
|
187611
|
+
var extension2 = extname11("x." + path2).toLowerCase().substr(1);
|
|
187612
187612
|
if (!extension2) {
|
|
187613
187613
|
return false;
|
|
187614
187614
|
}
|
|
@@ -200041,9 +200041,9 @@ parseAST_fn = function(str2, ast, pos, opt) {
|
|
|
200041
200041
|
if (!opt.noext && isExtglobType(c) && str2.charAt(i2) === "(") {
|
|
200042
200042
|
ast.push(acc2);
|
|
200043
200043
|
acc2 = "";
|
|
200044
|
-
const
|
|
200045
|
-
i2 = __privateMethod(_a2 = _AST, _parseAST, parseAST_fn).call(_a2, str2,
|
|
200046
|
-
ast.push(
|
|
200044
|
+
const ext3 = new _AST(c, ast);
|
|
200045
|
+
i2 = __privateMethod(_a2 = _AST, _parseAST, parseAST_fn).call(_a2, str2, ext3, i2, opt);
|
|
200046
|
+
ast.push(ext3);
|
|
200047
200047
|
continue;
|
|
200048
200048
|
}
|
|
200049
200049
|
acc2 += c;
|
|
@@ -200082,9 +200082,9 @@ parseAST_fn = function(str2, ast, pos, opt) {
|
|
|
200082
200082
|
if (isExtglobType(c) && str2.charAt(i) === "(") {
|
|
200083
200083
|
part.push(acc);
|
|
200084
200084
|
acc = "";
|
|
200085
|
-
const
|
|
200086
|
-
part.push(
|
|
200087
|
-
i = __privateMethod(_b = _AST, _parseAST, parseAST_fn).call(_b, str2,
|
|
200085
|
+
const ext3 = new _AST(c, part);
|
|
200086
|
+
part.push(ext3);
|
|
200087
|
+
i = __privateMethod(_b = _AST, _parseAST, parseAST_fn).call(_b, str2, ext3, i, opt);
|
|
200088
200088
|
continue;
|
|
200089
200089
|
}
|
|
200090
200090
|
if (c === "|") {
|
|
@@ -200186,15 +200186,15 @@ var minimatch = (p, pattern, options = {}) => {
|
|
|
200186
200186
|
return new Minimatch(pattern, options).match(p);
|
|
200187
200187
|
};
|
|
200188
200188
|
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
200189
|
-
var starDotExtTest = (
|
|
200190
|
-
var starDotExtTestDot = (
|
|
200191
|
-
var starDotExtTestNocase = (
|
|
200192
|
-
|
|
200193
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(
|
|
200189
|
+
var starDotExtTest = (ext3) => (f) => !f.startsWith(".") && f.endsWith(ext3);
|
|
200190
|
+
var starDotExtTestDot = (ext3) => (f) => f.endsWith(ext3);
|
|
200191
|
+
var starDotExtTestNocase = (ext3) => {
|
|
200192
|
+
ext3 = ext3.toLowerCase();
|
|
200193
|
+
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext3);
|
|
200194
200194
|
};
|
|
200195
|
-
var starDotExtTestNocaseDot = (
|
|
200196
|
-
|
|
200197
|
-
return (f) => f.toLowerCase().endsWith(
|
|
200195
|
+
var starDotExtTestNocaseDot = (ext3) => {
|
|
200196
|
+
ext3 = ext3.toLowerCase();
|
|
200197
|
+
return (f) => f.toLowerCase().endsWith(ext3);
|
|
200198
200198
|
};
|
|
200199
200199
|
var starDotStarRE = /^\*+\.\*+$/;
|
|
200200
200200
|
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
@@ -200205,27 +200205,27 @@ var starRE = /^\*+$/;
|
|
|
200205
200205
|
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
200206
200206
|
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
200207
200207
|
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
200208
|
-
var qmarksTestNocase = ([$0,
|
|
200208
|
+
var qmarksTestNocase = ([$0, ext3 = ""]) => {
|
|
200209
200209
|
const noext = qmarksTestNoExt([$0]);
|
|
200210
|
-
if (!
|
|
200210
|
+
if (!ext3)
|
|
200211
200211
|
return noext;
|
|
200212
|
-
|
|
200213
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(
|
|
200212
|
+
ext3 = ext3.toLowerCase();
|
|
200213
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext3);
|
|
200214
200214
|
};
|
|
200215
|
-
var qmarksTestNocaseDot = ([$0,
|
|
200215
|
+
var qmarksTestNocaseDot = ([$0, ext3 = ""]) => {
|
|
200216
200216
|
const noext = qmarksTestNoExtDot([$0]);
|
|
200217
|
-
if (!
|
|
200217
|
+
if (!ext3)
|
|
200218
200218
|
return noext;
|
|
200219
|
-
|
|
200220
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(
|
|
200219
|
+
ext3 = ext3.toLowerCase();
|
|
200220
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext3);
|
|
200221
200221
|
};
|
|
200222
|
-
var qmarksTestDot = ([$0,
|
|
200222
|
+
var qmarksTestDot = ([$0, ext3 = ""]) => {
|
|
200223
200223
|
const noext = qmarksTestNoExtDot([$0]);
|
|
200224
|
-
return !
|
|
200224
|
+
return !ext3 ? noext : (f) => noext(f) && f.endsWith(ext3);
|
|
200225
200225
|
};
|
|
200226
|
-
var qmarksTest = ([$0,
|
|
200226
|
+
var qmarksTest = ([$0, ext3 = ""]) => {
|
|
200227
200227
|
const noext = qmarksTestNoExt([$0]);
|
|
200228
|
-
return !
|
|
200228
|
+
return !ext3 ? noext : (f) => noext(f) && f.endsWith(ext3);
|
|
200229
200229
|
};
|
|
200230
200230
|
var qmarksTestNoExt = ([$0]) => {
|
|
200231
200231
|
const len = $0.length;
|
|
@@ -202156,28 +202156,37 @@ function handler2(args) {
|
|
|
202156
202156
|
// src/cmd/translate/extract.ts
|
|
202157
202157
|
var import_assert3 = require("assert");
|
|
202158
202158
|
var import_promises5 = require("fs/promises");
|
|
202159
|
-
var
|
|
202159
|
+
var import_path33 = require("path");
|
|
202160
202160
|
var import_async3 = __toESM2(require_async());
|
|
202161
202161
|
var import_translation3 = require("@diplodoc/translation");
|
|
202162
202162
|
|
|
202163
202163
|
// src/cmd/translate/utils/index.ts
|
|
202164
202164
|
var import_assert2 = require("assert");
|
|
202165
|
-
var
|
|
202165
|
+
var import_path32 = require("path");
|
|
202166
202166
|
var import_node_fs = require("fs");
|
|
202167
202167
|
var import_glob4 = __toESM2(require_glob());
|
|
202168
202168
|
|
|
202169
202169
|
// src/cmd/translate/utils/fs.ts
|
|
202170
202170
|
var import_translation = require("@diplodoc/translation");
|
|
202171
|
-
var import_path32 = require("path");
|
|
202172
202171
|
var import_promises4 = require("fs/promises");
|
|
202172
|
+
function last2(array) {
|
|
202173
|
+
return array[array.length - 1];
|
|
202174
|
+
}
|
|
202175
|
+
function ext2(path2) {
|
|
202176
|
+
const parts = path2.split(".");
|
|
202177
|
+
if (last2(parts) === "skl") {
|
|
202178
|
+
parts.pop();
|
|
202179
|
+
}
|
|
202180
|
+
return last2(parts);
|
|
202181
|
+
}
|
|
202173
202182
|
function parseFile(text, path2) {
|
|
202174
202183
|
if (typeof text !== "string") {
|
|
202175
202184
|
return text;
|
|
202176
202185
|
}
|
|
202177
|
-
switch ((
|
|
202178
|
-
case "
|
|
202186
|
+
switch (ext2(path2)) {
|
|
202187
|
+
case "yaml":
|
|
202179
202188
|
return load(text);
|
|
202180
|
-
case "
|
|
202189
|
+
case "json":
|
|
202181
202190
|
return JSON.parse(text);
|
|
202182
202191
|
default:
|
|
202183
202192
|
return text;
|
|
@@ -202187,20 +202196,20 @@ function stringifyFile(content, path2) {
|
|
|
202187
202196
|
if (typeof content === "string") {
|
|
202188
202197
|
return content;
|
|
202189
202198
|
}
|
|
202190
|
-
switch ((
|
|
202191
|
-
case "
|
|
202199
|
+
switch (ext2(path2)) {
|
|
202200
|
+
case "yaml":
|
|
202192
202201
|
return dump(content);
|
|
202193
|
-
case "
|
|
202202
|
+
case "json":
|
|
202194
202203
|
return JSON.stringify(content);
|
|
202195
202204
|
default:
|
|
202196
202205
|
return content;
|
|
202197
202206
|
}
|
|
202198
202207
|
}
|
|
202199
|
-
function loadFile(path2) {
|
|
202208
|
+
function loadFile(path2, resolve21 = true) {
|
|
202200
202209
|
return __async(this, null, function* () {
|
|
202201
202210
|
const text = yield (0, import_promises4.readFile)(path2, "utf8");
|
|
202202
202211
|
let content = parseFile(text, path2);
|
|
202203
|
-
if (content && typeof content === "object") {
|
|
202212
|
+
if (content && typeof content === "object" && resolve21) {
|
|
202204
202213
|
content = yield (0, import_translation.resolveRefs)(content, path2, parseFile);
|
|
202205
202214
|
}
|
|
202206
202215
|
return content;
|
|
@@ -202212,6 +202221,20 @@ function dumpFile(path2, content) {
|
|
|
202212
202221
|
yield (0, import_promises4.writeFile)(path2, text, "utf8");
|
|
202213
202222
|
});
|
|
202214
202223
|
}
|
|
202224
|
+
function resolveSchemas(path2) {
|
|
202225
|
+
return __async(this, null, function* () {
|
|
202226
|
+
if (path2.endsWith("toc.yaml")) {
|
|
202227
|
+
return [yield loadFile("schemas/toc-schema.yaml", false)];
|
|
202228
|
+
}
|
|
202229
|
+
if (path2.endsWith("index.yaml")) {
|
|
202230
|
+
return [yield loadFile("schemas/leading-schema.yaml", false)];
|
|
202231
|
+
}
|
|
202232
|
+
if (path2.endsWith("presets.yaml")) {
|
|
202233
|
+
return [yield loadFile("schemas/presets-schema.yaml", false)];
|
|
202234
|
+
}
|
|
202235
|
+
return [yield loadFile("schemas/toc-schema.yaml", false)];
|
|
202236
|
+
});
|
|
202237
|
+
}
|
|
202215
202238
|
|
|
202216
202239
|
// src/cmd/translate/utils/translate.ts
|
|
202217
202240
|
var import_translation2 = require("@diplodoc/translation");
|
|
@@ -202349,30 +202372,30 @@ function normalizeInput(params, language, exts) {
|
|
|
202349
202372
|
include = [].concat(include);
|
|
202350
202373
|
exclude = [].concat(exclude);
|
|
202351
202374
|
let files = null;
|
|
202352
|
-
if ((0,
|
|
202375
|
+
if ((0, import_path32.extname)(input) === ".list") {
|
|
202353
202376
|
const list2 = (0, import_node_fs.readFileSync)(input, "utf8").split("\n");
|
|
202354
|
-
input = (0,
|
|
202377
|
+
input = (0, import_path32.dirname)(input);
|
|
202355
202378
|
files = list2.map((file) => {
|
|
202356
|
-
const absPath = (0,
|
|
202379
|
+
const absPath = (0, import_path32.resolve)(input, file);
|
|
202357
202380
|
if (!absPath.startsWith(input)) {
|
|
202358
202381
|
throw new Error(`Insecure access to file out of project scope. (file: ${absPath})`);
|
|
202359
202382
|
}
|
|
202360
|
-
if (!exts.includes((0,
|
|
202383
|
+
if (!exts.includes((0, import_path32.extname)(file))) {
|
|
202361
202384
|
throw new Error(`Unhandles file extension. (file: ${absPath})`);
|
|
202362
202385
|
}
|
|
202363
202386
|
return absPath;
|
|
202364
202387
|
});
|
|
202365
202388
|
} else {
|
|
202366
|
-
if (exts.includes((0,
|
|
202367
|
-
files = [(0,
|
|
202368
|
-
input = (0,
|
|
202389
|
+
if (exts.includes((0, import_path32.extname)(input))) {
|
|
202390
|
+
files = [(0, import_path32.basename)(input)];
|
|
202391
|
+
input = (0, import_path32.dirname)(input);
|
|
202369
202392
|
}
|
|
202370
202393
|
if (!include.length) {
|
|
202371
202394
|
include.push("...");
|
|
202372
202395
|
}
|
|
202373
202396
|
include = include.reduce((acc, item) => {
|
|
202374
202397
|
if (item === "...") {
|
|
202375
|
-
acc.push(...exts.map((
|
|
202398
|
+
acc.push(...exts.map((ext3) => (language || ".") + "/**/*" + ext3));
|
|
202376
202399
|
} else {
|
|
202377
202400
|
acc.push(item);
|
|
202378
202401
|
}
|
|
@@ -202390,9 +202413,6 @@ function normalizeInput(params, language, exts) {
|
|
|
202390
202413
|
}
|
|
202391
202414
|
return { input, files };
|
|
202392
202415
|
}
|
|
202393
|
-
function resolveSchemas(_path) {
|
|
202394
|
-
return null;
|
|
202395
|
-
}
|
|
202396
202416
|
var Defer = class {
|
|
202397
202417
|
constructor() {
|
|
202398
202418
|
this.promise = new Promise((resolve21, reject) => {
|
|
@@ -202455,37 +202475,35 @@ function handler3(args) {
|
|
|
202455
202475
|
}
|
|
202456
202476
|
function pipeline2(params) {
|
|
202457
202477
|
const { input, output, source, target } = params;
|
|
202458
|
-
const inputRoot = (0,
|
|
202459
|
-
const outputRoot = (0,
|
|
202478
|
+
const inputRoot = (0, import_path33.resolve)(input);
|
|
202479
|
+
const outputRoot = (0, import_path33.resolve)(output);
|
|
202460
202480
|
return (path2) => __async(this, null, function* () {
|
|
202461
|
-
const
|
|
202462
|
-
if (![".yaml", ".json", ".md"].includes(
|
|
202481
|
+
const ext3 = (0, import_path33.extname)(path2);
|
|
202482
|
+
if (![".yaml", ".json", ".md"].includes(ext3)) {
|
|
202463
202483
|
return;
|
|
202464
202484
|
}
|
|
202465
|
-
const inputPath = (0,
|
|
202485
|
+
const inputPath = (0, import_path33.join)(inputRoot, path2);
|
|
202466
202486
|
const outputPath = path2.replace(source.language, target.language);
|
|
202467
|
-
const xliffPath = (0,
|
|
202468
|
-
const skeletonPath = (0,
|
|
202469
|
-
|
|
202470
|
-
if ([".yaml", ".json"].includes(ext2)) {
|
|
202471
|
-
schemas = resolveSchemas(path2);
|
|
202472
|
-
if (!schemas) {
|
|
202473
|
-
return;
|
|
202474
|
-
}
|
|
202475
|
-
}
|
|
202487
|
+
const xliffPath = (0, import_path33.join)(outputRoot, outputPath + ".xliff");
|
|
202488
|
+
const skeletonPath = (0, import_path33.join)(outputRoot, outputPath + ".skl");
|
|
202489
|
+
const schemas = yield resolveSchemas(path2);
|
|
202476
202490
|
const content = yield loadFile(inputPath);
|
|
202477
|
-
yield (0, import_promises5.mkdir)((0,
|
|
202478
|
-
const { xliff, skeleton } = (0, import_translation3.extract)(content, {
|
|
202491
|
+
yield (0, import_promises5.mkdir)((0, import_path33.dirname)(xliffPath), { recursive: true });
|
|
202492
|
+
const { xliff, skeleton, units } = (0, import_translation3.extract)(content, {
|
|
202479
202493
|
source,
|
|
202480
|
-
target
|
|
202494
|
+
target,
|
|
202495
|
+
schemas
|
|
202481
202496
|
});
|
|
202497
|
+
if (!units.length) {
|
|
202498
|
+
return;
|
|
202499
|
+
}
|
|
202482
202500
|
yield Promise.all([dumpFile(skeletonPath, skeleton), dumpFile(xliffPath, xliff)]);
|
|
202483
202501
|
});
|
|
202484
202502
|
}
|
|
202485
202503
|
|
|
202486
202504
|
// src/cmd/translate/compose.ts
|
|
202487
202505
|
var import_promises6 = require("fs/promises");
|
|
202488
|
-
var
|
|
202506
|
+
var import_path34 = require("path");
|
|
202489
202507
|
var import_async4 = __toESM2(require_async());
|
|
202490
202508
|
var import_translation4 = require("@diplodoc/translation");
|
|
202491
202509
|
var command3 = "compose";
|
|
@@ -202523,10 +202541,10 @@ function handler4(args) {
|
|
|
202523
202541
|
} = argv_default.getConfig();
|
|
202524
202542
|
const pairs2 = files.reduce(
|
|
202525
202543
|
(acc, file) => {
|
|
202526
|
-
const
|
|
202527
|
-
const path2 = file.slice(0, -
|
|
202528
|
-
acc[path2] = acc[path2] || { path: path2, ext:
|
|
202529
|
-
acc[path2][
|
|
202544
|
+
const ext3 = (0, import_path34.extname)(file);
|
|
202545
|
+
const path2 = file.slice(0, -ext3.length);
|
|
202546
|
+
acc[path2] = acc[path2] || { path: path2, ext: ext3 };
|
|
202547
|
+
acc[path2][ext3.slice(1)] = file;
|
|
202530
202548
|
return acc;
|
|
202531
202549
|
},
|
|
202532
202550
|
{}
|
|
@@ -202538,19 +202556,13 @@ function handler4(args) {
|
|
|
202538
202556
|
function pipeline3(input, output, { useSource }) {
|
|
202539
202557
|
return (file) => __async(this, null, function* () {
|
|
202540
202558
|
const [skeleton, xliff] = yield Promise.all([
|
|
202541
|
-
loadFile((0,
|
|
202542
|
-
loadFile((0,
|
|
202559
|
+
loadFile((0, import_path34.join)(input, file.skl)),
|
|
202560
|
+
loadFile((0, import_path34.join)(input, file.xliff))
|
|
202543
202561
|
]);
|
|
202544
|
-
|
|
202545
|
-
if ([".yaml", ".json"].includes(file.ext)) {
|
|
202546
|
-
schemas = resolveSchemas(file.path);
|
|
202547
|
-
if (!schemas) {
|
|
202548
|
-
return;
|
|
202549
|
-
}
|
|
202550
|
-
}
|
|
202562
|
+
const schemas = yield resolveSchemas(file.path);
|
|
202551
202563
|
const result = (0, import_translation4.compose)(skeleton, xliff, { useSource, schemas });
|
|
202552
|
-
const filePath = (0,
|
|
202553
|
-
yield (0, import_promises6.mkdir)((0,
|
|
202564
|
+
const filePath = (0, import_path34.join)(output, file.path);
|
|
202565
|
+
yield (0, import_promises6.mkdir)((0, import_path34.dirname)(filePath), { recursive: true });
|
|
202554
202566
|
yield dumpFile(filePath, result);
|
|
202555
202567
|
});
|
|
202556
202568
|
}
|
|
@@ -205554,7 +205566,7 @@ var {
|
|
|
205554
205566
|
// src/cmd/translate/handler.ts
|
|
205555
205567
|
var import_chalk5 = __toESM2(require_source());
|
|
205556
205568
|
var import_assert4 = require("assert");
|
|
205557
|
-
var
|
|
205569
|
+
var import_path35 = require("path");
|
|
205558
205570
|
var import_promises7 = require("fs/promises");
|
|
205559
205571
|
|
|
205560
205572
|
// src/cmd/translate/yandex/auth.ts
|
|
@@ -205747,22 +205759,24 @@ function requester(params, cache2) {
|
|
|
205747
205759
|
}
|
|
205748
205760
|
function translator(params, split) {
|
|
205749
205761
|
const { input, output, sourceLanguage, targetLanguage } = params;
|
|
205750
|
-
const inputRoot = (0,
|
|
205751
|
-
const outputRoot = (0,
|
|
205762
|
+
const inputRoot = (0, import_path35.resolve)(input);
|
|
205763
|
+
const outputRoot = (0, import_path35.resolve)(output);
|
|
205752
205764
|
return (path2) => __async(this, null, function* () {
|
|
205753
|
-
const
|
|
205754
|
-
if (![".yaml", ".json", ".md"].includes(
|
|
205765
|
+
const ext3 = (0, import_path35.extname)(path2);
|
|
205766
|
+
if (![".yaml", ".json", ".md"].includes(ext3)) {
|
|
205755
205767
|
return;
|
|
205756
205768
|
}
|
|
205757
|
-
const inputPath = (0,
|
|
205758
|
-
const outputPath = (0,
|
|
205769
|
+
const inputPath = (0, import_path35.join)(inputRoot, path2);
|
|
205770
|
+
const outputPath = (0, import_path35.join)(outputRoot, path2.replace(sourceLanguage, targetLanguage));
|
|
205759
205771
|
const content = yield loadFile(inputPath);
|
|
205760
|
-
yield (0, import_promises7.mkdir)((0,
|
|
205772
|
+
yield (0, import_promises7.mkdir)((0, import_path35.dirname)(outputPath), { recursive: true });
|
|
205761
205773
|
if (!content) {
|
|
205762
205774
|
yield dumpFile(outputPath, content);
|
|
205763
205775
|
return;
|
|
205764
205776
|
}
|
|
205777
|
+
const schemas = yield resolveSchemas(path2);
|
|
205765
205778
|
const { units, skeleton } = extract2(content, {
|
|
205779
|
+
compact: true,
|
|
205766
205780
|
source: {
|
|
205767
205781
|
language: sourceLanguage,
|
|
205768
205782
|
locale: "RU"
|
|
@@ -205770,14 +205784,15 @@ function translator(params, split) {
|
|
|
205770
205784
|
target: {
|
|
205771
205785
|
language: targetLanguage,
|
|
205772
205786
|
locale: "US"
|
|
205773
|
-
}
|
|
205787
|
+
},
|
|
205788
|
+
schemas
|
|
205774
205789
|
});
|
|
205775
205790
|
if (!units.length) {
|
|
205776
205791
|
yield dumpFile(outputPath, content);
|
|
205777
205792
|
return;
|
|
205778
205793
|
}
|
|
205779
205794
|
const parts = yield split(path2, units);
|
|
205780
|
-
const composed = compose(skeleton, parts, { useSource: true });
|
|
205795
|
+
const composed = compose(skeleton, parts, { useSource: true, schemas });
|
|
205781
205796
|
yield dumpFile(outputPath, composed);
|
|
205782
205797
|
});
|
|
205783
205798
|
}
|
|
@@ -205901,7 +205916,7 @@ import_yargs.default.command(build).command(publish).command(translate).option("
|
|
|
205901
205916
|
default: false,
|
|
205902
205917
|
describe: "Run in quiet mode. Don't write logs to stdout",
|
|
205903
205918
|
type: "boolean"
|
|
205904
|
-
}).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.
|
|
205919
|
+
}).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.16.0" : "").help().parse((0, import_helpers.hideBin)(process.argv), {}, (err, { strict }, output) => {
|
|
205905
205920
|
console.timeEnd(MAIN_TIMER_ID);
|
|
205906
205921
|
if (err) {
|
|
205907
205922
|
console.error(err);
|