Skip to content

refactor: move generated types into appkit-types/ directory#267

Merged
pkosiec merged 2 commits intomainfrom
pkosiec/improve-gen-types
Apr 15, 2026
Merged

refactor: move generated types into appkit-types/ directory#267
pkosiec merged 2 commits intomainfrom
pkosiec/improve-gen-types

Conversation

@pkosiec
Copy link
Copy Markdown
Member

@pkosiec pkosiec commented Apr 13, 2026

Generated type declaration files (analytics query types, serving endpoint types) used to live as separate top-level files in client/src/. This PR moves them into a dedicated src/appkit-types/ directory — one file per plugin. TypeScript auto-discovers them via "include": ["src"] in tsconfig, so no index or barrel file is needed.

Screenshots

image (3) image (4)

Changes

  • Analytics types: src/appKitTypes.d.tssrc/appkit-types/analytics.d.ts
  • Serving types: src/appKitServingTypes.d.tssrc/appkit-types/serving.d.ts
  • Both generators now mkdir -p before writing, so the directory is created on first run
  • Directory name and filenames extracted as shared constants (TYPES_DIR, ANALYTICS_TYPES_FILE, SERVING_TYPES_FILE)
  • Updated Vite plugin defaults, CLI defaults, docs, tests, and .gitignore

@pkosiec pkosiec force-pushed the pkosiec/improve-gen-types branch 2 times, most recently from d93dbfb to 190f62c Compare April 13, 2026 10:16
@pkosiec pkosiec marked this pull request as ready for review April 13, 2026 10:27
Comment thread packages/appkit/src/type-generator/vite-plugin.ts
pkosiec added 2 commits April 15, 2026 13:30
Consolidate generated .d.ts files into a single src/appkit-types/
directory instead of polluting client/src/ with multiple top-level
type files. TypeScript auto-discovers files via "include": ["src"].

- analytics types: src/appkit-types/analytics.d.ts
- serving types: src/appkit-types/serving.d.ts

Both generators now ensure the parent directory exists before writing.
Directory name and filenames are shared constants in type-generator.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
…artup

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@pkosiec pkosiec force-pushed the pkosiec/improve-gen-types branch from 190f62c to 4183585 Compare April 15, 2026 11:32
@pkosiec pkosiec merged commit a1ee0f4 into main Apr 15, 2026
7 checks passed
@pkosiec pkosiec deleted the pkosiec/improve-gen-types branch April 15, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants