UNPKG

3.88 kBJavaScriptView Raw
1"use strict";
2// The MIT License (MIT)
3//
4// Copyright (c) 2021 Firebase
5//
6// Permission is hereby granted, free of charge, to any person obtaining a copy
7// of this software and associated documentation files (the "Software"), to deal
8// in the Software without restriction, including without limitation the rights
9// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10// copies of the Software, and to permit persons to whom the Software is
11// furnished to do so, subject to the following conditions:
12//
13// The above copyright notice and this permission notice shall be included in all
14// copies or substantial portions of the Software.
15//
16// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22// SOFTWARE.
23Object.defineProperty(exports, "__esModule", { value: true });
24exports.app = exports.config = exports.params = exports.Change = exports.onInit = exports.setGlobalOptions = exports.firestore = exports.testLab = exports.remoteConfig = exports.scheduler = exports.eventarc = exports.tasks = exports.logger = exports.pubsub = exports.identity = exports.https = exports.storage = exports.database = exports.alerts = void 0;
25/**
26 * The 2nd gen API for Cloud Functions for Firebase.
27 * This SDK supports deep imports. For example, the namespace
28 * `pubsub` is available at `firebase-functions/v2` or is directly importable
29 * from `firebase-functions/v2/pubsub`.
30 * @packageDocumentation
31 */
32const logger = require("../logger");
33exports.logger = logger;
34const alerts = require("./providers/alerts");
35exports.alerts = alerts;
36const database = require("./providers/database");
37exports.database = database;
38const eventarc = require("./providers/eventarc");
39exports.eventarc = eventarc;
40const https = require("./providers/https");
41exports.https = https;
42const identity = require("./providers/identity");
43exports.identity = identity;
44const pubsub = require("./providers/pubsub");
45exports.pubsub = pubsub;
46const scheduler = require("./providers/scheduler");
47exports.scheduler = scheduler;
48const storage = require("./providers/storage");
49exports.storage = storage;
50const tasks = require("./providers/tasks");
51exports.tasks = tasks;
52const remoteConfig = require("./providers/remoteConfig");
53exports.remoteConfig = remoteConfig;
54const testLab = require("./providers/testLab");
55exports.testLab = testLab;
56const firestore = require("./providers/firestore");
57exports.firestore = firestore;
58var options_1 = require("./options");
59Object.defineProperty(exports, "setGlobalOptions", { enumerable: true, get: function () { return options_1.setGlobalOptions; } });
60var core_1 = require("./core");
61Object.defineProperty(exports, "onInit", { enumerable: true, get: function () { return core_1.onInit; } });
62var change_1 = require("../common/change");
63Object.defineProperty(exports, "Change", { enumerable: true, get: function () { return change_1.Change; } });
64// NOTE: Equivalent to `export * as params from "../params"` but api-extractor doesn't support that syntax.
65const params = require("../params");
66exports.params = params;
67// NOTE: Required to support the Functions Emulator which monkey patches `functions.config()`
68// TODO(danielylee): Remove in next major release.
69var config_1 = require("../v1/config");
70Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } });
71// Required for v1 Emulator support.
72const app_1 = require("../common/app");
73exports.app = { setEmulatedAdminApp: app_1.setApp };