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

@nativescript/firebase-core

Package Overview
Dependencies
Maintainers
19
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript/firebase-core - npm Package Compare versions

Comparing version 1.0.0-alpha.16 to 1.0.0-alpha.17

57

index.android.js

@@ -21,3 +21,4 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

static fromNative(native, message) {
const error = new FirebaseError(message || native?.getMessage?.());
var _a;
const error = new FirebaseError(message || ((_a = native === null || native === void 0 ? void 0 : native.getMessage) === null || _a === void 0 ? void 0 : _a.call(native)));
__classPrivateFieldSet(error, _FirebaseError_native, native, "f");

@@ -60,6 +61,7 @@ return error;

get apiKey() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_apiKey, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_apiKey, "f");
}
return this.native?.getApiKey?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getApiKey) === null || _b === void 0 ? void 0 : _b.call(_a);
}

@@ -70,12 +72,14 @@ set gcmSenderId(value) {

get gcmSenderId() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_gcmSenderId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_gcmSenderId, "f");
}
return this.native?.getGcmSenderId?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getGcmSenderId) === null || _b === void 0 ? void 0 : _b.call(_a);
}
get databaseURL() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_databaseURL, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_databaseURL, "f");
}
return this.native?.getDatabaseUrl?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getDatabaseUrl) === null || _b === void 0 ? void 0 : _b.call(_a);
}

@@ -86,6 +90,7 @@ set googleAppId(value) {

get googleAppId() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_googleAppId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_googleAppId, "f");
}
return this.native?.getApplicationId?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getApplicationId) === null || _b === void 0 ? void 0 : _b.call(_a);
}

@@ -96,6 +101,7 @@ set projectId(value) {

get projectId() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_projectId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_projectId, "f");
}
return this.native?.getProjectId?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getProjectId) === null || _b === void 0 ? void 0 : _b.call(_a);
}

@@ -106,6 +112,7 @@ set storageBucket(value) {

get storageBucket() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_storageBucket, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_storageBucket, "f");
}
return this.native?.getStorageBucket?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getStorageBucket) === null || _b === void 0 ? void 0 : _b.call(_a);
}

@@ -116,6 +123,7 @@ set trackingId(value) {

get trackingId() {
var _a, _b;
if (__classPrivateFieldGet(this, _FirebaseOptions_trackingId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_trackingId, "f");
}
return this.native?.getGaTrackingId?.();
return (_b = (_a = this.native) === null || _a === void 0 ? void 0 : _a.getGaTrackingId) === null || _b === void 0 ? void 0 : _b.call(_a);
}

@@ -200,24 +208,24 @@ }

}
if (options?.apiKey) {
if (options === null || options === void 0 ? void 0 : options.apiKey) {
nativeOptions.setApiKey(options.apiKey);
}
if (options?.gcmSenderId) {
if (options === null || options === void 0 ? void 0 : options.gcmSenderId) {
nativeOptions.setGcmSenderId(options.gcmSenderId);
}
if (options?.databaseURL) {
if (options === null || options === void 0 ? void 0 : options.databaseURL) {
nativeOptions.setDatabaseUrl(options.databaseURL);
}
if (options?.googleAppId) {
if (options === null || options === void 0 ? void 0 : options.googleAppId) {
nativeOptions.setApplicationId(options.googleAppId);
}
if (options?.projectId) {
if (options === null || options === void 0 ? void 0 : options.projectId) {
nativeOptions.setProjectId(options.projectId);
}
if (options?.storageBucket) {
if (options === null || options === void 0 ? void 0 : options.storageBucket) {
nativeOptions.setStorageBucket(options.storageBucket);
}
if (options?.trackingId) {
if (options === null || options === void 0 ? void 0 : options.trackingId) {
nativeOptions.setGaTrackingId(options.trackingId);
}
const name = typeof configOrName === 'string' ? configOrName : configOrName?.name;
const name = typeof configOrName === 'string' ? configOrName : configOrName === null || configOrName === void 0 ? void 0 : configOrName.name;
let app;

@@ -256,2 +264,3 @@ let isDefault = false;

initializeAppWithPath(path, options = null, config) {
var _a, _b;
let json;

@@ -278,3 +287,3 @@ const ctx = Utils.android.getApplicationContext();

const gcm_defaultSenderId = project_info['project_number'] || null;
const google_api_key = client['api_key']?.['current_key'] ?? null;
const google_api_key = (_b = (_a = client['api_key']) === null || _a === void 0 ? void 0 : _a['current_key']) !== null && _b !== void 0 ? _b : null;
const google_app_id = client_info['mobilesdk_app_id'] || null;

@@ -309,21 +318,21 @@ const google_crash_reporting_api_key = google_app_id;

}
if (options?.apiKey) {
if (options === null || options === void 0 ? void 0 : options.apiKey) {
nativeOptions.setApiKey(options.apiKey);
}
if (options?.gcmSenderId) {
if (options === null || options === void 0 ? void 0 : options.gcmSenderId) {
nativeOptions.setGcmSenderId(options.gcmSenderId);
}
if (options?.databaseURL) {
if (options === null || options === void 0 ? void 0 : options.databaseURL) {
nativeOptions.setDatabaseUrl(options.databaseURL);
}
if (options?.googleAppId) {
if (options === null || options === void 0 ? void 0 : options.googleAppId) {
nativeOptions.setApplicationId(options.googleAppId);
}
if (options?.projectId) {
if (options === null || options === void 0 ? void 0 : options.projectId) {
nativeOptions.setProjectId(options.projectId);
}
if (options?.storageBucket) {
if (options === null || options === void 0 ? void 0 : options.storageBucket) {
nativeOptions.setStorageBucket(options.storageBucket);
}
if (options?.trackingId) {
if (options === null || options === void 0 ? void 0 : options.trackingId) {
nativeOptions.setGaTrackingId(options.trackingId);

@@ -330,0 +339,0 @@ }

@@ -21,3 +21,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

static fromNative(native, message) {
const error = new FirebaseError(message || native?.localizedDescription);
const error = new FirebaseError(message || (native === null || native === void 0 ? void 0 : native.localizedDescription));
__classPrivateFieldSet(error, _FirebaseError_native, native, "f");

@@ -59,6 +59,8 @@ return error;

get native() {
return __classPrivateFieldGet(this, _FirebaseOptions_nativeApp, "f")?.options;
var _a;
return (_a = __classPrivateFieldGet(this, _FirebaseOptions_nativeApp, "f")) === null || _a === void 0 ? void 0 : _a.options;
}
get name() {
return __classPrivateFieldGet(this, _FirebaseOptions_nativeApp, "f")?.name;
var _a;
return (_a = __classPrivateFieldGet(this, _FirebaseOptions_nativeApp, "f")) === null || _a === void 0 ? void 0 : _a.name;
}

@@ -69,6 +71,7 @@ set apiKey(value) {

get apiKey() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_apiKey, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_apiKey, "f");
}
return this.native?.APIKey;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.APIKey;
}

@@ -79,6 +82,7 @@ set gcmSenderId(value) {

get gcmSenderId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_gcmSenderId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_gcmSenderId, "f");
}
return this.native?.GCMSenderID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.GCMSenderID;
}

@@ -89,6 +93,7 @@ set androidClientId(value) {

get androidClientId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_androidClientId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_androidClientId, "f");
}
return this.native?.androidClientID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.androidClientID;
}

@@ -99,6 +104,7 @@ set appGroupId(value) {

get appGroupId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_appGroupId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_appGroupId, "f");
}
return this.native?.appGroupID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.appGroupID;
}

@@ -109,6 +115,7 @@ set bundleId(value) {

get bundleId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_bundleId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_bundleId, "f");
}
return this.native?.bundleID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.bundleID;
}

@@ -119,6 +126,7 @@ set clientId(value) {

get clientId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_clientId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_clientId, "f");
}
return this.native?.clientID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.clientID;
}

@@ -129,6 +137,7 @@ set databaseURL(value) {

get databaseURL() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_databaseURL, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_databaseURL, "f");
}
return this.native?.databaseURL;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.databaseURL;
}

@@ -139,6 +148,7 @@ set deepLinkURLScheme(value) {

get deepLinkURLScheme() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_deepLinkURLScheme, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_deepLinkURLScheme, "f");
}
return this.native?.deepLinkURLScheme;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.deepLinkURLScheme;
}

@@ -149,6 +159,7 @@ set googleAppId(value) {

get googleAppId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_googleAppId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_googleAppId, "f");
}
return this.native?.googleAppID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.googleAppID;
}

@@ -159,6 +170,7 @@ set projectId(value) {

get projectId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_projectId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_projectId, "f");
}
return this.native?.projectID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.projectID;
}

@@ -169,6 +181,7 @@ set storageBucket(value) {

get storageBucket() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_storageBucket, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_storageBucket, "f");
}
return this.native?.storageBucket;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.storageBucket;
}

@@ -179,6 +192,7 @@ set trackingId(value) {

get trackingId() {
var _a;
if (__classPrivateFieldGet(this, _FirebaseOptions_trackingId, "f")) {
return __classPrivateFieldGet(this, _FirebaseOptions_trackingId, "f");
}
return this.native?.trackingID;
return (_a = this.native) === null || _a === void 0 ? void 0 : _a.trackingID;
}

@@ -267,3 +281,3 @@ }

initializeApp(options = null, configOrName) {
const name = typeof configOrName === 'string' ? configOrName : configOrName?.name;
const name = typeof configOrName === 'string' ? configOrName : configOrName === null || configOrName === void 0 ? void 0 : configOrName.name;
let nativeOptions;

@@ -276,36 +290,36 @@ if (name) {

}
if (options?.apiKey) {
if (options === null || options === void 0 ? void 0 : options.apiKey) {
nativeOptions.APIKey = options.apiKey;
}
if (options?.gcmSenderId) {
if (options === null || options === void 0 ? void 0 : options.gcmSenderId) {
nativeOptions.GCMSenderID = options.gcmSenderId;
}
if (options?.androidClientId) {
if (options === null || options === void 0 ? void 0 : options.androidClientId) {
nativeOptions.androidClientID = options.androidClientId;
}
if (options?.appGroupId) {
if (options === null || options === void 0 ? void 0 : options.appGroupId) {
nativeOptions.appGroupID = options.appGroupId;
}
if (options?.bundleId) {
if (options === null || options === void 0 ? void 0 : options.bundleId) {
nativeOptions.bundleID = options.bundleId;
}
if (options?.clientId) {
if (options === null || options === void 0 ? void 0 : options.clientId) {
nativeOptions.clientID = options.clientId;
}
if (options?.databaseURL) {
if (options === null || options === void 0 ? void 0 : options.databaseURL) {
nativeOptions.databaseURL = options.databaseURL;
}
if (options?.deepLinkURLScheme) {
if (options === null || options === void 0 ? void 0 : options.deepLinkURLScheme) {
nativeOptions.deepLinkURLScheme = options.deepLinkURLScheme;
}
if (options?.googleAppId) {
if (options === null || options === void 0 ? void 0 : options.googleAppId) {
nativeOptions.googleAppID = options.googleAppId;
}
if (options?.projectId) {
if (options === null || options === void 0 ? void 0 : options.projectId) {
nativeOptions.projectID = options.projectId;
}
if (options?.storageBucket) {
if (options === null || options === void 0 ? void 0 : options.storageBucket) {
nativeOptions.storageBucket = options.storageBucket;
}
if (options?.trackingId) {
if (options === null || options === void 0 ? void 0 : options.trackingId) {
nativeOptions.trackingID = options.trackingId;

@@ -352,36 +366,36 @@ }

const nativeOptions = FIROptions.alloc().initWithContentsOfFile(path);
if (options?.apiKey) {
if (options === null || options === void 0 ? void 0 : options.apiKey) {
nativeOptions.APIKey = options.apiKey;
}
if (options?.gcmSenderId) {
if (options === null || options === void 0 ? void 0 : options.gcmSenderId) {
nativeOptions.GCMSenderID = options.gcmSenderId;
}
if (options?.androidClientId) {
if (options === null || options === void 0 ? void 0 : options.androidClientId) {
nativeOptions.androidClientID = options.androidClientId;
}
if (options?.appGroupId) {
if (options === null || options === void 0 ? void 0 : options.appGroupId) {
nativeOptions.appGroupID = options.appGroupId;
}
if (options?.bundleId) {
if (options === null || options === void 0 ? void 0 : options.bundleId) {
nativeOptions.bundleID = options.bundleId;
}
if (options?.clientId) {
if (options === null || options === void 0 ? void 0 : options.clientId) {
nativeOptions.clientID = options.clientId;
}
if (options?.databaseURL) {
if (options === null || options === void 0 ? void 0 : options.databaseURL) {
nativeOptions.databaseURL = options.databaseURL;
}
if (options?.deepLinkURLScheme) {
if (options === null || options === void 0 ? void 0 : options.deepLinkURLScheme) {
nativeOptions.deepLinkURLScheme = options.deepLinkURLScheme;
}
if (options?.googleAppId) {
if (options === null || options === void 0 ? void 0 : options.googleAppId) {
nativeOptions.googleAppID = options.googleAppId;
}
if (options?.projectId) {
if (options === null || options === void 0 ? void 0 : options.projectId) {
nativeOptions.projectID = options.projectId;
}
if (options?.storageBucket) {
if (options === null || options === void 0 ? void 0 : options.storageBucket) {
nativeOptions.storageBucket = options.storageBucket;
}
if (options?.trackingId) {
if (options === null || options === void 0 ? void 0 : options.trackingId) {
nativeOptions.trackingID = options.trackingId;

@@ -388,0 +402,0 @@ }

{
"name": "@nativescript/firebase-core",
"version": "1.0.0-alpha.16",
"version": "1.0.0-alpha.17",
"description": "NativeScript Firebase - Core",

@@ -5,0 +5,0 @@ "main": "index",

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