@scalar/openapi-to-markdown 0.2.37 → 0.2.38
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @scalar/openapi-to-markdown
|
|
2
2
|
|
|
3
|
+
## 0.2.38
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 02085ef: refactor: use upgrade function from @scalar/openapi-upgrader
|
|
8
|
+
- Updated dependencies [6221e4a]
|
|
9
|
+
- Updated dependencies [005fba9]
|
|
10
|
+
- Updated dependencies [a1f865c]
|
|
11
|
+
- Updated dependencies [a1f865c]
|
|
12
|
+
- Updated dependencies [2d612e4]
|
|
13
|
+
- Updated dependencies [dcf50ef]
|
|
14
|
+
- Updated dependencies [02085ef]
|
|
15
|
+
- @scalar/openapi-upgrader@0.1.0
|
|
16
|
+
- @scalar/types@0.2.16
|
|
17
|
+
- @scalar/openapi-parser@0.21.0
|
|
18
|
+
- @scalar/oas-utils@0.4.30
|
|
19
|
+
- @scalar/snippetz@0.4.10
|
|
20
|
+
- @scalar/components@0.14.35
|
|
21
|
+
|
|
3
22
|
## 0.2.37
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-markdown-from-openapi.d.ts","sourceRoot":"","sources":["../src/create-markdown-from-openapi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-markdown-from-openapi.d.ts","sourceRoot":"","sources":["../src/create-markdown-from-openapi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAepD,KAAK,WAAW,GAAG,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAA;AAEtE,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,WAAW,mBAyB7D;AAED,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,WAAW,mBAEnE;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAYpE"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import p from "
|
|
4
|
-
import s from "rehype-
|
|
5
|
-
import u from "rehype-
|
|
6
|
-
import c from "
|
|
7
|
-
import f from "remark-
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import g from "
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { normalize as n, dereference as i } from "@scalar/openapi-parser";
|
|
2
|
+
import { upgrade as a } from "@scalar/openapi-upgrader";
|
|
3
|
+
import { minify as p } from "html-minifier-terser";
|
|
4
|
+
import s from "rehype-parse";
|
|
5
|
+
import u from "rehype-remark";
|
|
6
|
+
import c from "rehype-sanitize";
|
|
7
|
+
import f from "remark-gfm";
|
|
8
|
+
import l from "remark-stringify";
|
|
9
|
+
import { unified as y } from "unified";
|
|
10
|
+
import { createSSRApp as d } from "vue";
|
|
11
|
+
import { renderToString as g } from "vue/server-renderer";
|
|
12
|
+
import h from "./components/MarkdownReference.vue.js";
|
|
13
|
+
async function w(e) {
|
|
14
|
+
const r = a(n(e), "3.1"), { schema: t } = await i(r), o = d(h, {
|
|
14
15
|
content: t
|
|
15
|
-
}), m = await
|
|
16
|
-
return
|
|
16
|
+
}), m = await g(o);
|
|
17
|
+
return p(m, {
|
|
17
18
|
removeComments: !0,
|
|
18
19
|
removeEmptyElements: !0,
|
|
19
20
|
collapseWhitespace: !0,
|
|
@@ -25,17 +26,17 @@ async function h(e) {
|
|
|
25
26
|
useShortDoctype: !0
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
|
-
async function
|
|
29
|
-
return
|
|
29
|
+
async function R(e) {
|
|
30
|
+
return S(await w(e));
|
|
30
31
|
}
|
|
31
|
-
async function
|
|
32
|
-
const r = await
|
|
32
|
+
async function S(e) {
|
|
33
|
+
const r = await y().use(s, { fragment: !0 }).use(f).use(c).use(u).use(l, {
|
|
33
34
|
bullet: "-"
|
|
34
35
|
}).process(e);
|
|
35
36
|
return String(r);
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
w as createHtmlFromOpenApi,
|
|
40
|
+
R as createMarkdownFromOpenApi,
|
|
41
|
+
S as markdownFromHtml
|
|
41
42
|
};
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"llm",
|
|
17
17
|
"swagger"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.38",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=20"
|
|
22
22
|
},
|
|
@@ -54,24 +54,25 @@
|
|
|
54
54
|
"remark-stringify": "^11.0.0",
|
|
55
55
|
"unified": "^11.0.4",
|
|
56
56
|
"vue": "^3.5.17",
|
|
57
|
-
"@scalar/components": "0.14.
|
|
57
|
+
"@scalar/components": "0.14.35",
|
|
58
58
|
"@scalar/helpers": "0.0.11",
|
|
59
|
-
"@scalar/oas-utils": "0.4.
|
|
60
|
-
"@scalar/openapi-parser": "0.
|
|
59
|
+
"@scalar/oas-utils": "0.4.30",
|
|
60
|
+
"@scalar/openapi-parser": "0.21.0",
|
|
61
61
|
"@scalar/openapi-types": "0.3.7",
|
|
62
|
-
"@scalar/types": "0.2.
|
|
63
|
-
"@scalar/
|
|
62
|
+
"@scalar/types": "0.2.16",
|
|
63
|
+
"@scalar/openapi-upgrader": "0.1.0",
|
|
64
|
+
"@scalar/snippetz": "0.4.10"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@hono/node-server": "^1.11.0",
|
|
67
68
|
"@types/html-minifier-terser": "^7.0.2",
|
|
68
69
|
"@vitejs/plugin-vue": "6.0.1",
|
|
69
70
|
"@vue/test-utils": "^2.4.1",
|
|
70
|
-
"hono": "
|
|
71
|
+
"hono": "4.9.7",
|
|
71
72
|
"vite": "7.1.5",
|
|
72
73
|
"vue": "^3.5.17",
|
|
73
|
-
"@scalar/
|
|
74
|
-
"@scalar/
|
|
74
|
+
"@scalar/galaxy": "0.5.8",
|
|
75
|
+
"@scalar/build-tooling": "0.2.7"
|
|
75
76
|
},
|
|
76
77
|
"scripts": {
|
|
77
78
|
"build": "scalar-build-vite",
|