Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export function registerCreateCommand(program: Command): void {
deploySpinner.stop('Deployment is still building');
clack.log.info(`Deployment ID: ${result.deploymentId}`);
clack.log.warn('Deployment did not finish within 2 minutes.');
clack.log.info(`Check status with: insforge deployments status ${result.deploymentId}`);
clack.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`);
}
} catch (err) {
clack.log.warn(`Deploy failed: ${(err as Error).message}`);
Expand Down Expand Up @@ -540,7 +540,7 @@ async function downloadGitHubTemplate(
dbSpinner?.stop('Database migration failed');
if (!json) {
clack.log.warn(`Migration failed: ${(err as Error).message}`);
clack.log.info('You can run the migration manually: insforge db query --unrestricted "$(cat migrations/db_init.sql)"');
clack.log.info('You can run the migration manually: npx @insforge/cli db query --unrestricted "$(cat migrations/db_init.sql)"');
} else {
throw err;
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deployments/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function registerDeploymentsDeployCommand(deploymentsCmd: Command): void
} else {
clack.log.info(`Deployment ID: ${result.deploymentId}`);
clack.log.warn('Deployment did not finish within 2 minutes.');
clack.log.info(`Check status with: insforge deployments status ${result.deploymentId}`);
clack.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`);
}
}
await reportCliUsage('cli.deployments.deploy', true);
Expand Down
10 changes: 5 additions & 5 deletions src/commands/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Features: ${FEATURES.join(', ')}
Languages: ${LANGUAGES.join(', ')}

Examples:
insforge docs List all available docs
insforge docs instructions Show setup instructions
insforge docs db typescript Show TypeScript database SDK docs
insforge docs auth swift Show Swift auth SDK docs
insforge docs storage rest-api Show REST API storage docs`)
npx @insforge/cli docs List all available docs
npx @insforge/cli docs instructions Show setup instructions
npx @insforge/cli docs db typescript Show TypeScript database SDK docs
npx @insforge/cli docs auth swift Show Swift auth SDK docs
npx @insforge/cli docs storage rest-api Show REST API storage docs`)
.action(async (feature: string | undefined, language: string | undefined, _opts, cmd) => {
const { json } = getRootOpts(cmd);
try {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function registerContextCommand(program: Command): void {
console.log(` Region: ${projectConfig.region}`);
console.log(` OSS Host: ${projectConfig.oss_host}`);
} else {
console.log('\n Project: (not linked — run `insforge link`)');
console.log('\n Project: (not linked — run `npx @insforge/cli link`)');
}

console.log('');
Expand Down
6 changes: 3 additions & 3 deletions src/lib/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function requireAuth(apiUrl?: string, allowOssBypass = true): Promi

const retry = await clack.confirm({ message: 'Would you like to try again?' });
if (clack.isCancel(retry) || !retry) {
throw new AuthError('Authentication required. Run `insforge login` to authenticate.');
throw new AuthError('Authentication required. Run `npx @insforge/cli login` to authenticate.');
}
}
}
Expand All @@ -45,7 +45,7 @@ export async function requireAuth(apiUrl?: string, allowOssBypass = true): Promi
export async function refreshAccessToken(apiUrl?: string): Promise<string> {
const creds = getCredentials();
if (!creds?.refresh_token) {
throw new AuthError('Refresh token not found. Run `insforge login` again.');
throw new AuthError('Refresh token not found. Run `npx @insforge/cli login` again.');
}

const platformUrl = getPlatformApiUrl(apiUrl);
Expand Down Expand Up @@ -74,6 +74,6 @@ export async function refreshAccessToken(apiUrl?: string): Promise<string> {
const newCreds = await performOAuthLogin(apiUrl);
return newCreds.access_token;
}
throw new AuthError('Failed to refresh token. Run `insforge login` again.');
throw new AuthError('Failed to refresh token. Run `npx @insforge/cli login` again.');
}
}
4 changes: 2 additions & 2 deletions src/lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export class CLIError extends Error {
}

export class AuthError extends CLIError {
constructor(message: string = 'Not authenticated. Run `insforge login` first.') {
constructor(message: string = 'Not authenticated. Run `npx @insforge/cli login` first.') {
super(message, 2, 'AUTH_ERROR');
}
}

export class ProjectNotLinkedError extends CLIError {
constructor() {
super('No project linked. Run `insforge link` first.', 3, 'PROJECT_NOT_LINKED');
super('No project linked. Run `npx @insforge/cli link` first.', 3, 'PROJECT_NOT_LINKED');
}
}

Expand Down
Loading