mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-13 11:22:11 +02:00
fix: store Metabase mappings in ktx.yaml (#61)
* fix: store Metabase mappings in ktx.yaml * docs: note KTX has no public users * refactor: drop setup progress compatibility
This commit is contained in:
parent
c22248dabf
commit
b75576279c
43 changed files with 715 additions and 1351 deletions
|
|
@ -64,27 +64,6 @@ export async function markKtxSetupStateStepComplete(projectDir: string, step: Kt
|
|||
return nextState;
|
||||
}
|
||||
|
||||
export function ktxSetupCompletedSteps(config: KtxProjectConfig, state: KtxSetupState): KtxSetupStep[] {
|
||||
return uniqueSetupSteps([...(config.setup?.completed_steps ?? []), ...state.completed_steps]);
|
||||
}
|
||||
|
||||
export function stripKtxSetupCompletedSteps(config: KtxProjectConfig): KtxProjectConfig {
|
||||
if (!config.setup) {
|
||||
return config;
|
||||
}
|
||||
const databaseConnectionIds = config.setup.database_connection_ids ?? [];
|
||||
if (databaseConnectionIds.length === 0) {
|
||||
const { setup: _setup, ...withoutSetup } = config;
|
||||
return withoutSetup;
|
||||
}
|
||||
return {
|
||||
...config,
|
||||
setup: {
|
||||
database_connection_ids: [...databaseConnectionIds],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function setKtxSetupDatabaseConnectionIds(
|
||||
config: KtxProjectConfig,
|
||||
connectionIds: string[],
|
||||
|
|
@ -95,7 +74,6 @@ export function setKtxSetupDatabaseConnectionIds(
|
|||
...config,
|
||||
setup: {
|
||||
database_connection_ids: uniqueConnectionIds,
|
||||
...(config.setup?.completed_steps ? { completed_steps: [...config.setup.completed_steps] } : {}),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue