@scalar/nestjs-api-reference 0.3.163 → 0.3.165
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/dist/index.cjs +6 -2
- package/dist/index.js +6 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -96,12 +96,16 @@ var customThemeCSS = `
|
|
|
96
96
|
}
|
|
97
97
|
`;
|
|
98
98
|
var ApiReference = (options) => {
|
|
99
|
+
const configuration = {
|
|
100
|
+
_integration: "nestjs",
|
|
101
|
+
...options
|
|
102
|
+
};
|
|
99
103
|
return `
|
|
100
104
|
<script
|
|
101
105
|
id="api-reference"
|
|
102
106
|
type="application/json"
|
|
103
|
-
data-configuration="${JSON.stringify(
|
|
104
|
-
<script src="${
|
|
107
|
+
data-configuration="${JSON.stringify(configuration).split('"').join(""")}">${configuration.spec?.content ? typeof configuration.spec?.content === "function" ? JSON.stringify(configuration.spec?.content()) : JSON.stringify(configuration.spec?.content) : ""}</script>
|
|
108
|
+
<script src="${configuration.cdn || "https://cdn.jsdelivr.net/npm/@scalar/api-reference"}"></script>
|
|
105
109
|
`;
|
|
106
110
|
};
|
|
107
111
|
function apiReference(options) {
|
package/dist/index.js
CHANGED
|
@@ -68,12 +68,16 @@ var customThemeCSS = `
|
|
|
68
68
|
}
|
|
69
69
|
`;
|
|
70
70
|
var ApiReference = (options) => {
|
|
71
|
+
const configuration = {
|
|
72
|
+
_integration: "nestjs",
|
|
73
|
+
...options
|
|
74
|
+
};
|
|
71
75
|
return `
|
|
72
76
|
<script
|
|
73
77
|
id="api-reference"
|
|
74
78
|
type="application/json"
|
|
75
|
-
data-configuration="${JSON.stringify(
|
|
76
|
-
<script src="${
|
|
79
|
+
data-configuration="${JSON.stringify(configuration).split('"').join(""")}">${configuration.spec?.content ? typeof configuration.spec?.content === "function" ? JSON.stringify(configuration.spec?.content()) : JSON.stringify(configuration.spec?.content) : ""}</script>
|
|
80
|
+
<script src="${configuration.cdn || "https://cdn.jsdelivr.net/npm/@scalar/api-reference"}"></script>
|
|
77
81
|
`;
|
|
78
82
|
};
|
|
79
83
|
function apiReference(options) {
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/nestjs-api-reference"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.3.
|
|
13
|
+
"version": "0.3.165",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=18"
|
|
16
16
|
},
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"module": "dist/index.js",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@scalar/types": "0.0.
|
|
37
|
+
"@scalar/types": "0.0.16"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/express": "^4.17.21",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tsup": "^7.2.0",
|
|
44
44
|
"vite": "^5.2.10",
|
|
45
45
|
"vitest": "^1.6.0",
|
|
46
|
-
"@scalar/api-reference": "1.25.
|
|
46
|
+
"@scalar/api-reference": "1.25.38"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsup ./src/index.ts --format esm,cjs --dts",
|