Skip to content

Commit

Permalink
fix: error message if no endpoints are set
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Dec 9, 2023
1 parent ef0122f commit bac9e44
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 72 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nuxt-api-party",
"type": "module",
"version": "0.22.1",
"packageManager": "pnpm@8.11.0",
"packageManager": "pnpm@8.12.0",
"description": "Nuxt 3 module to securely connect with any API",
"author": "Johann Schopplich <pkg@johannschopplich.com>",
"license": "MIT",
Expand Down Expand Up @@ -68,7 +68,7 @@
"nuxt": "^3.8.2",
"nuxt-api-party": "workspace:*",
"typescript": "^5.3.3",
"vitest": "^0.34.6",
"vitest": "^1.0.2",
"vue-tsc": "^1.8.25"
}
}
122 changes: 54 additions & 68 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default defineNuxtModule<ModuleOptions>({
!Object.keys(options.endpoints!).length
&& !nuxt.options.runtimeConfig.apiParty
)
logger.error('Missing any API endpoint configuration. Please the `apiParty` module configuration in `nuxt.config.ts`.')
logger.error('Missing any API endpoint configuration. Please check the `apiParty` module configuration in `nuxt.config.ts`.')

// Private runtime config
// eslint-disable-next-line ts/prefer-ts-expect-error
Expand All @@ -104,7 +104,7 @@ export default defineNuxtModule<ModuleOptions>({
)

if (!nuxt.options.ssr) {
logger.info('Enabling Nuxt API Party client requests by default, because `ssr: false` is set.')
logger.info('Enabling Nuxt API Party client requests by default because SSR is disabled.')
options.client = 'always'
}

Expand Down

0 comments on commit bac9e44

Please sign in to comment.