🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

expo-firebase-core

Package Overview
Dependencies
Maintainers
24
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-firebase-core - npm Package Compare versions

Comparing version

to
3.0.0

plugin/build/withFirebaseCore.d.ts

46

app.plugin.js

@@ -1,45 +0,1 @@

const pkg = require('./package.json');
const { withDangerousMod, createRunOncePlugin, IOSConfig } = require('@expo/config-plugins');
const fs = require('fs-extra');
const methodInvocationBlock = `[FIRApp configure];`;
const withFirebaseAppDelegate = config => {
return withDangerousMod(config, [
'ios',
async config => {
const fileInfo = IOSConfig.Paths.getAppDelegate(config.modRequest.projectRoot);
let contents = await fs.readFile(fileInfo.path, 'utf-8');
if (fileInfo.language === 'objc') {
// Add import
if (!contents.includes('@import Firebase;')) {
contents = contents.replace(
/\#import \"AppDelegate.h\"/g,
`#import "AppDelegate.h"
@import Firebase;`
);
}
// Add invocation
if (!contents.includes(methodInvocationBlock)) {
// self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc]
contents = contents.replace(
/self\.moduleRegistryAdapter \= \[\[UMModuleRegistryAdapter alloc\]/g,
`${methodInvocationBlock}
self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc]`
);
}
} else {
// TODO: Support Swift
throw new Error(
`Cannot add Firebase code to AppDelegate of language "${fileInfo.language}"`
);
}
await fs.writeFile(fileInfo.path, contents);
return config;
},
]);
};
module.exports = createRunOncePlugin(withFirebaseAppDelegate, pkg.name, pkg.version);
module.exports = require('./plugin/build/withFirebaseCore');

@@ -1,6 +0,15 @@

import { IFirebaseOptions } from './FirebaseOptions';
declare const _default: {
readonly DEFAULT_APP_NAME: string;
readonly DEFAULT_APP_OPTIONS: void | IFirebaseOptions;
readonly DEFAULT_APP_OPTIONS: void | Partial<{
appId: string;
apiKey: string;
databaseURL: string;
trackingId: string;
messagingSenderId: string;
storageBucket: string;
projectId: string;
authDomain: string;
measurementId: string;
}>;
};
export default _default;

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

export interface IFirebaseOptions {
export declare type IFirebaseOptions = Partial<{
appId: string;

@@ -11,3 +11,3 @@ apiKey: string;

measurementId: string;
}
}>;
export declare function getDefaultWebOptions(): IFirebaseOptions | void;

@@ -11,6 +11,13 @@ # Changelog

## 2.0.0 — 2021-01-15
## 3.0.0 — 2021-03-10
_This version does not introduce any user-facing changes._
### 📚 native library updates
- Updated native `firebase sdk version` from `6.14.0` to `7.7.0` on iOS. ([#12125](https://github.com/expo/expo/pull/12125) by [@bbarthec](https://github.com/bbarthec))
### 🎉 New features
- Converted plugin to TypeScript. ([#11715](https://github.com/expo/expo/pull/11715) by [@EvanBacon](https://github.com/EvanBacon))
- Updated Android build configuration to target Android 11 (added support for Android SDK 30). ([#11647](https://github.com/expo/expo/pull/11647) by [@bbarthec](https://github.com/bbarthec))
## 2.0.0 — 2021-01-15

@@ -17,0 +24,0 @@

{
"name": "expo-firebase-core",
"version": "2.0.0",
"version": "3.0.0",
"description": "Core support for Google Firebase",

@@ -38,3 +38,3 @@ "main": "build/FirebaseCore.js",

"devDependencies": {
"expo-module-scripts": "^1.1.1"
"expo-module-scripts": "^2.0.0"
},

@@ -44,3 +44,3 @@ "jest": {

},
"gitHead": "e362887ddc6ba4e3518efd623d64b3cbd301a6a9"
"gitHead": "5b57d1fd0a20294c1dec7c43b5df34dd6425d1a5"
}
import Constants from 'expo-constants';
export interface IFirebaseOptions {
export type IFirebaseOptions = Partial<{
appId: string;

@@ -13,3 +13,3 @@ apiKey: string;

measurementId: string;
}
}>;

@@ -16,0 +16,0 @@ export function getDefaultWebOptions(): IFirebaseOptions | void {

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