Depot Package Common
Common utilities for Depot packages. Contains modules and functionality to work with Depot schemas, such as schema namespace merging (merge multiple schemas into a single namespace used for a Dataset Package).
Also contains tooling to construct and merge schema definitions that reference externally located SQL and Stored Procedures files.
Find the depot-package-common package here.
depot-package-to-yml
The depot-package-to-yml codemod is a tool for converting Depot TypeScript package definitions into YAML format. This is useful for:
- Migrating legacy TypeScript-based schema definitions to the more portable YAML format
- Generating human-readable schema documentation
- Creating schema exports that can be used with different tooling
Canonical Migration Output
Since Depot 9.10.0, depot-package-to-yml outputs canonical migrations alongside the schema definitions. This ensures that:
- Migration history is preserved when converting from TypeScript to YAML
- The generated YAML package includes all necessary migration definitions
- Schema evolution is properly tracked across format conversions
When running the codemod, migrations defined in your TypeScript package are automatically extracted and written to the appropriate YAML format, maintaining their target schemas, names, and migration logic.
Usage
npx @stage-tech/depot-package-to-yml --input ./src/my-package.ts --output ./schemas
The command will generate:
- YAML schema files in the output directory
- Canonical migration definitions preserving your migration history
- A properly structured package ready for deployment