Skip to content

Commit

Permalink
fix(docs): reworded team+ plan requirement notice
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees committed Sep 15, 2023
1 parent 19494a0 commit 0d28972
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ export async function cliEntry(argv = process.argv) {
}

if (err?.response?.body?.message?.includes('Project is not allowed to use this feature')) {
log.info(
'Embeddings Index API is available to users on the Team plan and above. Upgrade your plan to enable access.',
)
log.info('https://sanity.io/pricing')
;(await import('./disabledNotice')).default()
}

// eslint-disable-next-line no-process-exit
Expand Down
11 changes: 11 additions & 0 deletions src/disabledNotice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import log from './util/log'
import {createClient} from './util/sanityClient'

export default function logDisabledNotice() {
const client = createClient()

log.info(
'💎 Unlock semantic search with Embeddings Index APIs — available on Team, Business, and Enterprise plans. ' +
`Upgrade now: https://www.sanity.io/manage/project/${client.config().projectId}/plan`,
)
}

0 comments on commit 0d28972

Please sign in to comment.