@nuxt-customer-portal/core 0.4.3 → 0.4.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @nuxt-customer-portal/core
2
2
 
3
+ ## 0.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 67b5b80: Assemble authenticated OpenAPI documents through Nitro's local request context so HTTPS frontends do not break the raw schema request.
8
+
3
9
  ## 0.4.3
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt-customer-portal/core",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "license": "MIT",
5
5
  "homepage": "https://nuxt-customer-portal.com",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  id: 'core',
3
- version: '0.4.3',
3
+ version: '0.4.4',
4
4
  source: '@nuxt-customer-portal/core',
5
5
  dependsOn: [],
6
6
  schema: './server/db/schema/index.ts',
@@ -1,4 +1,3 @@
1
- import { fetchWithEvent, getRequestURL } from 'h3'
2
1
  import { auth } from '../../utils/auth'
3
2
  import { mergeBetterAuthOpenApi } from '../../utils/openapi-auth'
4
3
  import { enrichOpenApiContracts } from '../../utils/openapi-contracts'
@@ -15,8 +14,7 @@ defineRouteMeta({
15
14
  })
16
15
 
17
16
  export default defineEventHandler(async (event) => {
18
- const response = await fetchWithEvent(event, new URL('/api-docs/openapi.raw.json', getRequestURL(event)))
19
- const document = (await response.json()) as OpenApiDocument
17
+ const document = await event.$fetch<OpenApiDocument>('/api-docs/openapi.raw.json')
20
18
  const authDocument = (await auth.api.generateOpenAPISchema()) as unknown as OpenApiDocument
21
19
  return orderOpenApiDocument(enrichOpenApiContracts(mergeBetterAuthOpenApi(document, authDocument)))
22
20
  })