@scalar/nuxt 0.3.5 → 0.3.7

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.3.5",
4
+ "version": "0.3.7",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.1",
7
7
  "unbuild": "unknown"
@@ -27,14 +27,17 @@ const document =
27
27
  : await $fetch<string>('/_openapi.json')
28
28
 
29
29
  // Check for empty spec
30
- if (!document)
30
+ if (!document) {
31
31
  throw new Error('You must provide a document for Scalar API References')
32
+ }
32
33
 
33
34
  const parsedSpec = reactive(await parse(document))
34
35
  const rawSpec = JSON.stringify(document)
35
36
 
36
37
  // Load up the metadata
37
- if (props.configuration?.metaData) useSeoMeta(props.configuration.metaData)
38
+ if (props.configuration?.metaData) {
39
+ useSeoMeta(props.configuration.metaData)
40
+ }
38
41
 
39
42
  useHead({
40
43
  bodyAttrs: {
@@ -14,10 +14,11 @@ if (
14
14
  !meta.configuration?.spec?.url &&
15
15
  // @ts-expect-error support the old syntax for a bit
16
16
  !meta.configuration?.spec?.content
17
- )
17
+ ) {
18
18
  throw new Error(
19
19
  'You must either provide a spec to scalar, or enable experimental openApi in the Nitro config.',
20
20
  )
21
+ }
21
22
  </script>
22
23
 
23
24
  <template>
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "testing",
21
21
  "vue"
22
22
  ],
23
- "version": "0.3.5",
23
+ "version": "0.3.7",
24
24
  "engines": {
25
25
  "node": ">=18"
26
26
  },
@@ -39,9 +39,9 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "@nuxt/kit": "^3.12.3",
42
- "@scalar/api-client": "2.3.5",
43
- "@scalar/types": "0.1.1",
44
- "@scalar/api-reference": "1.28.5"
42
+ "@scalar/api-client": "2.3.7",
43
+ "@scalar/api-reference": "1.28.7",
44
+ "@scalar/types": "0.1.2"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@nuxt/devtools": "^1.3.9",