fr-config-pull currently appears to skip AM/AIC scripts where language is GROOVY.
AM supports both JavaScript and Groovy scripts, but the current script export logic only persists scripts where:
script.language === "JAVASCRIPT"
This means Groovy scripts that are visible and active in the AIC admin UI are omitted from the exported config repository.
Observed impact:
-
Groovy scripts are not written under scripts-content.
-
Their corresponding JSON config is not written under scripts-config.
-
A Git-backed config export can appear complete while missing valid tenant scripts.
-
This affects at least SOCIAL_IDP_PROFILE_TRANSFORMATION scripts, but may affect any Groovy-backed script context.
Expected behavior:
-
JAVASCRIPT scripts export as .js.
-
GROOVY scripts export as .groovy.
-
Both script types should have corresponding config JSON files in scripts-config.
Potential implementation approach:
const SCRIPT_EXTENSIONS = {
JAVASCRIPT: "js",
GROOVY: "groovy",
};
Then use the script language to choose the exported file extension instead of filtering out non-JavaScript scripts.
Related observation:
- In packages/fr-config-pull/src/scripts/journeys.js, script dependency exports appear to call exportScriptById(...) without await. If dependency export is asynchronous, referenced scripts may race process completion and fail to land reliably during journey export.
Suggested changes:
-
Remove the JavaScript-only export filter.
-
Add supported-language-to-extension handling for JAVASCRIPT and GROOVY.
-
Await exportScriptById(...) calls in journey dependency export.
-
Add tests for JavaScript, Groovy, and unsupported script language handling.
fr-config-pull currently appears to skip AM/AIC scripts where language is GROOVY.
AM supports both JavaScript and Groovy scripts, but the current script export logic only persists scripts where:
script.language === "JAVASCRIPT"This means Groovy scripts that are visible and active in the AIC admin UI are omitted from the exported config repository.
Observed impact:
Groovy scripts are not written under scripts-content.
Their corresponding JSON config is not written under scripts-config.
A Git-backed config export can appear complete while missing valid tenant scripts.
This affects at least SOCIAL_IDP_PROFILE_TRANSFORMATION scripts, but may affect any Groovy-backed script context.
Expected behavior:
JAVASCRIPT scripts export as .js.
GROOVY scripts export as .groovy.
Both script types should have corresponding config JSON files in scripts-config.
Potential implementation approach:
Then use the script language to choose the exported file extension instead of filtering out non-JavaScript scripts.
Related observation:
Suggested changes:
Remove the JavaScript-only export filter.
Add supported-language-to-extension handling for JAVASCRIPT and GROOVY.
Await exportScriptById(...) calls in journey dependency export.
Add tests for JavaScript, Groovy, and unsupported script language handling.