-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### **User description** To convert wip templates to buildable migration templates ___ ### **PR Type** Enhancement ___ ### **Description** - Added a new `promote` command to convert WIP templates to buildable migration templates. - Implemented a new `Promote` component with CLI and interactive UI modes. - Updated the command menu to include the new `promote` command. - Added a changeset file to document the new feature. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>index.tsx</strong><dd><code>Integrate `promote` command into command menu</code> </dd></summary> <hr> src/commands/index.tsx <li>Added the <code>Promote</code> component to the command menu.<br> <li> Included a new menu item for the <code>promote</code> command.<br> <li> Adjusted the <code>Select</code> component to show more options. </details> </td> <td><a href="https://github.com/t1mmen/srtd/pull/22/files#diff-28dd48060efda88c3ae7ffc80ff0a3fa13de4c93e5d0042cedbd658cfa448a9a">+7/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>promote.tsx</strong><dd><code>Implement `Promote` component for WIP template promotion</code> </dd></summary> <hr> src/commands/promote.tsx <li>Created a new <code>Promote</code> component for promoting WIP templates.<br> <li> Added CLI and interactive UI modes for template promotion.<br> <li> Implemented error handling and success feedback for the promotion <br>process.<br> <li> Utilized configuration and build log utilities for template <br>management. </details> </td> <td><a href="https://github.com/t1mmen/srtd/pull/22/files#diff-75e818a1d9e0c0a59e5bfea012f2d5ce88370ebc77f1e99bfa09e0c6b1765091">+195/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>quiet-birds-play.md</strong><dd><code>Document `promote` command in changeset</code> </dd></summary> <hr> .changeset/quiet-birds-play.md - Added a changeset file documenting the new `promote` command. </details> </td> <td><a href="https://github.com/t1mmen/srtd/pull/22/files#diff-9b4fb4eb7c2ebca995564182672c8cf29cbcbe6f4672ae5d011087dd93ec73c8">+5/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Dependencies</strong></td><td><table> <tr> <td> <details> <summary><strong>package-lock.json</strong><dd><code>Update package version to 0.4.4</code> </dd></summary> <hr> package-lock.json - Updated the package version from 0.4.3 to 0.4.4. </details> </td> <td><a href="https://github.com/t1mmen/srtd/pull/22/files#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519">+2/-2</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information
- Loading branch information
Showing
18 changed files
with
581 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@t1mmen/srtd": patch | ||
--- | ||
|
||
Add command for promoting .wip templates to buildable migration templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# See https://github.com/charmbracelet/vhs | ||
# Generate with `npm run vhs` | ||
|
||
Output readme-demo.gif | ||
|
||
Require npx | ||
|
||
# Setup the terminal | ||
Set FontSize 16 | ||
Set Width 1024 | ||
Set Height 550 | ||
Set TypingSpeed 10ms | ||
Set Theme "Catppuccin Mocha" | ||
Set WindowBar Colorful | ||
|
||
# Initialize SRTD | ||
# Type "clear" Enter | ||
Type "srtd init" | ||
Enter | ||
Sleep 1s | ||
Hide | ||
Sleep 2s | ||
Ctrl+C | ||
Show | ||
Sleep 250ms | ||
|
||
# Create our first templates | ||
Type "echo '-- SQL for hello..' >> supabase/migrations-templates/hello.sql" | ||
Enter | ||
Sleep 50ms | ||
Type "echo '-- More fake SQL..' >> supabase/migrations-templates/test.sql" | ||
Enter | ||
Sleep 50ms | ||
Type "echo '-- Another one...' >> supabase/migrations-templates/another_test.sql" | ||
Enter | ||
Sleep 50ms | ||
Type "echo '-- WIP SQL here..' >> supabase/migrations-templates/experiment.wip.sql" | ||
Enter | ||
Sleep 50ms | ||
Enter | ||
|
||
# Apply changes directly | ||
Type "srtd apply" Enter | ||
Hide | ||
Sleep 2 | ||
Show | ||
Sleep 2s | ||
Hide | ||
Sleep 1s | ||
Ctrl+C | ||
Show | ||
|
||
# More templates | ||
Type "echo '-- Changes to existing template' >> supabase/migrations-templates/hello.sql" Enter | ||
Sleep 50ms | ||
Type "echo '-- New template' >> supabase/migrations-templates/new.sql" Enter | ||
Sleep 1s | ||
|
||
# Start watching for changes | ||
Type "srtd watch" | ||
Sleep 1s | ||
Enter | ||
Hide | ||
Sleep 1s | ||
Show | ||
Sleep 5s | ||
Hide | ||
Ctrl+C | ||
Enter | ||
Show | ||
Sleep 1s | ||
|
||
# Build migration files | ||
Type "srtd build" | ||
Sleep 100ms | ||
Enter | ||
Hide | ||
Sleep 2 | ||
Enter | ||
Show | ||
Sleep 3s | ||
|
||
# Make a change to hello.sql | ||
Type "echo '-- Another update to hello' >> supabase/migrations-templates/hello.sql" Enter | ||
Enter | ||
Sleep 1s | ||
|
||
# Build migration files | ||
Type "srtd build" Enter | ||
Sleep 3s | ||
Hide | ||
Ctrl+C | ||
Show | ||
|
||
# Promote the WIP template | ||
Type "srtd promote experiment.wip.sql" | ||
Enter | ||
Hide | ||
Sleep 1s | ||
Show | ||
Sleep 2s | ||
|
||
# Build migration files | ||
Type "srtd build" Enter | ||
Sleep 3s | ||
Hide | ||
Ctrl+C | ||
Show | ||
|
||
# Show the resulting files | ||
Type "ls -1p supabase/migrations/" | ||
Enter | ||
Hide | ||
Enter | ||
Show | ||
Sleep 1s | ||
|
||
# Success message | ||
Enter | ||
Type "✨ Thanks for watching! Check out github.com/t1mmen/srtd for more info" | ||
Sleep 5s |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Screenshots for README.md documentation | ||
Output readme-screenshots.gif | ||
|
||
Require npx | ||
|
||
# Terminal setup | ||
Set FontSize 16 | ||
Set Width 840 | ||
Set Height 480 | ||
Set BorderRadius 4 | ||
Set TypingSpeed 20ms | ||
Set Theme "Catppuccin Mocha" | ||
|
||
# Default command | ||
Type "clear" Enter | ||
Sleep 200ms | ||
Type "npx @t1mmen/srtd@latest" Enter | ||
Sleep 5s | ||
Screenshot readme-screenshot-default.png | ||
Sleep 1s | ||
Ctrl+C | ||
|
||
# Watch command | ||
Type "clear" Enter | ||
Sleep 200ms | ||
Type "npx @t1mmen/srtd@latest watch" Enter | ||
Sleep 5s | ||
Screenshot readme-screenshot-watch.png | ||
Hide | ||
Ctrl+C | ||
Show | ||
Sleep 1s | ||
|
||
# Register command | ||
Type "clear" Enter | ||
Sleep 200ms | ||
Type "npx @t1mmen/srtd@latest register" Enter | ||
Sleep 5s | ||
Screenshot readme-screenshot-register.png | ||
Sleep 1s | ||
Ctrl+C | ||
|
||
# Promote command | ||
Type "clear" Enter | ||
Sleep 200ms | ||
Type "npx @t1mmen/srtd@latest promote" Enter | ||
Sleep 5s | ||
Screenshot readme-screenshot-promote.png | ||
Sleep 1s | ||
Ctrl+C | ||
|
||
# Clean command | ||
Type "clear" Enter | ||
Sleep 200ms | ||
Type "npx @t1mmen/srtd@latest clean" Enter | ||
Sleep 5s | ||
Screenshot readme-screenshot-clean.png | ||
Sleep 1s | ||
Ctrl+C |
Oops, something went wrong.