Skip to content

Commit baa4363

Browse files
authored
add secrets support in firestore app transporter (#1003)
1 parent 407fcac commit baa4363

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.changeset/spotty-games-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ensembleui/js-commons": patch
3+
---
4+
5+
feat: add secrets support in firestore app transporter

packages/js-commons/src/core/dto.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface ApplicationDTO
6161
readonly assets?: AssetDTO[];
6262
readonly fonts?: FontDTO[];
6363
readonly env?: EnvironmentDTO;
64+
readonly secrets?: SecretDTO;
6465
readonly translations?: TranslationDTO[];
6566
}
6667

@@ -111,6 +112,10 @@ export interface EnvironmentDTO {
111112
readonly secretVariables?: Record<string, unknown>;
112113
}
113114

115+
export interface SecretDTO {
116+
readonly secrets?: Record<string, unknown>;
117+
}
118+
114119
export type AssetDTO = EnsembleDocument & {
115120
readonly type: EnsembleDocumentType.Asset;
116121
readonly fileName: string;
@@ -151,5 +156,6 @@ export const ArtifactProps = [
151156
"fonts",
152157
"translations",
153158
"env",
159+
"secrets",
154160
"theme",
155161
] as const;

packages/js-commons/src/core/firebase.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const getFirestoreApplicationTransporter = (
7979
EnsembleDocumentType.I18n
8080
] as TranslationDTO[];
8181
const env = head(artifactsByType[EnsembleDocumentType.Environment]);
82+
const secrets = head(artifactsByType[EnsembleDocumentType.Secrets]);
8283

8384
return {
8485
...app,
@@ -90,6 +91,7 @@ export const getFirestoreApplicationTransporter = (
9091
translations,
9192
assets,
9293
env,
94+
secrets,
9395
fonts,
9496
manifest: Object.fromEntries(
9597
Object.values(artifactsByType).flatMap((artifacts) =>

0 commit comments

Comments
 (0)