Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/functions-compat

Package Overview
Dependencies
Maintainers
5
Versions
1145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/functions-compat - npm Package Compare versions

Comparing version 0.0.900-exp.555fe23c5 to 0.0.900-exp.57f19127c

25

dist/index.esm2017.js

@@ -1,2 +0,2 @@

import firebase, { firebase as firebase$1 } from '@firebase/app-compat';
import firebase from '@firebase/app-compat';
import { httpsCallable, useFunctionsEmulator } from '@firebase/functions';

@@ -7,3 +7,3 @@ import { FirebaseError } from '@firebase/util';

const name = "@firebase/functions-compat";
const version = "0.0.900";
const version = "0.0.900-exp.57f19127c";

@@ -27,10 +27,10 @@ /**

class FunctionsService {
constructor(app, _functionsInstance) {
constructor(app, _delegate) {
this.app = app;
this._functionsInstance = _functionsInstance;
this._region = this._functionsInstance.region;
this._customDomain = this._functionsInstance.customDomain;
this._delegate = _delegate;
this._region = this._delegate.region;
this._customDomain = this._delegate.customDomain;
}
httpsCallable(name, options) {
return httpsCallable(this._functionsInstance, name, options);
return httpsCallable(this._delegate, name, options);
}

@@ -51,6 +51,6 @@ /**

}
return useFunctionsEmulator(this._functionsInstance, match[1], Number(match[2]));
return useFunctionsEmulator(this._delegate, match[1], Number(match[2]));
}
useEmulator(host, port) {
return useFunctionsEmulator(this._functionsInstance, host, port);
return useFunctionsEmulator(this._delegate, host, port);
}

@@ -75,3 +75,4 @@ }

*/
const factory = (container, regionOrCustomDomain) => {
const DEFAULT_REGION = 'us-central1';
const factory = (container, { instanceIdentifier: regionOrCustomDomain }) => {
// Dependencies

@@ -82,3 +83,3 @@ const app = container.getProvider('app-compat').getImmediate();

.getImmediate({
identifier: regionOrCustomDomain
identifier: regionOrCustomDomain !== null && regionOrCustomDomain !== void 0 ? regionOrCustomDomain : DEFAULT_REGION
});

@@ -113,3 +114,3 @@ return new FunctionsService(app, functionsServiceExp);

registerFunctions();
firebase$1.registerVersion(name, version);
firebase.registerVersion(name, version);
//# sourceMappingURL=index.esm2017.js.map

@@ -1,2 +0,2 @@

import firebase, { firebase as firebase$1 } from '@firebase/app-compat';
import firebase from '@firebase/app-compat';
import { httpsCallable, useFunctionsEmulator } from '@firebase/functions';

@@ -7,3 +7,3 @@ import { FirebaseError } from '@firebase/util';

var name = "@firebase/functions-compat";
var version = "0.0.900";
var version = "0.0.900-exp.57f19127c";

@@ -27,10 +27,10 @@ /**

var FunctionsService = /** @class */ (function () {
function FunctionsService(app, _functionsInstance) {
function FunctionsService(app, _delegate) {
this.app = app;
this._functionsInstance = _functionsInstance;
this._region = this._functionsInstance.region;
this._customDomain = this._functionsInstance.customDomain;
this._delegate = _delegate;
this._region = this._delegate.region;
this._customDomain = this._delegate.customDomain;
}
FunctionsService.prototype.httpsCallable = function (name, options) {
return httpsCallable(this._functionsInstance, name, options);
return httpsCallable(this._delegate, name, options);
};

@@ -51,6 +51,6 @@ /**

}
return useFunctionsEmulator(this._functionsInstance, match[1], Number(match[2]));
return useFunctionsEmulator(this._delegate, match[1], Number(match[2]));
};
FunctionsService.prototype.useEmulator = function (host, port) {
return useFunctionsEmulator(this._functionsInstance, host, port);
return useFunctionsEmulator(this._delegate, host, port);
};

@@ -76,3 +76,5 @@ return FunctionsService;

*/
var factory = function (container, regionOrCustomDomain) {
var DEFAULT_REGION = 'us-central1';
var factory = function (container, _a) {
var regionOrCustomDomain = _a.instanceIdentifier;
// Dependencies

@@ -83,3 +85,3 @@ var app = container.getProvider('app-compat').getImmediate();

.getImmediate({
identifier: regionOrCustomDomain
identifier: regionOrCustomDomain !== null && regionOrCustomDomain !== void 0 ? regionOrCustomDomain : DEFAULT_REGION
});

@@ -114,3 +116,3 @@ return new FunctionsService(app, functionsServiceExp);

registerFunctions();
firebase$1.registerVersion(name, version);
firebase.registerVersion(name, version);
//# sourceMappingURL=index.esm5.js.map

@@ -13,3 +13,3 @@ 'use strict';

var name = "@firebase/functions-compat";
var version = "0.0.900";
var version = "0.0.900-exp.57f19127c";

@@ -33,10 +33,10 @@ /**

var FunctionsService = /** @class */ (function () {
function FunctionsService(app, _functionsInstance) {
function FunctionsService(app, _delegate) {
this.app = app;
this._functionsInstance = _functionsInstance;
this._region = this._functionsInstance.region;
this._customDomain = this._functionsInstance.customDomain;
this._delegate = _delegate;
this._region = this._delegate.region;
this._customDomain = this._delegate.customDomain;
}
FunctionsService.prototype.httpsCallable = function (name, options) {
return functions.httpsCallable(this._functionsInstance, name, options);
return functions.httpsCallable(this._delegate, name, options);
};

@@ -57,6 +57,6 @@ /**

}
return functions.useFunctionsEmulator(this._functionsInstance, match[1], Number(match[2]));
return functions.useFunctionsEmulator(this._delegate, match[1], Number(match[2]));
};
FunctionsService.prototype.useEmulator = function (host, port) {
return functions.useFunctionsEmulator(this._functionsInstance, host, port);
return functions.useFunctionsEmulator(this._delegate, host, port);
};

@@ -82,3 +82,5 @@ return FunctionsService;

*/
var factory = function (container, regionOrCustomDomain) {
var DEFAULT_REGION = 'us-central1';
var factory = function (container, _a) {
var regionOrCustomDomain = _a.instanceIdentifier;
// Dependencies

@@ -89,3 +91,3 @@ var app = container.getProvider('app-compat').getImmediate();

.getImmediate({
identifier: regionOrCustomDomain
identifier: regionOrCustomDomain !== null && regionOrCustomDomain !== void 0 ? regionOrCustomDomain : DEFAULT_REGION
});

@@ -92,0 +94,0 @@ return new FunctionsService(app, functionsServiceExp);

@@ -17,2 +17,21 @@ /**

*/
export {};
import * as types from '@firebase/functions-types';
declare module '@firebase/app-compat' {
interface FirebaseNamespace {
functions: {
(app?: FirebaseApp): types.FirebaseFunctions;
Functions: typeof types.FirebaseFunctions;
};
}
interface FirebaseApp {
functions(regionOrCustomDomain?: string): types.FirebaseFunctions;
}
}
import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
import { Functions, HttpsCallableOptions, HttpsCallable } from "@firebase/functions";
declare module "@firebase/functions" {
function getFunctions(app?: FirebaseAppCompat, regionOrCustomDomain?: string): Functions;
function httpsCallable<RequestData = unknown, ResponseData = unknown>(functionsInstance: types.FirebaseFunctions, name: string, options?: HttpsCallableOptions): HttpsCallable<RequestData, ResponseData>;
function useFunctionsEmulator(functionsInstance: types.FirebaseFunctions, host: string, port: number): void;
}

@@ -19,6 +19,6 @@ /**

import { HttpsCallableOptions, Functions as FunctionsServiceExp } from "@firebase/functions";
import { FirebaseApp } from '@firebase/app-compat';
export declare class FunctionsService implements FirebaseFunctions {
import { FirebaseApp, _FirebaseService } from '@firebase/app-compat';
export declare class FunctionsService implements FirebaseFunctions, _FirebaseService {
app: FirebaseApp;
private _functionsInstance;
readonly _delegate: FunctionsServiceExp;
/**

@@ -34,3 +34,3 @@ * For testing.

_customDomain: string | null;
constructor(app: FirebaseApp, _functionsInstance: FunctionsServiceExp);
constructor(app: FirebaseApp, _delegate: FunctionsServiceExp);
httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable;

@@ -37,0 +37,0 @@ /**

{
"name": "@firebase/functions-compat",
"version": "0.0.900-exp.555fe23c5",
"version": "0.0.900-exp.57f19127c",
"description": "",

@@ -8,5 +8,4 @@ "private": false,

"main": "dist/index.node.cjs.js",
"browser": "dist/index.esm5.js",
"module": "dist/index.esm5.js",
"esm2017": "dist/index.esm2017.js",
"browser": "dist/index.esm2017.js",
"module": "dist/index.esm2017.js",
"files": [

@@ -17,3 +16,3 @@ "dist"

"peerDependencies": {
"@firebase/app-compat": "0.0.900-exp.555fe23c5"
"@firebase/app-compat": "0.0.900-exp.57f19127c"
},

@@ -40,3 +39,3 @@ "devDependencies": {

"build:deps": "lerna run --scope @firebase/functions-compat --include-dependencies build",
"build:release": "rollup -c rollup.config.release.js",
"build:release": "rollup -c rollup.config.release.js && yarn add-compat-overloads",
"dev": "rollup -c -w",

@@ -49,11 +48,13 @@ "test": "run-p lint test:all",

"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
"test:emulator": "env FIREBASE_FUNCTIONS_HOST=http://localhost FIREBASE_FUNCTIONS_PORT=5005 run-p test:node"
"test:emulator": "env FIREBASE_FUNCTIONS_HOST=http://localhost FIREBASE_FUNCTIONS_PORT=5005 run-p test:node",
"add-compat-overloads": "ts-node-script ../../scripts/exp/create-overloads.ts -i ../functions-exp/dist/functions-exp-public.d.ts -o dist/src/index.d.ts -a -r Functions:types.FirebaseFunctions -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/functions"
},
"typings": "dist/functions-compat-public.d.ts",
"typings": "dist/src/index.d.ts",
"dependencies": {
"@firebase/component": "0.2.0",
"@firebase/functions": "0.0.900-exp.555fe23c5",
"@firebase/component": "0.5.3",
"@firebase/functions": "0.0.900-exp.57f19127c",
"@firebase/functions-types": "0.4.0",
"@firebase/messaging-types": "0.5.0",
"@firebase/util": "0.3.4",
"tslib": "^2.0.0"
"@firebase/util": "1.1.0",
"tslib": "^2.1.0"
},

@@ -65,3 +66,4 @@ "nyc": {

"reportDir": "./coverage/node"
}
},
"esm5": "dist/index.esm5.js"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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