@diplodoc/cli-tests 0.0.0-rc-err-count-202505291233 → 0.0.0-rc-ci-optimization-test-202506191355

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 (43) hide show
  1. package/e2e/__snapshots__/include-toc.test.ts.snap +98 -106
  2. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +66 -56
  3. package/e2e/__snapshots__/metadata.spec.ts.snap +19 -14
  4. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  5. package/e2e/__snapshots__/regression.test.ts.snap +764 -760
  6. package/e2e/__snapshots__/restricted-access.test.ts.snap +234 -0
  7. package/e2e/__snapshots__/rtl.spec.ts.snap +57 -47
  8. package/e2e/__snapshots__/translation.spec.ts.snap +366 -0
  9. package/e2e/errors.spec.ts +37 -0
  10. package/e2e/restricted-access.test.ts +21 -0
  11. package/fixtures/cliAdapter.ts +39 -20
  12. package/fixtures/runners/binary.ts +21 -3
  13. package/fixtures/runners/index.ts +3 -1
  14. package/fixtures/runners/source.ts +5 -5
  15. package/fixtures/runners/types.ts +7 -1
  16. package/fixtures/utils/file.ts +3 -3
  17. package/fixtures/utils/test.ts +6 -1
  18. package/mocks/errors/unreachable-link/input/exists.md +1 -0
  19. package/mocks/errors/unreachable-link/input/index.md +2 -0
  20. package/mocks/errors/unreachable-link/input/toc.yaml +1 -0
  21. package/mocks/regression/input/1.md +0 -4
  22. package/mocks/regression/input/_assets/5_1.png +0 -0
  23. package/mocks/regression/input/images.md +2 -0
  24. package/mocks/regression/input/includes.md +1 -0
  25. package/mocks/restricted-access/test1/input/index.md +0 -0
  26. package/mocks/restricted-access/test1/input/plugins/index.md +0 -0
  27. package/mocks/restricted-access/test1/input/plugins/index2.md +0 -0
  28. package/mocks/restricted-access/test1/input/plugins/index3.md +0 -0
  29. package/mocks/restricted-access/test1/input/plugins/index4.md +4 -0
  30. package/mocks/restricted-access/test1/input/toc.yaml +28 -0
  31. package/mocks/restricted-access/test2/input/index.md +0 -0
  32. package/mocks/restricted-access/test2/input/plugins/index.md +0 -0
  33. package/mocks/restricted-access/test2/input/project/index.md +0 -0
  34. package/mocks/restricted-access/test2/input/toc.yaml +21 -0
  35. package/mocks/restricted-access/test3/input/a1.md +1 -0
  36. package/mocks/restricted-access/test3/input/folder1/a1.md +1 -0
  37. package/mocks/restricted-access/test3/input/folder1/folder2/a1.md +1 -0
  38. package/mocks/restricted-access/test3/input/folder1/folder2/toc.yaml +8 -0
  39. package/mocks/restricted-access/test3/input/folder1/toc.yaml +10 -0
  40. package/mocks/restricted-access/test3/input/index.md +0 -0
  41. package/mocks/restricted-access/test3/input/toc.yaml +16 -0
  42. package/package.json +4 -3
  43. package/vitest.config.ts +1 -2
@@ -2,36 +2,56 @@
2
2
 
3
3
  exports[`Include toc > Nested toc inclusions with mixed including modes > filelist 1`] = `
4
4
  "[
5
- "product1/_includes/inc-bd8944f73bdd.md",
5
+ "product1/_includes/inc-hash.md",
6
6
  "product1/article1.md",
7
7
  "product1/toc.yaml",
8
- "product2/overlay1/_includes/inc-666e729492f5.md",
8
+ "product2/overlay1/_includes/inc-hash.md",
9
9
  "product2/overlay1/article1.md",
10
- "product2/overlay2/_includes/inc-666e729492f5.md",
10
+ "product2/overlay2/_includes/inc-hash.md",
11
11
  "product2/overlay2/article1.md",
12
- "product2/overlay3/_includes/inc-666e729492f5.md",
12
+ "product2/overlay3/_includes/inc-hash.md",
13
13
  "product2/overlay3/article1.md",
14
14
  "product2/p2.md",
15
15
  "product2/toc.yaml"
16
16
  ]"
17
17
  `;
18
18
 
19
- exports[`Include toc > Nested toc inclusions with mixed including modes > product1/_includes/inc-bd8944f73bdd.md 1`] = `"This is the core include."`;
19
+ exports[`Include toc > Nested toc inclusions with mixed including modes 1`] = `"This is the core include."`;
20
20
 
21
- exports[`Include toc > Nested toc inclusions with mixed including modes > product1/article1.md 1`] = `
21
+ exports[`Include toc > Nested toc inclusions with mixed including modes 2`] = `
22
22
  "---
23
23
  metadata:
24
24
  - name: generator
25
25
  content: Diplodoc Platform vDIPLODOC-VERSION
26
- sourcePath: product1/core/article1.md
27
26
  ---
28
27
  This is the core content of Article 1.
29
28
 
30
- {% include [x](_includes/inc-bd8944f73bdd.md) %}
29
+ {% include [x](_includes/inc-hash.md) %}
31
30
  "
32
31
  `;
33
32
 
34
- exports[`Include toc > Nested toc inclusions with mixed including modes > product1/toc.yaml 1`] = `
33
+ exports[`Include toc > Nested toc inclusions with mixed including modes 2 > filelist 1`] = `
34
+ "[
35
+ "toc.yaml"
36
+ ]"
37
+ `;
38
+
39
+ exports[`Include toc > Nested toc inclusions with mixed including modes 2 1`] = `
40
+ "title: main
41
+ items:
42
+ - name: toc_i/item
43
+ - name: core/toc_m/item
44
+ - name: overlay/toc_p/item
45
+ - name: core/toc_i/item
46
+ - name: test
47
+ items:
48
+ - name: core/concepts/toc_i/item
49
+ - name: core/concepts/toc_p/item
50
+ path: toc.yaml
51
+ "
52
+ `;
53
+
54
+ exports[`Include toc > Nested toc inclusions with mixed including modes 3`] = `
35
55
  "title: Product 1 title
36
56
  items:
37
57
  - name: Article1
@@ -40,61 +60,58 @@ path: product1/toc.yaml
40
60
  "
41
61
  `;
42
62
 
43
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/overlay1/_includes/inc-666e729492f5.md 1`] = `
63
+ exports[`Include toc > Nested toc inclusions with mixed including modes 4`] = `
44
64
  "This is the core include.
45
65
  "
46
66
  `;
47
67
 
48
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/overlay1/article1.md 1`] = `
68
+ exports[`Include toc > Nested toc inclusions with mixed including modes 5`] = `
49
69
  "---
50
70
  metadata:
51
71
  - name: generator
52
72
  content: Diplodoc Platform vDIPLODOC-VERSION
53
- sourcePath: product2/overlay1/product/article1.md
54
73
  ---
55
74
  This is the overlay content of Article 1 for product 2.
56
75
 
57
- {% include [x](_includes/inc-666e729492f5.md) %}
76
+ {% include [x](_includes/inc-hash.md) %}
58
77
  "
59
78
  `;
60
79
 
61
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/overlay2/_includes/inc-666e729492f5.md 1`] = `
80
+ exports[`Include toc > Nested toc inclusions with mixed including modes 6`] = `
62
81
  "This is the core include.
63
82
  "
64
83
  `;
65
84
 
66
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/overlay2/article1.md 1`] = `
85
+ exports[`Include toc > Nested toc inclusions with mixed including modes 7`] = `
67
86
  "---
68
87
  metadata:
69
88
  - name: generator
70
89
  content: Diplodoc Platform vDIPLODOC-VERSION
71
- sourcePath: product2/overlay2/product/article1.md
72
90
  ---
73
91
  This is the overlay number #2 of Article 1 content for product 2.
74
92
 
75
- {% include [x](_includes/inc-666e729492f5.md) %}
93
+ {% include [x](_includes/inc-hash.md) %}
76
94
  "
77
95
  `;
78
96
 
79
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/overlay3/_includes/inc-666e729492f5.md 1`] = `
97
+ exports[`Include toc > Nested toc inclusions with mixed including modes 8`] = `
80
98
  "This is the core include.
81
99
  "
82
100
  `;
83
101
 
84
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/overlay3/article1.md 1`] = `
102
+ exports[`Include toc > Nested toc inclusions with mixed including modes 9`] = `
85
103
  "---
86
104
  metadata:
87
105
  - name: generator
88
106
  content: Diplodoc Platform vDIPLODOC-VERSION
89
- sourcePath: product2/core/article1.md
90
107
  ---
91
108
  This is the core content of Article 1.
92
109
 
93
- {% include [x](_includes/inc-666e729492f5.md) %}
110
+ {% include [x](_includes/inc-hash.md) %}
94
111
  "
95
112
  `;
96
113
 
97
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/p2.md 1`] = `
114
+ exports[`Include toc > Nested toc inclusions with mixed including modes 10`] = `
98
115
  "---
99
116
  metadata:
100
117
  - name: generator
@@ -106,7 +123,7 @@ Check here link to [Article1 overlay 1](overlay1/article1.md)
106
123
  Check here link to [Article1 overlay 2](overlay2/article1.md)"
107
124
  `;
108
125
 
109
- exports[`Include toc > Nested toc inclusions with mixed including modes > product2/toc.yaml 1`] = `
126
+ exports[`Include toc > Nested toc inclusions with mixed including modes 11`] = `
110
127
  "title: Product 2 title
111
128
  items:
112
129
  - name: P2 Article
@@ -127,28 +144,16 @@ path: product2/toc.yaml
127
144
  "
128
145
  `;
129
146
 
130
- exports[`Include toc > Nested toc inclusions with mixed including modes 2 > filelist 1`] = `
147
+ exports[`Include toc > Toc is included in link mode > filelist 1`] = `
131
148
  "[
149
+ "a1.md",
150
+ "folder1/a1.md",
151
+ "folder1/folder2/a1.md",
132
152
  "toc.yaml"
133
153
  ]"
134
154
  `;
135
155
 
136
- exports[`Include toc > Nested toc inclusions with mixed including modes 2 > toc.yaml 1`] = `
137
- "title: main
138
- items:
139
- - name: toc_i/item
140
- - name: core/toc_m/item
141
- - name: overlay/toc_p/item
142
- - name: core/toc_i/item
143
- - name: test
144
- items:
145
- - name: core/concepts/toc_i/item
146
- - name: core/concepts/toc_p/item
147
- path: toc.yaml
148
- "
149
- `;
150
-
151
- exports[`Include toc > Toc is included in link mode > a1.md 1`] = `
156
+ exports[`Include toc > Toc is included in link mode 1`] = `
152
157
  "---
153
158
  metadata:
154
159
  - name: generator
@@ -158,16 +163,7 @@ This is the /a1.md file content.
158
163
  "
159
164
  `;
160
165
 
161
- exports[`Include toc > Toc is included in link mode > filelist 1`] = `
162
- "[
163
- "a1.md",
164
- "folder1/a1.md",
165
- "folder1/folder2/a1.md",
166
- "toc.yaml"
167
- ]"
168
- `;
169
-
170
- exports[`Include toc > Toc is included in link mode > folder1/a1.md 1`] = `
166
+ exports[`Include toc > Toc is included in link mode 2`] = `
171
167
  "---
172
168
  metadata:
173
169
  - name: generator
@@ -177,7 +173,7 @@ This is the /folder1/a1.md file content.
177
173
  "
178
174
  `;
179
175
 
180
- exports[`Include toc > Toc is included in link mode > folder1/folder2/a1.md 1`] = `
176
+ exports[`Include toc > Toc is included in link mode 3`] = `
181
177
  "---
182
178
  metadata:
183
179
  - name: generator
@@ -187,7 +183,7 @@ This is the /folder1/folder1/a1.md file content.
187
183
  "
188
184
  `;
189
185
 
190
- exports[`Include toc > Toc is included in link mode > toc.yaml 1`] = `
186
+ exports[`Include toc > Toc is included in link mode 4`] = `
191
187
  "items:
192
188
  - name: A1
193
189
  href: a1.md
@@ -203,12 +199,24 @@ path: toc.yaml
203
199
  "
204
200
  `;
205
201
 
206
- exports[`Include toc > Toc is included inline, not as a new section > .yfm 1`] = `
202
+ exports[`Include toc > Toc is included inline, not as a new section > filelist 1`] = `
203
+ "[
204
+ ".yfm",
205
+ "file1.md",
206
+ "fileA.md",
207
+ "fileB.md",
208
+ "fileC.md",
209
+ "fileX.md",
210
+ "toc.yaml"
211
+ ]"
212
+ `;
213
+
214
+ exports[`Include toc > Toc is included inline, not as a new section 1`] = `
207
215
  "applyPresets: true
208
216
  "
209
217
  `;
210
218
 
211
- exports[`Include toc > Toc is included inline, not as a new section > file1.md 1`] = `
219
+ exports[`Include toc > Toc is included inline, not as a new section 2`] = `
212
220
  "---
213
221
  metadata:
214
222
  - name: generator
@@ -218,12 +226,11 @@ metadata:
218
226
  "
219
227
  `;
220
228
 
221
- exports[`Include toc > Toc is included inline, not as a new section > fileA.md 1`] = `
229
+ exports[`Include toc > Toc is included inline, not as a new section 3`] = `
222
230
  "---
223
231
  metadata:
224
232
  - name: generator
225
233
  content: Diplodoc Platform vDIPLODOC-VERSION
226
- sourcePath: folder/fileA.md
227
234
  title: File A
228
235
  description: YFM description
229
236
  ---
@@ -237,12 +244,11 @@ Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, wh
237
244
  "
238
245
  `;
239
246
 
240
- exports[`Include toc > Toc is included inline, not as a new section > fileB.md 1`] = `
247
+ exports[`Include toc > Toc is included inline, not as a new section 4`] = `
241
248
  "---
242
249
  metadata:
243
250
  - name: generator
244
251
  content: Diplodoc Platform vDIPLODOC-VERSION
245
- sourcePath: folder/fileB.md
246
252
  ---
247
253
  # File B
248
254
 
@@ -256,18 +262,17 @@ Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, wh
256
262
  "
257
263
  `;
258
264
 
259
- exports[`Include toc > Toc is included inline, not as a new section > fileC.md 1`] = `
265
+ exports[`Include toc > Toc is included inline, not as a new section 5`] = `
260
266
  "---
261
267
  metadata:
262
268
  - name: generator
263
269
  content: Diplodoc Platform vDIPLODOC-VERSION
264
- sourcePath: folder/folder/fileC.md
265
270
  ---
266
271
  # File C
267
272
  "
268
273
  `;
269
274
 
270
- exports[`Include toc > Toc is included inline, not as a new section > fileX.md 1`] = `
275
+ exports[`Include toc > Toc is included inline, not as a new section 6`] = `
271
276
  "---
272
277
  metadata:
273
278
  - name: generator
@@ -277,19 +282,7 @@ metadata:
277
282
  "
278
283
  `;
279
284
 
280
- exports[`Include toc > Toc is included inline, not as a new section > filelist 1`] = `
281
- "[
282
- ".yfm",
283
- "file1.md",
284
- "fileA.md",
285
- "fileB.md",
286
- "fileC.md",
287
- "fileX.md",
288
- "toc.yaml"
289
- ]"
290
- `;
291
-
292
- exports[`Include toc > Toc is included inline, not as a new section > toc.yaml 1`] = `
285
+ exports[`Include toc > Toc is included inline, not as a new section 7`] = `
293
286
  "items:
294
287
  - name: Name1
295
288
  href: file1.md
@@ -305,11 +298,6 @@ path: toc.yaml
305
298
  "
306
299
  `;
307
300
 
308
- exports[`Include toc > Toc root merge on non root dir > .yfm 1`] = `
309
- "allowHtml: true
310
- "
311
- `;
312
-
313
301
  exports[`Include toc > Toc root merge on non root dir > filelist 1`] = `
314
302
  "[
315
303
  ".yfm",
@@ -318,7 +306,12 @@ exports[`Include toc > Toc root merge on non root dir > filelist 1`] = `
318
306
  ]"
319
307
  `;
320
308
 
321
- exports[`Include toc > Toc root merge on non root dir > ru/index.yaml 1`] = `
309
+ exports[`Include toc > Toc root merge on non root dir 1`] = `
310
+ "allowHtml: true
311
+ "
312
+ `;
313
+
314
+ exports[`Include toc > Toc root merge on non root dir 2`] = `
322
315
  "blocks:
323
316
  - type: header-block
324
317
  title: Title
@@ -328,11 +321,10 @@ meta:
328
321
  metadata:
329
322
  - name: generator
330
323
  content: Diplodoc Platform vDIPLODOC-VERSION
331
- sourcePath: ru/sub/folder/index.yaml
332
324
  "
333
325
  `;
334
326
 
335
- exports[`Include toc > Toc root merge on non root dir > ru/toc.yaml 1`] = `
327
+ exports[`Include toc > Toc root merge on non root dir 3`] = `
336
328
  "title: Toc
337
329
  items:
338
330
  - name: sub-page
@@ -341,7 +333,15 @@ path: ru/toc.yaml
341
333
  "
342
334
  `;
343
335
 
344
- exports[`Include toc > Toc with expressions > a1.md 1`] = `
336
+ exports[`Include toc > Toc with expressions > filelist 1`] = `
337
+ "[
338
+ "a1.md",
339
+ "index.yaml",
340
+ "toc.yaml"
341
+ ]"
342
+ `;
343
+
344
+ exports[`Include toc > Toc with expressions 1`] = `
345
345
  "---
346
346
  metadata:
347
347
  - name: generator
@@ -351,15 +351,7 @@ This is the /a1.md file content.
351
351
  "
352
352
  `;
353
353
 
354
- exports[`Include toc > Toc with expressions > filelist 1`] = `
355
- "[
356
- "a1.md",
357
- "index.yaml",
358
- "toc.yaml"
359
- ]"
360
- `;
361
-
362
- exports[`Include toc > Toc with expressions > index.yaml 1`] = `
354
+ exports[`Include toc > Toc with expressions 2`] = `
363
355
  "title: Title A
364
356
  description:
365
357
  - Desc A
@@ -375,7 +367,7 @@ links:
375
367
  "
376
368
  `;
377
369
 
378
- exports[`Include toc > Toc with expressions > toc.yaml 1`] = `
370
+ exports[`Include toc > Toc with expressions 3`] = `
379
371
  "title: Title A
380
372
  href: index.yaml
381
373
  items:
@@ -396,7 +388,7 @@ exports[`Include toc > Toc with generic includer > filelist 1`] = `
396
388
  ]"
397
389
  `;
398
390
 
399
- exports[`Include toc > Toc with generic includer > test/index.md 1`] = `
391
+ exports[`Include toc > Toc with generic includer 1`] = `
400
392
  "---
401
393
  metadata:
402
394
  - name: generator
@@ -409,30 +401,30 @@ metadata:
409
401
  "
410
402
  `;
411
403
 
412
- exports[`Include toc > Toc with generic includer > test/sub/sub/sub-3.md 1`] = `
404
+ exports[`Include toc > Toc with generic includer 2`] = `
413
405
  "---
414
406
  metadata:
415
407
  - name: generator
416
408
  content: Diplodoc Platform vDIPLODOC-VERSION
417
409
  ---
418
- # H1"
410
+ # H1
411
+
412
+ [same level link](./sub-2.md)
413
+ [outer link](../test.md)
414
+ [inner link](./sub/sub-3.md)
415
+ "
419
416
  `;
420
417
 
421
- exports[`Include toc > Toc with generic includer > test/sub/sub-1.md 1`] = `
418
+ exports[`Include toc > Toc with generic includer 3`] = `
422
419
  "---
423
420
  metadata:
424
421
  - name: generator
425
422
  content: Diplodoc Platform vDIPLODOC-VERSION
426
423
  ---
427
- # H1
428
-
429
- [same level link](./sub-2.md)
430
- [outer link](../test.md)
431
- [inner link](./sub/sub-3.md)
432
- "
424
+ # H1"
433
425
  `;
434
426
 
435
- exports[`Include toc > Toc with generic includer > test/sub/sub-2.md 1`] = `
427
+ exports[`Include toc > Toc with generic includer 4`] = `
436
428
  "---
437
429
  metadata:
438
430
  - name: generator
@@ -441,7 +433,7 @@ metadata:
441
433
  # H1"
442
434
  `;
443
435
 
444
- exports[`Include toc > Toc with generic includer > test/test.md 1`] = `
436
+ exports[`Include toc > Toc with generic includer 5`] = `
445
437
  "---
446
438
  metadata:
447
439
  - name: generator
@@ -450,7 +442,7 @@ metadata:
450
442
  # H1"
451
443
  `;
452
444
 
453
- exports[`Include toc > Toc with generic includer > toc.yaml 1`] = `
445
+ exports[`Include toc > Toc with generic includer 6`] = `
454
446
  "title: main
455
447
  items:
456
448
  - name: test