@diplodoc/cli-tests 0.0.0-rc-fix-translate-openapi-includer-202507171205 → 0.0.0-rc-liquid-conditions-saving-202509050811

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.
Files changed (108) hide show
  1. package/e2e/__snapshots__/generate-map.spec.ts.snap +345 -0
  2. package/e2e/__snapshots__/include-toc.test.ts.snap +8 -0
  3. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +64 -59
  4. package/e2e/__snapshots__/metadata.spec.ts.snap +29 -24
  5. package/e2e/__snapshots__/preprocess.test.ts.snap +549 -0
  6. package/e2e/__snapshots__/regression.test.ts.snap +177 -142
  7. package/e2e/__snapshots__/rtl.spec.ts.snap +44 -41
  8. package/e2e/__snapshots__/search.test.ts.snap +37 -22
  9. package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +211 -0
  10. package/e2e/__snapshots__/translation.spec.ts.snap +518 -2
  11. package/e2e/errors.spec.ts +33 -2
  12. package/e2e/generate-map.spec.ts +9 -3
  13. package/e2e/preprocess.test.ts +33 -0
  14. package/e2e/redirects-validation.spec.ts +61 -0
  15. package/e2e/search.test.ts +1 -1
  16. package/e2e/skip-html-extension.spec.ts +15 -0
  17. package/e2e/translation.spec.ts +47 -2
  18. package/fixtures/cliAdapter.ts +23 -0
  19. package/fixtures/globals.d.ts +4 -0
  20. package/fixtures/runners/binary.ts +4 -3
  21. package/fixtures/runners/types.ts +1 -2
  22. package/fixtures/utils/file.ts +5 -5
  23. package/fixtures/utils/test.ts +17 -8
  24. package/mocks/docs-viewer-interface/input/.yfm +6 -0
  25. package/mocks/docs-viewer-interface/input/index.md +3 -0
  26. package/mocks/docs-viewer-interface/input/toc.yaml +5 -0
  27. package/mocks/errors/extract-filtered-link/input/filtered.md +1 -0
  28. package/mocks/errors/extract-filtered-link/input/filtered2.md +0 -0
  29. package/mocks/errors/extract-filtered-link/input/index.md +7 -0
  30. package/mocks/errors/extract-filtered-link/input/toc.yaml +1 -0
  31. package/mocks/load-custom-resources/md2html-with-resources/input/page.md +9 -2
  32. package/mocks/load-custom-resources/md2md-with-resources/input/page.md +9 -2
  33. package/mocks/load-custom-resources/single-page-with-resources/input/page.md +9 -2
  34. package/mocks/metadata/md2html-with-metadata/input/page.md +8 -1
  35. package/mocks/metadata/md2md-with-metadata/input/page.md +7 -0
  36. package/mocks/preprocess/input/.yfm +1 -0
  37. package/mocks/preprocess/input/1.md +29 -0
  38. package/mocks/preprocess/input/_assets/1.png +0 -0
  39. package/mocks/preprocess/input/_assets/1.svg +0 -0
  40. package/mocks/preprocess/input/autotitle.md +23 -0
  41. package/mocks/preprocess/input/commented-include.md +3 -0
  42. package/mocks/preprocess/input/images.md +5 -0
  43. package/mocks/preprocess/input/included-item.md +12 -0
  44. package/mocks/preprocess/input/includes/deep.md +1 -0
  45. package/mocks/preprocess/input/includes/deepWithIndent.md +6 -0
  46. package/mocks/preprocess/input/includes/presets.yaml +2 -0
  47. package/mocks/preprocess/input/includes/sub/user.md +1 -0
  48. package/mocks/preprocess/input/includes/sub/userWithIndent.md +5 -0
  49. package/mocks/preprocess/input/includes/test.md +1 -0
  50. package/mocks/preprocess/input/includes/user.md +1 -0
  51. package/mocks/preprocess/input/includes.md +18 -0
  52. package/mocks/preprocess/input/latex.md +3 -0
  53. package/mocks/preprocess/input/mermaid.md +13 -0
  54. package/mocks/preprocess/input/presets.yaml +8 -0
  55. package/mocks/preprocess/input/sub/folder/item-1.md +7 -0
  56. package/mocks/preprocess/input/sub/toc.yaml +5 -0
  57. package/mocks/preprocess/input/toc-i.yaml +3 -0
  58. package/mocks/preprocess/input/toc.yaml +16 -0
  59. package/mocks/redirects-validation/extensions-deprecation/input/blah.md +0 -0
  60. package/mocks/redirects-validation/extensions-deprecation/input/redirects.yaml +5 -0
  61. package/mocks/redirects-validation/extensions-deprecation/input/toc.yaml +4 -0
  62. package/mocks/redirects-validation/invalid-regex/input/blah.md +0 -0
  63. package/mocks/redirects-validation/invalid-regex/input/redirects.yaml +3 -0
  64. package/mocks/redirects-validation/invalid-regex/input/toc.yaml +4 -0
  65. package/mocks/redirects-validation/malformed-redirect/input/blah.md +0 -0
  66. package/mocks/redirects-validation/malformed-redirect/input/redirects.yaml +6 -0
  67. package/mocks/redirects-validation/malformed-redirect/input/toc.yaml +4 -0
  68. package/mocks/redirects-validation/same-path/input/blah.md +0 -0
  69. package/mocks/redirects-validation/same-path/input/redirects.yaml +3 -0
  70. package/mocks/redirects-validation/same-path/input/toc.yaml +4 -0
  71. package/mocks/redirects-validation/unparseable/input/blah.md +0 -0
  72. package/mocks/redirects-validation/unparseable/input/redirects.yaml +11 -0
  73. package/mocks/redirects-validation/unparseable/input/toc.yaml +4 -0
  74. package/mocks/regression/input/.yfm +2 -0
  75. package/mocks/regression/input/images.md +2 -0
  76. package/mocks/regression/input/includes/deep.md +2 -0
  77. package/mocks/regression/input/includes/presets.yaml +1 -0
  78. package/mocks/regression/input/includes/tools.md +1 -0
  79. package/mocks/regression/input/includes.md +5 -0
  80. package/mocks/regression/input/merge/merge.md +2 -0
  81. package/mocks/regression/input/merge/presets.yaml +1 -0
  82. package/mocks/regression/input/merge/toc.yaml +2 -0
  83. package/mocks/regression/input/presets.yaml +1 -0
  84. package/mocks/regression/input/toc.yaml +2 -0
  85. package/mocks/search/input/.yfm +12 -0
  86. package/mocks/skip-html-extension/input/.yfm +1 -0
  87. package/mocks/skip-html-extension/input/folder/index.md +1 -0
  88. package/mocks/skip-html-extension/input/index-test-html/index.md +4 -0
  89. package/mocks/skip-html-extension/input/index.md +6 -0
  90. package/mocks/skip-html-extension/input/page1.md +3 -0
  91. package/mocks/skip-html-extension/input/page2.md +6 -0
  92. package/mocks/skip-html-extension/input/toc.yaml +13 -0
  93. package/mocks/translation/conditions/input/index.md +37 -0
  94. package/mocks/translation/dir-files/input/.yfm +6 -0
  95. package/mocks/translation/dir-files/input/ru/aboba.md +2 -4
  96. package/mocks/translation/dir-files/input/ru/nested/a1.md +3 -0
  97. package/mocks/translation/dir-files/input/ru/nested/folder1/a1.md +3 -0
  98. package/mocks/translation/dir-files/input/ru/nested/folder1/toc-i.yaml +3 -0
  99. package/mocks/translation/dir-files/input/ru/nested/syntax/base.md +2 -0
  100. package/mocks/translation/dir-files/input/ru/nested/toc.yaml +1 -0
  101. package/mocks/translation/dir-files/input/ru/no-var-page.md +3 -0
  102. package/mocks/translation/dir-files/input/ru/to-be-excluded.md +1 -0
  103. package/mocks/translation/dir-files/input/ru/toc.yaml +7 -1
  104. package/mocks/translation/openapi/input/toc.yaml +1 -1
  105. package/mocks/warning/unreachable-autotitle/input/index.md +1 -0
  106. package/mocks/warning/unreachable-autotitle/input/link.md +0 -0
  107. package/mocks/warning/unreachable-autotitle/input/toc.yaml +4 -0
  108. package/package.json +5 -5
@@ -13,6 +13,76 @@ exports[`Generate map for > project with external links in toc 1`] = `
13
13
  }"
14
14
  `;
15
15
 
16
+ exports[`Generate map for > project with external links in toc 2`] = `
17
+ {
18
+ "fileTrie": {
19
+ "tocMapping": {
20
+ "t0": "ru/toc.yaml",
21
+ },
22
+ "trie": {
23
+ "ru": {
24
+ "children": {
25
+ "folder1": {
26
+ "children": {
27
+ "a1": {
28
+ "file": {
29
+ "ext": ".md",
30
+ "toc": "t0",
31
+ },
32
+ },
33
+ "folder2": {
34
+ "children": {
35
+ "a1": {
36
+ "file": {
37
+ "ext": ".md",
38
+ "toc": "t0",
39
+ },
40
+ },
41
+ },
42
+ },
43
+ },
44
+ },
45
+ "index": {
46
+ "file": {
47
+ "ext": ".md",
48
+ "toc": "t0",
49
+ },
50
+ },
51
+ "plugins": {
52
+ "children": {
53
+ "index": {
54
+ "file": {
55
+ "ext": ".md",
56
+ "toc": "t0",
57
+ },
58
+ },
59
+ },
60
+ },
61
+ "project": {
62
+ "children": {
63
+ "index": {
64
+ "file": {
65
+ "ext": ".md",
66
+ "toc": "t0",
67
+ },
68
+ },
69
+ },
70
+ },
71
+ "settings": {
72
+ "file": {
73
+ "ext": ".md",
74
+ "toc": "t0",
75
+ },
76
+ },
77
+ },
78
+ },
79
+ },
80
+ },
81
+ "redirects": {},
82
+ "yfmConfig": {},
83
+ }
84
+ `;
85
+
16
86
  exports[`Generate map for > project with multiple language 1`] = `
17
87
  "{
18
88
  "files": [
@@ -32,6 +102,117 @@ exports[`Generate map for > project with multiple language 1`] = `
32
102
  }"
33
103
  `;
34
104
 
105
+ exports[`Generate map for > project with multiple language 2`] = `
106
+ {
107
+ "fileTrie": {
108
+ "tocMapping": {
109
+ "t0": "en/toc.yaml",
110
+ "t1": "ru/toc.yaml",
111
+ },
112
+ "trie": {
113
+ "en": {
114
+ "children": {
115
+ "index": {
116
+ "file": {
117
+ "ext": ".md",
118
+ "toc": "t0",
119
+ },
120
+ },
121
+ "plugins": {
122
+ "children": {
123
+ "import": {
124
+ "file": {
125
+ "ext": ".md",
126
+ "toc": "t0",
127
+ },
128
+ },
129
+ "index": {
130
+ "file": {
131
+ "ext": ".md",
132
+ "toc": "t0",
133
+ },
134
+ },
135
+ },
136
+ },
137
+ "project": {
138
+ "children": {
139
+ "config": {
140
+ "file": {
141
+ "ext": ".md",
142
+ "toc": "t0",
143
+ },
144
+ },
145
+ "index": {
146
+ "file": {
147
+ "ext": ".md",
148
+ "toc": "t0",
149
+ },
150
+ },
151
+ },
152
+ },
153
+ "settings": {
154
+ "file": {
155
+ "ext": ".md",
156
+ "toc": "t0",
157
+ },
158
+ },
159
+ },
160
+ },
161
+ "ru": {
162
+ "children": {
163
+ "index": {
164
+ "file": {
165
+ "ext": ".md",
166
+ "toc": "t1",
167
+ },
168
+ },
169
+ "plugins": {
170
+ "children": {
171
+ "import": {
172
+ "file": {
173
+ "ext": ".md",
174
+ "toc": "t1",
175
+ },
176
+ },
177
+ "index": {
178
+ "file": {
179
+ "ext": ".md",
180
+ "toc": "t1",
181
+ },
182
+ },
183
+ },
184
+ },
185
+ "project": {
186
+ "children": {
187
+ "config": {
188
+ "file": {
189
+ "ext": ".md",
190
+ "toc": "t1",
191
+ },
192
+ },
193
+ "index": {
194
+ "file": {
195
+ "ext": ".md",
196
+ "toc": "t1",
197
+ },
198
+ },
199
+ },
200
+ },
201
+ "settings": {
202
+ "file": {
203
+ "ext": ".md",
204
+ "toc": "t1",
205
+ },
206
+ },
207
+ },
208
+ },
209
+ },
210
+ },
211
+ "redirects": {},
212
+ "yfmConfig": {},
213
+ }
214
+ `;
215
+
35
216
  exports[`Generate map for > project with single language and toc include - only md2html 1`] = `
36
217
  "{
37
218
  "files": [
@@ -47,6 +228,88 @@ exports[`Generate map for > project with single language and toc include - only
47
228
  }"
48
229
  `;
49
230
 
231
+ exports[`Generate map for > project with single language and toc include - only md2html 2`] = `
232
+ {
233
+ "fileTrie": {
234
+ "tocMapping": {
235
+ "t0": "ru/toc.yaml",
236
+ },
237
+ "trie": {
238
+ "ru": {
239
+ "children": {
240
+ "folder1": {
241
+ "children": {
242
+ "a1": {
243
+ "file": {
244
+ "ext": ".md",
245
+ "toc": "t0",
246
+ },
247
+ },
248
+ "folder2": {
249
+ "children": {
250
+ "a1": {
251
+ "file": {
252
+ "ext": ".md",
253
+ "toc": "t0",
254
+ },
255
+ },
256
+ },
257
+ },
258
+ },
259
+ },
260
+ "index": {
261
+ "file": {
262
+ "ext": ".md",
263
+ "toc": "t0",
264
+ },
265
+ },
266
+ "plugins": {
267
+ "children": {
268
+ "import": {
269
+ "file": {
270
+ "ext": ".md",
271
+ "toc": "t0",
272
+ },
273
+ },
274
+ "index": {
275
+ "file": {
276
+ "ext": ".md",
277
+ "toc": "t0",
278
+ },
279
+ },
280
+ },
281
+ },
282
+ "project": {
283
+ "children": {
284
+ "config": {
285
+ "file": {
286
+ "ext": ".md",
287
+ "toc": "t0",
288
+ },
289
+ },
290
+ "index": {
291
+ "file": {
292
+ "ext": ".md",
293
+ "toc": "t0",
294
+ },
295
+ },
296
+ },
297
+ },
298
+ "settings": {
299
+ "file": {
300
+ "ext": ".md",
301
+ "toc": "t0",
302
+ },
303
+ },
304
+ },
305
+ },
306
+ },
307
+ },
308
+ "redirects": {},
309
+ "yfmConfig": {},
310
+ }
311
+ `;
312
+
50
313
  exports[`Generate map for > project with single language and toc include 1`] = `
51
314
  "{
52
315
  "files": [
@@ -61,3 +324,85 @@ exports[`Generate map for > project with single language and toc include 1`] = `
61
324
  ]
62
325
  }"
63
326
  `;
327
+
328
+ exports[`Generate map for > project with single language and toc include 2`] = `
329
+ {
330
+ "fileTrie": {
331
+ "tocMapping": {
332
+ "t0": "ru/toc.yaml",
333
+ },
334
+ "trie": {
335
+ "ru": {
336
+ "children": {
337
+ "folder1": {
338
+ "children": {
339
+ "a1": {
340
+ "file": {
341
+ "ext": ".md",
342
+ "toc": "t0",
343
+ },
344
+ },
345
+ "folder2": {
346
+ "children": {
347
+ "a1": {
348
+ "file": {
349
+ "ext": ".md",
350
+ "toc": "t0",
351
+ },
352
+ },
353
+ },
354
+ },
355
+ },
356
+ },
357
+ "index": {
358
+ "file": {
359
+ "ext": ".md",
360
+ "toc": "t0",
361
+ },
362
+ },
363
+ "plugins": {
364
+ "children": {
365
+ "import": {
366
+ "file": {
367
+ "ext": ".md",
368
+ "toc": "t0",
369
+ },
370
+ },
371
+ "index": {
372
+ "file": {
373
+ "ext": ".md",
374
+ "toc": "t0",
375
+ },
376
+ },
377
+ },
378
+ },
379
+ "project": {
380
+ "children": {
381
+ "config": {
382
+ "file": {
383
+ "ext": ".md",
384
+ "toc": "t0",
385
+ },
386
+ },
387
+ "index": {
388
+ "file": {
389
+ "ext": ".md",
390
+ "toc": "t0",
391
+ },
392
+ },
393
+ },
394
+ },
395
+ "settings": {
396
+ "file": {
397
+ "ext": ".md",
398
+ "toc": "t0",
399
+ },
400
+ },
401
+ },
402
+ },
403
+ },
404
+ },
405
+ "redirects": {},
406
+ "yfmConfig": {},
407
+ }
408
+ `;
@@ -23,6 +23,7 @@ exports[`Include toc > Nested toc inclusions with mixed including modes 2`] = `
23
23
  metadata:
24
24
  - name: generator
25
25
  content: Diplodoc Platform vDIPLODOC-VERSION
26
+ sourcePath: product1/core/article1.md
26
27
  ---
27
28
  This is the core content of Article 1.
28
29
 
@@ -70,6 +71,7 @@ exports[`Include toc > Nested toc inclusions with mixed including modes 5`] = `
70
71
  metadata:
71
72
  - name: generator
72
73
  content: Diplodoc Platform vDIPLODOC-VERSION
74
+ sourcePath: product2/overlay1/product/article1.md
73
75
  ---
74
76
  This is the overlay content of Article 1 for product 2.
75
77
 
@@ -87,6 +89,7 @@ exports[`Include toc > Nested toc inclusions with mixed including modes 7`] = `
87
89
  metadata:
88
90
  - name: generator
89
91
  content: Diplodoc Platform vDIPLODOC-VERSION
92
+ sourcePath: product2/overlay2/product/article1.md
90
93
  ---
91
94
  This is the overlay number #2 of Article 1 content for product 2.
92
95
 
@@ -104,6 +107,7 @@ exports[`Include toc > Nested toc inclusions with mixed including modes 9`] = `
104
107
  metadata:
105
108
  - name: generator
106
109
  content: Diplodoc Platform vDIPLODOC-VERSION
110
+ sourcePath: product2/core/article1.md
107
111
  ---
108
112
  This is the core content of Article 1.
109
113
 
@@ -231,6 +235,7 @@ exports[`Include toc > Toc is included inline, not as a new section 3`] = `
231
235
  metadata:
232
236
  - name: generator
233
237
  content: Diplodoc Platform vDIPLODOC-VERSION
238
+ sourcePath: folder/fileA.md
234
239
  title: File A
235
240
  description: YFM description
236
241
  ---
@@ -249,6 +254,7 @@ exports[`Include toc > Toc is included inline, not as a new section 4`] = `
249
254
  metadata:
250
255
  - name: generator
251
256
  content: Diplodoc Platform vDIPLODOC-VERSION
257
+ sourcePath: folder/fileB.md
252
258
  ---
253
259
  # File B
254
260
 
@@ -267,6 +273,7 @@ exports[`Include toc > Toc is included inline, not as a new section 5`] = `
267
273
  metadata:
268
274
  - name: generator
269
275
  content: Diplodoc Platform vDIPLODOC-VERSION
276
+ sourcePath: folder/folder/fileC.md
270
277
  ---
271
278
  # File C
272
279
  "
@@ -321,6 +328,7 @@ meta:
321
328
  metadata:
322
329
  - name: generator
323
330
  content: Diplodoc Platform vDIPLODOC-VERSION
331
+ sourcePath: ru/sub/folder/index.yaml
324
332
  "
325
333
  `;
326
334