diff --git a/docs/content/1.docs/1.getting-started/1.index.md b/docs/content/1.docs/1.getting-started/1.index.md index c57dc37a..3da54249 100644 --- a/docs/content/1.docs/1.getting-started/1.index.md +++ b/docs/content/1.docs/1.getting-started/1.index.md @@ -91,7 +91,7 @@ The [NuxtHub admin](https://admin.hub.nuxt.com) is a web based dashboard to mana It abstracts the complexity of managing full-stack Nuxt applications on Cloudflare: - Link your Cloudflare account and stay in control, we never mark-up Cloudflare prices -- [Deploy your application](/docs/getting-started/deploy) with `nuxthub deploy` command or with Cloudflare Pages CI +- [Deploy your application](/docs/getting-started/deploy) with `npx nuxthub deploy` command or with Cloudflare Pages CI - Relax while it provisions all the necessary resources (ai, blob, cache, database, kv) - Manage your app's resources with an admin panel - Visualize application, database, and cache metrics diff --git a/docs/content/1.docs/1.getting-started/3.deploy.md b/docs/content/1.docs/1.getting-started/3.deploy.md index 10d2fdf5..634d4e5d 100644 --- a/docs/content/1.docs/1.getting-started/3.deploy.md +++ b/docs/content/1.docs/1.getting-started/3.deploy.md @@ -94,7 +94,7 @@ jobs: ``` You need to add the following secrets to your GitHub repository: -- `NUXT_HUB_PROJECT_KEY`: Your project key (available in your project settings in the NuxtHub Admin or in your `.env` file if you ran `nuxthub link`) +- `NUXT_HUB_PROJECT_KEY`: Your project key (available in your project settings in the NuxtHub Admin or in your `.env` file if you ran `npx nuxthub link`) - `NUXT_HUB_USER_TOKEN`: Your user token available in **User settings** → **Tokens** in the NuxtHub Admin ::tip diff --git a/docs/content/1.docs/1.getting-started/4.remote-storage.md b/docs/content/1.docs/1.getting-started/4.remote-storage.md index 89b26e45..037b14c6 100644 --- a/docs/content/1.docs/1.getting-started/4.remote-storage.md +++ b/docs/content/1.docs/1.getting-started/4.remote-storage.md @@ -55,7 +55,7 @@ You should not use the `remote` option in your `nuxt.config` file in production :: ::note -NuxtHub will use the remote storage from your deployed project **as long as you are logged in with the [NuxtHub CLI](https://github.com/nuxt-hub/cli) and the local project is linked to a NuxtHub project** with `nuxthub link` or `nuxthub deploy`. +NuxtHub will use the remote storage from your deployed project **as long as you are logged in with the [NuxtHub CLI](https://github.com/nuxt-hub/cli) and the local project is linked to a NuxtHub project** with `npx nuxthub link` or `npx nuxthub deploy`. :: ### Production vs Preview diff --git a/docs/content/1.docs/1.getting-started/5.server-logs.md b/docs/content/1.docs/1.getting-started/5.server-logs.md index 6c1cecb0..d35ef153 100644 --- a/docs/content/1.docs/1.getting-started/5.server-logs.md +++ b/docs/content/1.docs/1.getting-started/5.server-logs.md @@ -18,7 +18,7 @@ Using the [NuxtHub CLI](https://github.com/nuxt-hub/cli), you can access to the By default, the CLI will detect based on the current branch the canonical deployment of your project and stream the logs of that deployment in the CLI. ```bash [Terminal] -nuxthub logs +npx nuxthub logs ``` :nuxt-img{src="/images/landing/nuxthub-cli-server-logs.png" alt="NuxtHub CLI Server Logs" width="915" height="515" data-zoom-src="/images/landing/nuxthub-cli-server-logs.png" class="rounded"} @@ -28,7 +28,7 @@ nuxthub logs To access the logs of the production environment, you can use the `--production` flag. ```bash [Terminal] -nuxthub logs --production +npx nuxthub logs --production ``` ### Preview environment @@ -36,5 +36,5 @@ nuxthub logs --production In preview environment, NuxtHub will stream the logs of the latest successful deployment in the CLI. ```bash [Terminal] -nuxthub logs --preview +npx nuxthub logs --preview ``` diff --git a/docs/content/5.blog/1.beta.md b/docs/content/5.blog/1.beta.md index f54929eb..c352708c 100644 --- a/docs/content/5.blog/1.beta.md +++ b/docs/content/5.blog/1.beta.md @@ -70,7 +70,7 @@ The [NuxtHub admin](https://admin.hub.nuxt.com) is a web based dashboard to mana Some of the features are: - Link your Cloudflare account and stay in control (we never mark-up Cloudflare prices) - Clone one of our full-stack Nuxt templates -- Deploy your application with nuxthub deploy command or link your GitHub or GitLab repository +- Deploy your application with `npx nuxthub deploy` command or link your GitHub or GitLab repository - Relax while it provisions all the necessary resources (database, kv, blob) - Manage your app's resources with an admin panel - Share team member access to manage your app without sharing your Cloudflare account diff --git a/src/features.ts b/src/features.ts index de97bc7f..908173c8 100644 --- a/src/features.ts +++ b/src/features.ts @@ -80,7 +80,7 @@ export function setupBase(nuxt: Nuxt, hub: HubConfig) { export async function setupAI(nuxt: Nuxt, hub: HubConfig) { // If we are in dev mode and the project is not linked, disable it if (nuxt.options.dev && !hub.remote && !hub.projectKey) { - return log.warn('`hubAI()` is disabled: link a project with `nuxthub link` to run AI models in development mode.') + return log.warn('`hubAI()` is disabled: link a project with `npx nuxthub link` to run AI models in development mode.') } // If we are in dev mode and the project is linked, verify it if (nuxt.options.dev && !hub.remote && hub.projectKey) { @@ -95,9 +95,9 @@ export async function setupAI(nuxt: Nuxt, hub: HubConfig) { if (!err.status) { log.warn ('`hubAI()` is disabled: it seems that you are offline.') } else if (err.status === 401) { - log.warn ('`hubAI()` is disabled: you are not logged in, make sure to run `nuxthub login`.') + log.warn ('`hubAI()` is disabled: you are not logged in, make sure to run `npx nuxthub login`.') } else { - log.error('`hubAI()` is disabled: failed to fetch linked project `' + hub.projectKey + '` on NuxtHub, make sure to run `nuxthub link` again.') + log.error('`hubAI()` is disabled: failed to fetch linked project `' + hub.projectKey + '` on NuxtHub, make sure to run `npx nuxthub link` again.') } return } @@ -262,9 +262,9 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) { if (!err.status) { log.error('It seems that you are offline.') } else if (err.status === 401) { - log.error('It seems that you are not logged in, make sure to run `nuxthub login`.') + log.error('It seems that you are not logged in, make sure to run `npx nuxthub login`.') } else { - log.error('Failed to fetch linked project on NuxtHub, make sure to run `nuxthub link` again.') + log.error('Failed to fetch linked project on NuxtHub, make sure to run `npx nuxthub link` again.') } process.exit(1) }) @@ -286,7 +286,7 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) { hub.projectUrl = hub.projectUrl || (env === 'production' ? project.url : project.previewUrl) // No production or preview URL found if (!hub.projectUrl) { - log.error(`No deployment found for \`${env}\`, make sure to deploy the project using \`nuxthub deploy\`.`) + log.error(`No deployment found for \`${env}\`, make sure to deploy the project using \`npx nuxthub deploy\`.`) process.exit(1) } // Update hub.env in runtimeConfig @@ -295,7 +295,7 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) { // Make sure we have a projectUrl when using the remote option if (!hub.projectUrl) { - log.error('No project URL defined, make sure to link your project with `nuxthub link` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable (if self-hosted).') + log.error('No project URL defined, make sure to link your project with `npx nuxthub link` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable (if self-hosted).') process.exit(1) } @@ -314,11 +314,11 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) { } }) .catch(async (err) => { - let message = 'Project not found.\nMake sure to deploy the project using `nuxthub deploy` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable.' + let message = 'Project not found.\nMake sure to deploy the project using `npx nuxthub deploy` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable.' if (err.status >= 500) { message = 'Internal server error' } else if (err.status === 401) { - message = 'Authorization failed.\nMake sure to provide a valid NUXT_HUB_PROJECT_SECRET_KEY or being logged in with `nuxthub login`' + message = 'Authorization failed.\nMake sure to provide a valid NUXT_HUB_PROJECT_SECRET_KEY or being logged in with `npx nuxthub login`' } log.error(`Failed to fetch remote storage: ${message}`) process.exit(1) diff --git a/src/types/module.ts b/src/types/module.ts index e07c5ec3..fa506099 100644 --- a/src/types/module.ts +++ b/src/types/module.ts @@ -94,12 +94,12 @@ export interface ModuleOptions { */ url?: string /** - * The project's key on the NuxtHub platform, added with `nuxthub link`. + * The project's key on the NuxtHub platform, added with `npx nuxthub link`. * @default process.env.NUXT_HUB_PROJECT_KEY */ projectKey?: string /** - * The user token to access the NuxtHub platform, added with `nuxthub login` + * The user token to access the NuxtHub platform, added with `npx nuxthub login` * @default process.env.NUXT_HUB_USER_TOKEN */ userToken?: string