Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ type HttpsFunctionOrCloudFunctionV1<T, U> = U extends HttpsFunction &
? HttpsFunction & Runnable<T>
: CloudFunctionV1<T>;

export { mockSecretManager } from './secretManager';

// Re-exporting V1 (to reduce breakage)
export {
ContextOptions,
Expand Down
6 changes: 6 additions & 0 deletions src/secretManager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Mock values returned by `functions.config()`. */
export function mockSecretManager(conf: { [key: string]: any }) {
for (const [key, value] of Object.entries(conf)) {
process.env[key] = value;
}
}