Add spec for package component and file field
Refactor spec for package