Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/server/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,24 @@ export const replaceInputsWithConfig = (
) => {
const types = 'inputs'

// Pre-process overrideConfig: if a key matches a variable override (custom variable),
// move it to overrideConfig.vars so getGlobalVariable can resolve it properly.
// This allows users to pass overrideConfig: { myVariable: "value" } instead of
// overrideConfig: { vars: { myVariable: "value" } }
if (variableOverrides && variableOverrides.length > 0) {
if (!overrideConfig['vars']) {
overrideConfig['vars'] = {}
}
for (const configKey of Object.keys(overrideConfig)) {
if (configKey === 'analytics' || configKey === 'vars' || configKey === 'sessionId') continue
const varOverride = variableOverrides.find((v) => v.name === configKey)
if (varOverride?.enabled) {
overrideConfig['vars'][configKey] = overrideConfig[configKey]
delete overrideConfig[configKey]
}
}
}

const isParameterEnabled = (nodeType: string, paramName: string): boolean => {
if (!nodeOverrides[nodeType]) return false
const parameter = nodeOverrides[nodeType].find((param: any) => param.name === paramName)
Expand Down