@scalar/nuxt 0.6.34 → 0.6.37

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scalar/nuxt",
3
3
  "configKey": "scalar",
4
- "version": "0.6.34",
4
+ "version": "0.6.37",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "unknown"
@@ -29,7 +29,7 @@ if (!document.value) {
29
29
  if (typeof content === "function") {
30
30
  document.value = content();
31
31
  } else if (content) {
32
- document.value = content;
32
+ document.value = typeof content === "string" ? content : JSON.stringify(content);
33
33
  } else if (url) {
34
34
  try {
35
35
  const response = await useFetch(url, { responseType: "text" });
@@ -2,9 +2,7 @@
2
2
  import { useRoute } from "#imports";
3
3
  const route = useRoute();
4
4
  const meta = route.meta;
5
- if (!meta.isOpenApiEnabled && !meta.configuration?.url && !meta.configuration?.content && // @ts-expect-error support the old syntax for a bit
6
- !meta.configuration?.spec?.url && // @ts-expect-error support the old syntax for a bit
7
- !meta.configuration?.spec?.content) {
5
+ if (!meta.isOpenApiEnabled && !meta.configuration?.url && !meta.configuration?.content && !meta.configuration?.spec?.url && !meta.configuration?.spec?.content) {
8
6
  throw new Error(
9
7
  "You must either provide a spec to scalar, or enable experimental openApi in the Nitro config."
10
8
  );
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "testing",
21
21
  "vue"
22
22
  ],
23
- "version": "0.6.34",
23
+ "version": "0.6.37",
24
24
  "engines": {
25
25
  "node": ">=22"
26
26
  },
@@ -54,10 +54,10 @@
54
54
  "dependencies": {
55
55
  "@nuxt/kit": "^4.0.0",
56
56
  "vue": "^3.5.30",
57
- "@scalar/api-client": "3.6.1",
58
- "@scalar/api-reference": "1.55.3",
59
- "@scalar/types": "0.9.6",
60
- "@scalar/use-hooks": "0.4.3"
57
+ "@scalar/api-client": "3.8.1",
58
+ "@scalar/types": "0.11.0",
59
+ "@scalar/use-hooks": "0.4.5",
60
+ "@scalar/api-reference": "1.57.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@nuxt/module-builder": "^1.0.1",