@scalar/import 0.0.4 → 0.0.5
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 +9 -0
- package/dist/resolve.js +5 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/resolve.js
CHANGED
|
@@ -157,6 +157,11 @@ function parseHtml(html) {
|
|
|
157
157
|
if (linkMatch?.[1]) {
|
|
158
158
|
return linkMatch[1];
|
|
159
159
|
}
|
|
160
|
+
// Check for URLs in escaped JS objects
|
|
161
|
+
const escapedJsonMatch = html.match(/\\"spec\\":\{.*?\\"url\\":\\"([^"\\]+)\\"/);
|
|
162
|
+
if (escapedJsonMatch?.[1]) {
|
|
163
|
+
return escapedJsonMatch[1];
|
|
164
|
+
}
|
|
160
165
|
return undefined;
|
|
161
166
|
}
|
|
162
167
|
/**
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"postman",
|
|
17
17
|
"scalar"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.0.
|
|
19
|
+
"version": "0.0.5",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"module": "dist/index.js",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"yaml": "^2.4.5",
|
|
39
|
-
"@scalar/openapi-parser": "0.8.
|
|
39
|
+
"@scalar/openapi-parser": "0.8.9"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"vite": "^5.4.9",
|