firebase / firebase/firebase-admin-node
[FR] Add a function that initializes an App or returns existing one
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 1.7k
- 派生
- 419
- 平均合并
- 3 天 10 小时
- 30 天内合并 PR
- 16
描述
Is your feature request related to a problem? Please describe.
A function initializeApp throws an error if the app is already existed at the time. As current workaround, we need to handle thrown error.
(related: https://github.com/firebase/firebase-admin-node/issues/2111 )
Describe the solution you'd like
Add a function wrapping initializeApp and getApp, that returns existing FirebaseApp, or initialize a new FirebaseApp if the app doesn't exist.
my sample implementation: https://github.com/arayaryoma/firebase-admin-node/commit/65be1703a0c4f8ede7fd34c63d71e05b38f48efb
Describe alternatives you've considered
Not yet
Additional context
If this proposal is affirmed, I can open a PullRequest.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位导出的 initializeApp 和 getApp 入口点及其现有测试。当新函数在已有 FirebaseApp 时返回它,或在不存在时初始化一个,并且测试覆盖这两种情况后,工作即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- firebase, node.js, typescript
- 领域
- api, backend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100