Skip to content

Commit

Permalink
Merge branch 'main' into dev-428
Browse files Browse the repository at this point in the history
  • Loading branch information
RihanArfan authored Oct 29, 2024
2 parents e259098 + 2ca1db4 commit fca6126
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# Changelog


## v0.8.3

[compare changes](https://github.com/nuxt-hub/core/compare/v0.8.2...v0.8.3)

### 🩹 Fixes

- Make vectorize query params optional ([#351](https://github.com/nuxt-hub/core/pull/351))
- Correctly resolve vectorize type ([#349](https://github.com/nuxt-hub/core/pull/349))
- Only show vectorize as remote storage if indexes present ([#352](https://github.com/nuxt-hub/core/pull/352))

### 📖 Documentation

- Let auto mode for color mode ([a823ba7](https://github.com/nuxt-hub/core/commit/a823ba7))
- Add back studio ([1826a4c](https://github.com/nuxt-hub/core/commit/1826a4c))

### ❤️ Contributors

- Rihan ([@RihanArfan](http://github.com/RihanArfan))
- Sébastien Chopin ([@atinux](http://github.com/atinux))

## v0.8.2

[compare changes](https://github.com/nuxt-hub/core/compare/v0.8.1...v0.8.2)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nuxthub/core",
"private": false,
"version": "0.8.2",
"version": "0.8.3",
"description": "Build full-stack Nuxt applications on Cloudflare, with zero configuration.",
"repository": {
"type": "git",
Expand Down
10 changes: 8 additions & 2 deletions src/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,16 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) {
}
})

const availableStorages = Object.keys(remoteManifest?.storage || {}).filter(k => hub[k as keyof typeof hub] && remoteManifest?.storage[k])
const availableStorages = Object.keys(remoteManifest?.storage || {}).filter((k) => {
if (k === 'vectorize') {
return Object.keys(hub.vectorize ?? {}).length && Object.keys(remoteManifest!.storage.vectorize!).length
}
return hub[k as keyof typeof hub] && remoteManifest?.storage[k]
})

if (availableStorages.length > 0) {
const storageDescriptions = availableStorages.map((storage) => {
if (storage === 'vectorize' && Object.keys(hub.vectorize || {}).length) {
if (storage === 'vectorize') {
const indexes = Object.keys(remoteManifest!.storage.vectorize!).join(', ')
return `\`${storage} (${indexes})\``
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/vectorize/server/utils/vectorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { joinURL } from 'ufo'
import { createError } from 'h3'
import type { H3Error } from 'h3'
import type { RuntimeConfig } from 'nuxt/schema'
import type { Vectorize } from '../../../../types/vectorize'
import type { Vectorize } from '@nuxthub/core'
import { requireNuxtHubFeature } from '../../../utils/features'
import { getCloudflareAccessHeaders } from '../../../utils/cloudflareAccess'
import { useRuntimeConfig } from '#imports'
Expand Down

0 comments on commit fca6126

Please sign in to comment.