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
3 changes: 2 additions & 1 deletion src/bin-default-command.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ describe('bin $0 default command (non-TTY)', () => {

const combined = `${result.stdout}\n${result.stderr}`;
// parser.showHelp() (not the fresh-yargs block) lists the full command set.
expect(combined).toMatch(/install/);
expect(combined).toContain('workos install');
expect(combined).toContain('[aliases: integrate]');
expect(combined).toMatch(/organization/);
expect(combined).toMatch(/auth/);
}, 20_000);
Expand Down
3 changes: 2 additions & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ async function runCli(): Promise<void> {
'env',
'claim',
'install',
'integrate',
'setup',
'debug',
'internal',
Expand Down Expand Up @@ -3182,7 +3183,7 @@ async function runCli(): Promise<void> {
},
)
.command(
'install',
['install', 'integrate'],
'Install WorkOS AuthKit into your project (interactive framework detection and setup)',
(yargs) => yargs.options(installerOptions),
async (argv) => {
Expand Down
1 change: 1 addition & 0 deletions src/lib/command-aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Adding an alias here updates both metrics aggregation and --help --json output.
*/
export const COMMAND_ALIASES: Record<string, string> = {
integrate: 'install',
org: 'organization',
// `env` was the pre-0.22 name for local profiles; kept as a quiet alias.
env: 'profile',
Expand Down
1 change: 1 addition & 0 deletions src/utils/command-telemetry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe('command-telemetry', () => {
describe('resolveCanonicalName', () => {
it('resolves aliased commands', () => {
expect(resolveCanonicalName(['org', 'list'])).toBe('organization.list');
expect(resolveCanonicalName(['integrate'])).toBe('install');
});

it('passes through non-aliased commands', () => {
Expand Down
1 change: 1 addition & 0 deletions src/utils/help-json.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('help-json', () => {

it('resolves command aliases', () => {
expect(extractHelpJsonCommand(['org', '--help', '--json'])).toBe('organization');
expect(extractHelpJsonCommand(['integrate', '--help', '--json'])).toBe('install');
});
});

Expand Down