New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/functions

Package Overview
Dependencies
Maintainers
3
Versions
3351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/functions - npm Package Compare versions

Comparing version 0.2.3-canary.3fa62ef to 0.2.3-canary.b658d8c

86

dist/index.cjs.js

@@ -7,67 +7,5 @@ 'use strict';

var tslib_1 = require('tslib');
var firebase = _interopDefault(require('@firebase/app'));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
/**

@@ -119,3 +57,3 @@ * Copyright 2017 Google Inc.

var HttpsErrorImpl = /** @class */ (function (_super) {
__extends(HttpsErrorImpl, _super);
tslib_1.__extends(HttpsErrorImpl, _super);
function HttpsErrorImpl(code, message, details) {

@@ -228,5 +166,5 @@ var _this = _super.call(this, message) || this;

ContextProvider.prototype.getAuthToken = function () {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var token, e_1;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -252,5 +190,5 @@ case 0:

ContextProvider.prototype.getInstanceIdToken = function () {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var messaging, token, e_2;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -284,5 +222,5 @@ case 0:

ContextProvider.prototype.getContext = function () {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var authToken, instanceIdToken;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -466,5 +404,5 @@ case 0: return [4 /*yield*/, this.getAuthToken()];

Service.prototype.postJSON = function (url, body, headers) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var response, e_1, json, e_2;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -520,5 +458,5 @@ case 0:

Service.prototype.call = function (name, data) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var url, body, headers, context, response, error, responseData, decodedData;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -525,0 +463,0 @@ case 0:

@@ -0,66 +1,4 @@

import { __awaiter, __generator, __extends } from 'tslib';
import firebase from '@firebase/app';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
/**

@@ -67,0 +5,0 @@ * Copyright 2017 Google Inc.

@@ -7,68 +7,6 @@ 'use strict';

var tslib_1 = require('tslib');
var firebase = _interopDefault(require('@firebase/app'));
require('isomorphic-fetch');
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
/**

@@ -120,3 +58,3 @@ * Copyright 2017 Google Inc.

var HttpsErrorImpl = /** @class */ (function (_super) {
__extends(HttpsErrorImpl, _super);
tslib_1.__extends(HttpsErrorImpl, _super);
function HttpsErrorImpl(code, message, details) {

@@ -229,5 +167,5 @@ var _this = _super.call(this, message) || this;

ContextProvider.prototype.getAuthToken = function () {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var token, e_1;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -253,5 +191,5 @@ case 0:

ContextProvider.prototype.getInstanceIdToken = function () {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var messaging, token, e_2;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -285,5 +223,5 @@ case 0:

ContextProvider.prototype.getContext = function () {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var authToken, instanceIdToken;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -467,5 +405,5 @@ case 0: return [4 /*yield*/, this.getAuthToken()];

Service.prototype.postJSON = function (url, body, headers) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var response, e_1, json, e_2;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -521,5 +459,5 @@ case 0:

Service.prototype.call = function (name, data) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var url, body, headers, context, response, error, responseData, decodedData;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -526,0 +464,0 @@ case 0:

13

package.json
{
"name": "@firebase/functions",
"version": "0.2.3-canary.3fa62ef",
"version": "0.2.3-canary.b658d8c",
"description": "",

@@ -23,4 +23,4 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

"peerDependencies": {
"@firebase/app": "0.3.2-canary.3fa62ef",
"@firebase/app-types": "0.3.1-canary.3fa62ef"
"@firebase/app": "0.3.2-canary.b658d8c",
"@firebase/app-types": "0.3.1-canary.b658d8c"
},

@@ -67,5 +67,6 @@ "devDependencies": {

"dependencies": {
"@firebase/functions-types": "0.1.2-canary.3fa62ef",
"@firebase/messaging-types": "0.2.2-canary.3fa62ef",
"isomorphic-fetch": "2.2.1"
"@firebase/functions-types": "0.1.2-canary.b658d8c",
"@firebase/messaging-types": "0.2.2-canary.b658d8c",
"isomorphic-fetch": "2.2.1",
"tslib": "1.9.0"
},

@@ -72,0 +73,0 @@ "nyc": {

# `@firebase/functions`
This is the functions component for the Firebase JS SDK. It has a peer
dependency on the [`@firebase/app`](https://npm.im) package on NPM. This package
is included by default in the [`firebase`](https://npm.im/firebase) wrapper
package.
This is the Firebase Functions component of the Firebase JS SDK.
## Installation
You can install this package by running the following in your project:
```bash
$ npm install @firebase/functions
```
## Usage
You can then use the firebase namespace exposed by this package as illustrated
below:
**ES Modules**
```javascript
import firebase from '@firebase/app';
import '@firebase/functions'
// Do stuff w/ `firebase` and `firebase.functions`
```
**CommonJS Modules**
```javascript
const firebase = require('@firebase/app').default;
require('@firebase/functions');
// Do stuff with `firebase` and `firebase.functions`
```
## Documentation
For comprehensive documentation please see the [Firebase Reference
Docs][reference-docs].
[reference-docs]: https://firebase.google.com/docs/reference/js/
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc