@@ -662,12 +662,25 @@ export async function resolveVariablesForEnvironment(runtimeEnvironment: Runtime
662
662
runtimeEnvironment . id
663
663
) ;
664
664
665
+ const overridableTriggerVariables = await resolveOverridableTriggerVariables ( runtimeEnvironment ) ;
666
+
665
667
const builtInVariables =
666
668
runtimeEnvironment . type === "DEVELOPMENT"
667
669
? await resolveBuiltInDevVariables ( runtimeEnvironment )
668
670
: await resolveBuiltInProdVariables ( runtimeEnvironment ) ;
669
671
670
- return [ ...projectSecrets , ...builtInVariables ] ;
672
+ return [ ...overridableTriggerVariables , ...projectSecrets , ...builtInVariables ] ;
673
+ }
674
+
675
+ async function resolveOverridableTriggerVariables ( runtimeEnvironment : RuntimeEnvironment ) {
676
+ let result : Array < EnvironmentVariable > = [
677
+ {
678
+ key : "TRIGGER_REALTIME_STREAM_VERSION" ,
679
+ value : env . REALTIME_STREAM_VERSION ,
680
+ } ,
681
+ ] ;
682
+
683
+ return result ;
671
684
}
672
685
673
686
async function resolveBuiltInDevVariables ( runtimeEnvironment : RuntimeEnvironment ) {
@@ -684,10 +697,6 @@ async function resolveBuiltInDevVariables(runtimeEnvironment: RuntimeEnvironment
684
697
key : "TRIGGER_STREAM_URL" ,
685
698
value : env . STREAM_ORIGIN ?? env . API_ORIGIN ?? env . APP_ORIGIN ,
686
699
} ,
687
- {
688
- key : "TRIGGER_REALTIME_STREAM_VERSION" ,
689
- value : env . REALTIME_STREAM_VERSION ,
690
- } ,
691
700
] ;
692
701
693
702
if ( env . DEV_OTEL_BATCH_PROCESSING_ENABLED === "1" ) {
@@ -758,10 +767,6 @@ async function resolveBuiltInProdVariables(runtimeEnvironment: RuntimeEnvironmen
758
767
key : "TRIGGER_ORG_ID" ,
759
768
value : runtimeEnvironment . organizationId ,
760
769
} ,
761
- {
762
- key : "TRIGGER_REALTIME_STREAM_VERSION" ,
763
- value : env . REALTIME_STREAM_VERSION ,
764
- } ,
765
770
] ;
766
771
767
772
if ( env . PROD_OTEL_BATCH_PROCESSING_ENABLED === "1" ) {
0 commit comments