/
args.ts
37 lines (31 loc) · 1.02 KB
/
args.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import * as backend from "./backend";
import * as gcfV2 from "../../gcp/cloudfunctionsv2";
// These types should proably be in a root deploy.ts, but we can only boil the ocean one bit at a time.
// Payload holds the output types of what we're building.
export interface Payload {
functions?: {
backend: backend.Backend;
};
}
// Context holds cached values of what we've looked up in handling this request.
// For non-trivial values, use helper functions that cache automatically and/or hide implementation
// details.
export interface Context {
projectId: string;
filters: string[][];
// Filled in the "prepare" phase.
functionsSourceV1?: string;
functionsSourceV2?: string;
runtimeConfigEnabled?: boolean;
artifactRegistryEnabled?: boolean;
firebaseConfig?: FirebaseConfig;
// Filled in the "deploy" phase.
uploadUrl?: string;
storage?: Record<string, gcfV2.StorageSource>;
}
export interface FirebaseConfig {
locationId: string;
projectId: string;
storageBucket: string;
databaseURL: string;
}