@scalar/nuxt 0.2.161 → 0.2.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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scalar/nuxt",
3
3
  "configKey": "scalar",
4
- "version": "0.2.161",
4
+ "version": "0.2.165",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.1",
7
7
  "unbuild": "unknown"
@@ -1,10 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { useHead, useRequestURL, useSeoMeta } from '#imports'
3
- import {
4
- ModernLayout,
5
- type ReferenceConfiguration,
6
- parse,
7
- } from '@scalar/api-reference'
3
+ import { ModernLayout, parse } from '@scalar/api-reference'
4
+ import type { ReferenceConfiguration } from '@scalar/types/legacy'
8
5
  import { reactive, ref, toRaw } from 'vue'
9
6
  import type { Configuration } from '~/src/types'
10
7
 
@@ -15,11 +12,14 @@ const props = defineProps<{
15
12
  const isDark = ref(props.configuration.darkMode)
16
13
 
17
14
  // Grab spec if we can
18
- const content: unknown = props.configuration.spec?.content
19
- ? toRaw(props.configuration.spec.content)
20
- : props.configuration.spec?.url
21
- ? await $fetch(props.configuration.spec?.url)
22
- : await $fetch('/_nitro/openapi.json')
15
+ const content =
16
+ typeof props.configuration.spec?.content === 'function'
17
+ ? toRaw(props.configuration.spec.content())
18
+ : props.configuration.spec?.content
19
+ ? toRaw(props.configuration.spec.content)
20
+ : props.configuration.spec?.url
21
+ ? await $fetch<string>(props.configuration.spec?.url)
22
+ : await $fetch<string>('/_nitro/openapi.json')
23
23
 
24
24
  // Check for empty spec
25
25
  if (!content)
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "testing",
21
21
  "vue"
22
22
  ],
23
- "version": "0.2.161",
23
+ "version": "0.2.165",
24
24
  "engines": {
25
25
  "node": ">=18"
26
26
  },
@@ -39,8 +39,9 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "@nuxt/kit": "^3.12.3",
42
- "@scalar/api-client": "2.2.12",
43
- "@scalar/api-reference": "1.25.83"
42
+ "@scalar/api-client": "2.2.16",
43
+ "@scalar/api-reference": "1.25.87",
44
+ "@scalar/types": "0.0.25"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@nuxt/devtools": "^1.3.9",