@diplodoc/cli-tests 0.0.0-rc-liquid-conditions-saving-202509050811 → 0.0.0-rc-resolve-codeblock-202509151421

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 (30) hide show
  1. package/e2e/__snapshots__/bundles.spec.ts.snap +168 -0
  2. package/e2e/__snapshots__/include-toc.test.ts.snap +34 -0
  3. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +15 -106
  4. package/e2e/__snapshots__/metadata.spec.ts.snap +9 -47
  5. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  6. package/e2e/__snapshots__/preprocess.test.ts.snap +32 -0
  7. package/e2e/__snapshots__/regression.test.ts.snap +59 -211
  8. package/e2e/__snapshots__/restricted-access.test.ts.snap +20 -0
  9. package/e2e/__snapshots__/rtl.spec.ts.snap +6 -105
  10. package/e2e/__snapshots__/search.test.ts.snap +1 -31
  11. package/e2e/__snapshots__/single-page.spec.ts.snap +157 -0
  12. package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +4 -63
  13. package/e2e/__snapshots__/translation.spec.ts.snap +183 -1416
  14. package/e2e/bundles.spec.ts +15 -0
  15. package/e2e/single-page.spec.ts +22 -0
  16. package/e2e/translation.spec.ts +0 -26
  17. package/fixtures/utils/file.ts +49 -6
  18. package/mocks/bundles/input/.yfm +13 -0
  19. package/mocks/bundles/input/index.md +12 -0
  20. package/mocks/bundles/input/page1.md +3 -0
  21. package/mocks/bundles/input/page2.md +5 -0
  22. package/mocks/bundles/input/toc.yaml +9 -0
  23. package/mocks/errors/extract-filtered-link/input/index.md +1 -1
  24. package/mocks/regression/input/autotitle.md +3 -0
  25. package/mocks/single-page/input/ru/index.yaml +9 -0
  26. package/mocks/single-page/input/ru/page.md +14 -0
  27. package/mocks/single-page/input/ru/project/config.md +1 -0
  28. package/mocks/single-page/input/ru/toc.yaml +7 -0
  29. package/package.json +1 -1
  30. package/mocks/translation/conditions/input/index.md +0 -37
@@ -0,0 +1,168 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Check bundles > bundles list is correct > filelist 1`] = `
4
+ "[
5
+ ".yfm",
6
+ "_bundle/app-css-1",
7
+ "_bundle/app-js-2",
8
+ "_bundle/latex-extension.css",
9
+ "_bundle/latex-extension.js",
10
+ "_bundle/mermaid-extension.js",
11
+ "_bundle/page-constructor-extension.css",
12
+ "_bundle/page-constructor-extension.js",
13
+ "_bundle/search-async-0",
14
+ "_bundle/search-async-1",
15
+ "_bundle/search-css-0",
16
+ "_bundle/search-css-1",
17
+ "_bundle/search-css-2",
18
+ "_bundle/search-css-3",
19
+ "_bundle/search-css-4",
20
+ "_bundle/search-js-0",
21
+ "_bundle/search-js-1",
22
+ "_bundle/search-js-2",
23
+ "_search/api.js",
24
+ "_search/ru/hash-index.js",
25
+ "_search/ru/hash-registry.js",
26
+ "_search/ru/hash-resources.js",
27
+ "_search/ru/index.html",
28
+ "_search/ru/language.js",
29
+ "index.html",
30
+ "page1.html",
31
+ "page2.html",
32
+ "toc.js"
33
+ ]"
34
+ `;
35
+
36
+ exports[`Check bundles > bundles list is correct 1`] = `
37
+ "allowHTML: true
38
+
39
+ meta:
40
+ rootPath: http://127.0.0.1:5000/
41
+
42
+ interface:
43
+ toc-header: false
44
+ favicon-src: https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico
45
+
46
+ search:
47
+ provider: local
48
+ tolerance: 2
49
+ confidense: phrased
50
+ "
51
+ `;
52
+
53
+ exports[`Check bundles > bundles list is correct 2`] = `
54
+ "<!DOCTYPE html>
55
+ <html lang="ru" dir="ltr">
56
+ <head>
57
+ <meta charset="utf-8">
58
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
59
+ <base href="./" />
60
+ <title>Header | Skip html extension</title>
61
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
62
+ <meta name="availableLangs" content="en,ru">
63
+ <meta http-equiv="Content-Security-Policy" content="worker-src 'self';">
64
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
65
+ <link rel="icon" type="image/x-icon" href="https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico">
66
+
67
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
68
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
69
+ </head>
70
+ <body class="g-root g-root_theme_light">
71
+ <div id="root"></div>
72
+ <script type="application/json" id="diplodoc-state">
73
+ {"data":{"leading":false,"html":"&lt;p&gt;Content&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"page1.html\\"&gt;Link 1&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"page2.html\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"availableLangs":["en","ru"],"vcsPath":"index.md","sourcePath":"index.md"},"headings":[],"title":"Header"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc-header":false,"favicon-src":"https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico","toc":true,"search":true,"feedback":true},"search":{"provider":"local","tolerance":2,"confidense":"phrased","enabled":true,"api":"_search/api.js","link":"_search/ru/index.html"}}
74
+ </script>
75
+ <script type="application/javascript">
76
+ const data = document.querySelector('script#diplodoc-state');
77
+ window.__DATA__ = JSON.parse((function unescape(string) {
78
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
79
+ })(data.innerText));
80
+ window.STATIC_CONTENT = false;
81
+ </script>
82
+ <script type="application/javascript" defer src="toc.js"></script>
83
+ <script type="application/javascript" defer src="_search/ru/hash-resources.js"></script>
84
+ <script type="application/javascript" defer src="_bundle/search-js-1"></script>
85
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
86
+ <script type="application/javascript" defer src="_bundle/app-js-2"></script>
87
+
88
+ </body>
89
+ </html>"
90
+ `;
91
+
92
+ exports[`Check bundles > bundles list is correct 3`] = `
93
+ "<!DOCTYPE html>
94
+ <html lang="ru" dir="ltr">
95
+ <head>
96
+ <meta charset="utf-8">
97
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
98
+ <base href="./" />
99
+ <title>Page 1 | Skip html extension</title>
100
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
101
+ <meta http-equiv="Content-Security-Policy" content="worker-src 'self';">
102
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
103
+ <link rel="icon" type="image/x-icon" href="https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico">
104
+
105
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
106
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
107
+ </head>
108
+ <body class="g-root g-root_theme_light">
109
+ <div id="root"></div>
110
+ <script type="application/json" id="diplodoc-state">
111
+ {"data":{"leading":false,"html":"&lt;p&gt;&lt;a href=\\"page2.html#hash\\"&gt;Link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"page1.md","sourcePath":"page1.md"},"headings":[],"title":"Page 1"},"router":{"pathname":"page1","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc-header":false,"favicon-src":"https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico","toc":true,"search":true,"feedback":true},"search":{"provider":"local","tolerance":2,"confidense":"phrased","enabled":true,"api":"_search/api.js","link":"_search/ru/index.html"}}
112
+ </script>
113
+ <script type="application/javascript">
114
+ const data = document.querySelector('script#diplodoc-state');
115
+ window.__DATA__ = JSON.parse((function unescape(string) {
116
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
117
+ })(data.innerText));
118
+ window.STATIC_CONTENT = false;
119
+ </script>
120
+ <script type="application/javascript" defer src="toc.js"></script>
121
+ <script type="application/javascript" defer src="_search/ru/hash-resources.js"></script>
122
+ <script type="application/javascript" defer src="_bundle/search-js-1"></script>
123
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
124
+ <script type="application/javascript" defer src="_bundle/app-js-2"></script>
125
+
126
+ </body>
127
+ </html>"
128
+ `;
129
+
130
+ exports[`Check bundles > bundles list is correct 4`] = `
131
+ "<!DOCTYPE html>
132
+ <html lang="ru" dir="ltr">
133
+ <head>
134
+ <meta charset="utf-8">
135
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
136
+ <base href="./" />
137
+ <title>Page 2 | Skip html extension</title>
138
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
139
+ <meta http-equiv="Content-Security-Policy" content="worker-src 'self';">
140
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
141
+ <link rel="icon" type="image/x-icon" href="https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico">
142
+
143
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
144
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
145
+ </head>
146
+ <body class="g-root g-root_theme_light">
147
+ <div id="root"></div>
148
+ <script type="application/json" id="diplodoc-state">
149
+ {"data":{"leading":false,"html":"&lt;h2 id=\\"hash\\"&gt;&lt;a href=\\"page2.html#hash\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"&gt;&lt;span class=\\"visually-hidden\\" data-no-index=\\"true\\"&gt;hash&lt;/span&gt;&lt;/a&gt;hash&lt;/h2&gt;/n&lt;p&gt;&lt;a href=\\"https://example.com\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\"&gt;External link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"page2.md","sourcePath":"page2.md"},"headings":[{"title":"hash","href":"page2.html#hash","level":2}],"title":"Page 2"},"router":{"pathname":"page2","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc-header":false,"favicon-src":"https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico","toc":true,"search":true,"feedback":true},"search":{"provider":"local","tolerance":2,"confidense":"phrased","enabled":true,"api":"_search/api.js","link":"_search/ru/index.html"}}
150
+ </script>
151
+ <script type="application/javascript">
152
+ const data = document.querySelector('script#diplodoc-state');
153
+ window.__DATA__ = JSON.parse((function unescape(string) {
154
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
155
+ })(data.innerText));
156
+ window.STATIC_CONTENT = false;
157
+ </script>
158
+ <script type="application/javascript" defer src="toc.js"></script>
159
+ <script type="application/javascript" defer src="_search/ru/hash-resources.js"></script>
160
+ <script type="application/javascript" defer src="_bundle/search-js-1"></script>
161
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
162
+ <script type="application/javascript" defer src="_bundle/app-js-2"></script>
163
+
164
+ </body>
165
+ </html>"
166
+ `;
167
+
168
+ exports[`Check bundles > bundles list is correct 5`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":"index.html","items":[{"name":"Title 1","href":"page1.html","id":"UUID"},{"name":"Title 2","href":"page2.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
@@ -24,6 +24,7 @@ metadata:
24
24
  - name: generator
25
25
  content: Diplodoc Platform vDIPLODOC-VERSION
26
26
  sourcePath: product1/core/article1.md
27
+ vcsPath: product1/core/article1.md
27
28
  ---
28
29
  This is the core content of Article 1.
29
30
 
@@ -72,6 +73,7 @@ metadata:
72
73
  - name: generator
73
74
  content: Diplodoc Platform vDIPLODOC-VERSION
74
75
  sourcePath: product2/overlay1/product/article1.md
76
+ vcsPath: product2/overlay1/product/article1.md
75
77
  ---
76
78
  This is the overlay content of Article 1 for product 2.
77
79
 
@@ -90,6 +92,7 @@ metadata:
90
92
  - name: generator
91
93
  content: Diplodoc Platform vDIPLODOC-VERSION
92
94
  sourcePath: product2/overlay2/product/article1.md
95
+ vcsPath: product2/overlay2/product/article1.md
93
96
  ---
94
97
  This is the overlay number #2 of Article 1 content for product 2.
95
98
 
@@ -108,6 +111,7 @@ metadata:
108
111
  - name: generator
109
112
  content: Diplodoc Platform vDIPLODOC-VERSION
110
113
  sourcePath: product2/core/article1.md
114
+ vcsPath: product2/core/article1.md
111
115
  ---
112
116
  This is the core content of Article 1.
113
117
 
@@ -120,6 +124,8 @@ exports[`Include toc > Nested toc inclusions with mixed including modes 10`] = `
120
124
  metadata:
121
125
  - name: generator
122
126
  content: Diplodoc Platform vDIPLODOC-VERSION
127
+ vcsPath: product2/p2.md
128
+ sourcePath: product2/p2.md
123
129
  ---
124
130
  This is the product 2 specific article.
125
131
 
@@ -162,6 +168,8 @@ exports[`Include toc > Toc is included in link mode 1`] = `
162
168
  metadata:
163
169
  - name: generator
164
170
  content: Diplodoc Platform vDIPLODOC-VERSION
171
+ vcsPath: a1.md
172
+ sourcePath: a1.md
165
173
  ---
166
174
  This is the /a1.md file content.
167
175
  "
@@ -172,6 +180,8 @@ exports[`Include toc > Toc is included in link mode 2`] = `
172
180
  metadata:
173
181
  - name: generator
174
182
  content: Diplodoc Platform vDIPLODOC-VERSION
183
+ vcsPath: folder1/a1.md
184
+ sourcePath: folder1/a1.md
175
185
  ---
176
186
  This is the /folder1/a1.md file content.
177
187
  "
@@ -182,6 +192,8 @@ exports[`Include toc > Toc is included in link mode 3`] = `
182
192
  metadata:
183
193
  - name: generator
184
194
  content: Diplodoc Platform vDIPLODOC-VERSION
195
+ vcsPath: folder1/folder2/a1.md
196
+ sourcePath: folder1/folder2/a1.md
185
197
  ---
186
198
  This is the /folder1/folder1/a1.md file content.
187
199
  "
@@ -225,6 +237,8 @@ exports[`Include toc > Toc is included inline, not as a new section 2`] = `
225
237
  metadata:
226
238
  - name: generator
227
239
  content: Diplodoc Platform vDIPLODOC-VERSION
240
+ vcsPath: file1.md
241
+ sourcePath: file1.md
228
242
  ---
229
243
  # File 1
230
244
  "
@@ -238,6 +252,7 @@ metadata:
238
252
  sourcePath: folder/fileA.md
239
253
  title: File A
240
254
  description: YFM description
255
+ vcsPath: folder/fileA.md
241
256
  ---
242
257
  # File A
243
258
 
@@ -255,6 +270,7 @@ metadata:
255
270
  - name: generator
256
271
  content: Diplodoc Platform vDIPLODOC-VERSION
257
272
  sourcePath: folder/fileB.md
273
+ vcsPath: folder/fileB.md
258
274
  ---
259
275
  # File B
260
276
 
@@ -274,6 +290,7 @@ metadata:
274
290
  - name: generator
275
291
  content: Diplodoc Platform vDIPLODOC-VERSION
276
292
  sourcePath: folder/folder/fileC.md
293
+ vcsPath: folder/folder/fileC.md
277
294
  ---
278
295
  # File C
279
296
  "
@@ -284,6 +301,8 @@ exports[`Include toc > Toc is included inline, not as a new section 6`] = `
284
301
  metadata:
285
302
  - name: generator
286
303
  content: Diplodoc Platform vDIPLODOC-VERSION
304
+ vcsPath: fileX.md
305
+ sourcePath: fileX.md
287
306
  ---
288
307
  # File X
289
308
  "
@@ -329,6 +348,7 @@ meta:
329
348
  - name: generator
330
349
  content: Diplodoc Platform vDIPLODOC-VERSION
331
350
  sourcePath: ru/sub/folder/index.yaml
351
+ vcsPath: ru/sub/folder/index.yaml
332
352
  "
333
353
  `;
334
354
 
@@ -354,6 +374,8 @@ exports[`Include toc > Toc with expressions 1`] = `
354
374
  metadata:
355
375
  - name: generator
356
376
  content: Diplodoc Platform vDIPLODOC-VERSION
377
+ vcsPath: a1.md
378
+ sourcePath: a1.md
357
379
  ---
358
380
  This is the /a1.md file content.
359
381
  "
@@ -368,6 +390,8 @@ meta:
368
390
  - name: generator
369
391
  content: Diplodoc Platform vDIPLODOC-VERSION
370
392
  title: Meta A
393
+ vcsPath: index.yaml
394
+ sourcePath: index.yaml
371
395
  links:
372
396
  - title: A1
373
397
  description: A1 desc
@@ -401,6 +425,8 @@ exports[`Include toc > Toc with generic includer 1`] = `
401
425
  metadata:
402
426
  - name: generator
403
427
  content: Diplodoc Platform vDIPLODOC-VERSION
428
+ vcsPath: test/index.md
429
+ sourcePath: test/index.md
404
430
  ---
405
431
  # H1
406
432
 
@@ -414,6 +440,8 @@ exports[`Include toc > Toc with generic includer 2`] = `
414
440
  metadata:
415
441
  - name: generator
416
442
  content: Diplodoc Platform vDIPLODOC-VERSION
443
+ vcsPath: test/sub/sub-1.md
444
+ sourcePath: test/sub/sub-1.md
417
445
  ---
418
446
  # H1
419
447
 
@@ -428,6 +456,8 @@ exports[`Include toc > Toc with generic includer 3`] = `
428
456
  metadata:
429
457
  - name: generator
430
458
  content: Diplodoc Platform vDIPLODOC-VERSION
459
+ vcsPath: test/sub/sub-2.md
460
+ sourcePath: test/sub/sub-2.md
431
461
  ---
432
462
  # H1"
433
463
  `;
@@ -437,6 +467,8 @@ exports[`Include toc > Toc with generic includer 4`] = `
437
467
  metadata:
438
468
  - name: generator
439
469
  content: Diplodoc Platform vDIPLODOC-VERSION
470
+ vcsPath: test/sub/sub/sub-3.md
471
+ sourcePath: test/sub/sub/sub-3.md
440
472
  ---
441
473
  # H1"
442
474
  `;
@@ -446,6 +478,8 @@ exports[`Include toc > Toc with generic includer 5`] = `
446
478
  metadata:
447
479
  - name: generator
448
480
  content: Diplodoc Platform vDIPLODOC-VERSION
481
+ vcsPath: test/test.md
482
+ sourcePath: test/test.md
449
483
  ---
450
484
  # H1"
451
485
  `;