Skip to content

refactor: split generated output into individual files per enum/resource - #7

Merged
joshmanders merged 1 commit into
masterfrom
refactor-output
Jan 11, 2026
Merged

refactor: split generated output into individual files per enum/resource#7
joshmanders merged 1 commit into
masterfrom
refactor-output

Conversation

@joshmanders

Copy link
Copy Markdown
Contributor

Summary

  • Split bundled index.d.ts / index.js output into individual files per enum and resource (e.g., StatusEnum.d.ts, UserResource.d.ts)
  • Added barrel export files (index.d.ts, index.js) that re-export all types for backwards-compatible imports
  • Added cleanOutputDir() helper to remove stale generated files when enums/resources are deleted
  • Individual resource files now only import the specific enums they reference

New Output Structure

node_modules/@ferry/enums/
├── StatusEnum.d.ts
├── StatusEnum.js
├── index.d.ts       # export { StatusEnum } from './StatusEnum.js';
└── index.js

node_modules/@ferry/resources/
├── UserResource.d.ts
├── UserResource.js
├── index.d.ts       # export type { UserResource } from './UserResource.js';
└── index.js

Test Plan

  • All existing tests pass
  • Build succeeds with no TypeScript errors

Co-Authored-By: Claude Code <noreply@anthropic.com>
@joshmanders
joshmanders merged commit 04416db into master Jan 11, 2026
1 check passed
@joshmanders
joshmanders deleted the refactor-output branch January 11, 2026 06:54
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.

1 participant