diff --git a/src/commands/change-org/index.ts b/src/commands/org/switch.ts similarity index 87% rename from src/commands/change-org/index.ts rename to src/commands/org/switch.ts index 640e87a..623d331 100644 --- a/src/commands/change-org/index.ts +++ b/src/commands/org/switch.ts @@ -1,4 +1,4 @@ -import {Command} from '@oclif/core' +import { Command } from '@oclif/core' import chalk from "chalk"; import * as fs from 'node:fs' import { createInterface } from "node:readline"; @@ -6,18 +6,17 @@ import { createInterface } from "node:readline"; import { fileExists, getEnvFilePath, promptOrgSelection, readEnvFile, sendGraphQLRequest } from '../../util/index.js' -export default class ChangeOrg extends Command { +export default class OrgSwitch extends Command { static override args = { } - static override description = 'Change the current Hypermode organization' + static override description = 'Switch the current Hypermode organization' static override examples = [ '<%= config.bin %> <%= command.id %>', ] - static override flags = { - } + static override flags = {} public async run(): Promise { const envFilePath = getEnvFilePath(); diff --git a/test/commands/change-org/index.test.ts b/test/commands/change-org/index.test.ts deleted file mode 100644 index 8915675..0000000 --- a/test/commands/change-org/index.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {runCommand} from '@oclif/test' -import {expect} from 'chai' - -describe('change-org:index', () => { - it('runs change-org:index cmd', async () => { - const {stdout} = await runCommand('change-org:index') - expect(stdout).to.contain('hello world') - }) - - it('runs change-org:index --name oclif', async () => { - const {stdout} = await runCommand('change-org:index --name oclif') - expect(stdout).to.contain('hello oclif') - }) -}) diff --git a/test/commands/org/switch.test.ts b/test/commands/org/switch.test.ts new file mode 100644 index 0000000..71a91cd --- /dev/null +++ b/test/commands/org/switch.test.ts @@ -0,0 +1,9 @@ +import {runCommand} from '@oclif/test' +import {expect} from 'chai' + +describe('org:switch', () => { + it('runs org:switch cmd', async () => { + const {stdout} = await runCommand('org:switch') + expect(stdout).to.contain('Not logged in.') + }) +}) diff --git a/tsconfig.tsbuildinfo b/tsconfig.tsbuildinfo index 9a24518..170d34f 100644 --- a/tsconfig.tsbuildinfo +++ b/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/index.ts","./src/commands/hello/index.ts","./src/commands/hello/world.ts"],"version":"5.6.2"} \ No newline at end of file +{"root":["./src/index.ts","./src/commands/change-org/index.ts","./src/commands/hello/index.ts","./src/commands/hello/world.ts","./src/commands/login/index.ts","./src/commands/logout/index.ts","./src/util/index.ts"],"errors":true,"version":"5.6.2"} \ No newline at end of file