File tree Expand file tree Collapse file tree 3 files changed +37
-19
lines changed
packages/js-commons/src/core Expand file tree Collapse file tree 3 files changed +37
-19
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ export type TranslationDTO = EnsembleDocument & {
110110export interface EnvironmentDTO {
111111 readonly envVariables ?: Record < string , unknown > ;
112112 readonly secretVariables ?: Record < string , unknown > ;
113+ readonly baseUrl ?: string ;
114+ readonly useBrowserUrl ?: boolean ;
113115}
114116
115117export interface SecretDTO {
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ export const getFirestoreApplicationTransporter = (
140140 translations,
141141 theme,
142142 env,
143+ secrets,
143144 assets,
144145 fonts,
145146 } = app ;
@@ -217,20 +218,31 @@ export const getFirestoreApplicationTransporter = (
217218 } ) ;
218219
219220 if ( env ) {
220- batch . set (
221- doc ( artifactsRef , "appConfig" ) ,
222- {
223- type : EnsembleDocumentType . Environment ,
224- envVariables : env ,
225- isRoot : true ,
226- isArchived : false ,
227- createdAt : timestamp ,
228- updatedAt : timestamp ,
229- createdBy : userRef ,
230- updatedBy : userRef ,
231- } ,
232- { merge : true } ,
233- ) ;
221+ batch . set ( doc ( artifactsRef , "appConfig" ) , {
222+ type : EnsembleDocumentType . Environment ,
223+ envVariables : env . envVariables ,
224+ isRoot : true ,
225+ isArchived : false ,
226+ createdAt : timestamp ,
227+ updatedAt : timestamp ,
228+ createdBy : userRef ,
229+ updatedBy : userRef ,
230+ baseUrl : env . baseUrl ,
231+ useBrowserUrl : env . useBrowserUrl ,
232+ } ) ;
233+ }
234+
235+ if ( secrets ) {
236+ batch . set ( doc ( artifactsRef , "secrets" ) , {
237+ type : EnsembleDocumentType . Secrets ,
238+ secrets : secrets . secrets ,
239+ isRoot : true ,
240+ isArchived : false ,
241+ createdAt : timestamp ,
242+ updatedAt : timestamp ,
243+ createdBy : userRef ,
244+ updatedBy : userRef ,
245+ } ) ;
234246 }
235247
236248 await batch . commit ( ) ;
Original file line number Diff line number Diff line change @@ -78,11 +78,15 @@ export const getLocalApplicationTransporter = (
7878 return ;
7979 }
8080
81- const content = isConfigOrSecret ( document )
82- ? undefined
83- : await readFile ( filePath , {
84- encoding : isAssetOrFont ( document ) ? "base64" : "utf-8" ,
85- } ) ;
81+ if ( isConfigOrSecret ( document ) ) {
82+ return {
83+ ...document ,
84+ } as EnsembleDocument ;
85+ }
86+
87+ const content = await readFile ( filePath , {
88+ encoding : isAssetOrFont ( document ) ? "base64" : "utf-8" ,
89+ } ) ;
8690
8791 return {
8892 ...document ,
You can’t perform that action at this time.
0 commit comments