diff --git a/src/commands/__tests__/gen-types/command.test.ts b/src/commands/generate/types/__tests__/command.test.ts similarity index 98% rename from src/commands/__tests__/gen-types/command.test.ts rename to src/commands/generate/types/__tests__/command.test.ts index a960675..b88d799 100644 --- a/src/commands/__tests__/gen-types/command.test.ts +++ b/src/commands/generate/types/__tests__/command.test.ts @@ -1,12 +1,12 @@ import { describe, expect, it } from 'bun:test'; -import { createGenTypesCommand } from '../../gen-types/command.js'; +import { createGenTypesCommand } from '../command.js'; import type { ApiListItem, GenerationTarget, GenTypesOptions, ManagementApiSchema, ManagementClientConfig, -} from '../../gen-types/types.js'; +} from '../types.js'; const FIXTURE_CONFIG: ManagementClientConfig = { serviceDomain: 'test-service', diff --git a/src/commands/__tests__/gen-types/config.test.ts b/src/commands/generate/types/__tests__/config.test.ts similarity index 98% rename from src/commands/__tests__/gen-types/config.test.ts rename to src/commands/generate/types/__tests__/config.test.ts index a647cca..04dab3e 100644 --- a/src/commands/__tests__/gen-types/config.test.ts +++ b/src/commands/generate/types/__tests__/config.test.ts @@ -1,6 +1,6 @@ import path from 'node:path'; import { afterEach, describe, expect, it } from 'bun:test'; -import { resolveConfig, resolveOutputFilePath, resolveSingleEndpoint } from '../../gen-types/config.js'; +import { resolveConfig, resolveOutputFilePath, resolveSingleEndpoint } from '../config.js'; const ORIGINAL_ENV = { serviceDomain: process.env.MICROCMS_SERVICE_DOMAIN, diff --git a/src/commands/__tests__/gen-types/management-api.test.ts b/src/commands/generate/types/__tests__/management-api.test.ts similarity index 97% rename from src/commands/__tests__/gen-types/management-api.test.ts rename to src/commands/generate/types/__tests__/management-api.test.ts index b7bd29a..338c2ae 100644 --- a/src/commands/__tests__/gen-types/management-api.test.ts +++ b/src/commands/generate/types/__tests__/management-api.test.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, it } from 'bun:test'; -import { fetchApiList, fetchApiSchema } from '../../gen-types/management-api.js'; -import type { ManagementClientConfig } from '../../gen-types/types.js'; +import { fetchApiList, fetchApiSchema } from '../management-api.js'; +import type { ManagementClientConfig } from '../types.js'; const FIXTURE_CONFIG: ManagementClientConfig = { serviceDomain: 'sample', diff --git a/src/commands/__tests__/gen-types/type-generator.test.ts b/src/commands/generate/types/__tests__/type-generator.test.ts similarity index 94% rename from src/commands/__tests__/gen-types/type-generator.test.ts rename to src/commands/generate/types/__tests__/type-generator.test.ts index d968e14..f737a68 100644 --- a/src/commands/__tests__/gen-types/type-generator.test.ts +++ b/src/commands/generate/types/__tests__/type-generator.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'bun:test'; -import { renderDefinitionsFile } from '../../gen-types/type-generator.js'; -import type { GenerationTarget, ManagementApiSchema } from '../../gen-types/types.js'; +import { renderDefinitionsFile } from '../type-generator.js'; +import type { GenerationTarget, ManagementApiSchema } from '../types.js'; function createSchema(overrides: Partial = {}): ManagementApiSchema { return { diff --git a/src/commands/gen-types/command.ts b/src/commands/generate/types/command.ts similarity index 100% rename from src/commands/gen-types/command.ts rename to src/commands/generate/types/command.ts diff --git a/src/commands/gen-types/config.ts b/src/commands/generate/types/config.ts similarity index 100% rename from src/commands/gen-types/config.ts rename to src/commands/generate/types/config.ts diff --git a/src/commands/gen-types/constants.ts b/src/commands/generate/types/constants.ts similarity index 100% rename from src/commands/gen-types/constants.ts rename to src/commands/generate/types/constants.ts diff --git a/src/commands/gen-types/index.ts b/src/commands/generate/types/index.ts similarity index 100% rename from src/commands/gen-types/index.ts rename to src/commands/generate/types/index.ts diff --git a/src/commands/gen-types/management-api.ts b/src/commands/generate/types/management-api.ts similarity index 100% rename from src/commands/gen-types/management-api.ts rename to src/commands/generate/types/management-api.ts diff --git a/src/commands/gen-types/shared.ts b/src/commands/generate/types/shared.ts similarity index 100% rename from src/commands/gen-types/shared.ts rename to src/commands/generate/types/shared.ts diff --git a/src/commands/gen-types/type-generator.ts b/src/commands/generate/types/type-generator.ts similarity index 100% rename from src/commands/gen-types/type-generator.ts rename to src/commands/generate/types/type-generator.ts diff --git a/src/commands/gen-types/types.ts b/src/commands/generate/types/types.ts similarity index 100% rename from src/commands/gen-types/types.ts rename to src/commands/generate/types/types.ts diff --git a/src/index.ts b/src/index.ts index 99879ee..262bb8e 100755 --- a/src/index.ts +++ b/src/index.ts @@ -19,7 +19,7 @@ dotenv.config({ path: path.join(envDir, '.env.local') }); process.env.__MICROCMS_CLI_ENV_DIR = envDir; import { Command } from 'commander'; -import { genTypesCommand } from './commands/gen-types/index.js'; +import { genTypesCommand } from './commands/generate/types/index.js'; const program = new Command();