@scalar/fastify-api-reference 1.26.2 → 1.28.1
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.
|
@@ -49,21 +49,18 @@ const getConfiguration = (givenConfiguration) => {
|
|
|
49
49
|
const configuration = {
|
|
50
50
|
...givenConfiguration,
|
|
51
51
|
};
|
|
52
|
-
if (
|
|
53
|
-
delete configuration.
|
|
54
|
-
}
|
|
55
|
-
else if (configuration.spec?.content) {
|
|
56
|
-
delete configuration.spec?.content;
|
|
52
|
+
if (configuration.content) {
|
|
53
|
+
delete configuration.content;
|
|
57
54
|
}
|
|
58
55
|
return JSON.stringify(configuration).split('"').join('"');
|
|
59
56
|
};
|
|
60
57
|
/**
|
|
61
58
|
* The content to pass to the @scalar/api-reference package as the <script> tag content.
|
|
62
59
|
*/
|
|
63
|
-
const getScriptTagContent = (configuration) => configuration.
|
|
64
|
-
? typeof configuration.
|
|
65
|
-
? JSON.stringify(configuration.
|
|
66
|
-
: JSON.stringify(configuration.
|
|
60
|
+
const getScriptTagContent = (configuration) => configuration.content
|
|
61
|
+
? typeof configuration.content === 'function'
|
|
62
|
+
? JSON.stringify(configuration.content())
|
|
63
|
+
: JSON.stringify(configuration.content)
|
|
67
64
|
: '';
|
|
68
65
|
|
|
69
66
|
export { getConfiguration, getHtmlDocument, getScriptTagContent, getScriptTags };
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"openapi",
|
|
18
18
|
"swagger"
|
|
19
19
|
],
|
|
20
|
-
"version": "1.
|
|
20
|
+
"version": "1.28.1",
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=18"
|
|
23
23
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"fastify-plugin": "^4.5.1",
|
|
41
41
|
"github-slugger": "^2.0.0",
|
|
42
|
-
"@scalar/
|
|
43
|
-
"@scalar/types": "0.0.40",
|
|
42
|
+
"@scalar/types": "0.1.0",
|
|
44
43
|
"@scalar/openapi-types": "0.1.9",
|
|
44
|
+
"@scalar/core": "0.1.3",
|
|
45
45
|
"@scalar/openapi-parser": "0.10.10"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"vite-plugin-static-copy": "^1.0.2",
|
|
57
57
|
"vitest": "^1.6.0",
|
|
58
58
|
"yaml": "^2.4.5",
|
|
59
|
-
"@scalar/
|
|
60
|
-
"@scalar/
|
|
59
|
+
"@scalar/build-tooling": "0.1.17",
|
|
60
|
+
"@scalar/api-reference": "1.28.1"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "scalar-build-rollup && pnpm copy:standalone",
|