mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-28 08:49:38 +02:00
refactor: enforce ktx naming and AGENTS.md compliance sweep (#289)
Align the tree with AGENTS.md/CLAUDE.md conventions: - Rewrite user-facing strings, docs, and tests to lowercase `ktx` (no bare uppercase `KTX` tokens remain outside literal identifiers). - Drop the legacy `historicSql` migration path and its now-unused helpers, per the no-backward-compat rule. - Remove `as unknown as` / `any` casts: narrow `BaseTool` generics to `z.ZodObject`, add a typed `createLookerClient`, and delete the dead `getParametersSchema`/`toAnthropicFormat` pre-AI-SDK helpers. - Use `InvalidArgumentError` for Commander parse failures. - Finish the adapter→connector prose conversion in the `ktx.yaml` docs while keeping the literal `adapters` config key.
This commit is contained in:
parent
005c5fc860
commit
00cdf2de90
237 changed files with 844 additions and 974 deletions
|
|
@ -131,7 +131,7 @@ describe('setup project step', () => {
|
|||
expect(result.projectDir).toBe(projectDir);
|
||||
expect(prompts.select).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
message: 'Where should KTX create the project?',
|
||||
message: 'Where should ktx create the project?',
|
||||
options: [
|
||||
expect.objectContaining({ value: 'current', label: `Current directory (${projectDir})` }),
|
||||
expect.objectContaining({
|
||||
|
|
@ -165,7 +165,7 @@ describe('setup project step', () => {
|
|||
expect(prompts.select).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
expect.objectContaining({
|
||||
message: 'Where should KTX create the project?',
|
||||
message: 'Where should ktx create the project?',
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
value: 'new-default',
|
||||
|
|
@ -176,11 +176,11 @@ describe('setup project step', () => {
|
|||
);
|
||||
expect(prompts.select).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
expect.objectContaining({ message: `Create KTX project at ${projectDir}?` }),
|
||||
expect.objectContaining({ message: `Create ktx project at ${projectDir}?` }),
|
||||
);
|
||||
expect(prompts.text).not.toHaveBeenCalled();
|
||||
expect(result.status === 'ready' ? result.project.configPath : '').toBe(join(projectDir, 'ktx.yaml'));
|
||||
expect(testIo.stdout()).toContain(`│ KTX will create:\n│ ${projectDir}`);
|
||||
expect(testIo.stdout()).toContain(`│ ktx will create:\n│ ${projectDir}`);
|
||||
await expect(stat(join(projectDir, 'ktx.yaml'))).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ describe('setup project step', () => {
|
|||
expect(prompts.select).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
expect.objectContaining({
|
||||
message: `Create KTX project at ${customProjectDir}?`,
|
||||
message: `Create ktx project at ${customProjectDir}?`,
|
||||
options: [
|
||||
expect.objectContaining({ value: 'create', label: 'Create project' }),
|
||||
expect.objectContaining({ value: 'choose-another', label: 'Choose another folder' }),
|
||||
|
|
@ -253,7 +253,7 @@ describe('setup project step', () => {
|
|||
);
|
||||
expect(prompts.select).toHaveBeenNthCalledWith(
|
||||
3,
|
||||
expect.objectContaining({ message: 'Where should KTX create the project?' }),
|
||||
expect.objectContaining({ message: 'Where should ktx create the project?' }),
|
||||
);
|
||||
await expect(stat(join(customProjectDir, 'ktx.yaml'))).rejects.toThrow();
|
||||
});
|
||||
|
|
@ -280,7 +280,7 @@ describe('setup project step', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('confirms before creating KTX files inside an existing non-empty folder', async () => {
|
||||
it('confirms before creating ktx files inside an existing non-empty folder', async () => {
|
||||
const startDir = join(tempDir, 'start');
|
||||
const projectDir = join(startDir, 'analytics-ktx');
|
||||
await mkdir(projectDir, { recursive: true });
|
||||
|
|
@ -300,7 +300,7 @@ describe('setup project step', () => {
|
|||
expect.objectContaining({
|
||||
message: `That folder already exists and is not empty: ${projectDir}`,
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({ value: 'use-existing', label: 'Yes, create KTX files there' }),
|
||||
expect.objectContaining({ value: 'use-existing', label: 'Yes, create ktx files there' }),
|
||||
expect.objectContaining({ value: 'choose-another', label: 'Choose another folder' }),
|
||||
]),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue