@@ -47,10 +47,10 @@ type Manifest struct {
4747}
4848
4949type RenderSpec struct {
50- Env map [string ]string `json:"env"`
51- ComposeValues map [string ]any `json:"compose_values"`
52- Exposure map [string ]any `json:"exposure"`
53- Files []any `json:"files"`
50+ Env map [string ]string `json:"env"`
51+ ComposeValues map [string ]any `json:"compose_values"`
52+ Exposure map [string ]any `json:"exposure"`
53+ Files []any `json:"files"`
5454}
5555
5656type Source struct {
@@ -83,6 +83,7 @@ type RenderedTemplate struct {
8383 SecretRefs []string
8484 Metadata map [string ]any
8585 ExposureIntent map [string ]any
86+ RenderExposure map [string ]any
8687 Manifest Manifest
8788}
8889
@@ -165,12 +166,13 @@ func (s *Service) Render(app core.App, request RenderRequest) (*RenderedTemplate
165166 return nil , err
166167 }
167168 result := & RenderedTemplate {
168- TemplateKey : request .TemplateKey ,
169- ProjectName : projectName ,
170- Compose : compose ,
171- ResolvedEnv : resolvedEnv ,
172- SecretRefs : secretRefs ,
173- Manifest : tpl .Manifest ,
169+ TemplateKey : request .TemplateKey ,
170+ ProjectName : projectName ,
171+ Compose : compose ,
172+ ResolvedEnv : resolvedEnv ,
173+ SecretRefs : secretRefs ,
174+ RenderExposure : cloneAnyMap (tpl .Render .Exposure ),
175+ Manifest : tpl .Manifest ,
174176 ExposureIntent : map [string ]any {
175177 "exposure_type" : normalizedExposureType (tpl .Render .Exposure ),
176178 "is_primary" : true ,
@@ -179,8 +181,8 @@ func (s *Service) Render(app core.App, request RenderRequest) (*RenderedTemplate
179181 Metadata : map [string ]any {
180182 "candidate_kind" : "store-prefill" ,
181183 "prefill_context" : map [string ]any {
182- "app_key" : tpl .Manifest .Key ,
183- "template_key" : tpl .Manifest .Key ,
184+ "app_key" : tpl .Manifest .Key ,
185+ "template_key" : tpl .Manifest .Key ,
184186 "template_source" : tpl .Source .OriginKind ,
185187 },
186188 "template_context" : map [string ]any {
@@ -212,7 +214,7 @@ func (s *Service) Describe(templateKey string) (*DescribeResponse, error) {
212214 Exposure : cloneAnyMap (tpl .Render .Exposure ),
213215 ComposeValues : cloneAnyMap (tpl .Render .ComposeValues ),
214216 }, nil
215- }
217+ }
216218
217219func (s * Service ) loadTemplate (templateKey string ) (* Template , error ) {
218220 if templateKey == "" {
@@ -468,4 +470,4 @@ func cloneAnyMap(source map[string]any) map[string]any {
468470 result [key ] = value
469471 }
470472 return result
471- }
473+ }
0 commit comments