mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-01 21:13:11 +00:00
feat: Add the effects to the migrations
This commit is contained in:
@@ -20,7 +20,7 @@ export function updateConfig<
|
||||
version extends string,
|
||||
type extends "up" | "down",
|
||||
>(
|
||||
fn: (config: T.Config) => T.Config,
|
||||
fn: (config: T.Config, effects: T.Effects) => T.Config,
|
||||
configured: boolean,
|
||||
noRepeat?: NoRepeat<version, type>,
|
||||
noFail = false,
|
||||
@@ -30,7 +30,7 @@ export function updateConfig<
|
||||
let config = util.unwrapResultType(await getConfig({})(effects)).config;
|
||||
if (config) {
|
||||
try {
|
||||
config = fn(config);
|
||||
config = fn(config, effects);
|
||||
} catch (e) {
|
||||
if (!noFail) {
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user