Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Apr 10, 2020
1 parent 9f4ee48 commit 6142ec1
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 25 deletions.
2 changes: 1 addition & 1 deletion demo-ng/package.json
Expand Up @@ -25,7 +25,7 @@
"nativescript-angular": "~8.0.3",
"nativescript-camera": "~4.5.0",
"nativescript-imagepicker": "~6.3.0",
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.1.tgz",
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.2.tgz",
"nativescript-theme-core": "~1.0.6",
"reflect-metadata": "~0.1.13",
"rxjs": "~6.5.2",
Expand Down
2 changes: 1 addition & 1 deletion demo-push/package.json
Expand Up @@ -9,7 +9,7 @@
}
},
"dependencies": {
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.1.tgz",
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.2.tgz",
"nativescript-theme-core": "~1.0.6",
"nativescript-unit-test-runner": "0.7.0",
"tns-core-modules": "~6.3.2"
Expand Down
2 changes: 1 addition & 1 deletion demo-vue/package.json
Expand Up @@ -14,7 +14,7 @@
}
},
"dependencies": {
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.1.tgz",
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.2.tgz",
"nativescript-theme-core": "~1.0.6",
"nativescript-vue": "~2.4.0",
"tns-core-modules": "~6.3.2"
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"firebase-functions": "^2.0.5",
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.1.tgz",
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.5.2.tgz",
"nativescript-theme-core": "^1.0.4",
"nativescript-unit-test-runner": "0.7.0",
"tns-core-modules": "~6.3.2"
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
@@ -1,6 +1,6 @@
{
"name": "nativescript-plugin-firebase",
"version": "10.5.1",
"version": "10.5.2",
"description": "Fire. Base. Firebase!",
"main": "firebase",
"typings": "index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/performance/index.ts
@@ -1,2 +1,3 @@
import * as perf from "./performance";

export const performance = perf;
3 changes: 2 additions & 1 deletion src/performance/performance.android.ts
Expand Up @@ -47,7 +47,8 @@ export class FirebaseTrace {
}

export class FirebaseHttpMetric {
constructor(private nativeHttpMetric: com.google.firebase.perf.metrics.HttpMetric) {}
constructor(private nativeHttpMetric: com.google.firebase.perf.metrics.HttpMetric) {
}

setRequestPayloadSize(size: number) {
this.nativeHttpMetric.setRequestPayloadSize(size);
Expand Down
7 changes: 7 additions & 0 deletions src/performance/performance.d.ts
@@ -1,17 +1,24 @@
export declare class FirebaseTrace {
setValue(attribute: string, value: string): void;

getValue(attribute: string): string;

getAttributes(): { [field: string]: any };

removeAttribute(attribute: string): void;

incrementMetric(metric: string, by: number): void;

stop(): void;
}

export declare function startTrace(name: string): FirebaseTrace;

export declare class FirebaseHttpMetric {
setRequestPayloadSize(size: number): void;

setHttpResponseCode(responseCode: number): void;

stop(): void;
}

Expand Down
38 changes: 19 additions & 19 deletions src/performance/performance.ios.ts
Expand Up @@ -44,35 +44,35 @@ export class FirebaseHttpMetric {
}

setRequestPayloadSize(size: number) {
this.nativeHttpMetric.requestPayloadSize = size;
this.nativeHttpMetric.requestPayloadSize = size;
}

setHttpResponseCode(responseCode: number) {
this.nativeHttpMetric.responseCode = responseCode;
this.nativeHttpMetric.responseCode = responseCode;
}

stop(): void {
this.nativeHttpMetric.stop();
this.nativeHttpMetric.stop();
}
}

function getHttpMethodFromString(method: string): FIRHTTPMethod {
switch (method) {
case 'GET':
return FIRHTTPMethod.GET;
case 'PUT':
return FIRHTTPMethod.PUT;
case 'POST':
return FIRHTTPMethod.POST;
case 'DELETE':
return FIRHTTPMethod.DELETE;
case 'HEAD':
return FIRHTTPMethod.HEAD;
case 'PATCH':
return FIRHTTPMethod.PATCH;
case 'OPTIONS':
return FIRHTTPMethod.OPTIONS;
default:
return null;
case 'GET':
return FIRHTTPMethod.GET;
case 'PUT':
return FIRHTTPMethod.PUT;
case 'POST':
return FIRHTTPMethod.POST;
case 'DELETE':
return FIRHTTPMethod.DELETE;
case 'HEAD':
return FIRHTTPMethod.HEAD;
case 'PATCH':
return FIRHTTPMethod.PATCH;
case 'OPTIONS':
return FIRHTTPMethod.OPTIONS;
default:
return null;
}
}

0 comments on commit 6142ec1

Please sign in to comment.