{"version":3,"file":"patch-migration.cjs","names":["z","action"],"sources":["../../src/actions/patch-migration.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { supabase } from \"../app\";\n\nexport const SupabasePatchMigrationInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project (used in the URL path). Must be exactly 20 lowercase letters (a-z).\"),\n  name: z.string().describe(\"New name for the migration entry. Updates the display name in migration history.\").optional(),\n  version: z.string().describe(\"The version identifier of the migration to patch (typically a timestamp like '20260216042751'). This is found in the migration history.\"),\n  rollback: z.string().describe(\"SQL rollback script for the migration. Defines how to revert the migration changes.\").optional(),\n}).describe(\"Request schema for patching an existing migration history entry.\");\nexport const SupabasePatchMigrationOutput = z.object({\n  name: z.string().describe(\"The updated name of the migration.\").nullable().optional(),\n  version: z.string().describe(\"The version identifier of the patched migration.\").nullable(),\n  rollback: z.string().describe(\"The rollback script for the migration.\").nullable().optional(),\n}).passthrough().describe(\"Response from patching a migration history entry.\\n\\nReturns the updated migration entry details after successful patch operation.\");\n\nexport const supabasePatchMigration: AppAction<\n  typeof SupabasePatchMigrationInput,\n  typeof SupabasePatchMigrationOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_PATCH_MIGRATION\", {\n  slug: \"supabase-patch-migration\",\n  name: \"Patch a migration\",\n  description: \"[Beta] Patches an existing entry in the project's migration history, updating the name or rollback script. Use this to correct migration metadata after the migration has been created.\",\n  input: SupabasePatchMigrationInput,\n  output: SupabasePatchMigrationOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qHAAqH;CAC9I,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACvH,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yIAAyI;CACtK,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS;AAChI,CAAC,CAAC,CAAC,SAAS,kEAAkE;AAC9E,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC1F,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC9F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oIAAoI;AAE9J,MAAa,yBAITC,eAAAA,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}