@diplodoc/cli-tests 0.0.0-rc-toc-translation-202506261401 → 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.
- package/e2e/__snapshots__/generate-map.spec.ts.snap +345 -0
- package/e2e/__snapshots__/include-toc.test.ts.snap +8 -0
- package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +68 -56
- package/e2e/__snapshots__/metadata.spec.ts.snap +31 -23
- package/e2e/__snapshots__/preprocess.test.ts.snap +549 -0
- package/e2e/__snapshots__/regression.test.ts.snap +197 -142
- package/e2e/__snapshots__/rtl.spec.ts.snap +51 -41
- package/e2e/__snapshots__/search.test.ts.snap +86 -0
- package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +211 -0
- package/e2e/__snapshots__/translation.spec.ts.snap +2138 -1026
- package/e2e/errors.spec.ts +33 -2
- package/e2e/generate-map.spec.ts +9 -3
- package/e2e/preprocess.test.ts +33 -0
- package/e2e/redirects-validation.spec.ts +61 -0
- package/e2e/search.test.ts +15 -0
- package/e2e/skip-html-extension.spec.ts +15 -0
- package/e2e/translation.spec.ts +73 -3
- package/fixtures/cliAdapter.ts +23 -0
- package/fixtures/globals.d.ts +4 -0
- package/fixtures/runners/binary.ts +4 -3
- package/fixtures/runners/types.ts +1 -2
- package/fixtures/utils/file.ts +5 -5
- package/fixtures/utils/test.ts +18 -8
- package/mocks/docs-viewer-interface/input/.yfm +6 -0
- package/mocks/docs-viewer-interface/input/index.md +3 -0
- package/mocks/docs-viewer-interface/input/toc.yaml +5 -0
- package/mocks/errors/extract-filtered-link/input/filtered.md +1 -0
- package/mocks/errors/extract-filtered-link/input/filtered2.md +0 -0
- package/mocks/errors/extract-filtered-link/input/index.md +7 -0
- package/mocks/errors/extract-filtered-link/input/toc.yaml +1 -0
- package/mocks/load-custom-resources/md2html-with-resources/input/page.md +9 -2
- package/mocks/load-custom-resources/md2md-with-resources/input/page.md +9 -2
- package/mocks/load-custom-resources/single-page-with-resources/input/page.md +9 -2
- package/mocks/metadata/md2html-with-metadata/input/page.md +8 -1
- package/mocks/metadata/md2md-with-metadata/input/page.md +7 -0
- package/mocks/preprocess/input/.yfm +1 -0
- package/mocks/preprocess/input/1.md +29 -0
- package/mocks/preprocess/input/_assets/1.png +0 -0
- package/mocks/preprocess/input/_assets/1.svg +0 -0
- package/mocks/preprocess/input/autotitle.md +23 -0
- package/mocks/preprocess/input/commented-include.md +3 -0
- package/mocks/preprocess/input/images.md +5 -0
- package/mocks/preprocess/input/included-item.md +12 -0
- package/mocks/preprocess/input/includes/deep.md +1 -0
- package/mocks/preprocess/input/includes/deepWithIndent.md +6 -0
- package/mocks/preprocess/input/includes/presets.yaml +2 -0
- package/mocks/preprocess/input/includes/sub/user.md +1 -0
- package/mocks/preprocess/input/includes/sub/userWithIndent.md +5 -0
- package/mocks/preprocess/input/includes/test.md +1 -0
- package/mocks/preprocess/input/includes/user.md +1 -0
- package/mocks/preprocess/input/includes.md +18 -0
- package/mocks/preprocess/input/latex.md +3 -0
- package/mocks/preprocess/input/mermaid.md +13 -0
- package/mocks/preprocess/input/presets.yaml +8 -0
- package/mocks/preprocess/input/sub/folder/item-1.md +7 -0
- package/mocks/preprocess/input/sub/toc.yaml +5 -0
- package/mocks/preprocess/input/toc-i.yaml +3 -0
- package/mocks/preprocess/input/toc.yaml +16 -0
- package/mocks/redirects-validation/extensions-deprecation/input/blah.md +0 -0
- package/mocks/redirects-validation/extensions-deprecation/input/redirects.yaml +5 -0
- package/mocks/redirects-validation/extensions-deprecation/input/toc.yaml +4 -0
- package/mocks/redirects-validation/invalid-regex/input/blah.md +0 -0
- package/mocks/redirects-validation/invalid-regex/input/redirects.yaml +3 -0
- package/mocks/redirects-validation/invalid-regex/input/toc.yaml +4 -0
- package/mocks/redirects-validation/malformed-redirect/input/blah.md +0 -0
- package/mocks/redirects-validation/malformed-redirect/input/redirects.yaml +6 -0
- package/mocks/redirects-validation/malformed-redirect/input/toc.yaml +4 -0
- package/mocks/redirects-validation/same-path/input/blah.md +0 -0
- package/mocks/redirects-validation/same-path/input/redirects.yaml +3 -0
- package/mocks/redirects-validation/same-path/input/toc.yaml +4 -0
- package/mocks/redirects-validation/unparseable/input/blah.md +0 -0
- package/mocks/redirects-validation/unparseable/input/redirects.yaml +11 -0
- package/mocks/redirects-validation/unparseable/input/toc.yaml +4 -0
- package/mocks/regression/input/.yfm +2 -0
- package/mocks/regression/input/images.md +2 -0
- package/mocks/regression/input/includes/deep.md +2 -0
- package/mocks/regression/input/includes/presets.yaml +1 -0
- package/mocks/regression/input/includes/tools.md +1 -0
- package/mocks/regression/input/includes.md +5 -0
- package/mocks/regression/input/merge/merge.md +2 -0
- package/mocks/regression/input/merge/presets.yaml +1 -0
- package/mocks/regression/input/merge/toc.yaml +2 -0
- package/mocks/regression/input/presets.yaml +1 -0
- package/mocks/regression/input/toc.yaml +2 -0
- package/mocks/search/input/.yfm +12 -0
- package/mocks/search/input/index.md +3 -0
- package/mocks/search/input/toc.yaml +1 -0
- package/mocks/skip-html-extension/input/.yfm +1 -0
- package/mocks/skip-html-extension/input/folder/index.md +1 -0
- package/mocks/skip-html-extension/input/index-test-html/index.md +4 -0
- package/mocks/skip-html-extension/input/index.md +6 -0
- package/mocks/skip-html-extension/input/page1.md +3 -0
- package/mocks/skip-html-extension/input/page2.md +6 -0
- package/mocks/skip-html-extension/input/toc.yaml +13 -0
- package/mocks/translation/conditions/input/index.md +37 -0
- package/mocks/translation/dir-files/input/ru/nested/syntax/base.md +2 -0
- package/mocks/translation/no-translate/input/index.md +7 -0
- package/mocks/translation/no-translate/input/no-translate.md +57 -0
- package/mocks/translation/no-translate/input/openapi-spec.yaml +37 -0
- package/mocks/translation/no-translate/input/toc.yaml +11 -0
- package/mocks/translation/openapi/input/openapi-spec.yaml +42 -0
- package/mocks/translation/openapi/input/toc.yaml +8 -0
- package/mocks/warning/unreachable-autotitle/input/index.md +1 -0
- package/mocks/warning/unreachable-autotitle/input/link.md +0 -0
- package/mocks/warning/unreachable-autotitle/input/toc.yaml +4 -0
- package/package.json +5 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Autotitles 
|
|
2
|
+
|
|
3
|
+
Empty title
|
|
4
|
+
[](./1.md)
|
|
5
|
+
|
|
6
|
+
Empty subtitle
|
|
7
|
+
[](./1.md#subtitle)
|
|
8
|
+
|
|
9
|
+
Special title
|
|
10
|
+
[{#T}](./1.md)
|
|
11
|
+
|
|
12
|
+
Special subtitle
|
|
13
|
+
[{#T}](./1.md#subtitle)
|
|
14
|
+
|
|
15
|
+
Empty local title
|
|
16
|
+
[](#header)
|
|
17
|
+
|
|
18
|
+
Special local title
|
|
19
|
+
[{#T}](#header)
|
|
20
|
+
|
|
21
|
+
## Header {#header}
|
|
22
|
+
|
|
23
|
+
Content
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% include [user](sub/user.md) %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{user}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Test
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{user}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Text
|
|
2
|
+
|
|
3
|
+
{% include [user](includes/user.md) %}
|
|
4
|
+
|
|
5
|
+
{% include [test](includes/test.md) %}
|
|
6
|
+
|
|
7
|
+
Link after include
|
|
8
|
+
[{#T}](./1.md)
|
|
9
|
+
|
|
10
|
+
<!--{% include [For includes/deep.md](includes/deep.md) %}-->
|
|
11
|
+
{% include [For includes/deep.md](includes/deep.md) %}
|
|
12
|
+
|
|
13
|
+
Include with big indent
|
|
14
|
+
|
|
15
|
+
{% include [For includes/deep.md](includes/deepWithIndent.md) %}
|
|
16
|
+
|
|
17
|
+
Link after include
|
|
18
|
+
[{#T}](./1.md#subtitle)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
items:
|
|
2
|
+
- name: Md item with not_var syntax
|
|
3
|
+
href: ./1.md
|
|
4
|
+
- name: Md item named without extension
|
|
5
|
+
href: ./1
|
|
6
|
+
- include: {path: toc-i.yaml}
|
|
7
|
+
- include: {path: sub/toc.yaml, mode: link}
|
|
8
|
+
- href: ./mermaid
|
|
9
|
+
- name: '{#T}'
|
|
10
|
+
href: ./latex
|
|
11
|
+
- name: Images
|
|
12
|
+
href: ./images
|
|
13
|
+
- name: Autotitle
|
|
14
|
+
href: ./autotitle
|
|
15
|
+
- name: includes
|
|
16
|
+
href: ./includes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Tool: {{tools}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
href: index.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
allowHTML: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Page 3
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[existing file](./exists.md)
|
|
2
|
+
<!-- [missed file](./missed.md) -->
|
|
3
|
+
{% if prod == true %}Test text{% endif %}
|
|
4
|
+
|
|
5
|
+
{% if inner == true %}inner test text{% endif %}
|
|
6
|
+
|
|
7
|
+
{% if prod == true %}Test text{% if inner == true %}inner test text{% endif %}{% endif %}
|
|
8
|
+
|
|
9
|
+
{% if prod == true %}
|
|
10
|
+
|
|
11
|
+
{% if list contains "item" %}
|
|
12
|
+
|
|
13
|
+
#### List
|
|
14
|
+
|
|
15
|
+
{% if item == true %}1. Item {% endif %}
|
|
16
|
+
|
|
17
|
+
Some text
|
|
18
|
+
|
|
19
|
+
{% endif %}
|
|
20
|
+
|
|
21
|
+
{% endif %}
|
|
22
|
+
|
|
23
|
+
#### Standalone contains condition
|
|
24
|
+
|
|
25
|
+
{% if list contains "item" %}
|
|
26
|
+
|
|
27
|
+
#### List
|
|
28
|
+
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
#### Inline contains condition
|
|
32
|
+
|
|
33
|
+
{% if prod == true %}
|
|
34
|
+
|
|
35
|
+
#### List {% if list contains "item" %} sub text {% endif %}
|
|
36
|
+
|
|
37
|
+
{% endif %}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# No-translate directive
|
|
2
|
+
|
|
3
|
+
## Block directive
|
|
4
|
+
:::no-translate
|
|
5
|
+
### No-translate header
|
|
6
|
+
|
|
7
|
+
:::html-block
|
|
8
|
+
testsetsets
|
|
9
|
+
:::
|
|
10
|
+
|
|
11
|
+
::: any-other-directive
|
|
12
|
+
content test
|
|
13
|
+
:::
|
|
14
|
+
|
|
15
|
+
Should not be translated.
|
|
16
|
+
Can use **markup** inside.
|
|
17
|
+
:::
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
::: some-other-directive
|
|
21
|
+
content here
|
|
22
|
+
:::
|
|
23
|
+
::: no-translate
|
|
24
|
+
content here
|
|
25
|
+
::: some-other-directive
|
|
26
|
+
nested content
|
|
27
|
+
:::
|
|
28
|
+
:::
|
|
29
|
+
|
|
30
|
+
## Leaf directive
|
|
31
|
+
|
|
32
|
+
::no-translate [## /usr/local/bin/application]
|
|
33
|
+
::no-translate[**C:\Program Files\Application\config.ini**]
|
|
34
|
+
::no-translate [~/Documents/project/src/main.rs]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
- :no-translate[GET /api/v1/users] — get all users
|
|
38
|
+
- :no-translate[POST /api/v1/auth/login] — authorization
|
|
39
|
+
- :no-translate[PUT /api/v1/users/{id}] — update users data
|
|
40
|
+
|
|
41
|
+
## Simple case leaf
|
|
42
|
+
Install using command.
|
|
43
|
+
:no-translate[The default port is unless specified.] Next sentence.
|
|
44
|
+
Set NODE_ENV=production for production builds.
|
|
45
|
+
|
|
46
|
+
## Simple case inline
|
|
47
|
+
Install using :no-translate[npm install @company/package] command.
|
|
48
|
+
The default port is :no-translate[8080] unless specified.
|
|
49
|
+
Set :no-translate[NODE_ENV=production] for production builds.
|
|
50
|
+
|
|
51
|
+
## Few inline directives
|
|
52
|
+
Use :no-translate[**GET /api/v1/users**] to list users and :no-translate[POST /api/v1/users] to create.
|
|
53
|
+
|
|
54
|
+
## Empty inline directive
|
|
55
|
+
This is text with empty :no-translate[] directive.
|
|
56
|
+
|
|
57
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
openapi: 3.0.1
|
|
2
|
+
info:
|
|
3
|
+
title: OpenAPI definition
|
|
4
|
+
version: v0
|
|
5
|
+
servers:
|
|
6
|
+
- url: http://localhost:8080
|
|
7
|
+
description: Generated server url
|
|
8
|
+
paths:
|
|
9
|
+
/test:
|
|
10
|
+
get:
|
|
11
|
+
tags:
|
|
12
|
+
- test-controller
|
|
13
|
+
summary: Simple get operation. тест новой верстки 3
|
|
14
|
+
description: Defines a simple get :no-translate[skip this] operation with no inputs and a complex
|
|
15
|
+
operationId: getWithPayloadResponse
|
|
16
|
+
responses:
|
|
17
|
+
"200":
|
|
18
|
+
description: 200!!!!
|
|
19
|
+
content:
|
|
20
|
+
application/json:
|
|
21
|
+
schema:
|
|
22
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
23
|
+
components:
|
|
24
|
+
schemas:
|
|
25
|
+
RecurceTop:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
A:
|
|
29
|
+
type: string
|
|
30
|
+
# $ref: '#/components/schemas/RecurceMiddle'
|
|
31
|
+
RecurceMiddle:
|
|
32
|
+
type: object
|
|
33
|
+
properties:
|
|
34
|
+
B:
|
|
35
|
+
type: array
|
|
36
|
+
items:
|
|
37
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
openapi: 3.0.1
|
|
2
|
+
info:
|
|
3
|
+
title: OpenAPI definition
|
|
4
|
+
version: v0
|
|
5
|
+
servers:
|
|
6
|
+
- url: http://localhost:8080
|
|
7
|
+
description: Generated server url
|
|
8
|
+
paths:
|
|
9
|
+
/test:
|
|
10
|
+
get:
|
|
11
|
+
tags:
|
|
12
|
+
- test-controller
|
|
13
|
+
summary: Simple get operation. тест новой верстки 3
|
|
14
|
+
description: Defines a simple get operation with no inputs and a complex
|
|
15
|
+
operationId: getWithPayloadResponse
|
|
16
|
+
responses:
|
|
17
|
+
"200":
|
|
18
|
+
description: 200!!!!
|
|
19
|
+
content:
|
|
20
|
+
application/json:
|
|
21
|
+
schema:
|
|
22
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
23
|
+
components:
|
|
24
|
+
schemas:
|
|
25
|
+
RecurceTop:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
A:
|
|
29
|
+
type: string
|
|
30
|
+
description: |
|
|
31
|
+
Статус загрузки:
|
|
32
|
+
- `UPLOADED` — загрузка завершена.
|
|
33
|
+
- `IN_PROGRESS` — загрузка находится в процессе обработки.
|
|
34
|
+
- `PROCESSED` — загрузка успешно обработана.
|
|
35
|
+
# $ref: '#/components/schemas/RecurceMiddle'
|
|
36
|
+
RecurceMiddle:
|
|
37
|
+
type: object
|
|
38
|
+
properties:
|
|
39
|
+
B:
|
|
40
|
+
type: array
|
|
41
|
+
items:
|
|
42
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{#T}](./link.md#unknown_yfm010)
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diplodoc/cli-tests",
|
|
3
|
-
"version": "0.0.0-rc-
|
|
3
|
+
"version": "0.0.0-rc-liquid-conditions-saving-202509050811",
|
|
4
4
|
"bin": {
|
|
5
5
|
"diplodoc-cli-test": "bin.mjs"
|
|
6
6
|
},
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"@diplodoc/cli": "file:.."
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@diplodoc/
|
|
30
|
+
"@diplodoc/liquid": "^1.3.4",
|
|
31
31
|
"@types/node": "18.x",
|
|
32
32
|
"@vitest/coverage-istanbul": "^3.1.1",
|
|
33
33
|
"@vitest/coverage-v8": "^3.1.1",
|
|
34
|
-
"commander": "^13.1.0",
|
|
35
34
|
"execa": "^9.5.3",
|
|
36
35
|
"glob": "^11.0.2",
|
|
37
36
|
"js-yaml": "^4.1.0",
|
|
37
|
+
"strip-ansi": "^7.1.0",
|
|
38
38
|
"ts-dedent": "^2.2.0",
|
|
39
|
-
"
|
|
40
|
-
"typescript": "^5.3.3"
|
|
39
|
+
"typescript": "^5.9.2"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
42
|
+
"@diplodoc/cli": "*",
|
|
43
43
|
"vitest": "^3.1.1"
|
|
44
44
|
}
|
|
45
45
|
}
|