확장 프로그램 게시자 개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Firebase 확장 프로그램은 Firebase 클라우드 메시징, Cloud Firestore, Pub/Sub와 같은 다른 Firebase 및 Google 제품에서 들어오는 HTTP 요청 또는 트리거 이벤트에 대한 응답으로 특정 태스크 또는 태스크 세트를 수행합니다.
자체 확장 프로그램을 빌드하여 개인적인 용도로 사용하거나 Firebase Extensions Hub에서 전 세계에 공유할 수 있습니다. 예를 들어 앱에 정기적으로 필요한 특정 태스크를 수행하거나 회사 API 중 하나에 더 쉽게 액세스하는 데 사용할 수 있는 확장 프로그램을 빌드할 수 있습니다. 확장 프로그램을 빌드한 후 다른 사용자와 공유할 수 있습니다. 이러한 사용자는 자신의 Firebase 프로젝트에서 사용할 확장 프로그램을 설치하고 구성할 수 있습니다.
확장 프로그램의 구조
확장 프로그램은 다음의 세 가지 구성요소로 이루어져 있습니다.
- JavaScript 또는 TypeScript로 작성된 Cloud Functions 코드
- 확장 프로그램을 설명하는 메타데이터
- 사용자가 확장 프로그램을 구성하고 사용하는 방법을 설명하는 문서
확장 프로그램을 개발하려면 이러한 구성요소를 다음 구조로 조합합니다.
example-extension
├── functions
│ ├── integration-tests
│ │ ├── extensions
│ │ │ └── example-extension.env
│ │ ├── firebase.json
│ │ └── integration-test.spec.js
│ ├── index.js
│ └── package.json
├── README.md
├── PREINSTALL.md
├── POSTINSTALL.md
├── CHANGELOG.md
├── icon.png
└── extension.yaml
functions
디렉터리에는 JavaScript 또는 TypeScript로 작성된 Cloud Functions 코드가 있습니다. 이 코드는 Firebase 및 Google 서비스에 의해 트리거되는 이벤트에 대한 응답으로 확장 프로그램의 태스크를 수행합니다.
extension.yaml
파일에는 트리거 및 IAM 액세스 역할과 같은 확장 프로그램에 대한 메타데이터와 사용자가 구성할 수 있는 매개변수가 포함됩니다.
PREINSTALL
, POSTINSTALL
, CHANGELOG
파일은 확장 프로그램에 있어야 하는 최소 문서입니다. 사용자는 이러한 파일을 통해 확장 프로그램의 기능, 사용 방법, 업데이트한 내용을 확인할 수 있습니다. 또한 사용자가 확장 프로그램을 쉽게 알아볼 수 있도록 아이콘을 제공해야 합니다. Firebase Console, Firebase CLI, Extensions Hub는 사용자가 확장 프로그램을 검색, 설치, 관리할 때 이러한 파일의 콘텐츠를 표시합니다.
확장 프로그램을 만든 후에는 Firebase CLI를 사용하여 프로젝트에 설치하거나 Extensions Hub에 게시할 수 있습니다. Extensions Hub에서는 누구나 확장 프로그램을 검색하여 프로젝트에 설치할 수 있습니다.
확장 프로그램과 상호작용할 수 있는 제품은 무엇인가요?
Firebase 확장 프로그램은 Cloud Functions를 사용하여 작동하므로 내 확장 프로그램의 함수를 트리거할 수 있는 제품은 무엇인가요?, 일단 트리거되면 내 확장 프로그램의 함수와 상호작용할 수 있는 제품은 무엇인가요?의 두 가지 측면에서 통합의 문제를 생각해 볼 수 있습니다.
지원되는 함수 트리거
수동 트리거
먼저 함수를 수동으로 트리거할 수 있습니다. Firebase Extensions와 Cloud Functions는 함수를 수동으로 트리거하는 다음의 두 가지 방법을 지원합니다.
- HTTP 트리거: 함수를 HTTP 엔드포인트에 배포합니다.
- 호출 가능 함수: Firebase 클라이언트 SDK를 사용하여 iOS, Android 또는 웹 클라이언트 코드에서 직접 Cloud Functions를 호출합니다.
확장 프로그램에서 HTTP 엔드포인트를 노출하면 확장 프로그램이 웹훅을 지원하는 모든 웹 서비스와 통합될 수 있습니다. 호출 가능 함수를 사용하면 확장 프로그램을 설치하는 사용자가 Firebase SDK를 확장 프로그램이 구현하는 API에 액세스하기 위한 클라이언트 라이브러리로 사용할 수 있습니다.
Firebase 서비스 트리거
대부분의 Firebase 제품은 확장 프로그램의 Cloud Functions를 트리거할 수 있는 이벤트를 내보냅니다.
- 애널리틱스: 애널리틱스에서 이벤트를 로깅할 때 함수를 트리거합니다.
- 앱 배포: 앱 배포에서 알림을 트리거할 때 함수를 트리거합니다.
- 인증: 사용자가 계정을 만들고 삭제할 때 함수를 트리거합니다.
- Cloud Firestore: 페이지가 생성, 업데이트, 삭제될 때 함수를 트리거합니다.
- Cloud Storage: 객체가 버킷에서 업로드, 보관처리, 삭제될 때 함수를 트리거합니다.
- Crashlytics: Crashlytics에서 알림을 트리거할 때 함수를 트리거합니다.
- Performance Monitoring: Performance Monitoring에서 알림을 트리거할 때 함수를 트리거합니다.
- 실시간 데이터베이스: 데이터가 생성, 업데이트, 삭제될 때 함수를 트리거합니다.
- 원격 구성: 파라미터가 업데이트될 때 함수를 트리거합니다.
- Test Lab: Test Lab에서 알림을 트리거할 때 함수를 트리거합니다.
Google Cloud 서비스 트리거
또한 확장 프로그램에는 Firebase 이외의 Google Cloud 서비스 몇 개를 트리거하는 함수가 포함될 수 있습니다.
- Cloud Pub/Sub: 구성 가능한 Pub/Sub 주제에 이벤트가 게시될 때 트리거되는 함수가 확장 프로그램에 포함될 수 있습니다.
- Cloud Scheduler: 설정된 일정에 따라 실행되는 함수가 확장 프로그램에 포함될 수 있습니다.
- Cloud Tasks: Cloud Tasks를 사용하여 큐에 추가할 수 있는 함수가 확장 프로그램에 포함될 수 있습니다. Firebase Extensions는 이 기능을 사용하여 확장 프로그램 작성자가 프로젝트에 처음 설치되거나 새 버전으로 업그레이드되거나 다시 구성되는 등 확장 프로그램의 '수명 주기' 이벤트에 응답하는 함수를 작성할 수 있도록 합니다.
- Eventarc: 구성 가능한 Eventarc 채널에 이벤트가 게시될 때 트리거되는 함수가 확장 프로그램에 포함될 수 있습니다. 반대로 확장 프로그램은 사용자가 확장 프로그램의 이벤트에서 트리거하는 자체 함수를 정의할 수 있도록 자체 이벤트를 Eventarc 채널에 게시할 수 있습니다.
함수에서 지원됨
확장 프로그램의 Cloud 함수가 트리거되면 일반적으로 가능한 통합 범위에 제한이 없습니다. Cloud 함수에서 수행할 수 있는 몇 가지 주요 작업은 다음과 같습니다.
- 지원되는 IAM 역할을 사용하는 Firebase 또는 Google Cloud 서비스를 읽고 쓰고 상호작용합니다.
- 웹 API를 제공하는 모든 서드 파티 서비스를 사용합니다.
- 웹 API를 제공하는 경우 커스텀 서비스를 사용합니다.
- TensorFlow.js, Express.js 등 대부분의 JavaScript 라이브러리를 실행합니다.
확장 프로그램 빌드 방법
시작하기 튜토리얼은 전체 확장 프로그램을 빌드, 테스트, 게시하는 과정을 안내하므로 확장 프로그램을 빌드하는 방법을 알아보는 데 권장되는 방법입니다.
시작하기
시작 가이드를 한 번 진행했다면 자체 확장 프로그램 빌드와 관련된 각 태스크를 설명하는 개별 주제 가이드를 참조할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-12(UTC)
[null,null,["최종 업데이트: 2025-08-12(UTC)"],[],[],null,["# Extension publisher overview\n\n\u003cbr /\u003e\n\nA Firebase Extension performs a specific task or set of tasks in response to\nHTTP requests or triggering events from other Firebase and Google products, like\nFirebase Cloud Messaging, Cloud Firestore, or Pub/Sub.\n\nYou can build your own extension for personal use or to share with the world in\nthe Firebase Extensions Hub. For example, your extension can perform a specific\ntask that your app regularly needs, or it can make it easier to access one of\nyour company's APIs. After you build your extension, you can share it with\nothers. Those users can install and configure the extension for use in their own\nFirebase projects.\n\nStructure of an extension\n-------------------------\n\nYou can think of an extension as having three main components:\n\n- Cloud Functions code, in JavaScript or TypeScript\n- Metadata that describes your extension\n- Documentation to help your users configure and use your extension\n\nTo develop an extension, you assemble these components into the following\nstructure: \n\n example-extension\n ├── functions\n │ ├── integration-tests\n │ │ ├── extensions\n │ │ │ └── example-extension.env\n │ │ ├── firebase.json\n │ │ └── integration-test.spec.js\n │ ├── index.js\n │ └── package.json\n ├── README.md\n ├── PREINSTALL.md\n ├── POSTINSTALL.md\n ├── CHANGELOG.md\n ├── icon.png\n └── extension.yaml\n\n- The `functions` directory contains your Cloud Functions code in JavaScript or TypeScript. This is the code that performs the extension's tasks in response to events triggered by Firebase and Google services.\n- The `extension.yaml` file contains metadata about your extension, such as its triggers and IAM access roles, as well as any parameters you want to be user-configurable.\n- The `PREINSTALL`, `POSTINSTALL`, and `CHANGELOG` files are the minimum documentation your extension must have. These files help your users learn what your extension does, how to use it, and what updates you've made. You should also provide an icon to help users recognize your extension. The Firebase console, Firebase CLI, and Extensions Hub display the contents of these files when users explore, install, and manage your extension.\n\nAfter you have created your extension, you can use the Firebase CLI to install\nit into a project or publish it to the Extensions Hub, where anyone can discover\nand install it into their projects.\n\nWhat products can my extension interact with?\n---------------------------------------------\n\nBecause a Firebase extension does its work using Cloud Functions, you can think\nof the question of possible integrations in two ways: *What products can trigger\nmy extension's functions?* and *Once triggered, what products can my extension's\nfunctions interact with?*\n\n### Supported function triggers\n\n#### Manual triggers\n\nFirst of all, you can manually trigger a function. Firebase Extensions and Cloud\nFunctions support two ways of manually triggering functions:\n\n- HTTP triggers: deploy a function to an HTTP endpoint\n- Callable functions: call your Cloud Functions directly from your iOS, Android, or web client code, using the Firebase client SDKs.\n\nBy exposing HTTP endpoints from your extension, your extension can potentially\nintegrate with any web service that supports webhooks. With callable functions,\nusers who install your extension can use the Firebase SDKs as a client library\nfor accessing the API your extension implements.\n\n#### Firebase service triggers\n\nMost Firebase products emit events that can trigger an extension's Cloud\nFunctions.\n\n- **Analytics:** trigger functions when Analytics logs an event\n- **App Distribution:** trigger functions when App Distribution triggers an alert\n- **Authentication:** trigger functions when users create and delete accounts\n- **Cloud Firestore:** trigger functions when pages are created, updated, or deleted\n- **Cloud Storage**: trigger functions when objects are uploaded, archived, or deleted from buckets\n- **Crashlytics:** trigger functions when Crashlytics triggers an alert\n- **Performance Monitoring:** trigger functions when Performance Monitoring triggers an alert\n- **Realtime Database:** trigger functions when data is created, updated, or deleted\n- **Remote Config:** trigger functions when a parameter is updated\n- **Test Lab:** trigger functions when Test Lab triggers an alert\n\n#### Google Cloud service triggers\n\nAn extension can also include functions that trigger off several non-Firebase\nGoogle Cloud services:\n\n- **Cloud Pub/Sub**: an extension can include functions that trigger when events are posted to a configurable Pub/Sub topic.\n- **Cloud Scheduler**: an extension can include functions that run on a set schedule\n- **Cloud Tasks**: an extension can include functions that can be queued using Cloud Tasks. Firebase Extensions uses this capability to let you, as an extension author, write functions that respond to an extension's \"lifecycle\" events: being installed in a project for the first time, being upgraded to a new version, and being reconfigured.\n- **Eventarc** : an extension can include functions that trigger when events are published to a configurable Eventarc channel; conversely, an extension can publish its own events to an Eventarc channel in order to enable users to define their own functions that trigger from an *extension's* events.\n\n### Supported from functions\n\nOnce an extension's Cloud Function has been triggered, the range of possible\nintegrations is generally open ended. Here are some highlights of what you can\ndo from a Cloud Function:\n\n- Read, write, and otherwise interact with any **Firebase** or **Google Cloud** service that uses a [supported IAM role](/docs/extensions/publishers/access#supported-roles).\n- Work with any **third-party service** that provides a web API.\n- Work with your **custom services** if you provide a web API.\n- Run most JavaScript libraries, including **TensorFlow.js** , **Express.js,** and so on.\n\nHow to build an extension\n-------------------------\n\nThe [Get Started](/docs/extensions/publishers/get-started) tutorial walks you through\nthe process of building, testing, and publishing a complete extension, and is\nthe recommended way to learn how to build one.\n\n[Get Started](/docs/extensions/publishers/get-started)\n\nAfter you've gone through the getting started guide once, you can refer to the\nindividual topic guides, which explain each of the tasks involved in building\nyour own extension:\n\n- [Write functions for an extension](/docs/extensions/publishers/functions)\n- [Use parameters in an extension](/docs/extensions/publishers/parameters)\n- [Set up appropriate access for an extension](/docs/extensions/publishers/access)\n- [Respond to extension lifecycle events](/docs/extensions/publishers/lifecycle-events)\n- [Add user hooks to an extension](/docs/extensions/publishers/user-hooks)\n- [Create user documentation for your extension](/docs/extensions/publishers/user-documentation)\n- [Publish an extension on Extensions Hub](/docs/extensions/publishers/upload-and-publish)\n- [Complete extension.yaml reference](/docs/extensions/reference/extension-yaml)"]]