@firebase/performance-compat 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.esm2017.js +63 -63
- package/dist/esm/src/index.d.ts +27 -27
- package/dist/esm/src/performance.d.ts +29 -29
- package/dist/esm/src/performance.test.d.ts +17 -17
- package/dist/esm/test/setup.d.ts +17 -17
- package/dist/esm/test/util.d.ts +21 -21
- package/dist/index.cjs.js +63 -63
- package/dist/src/index.d.ts +27 -27
- package/dist/src/performance.d.ts +29 -29
- package/dist/src/performance.test.d.ts +17 -17
- package/dist/test/setup.d.ts +17 -17
- package/dist/test/util.d.ts +21 -21
- package/package.json +8 -8
|
@@ -2,72 +2,72 @@ import firebase from '@firebase/app-compat';
|
|
|
2
2
|
import { Component } from '@firebase/component';
|
|
3
3
|
import { trace } from '@firebase/performance';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2020 Google LLC
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
class PerformanceCompatImpl {
|
|
22
|
-
constructor(app, _delegate) {
|
|
23
|
-
this.app = app;
|
|
24
|
-
this._delegate = _delegate;
|
|
25
|
-
}
|
|
26
|
-
get instrumentationEnabled() {
|
|
27
|
-
return this._delegate.instrumentationEnabled;
|
|
28
|
-
}
|
|
29
|
-
set instrumentationEnabled(val) {
|
|
30
|
-
this._delegate.instrumentationEnabled = val;
|
|
31
|
-
}
|
|
32
|
-
get dataCollectionEnabled() {
|
|
33
|
-
return this._delegate.dataCollectionEnabled;
|
|
34
|
-
}
|
|
35
|
-
set dataCollectionEnabled(val) {
|
|
36
|
-
this._delegate.dataCollectionEnabled = val;
|
|
37
|
-
}
|
|
38
|
-
trace(traceName) {
|
|
39
|
-
return trace(this._delegate, traceName);
|
|
40
|
-
}
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2020 Google LLC
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
class PerformanceCompatImpl {
|
|
22
|
+
constructor(app, _delegate) {
|
|
23
|
+
this.app = app;
|
|
24
|
+
this._delegate = _delegate;
|
|
25
|
+
}
|
|
26
|
+
get instrumentationEnabled() {
|
|
27
|
+
return this._delegate.instrumentationEnabled;
|
|
28
|
+
}
|
|
29
|
+
set instrumentationEnabled(val) {
|
|
30
|
+
this._delegate.instrumentationEnabled = val;
|
|
31
|
+
}
|
|
32
|
+
get dataCollectionEnabled() {
|
|
33
|
+
return this._delegate.dataCollectionEnabled;
|
|
34
|
+
}
|
|
35
|
+
set dataCollectionEnabled(val) {
|
|
36
|
+
this._delegate.dataCollectionEnabled = val;
|
|
37
|
+
}
|
|
38
|
+
trace(traceName) {
|
|
39
|
+
return trace(this._delegate, traceName);
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
const name = "@firebase/performance-compat";
|
|
44
|
-
const version = "0.2.
|
|
44
|
+
const version = "0.2.11";
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2020 Google LLC
|
|
49
|
-
*
|
|
50
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
-
* you may not use this file except in compliance with the License.
|
|
52
|
-
* You may obtain a copy of the License at
|
|
53
|
-
*
|
|
54
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
-
*
|
|
56
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
-
* See the License for the specific language governing permissions and
|
|
60
|
-
* limitations under the License.
|
|
61
|
-
*/
|
|
62
|
-
function registerPerformanceCompat(firebaseInstance) {
|
|
63
|
-
firebaseInstance.INTERNAL.registerComponent(new Component('performance-compat', performanceFactory, "PUBLIC" /* ComponentType.PUBLIC */));
|
|
64
|
-
firebaseInstance.registerVersion(name, version);
|
|
65
|
-
}
|
|
66
|
-
function performanceFactory(container) {
|
|
67
|
-
const app = container.getProvider('app-compat').getImmediate();
|
|
68
|
-
// The following call will always succeed.
|
|
69
|
-
const performance = container.getProvider('performance').getImmediate();
|
|
70
|
-
return new PerformanceCompatImpl(app, performance);
|
|
71
|
-
}
|
|
46
|
+
/**
|
|
47
|
+
* @license
|
|
48
|
+
* Copyright 2020 Google LLC
|
|
49
|
+
*
|
|
50
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
+
* you may not use this file except in compliance with the License.
|
|
52
|
+
* You may obtain a copy of the License at
|
|
53
|
+
*
|
|
54
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
+
*
|
|
56
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
+
* See the License for the specific language governing permissions and
|
|
60
|
+
* limitations under the License.
|
|
61
|
+
*/
|
|
62
|
+
function registerPerformanceCompat(firebaseInstance) {
|
|
63
|
+
firebaseInstance.INTERNAL.registerComponent(new Component('performance-compat', performanceFactory, "PUBLIC" /* ComponentType.PUBLIC */));
|
|
64
|
+
firebaseInstance.registerVersion(name, version);
|
|
65
|
+
}
|
|
66
|
+
function performanceFactory(container) {
|
|
67
|
+
const app = container.getProvider('app-compat').getImmediate();
|
|
68
|
+
// The following call will always succeed.
|
|
69
|
+
const performance = container.getProvider('performance').getImmediate();
|
|
70
|
+
return new PerformanceCompatImpl(app, performance);
|
|
71
|
+
}
|
|
72
72
|
registerPerformanceCompat(firebase);
|
|
73
73
|
//# sourceMappingURL=index.esm2017.js.map
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
18
|
-
declare module '@firebase/app-compat' {
|
|
19
|
-
interface FirebaseNamespace {
|
|
20
|
-
performance: {
|
|
21
|
-
(app?: FirebaseApp): FirebasePerformanceCompat;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
interface FirebaseApp {
|
|
25
|
-
performance(): FirebasePerformanceCompat;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
18
|
+
declare module '@firebase/app-compat' {
|
|
19
|
+
interface FirebaseNamespace {
|
|
20
|
+
performance: {
|
|
21
|
+
(app?: FirebaseApp): FirebasePerformanceCompat;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
interface FirebaseApp {
|
|
25
|
+
performance(): FirebasePerformanceCompat;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
18
|
-
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
19
|
-
import { FirebaseApp, _FirebaseService } from '@firebase/app-compat';
|
|
20
|
-
export declare class PerformanceCompatImpl implements FirebasePerformanceCompat, _FirebaseService {
|
|
21
|
-
app: FirebaseApp;
|
|
22
|
-
readonly _delegate: FirebasePerformance;
|
|
23
|
-
constructor(app: FirebaseApp, _delegate: FirebasePerformance);
|
|
24
|
-
get instrumentationEnabled(): boolean;
|
|
25
|
-
set instrumentationEnabled(val: boolean);
|
|
26
|
-
get dataCollectionEnabled(): boolean;
|
|
27
|
-
set dataCollectionEnabled(val: boolean);
|
|
28
|
-
trace(traceName: string): PerformanceTrace;
|
|
29
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
18
|
+
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
19
|
+
import { FirebaseApp, _FirebaseService } from '@firebase/app-compat';
|
|
20
|
+
export declare class PerformanceCompatImpl implements FirebasePerformanceCompat, _FirebaseService {
|
|
21
|
+
app: FirebaseApp;
|
|
22
|
+
readonly _delegate: FirebasePerformance;
|
|
23
|
+
constructor(app: FirebaseApp, _delegate: FirebasePerformance);
|
|
24
|
+
get instrumentationEnabled(): boolean;
|
|
25
|
+
set instrumentationEnabled(val: boolean);
|
|
26
|
+
get dataCollectionEnabled(): boolean;
|
|
27
|
+
set dataCollectionEnabled(val: boolean);
|
|
28
|
+
trace(traceName: string): PerformanceTrace;
|
|
29
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../test/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../test/setup';
|
package/dist/esm/test/setup.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
package/dist/esm/test/util.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebaseApp } from '@firebase/app-compat';
|
|
18
|
-
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
19
|
-
export declare function getFakeApp(): FirebaseApp;
|
|
20
|
-
export declare function getFakeModularPerformance(): FirebasePerformance;
|
|
21
|
-
export declare function getFakeModularPerformanceTrace(): PerformanceTrace;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseApp } from '@firebase/app-compat';
|
|
18
|
+
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
19
|
+
export declare function getFakeApp(): FirebaseApp;
|
|
20
|
+
export declare function getFakeModularPerformance(): FirebasePerformance;
|
|
21
|
+
export declare function getFakeModularPerformanceTrace(): PerformanceTrace;
|
package/dist/index.cjs.js
CHANGED
|
@@ -8,72 +8,72 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @license
|
|
13
|
-
* Copyright 2020 Google LLC
|
|
14
|
-
*
|
|
15
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
-
* you may not use this file except in compliance with the License.
|
|
17
|
-
* You may obtain a copy of the License at
|
|
18
|
-
*
|
|
19
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
*
|
|
21
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
22
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
-
* See the License for the specific language governing permissions and
|
|
25
|
-
* limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
class PerformanceCompatImpl {
|
|
28
|
-
constructor(app, _delegate) {
|
|
29
|
-
this.app = app;
|
|
30
|
-
this._delegate = _delegate;
|
|
31
|
-
}
|
|
32
|
-
get instrumentationEnabled() {
|
|
33
|
-
return this._delegate.instrumentationEnabled;
|
|
34
|
-
}
|
|
35
|
-
set instrumentationEnabled(val) {
|
|
36
|
-
this._delegate.instrumentationEnabled = val;
|
|
37
|
-
}
|
|
38
|
-
get dataCollectionEnabled() {
|
|
39
|
-
return this._delegate.dataCollectionEnabled;
|
|
40
|
-
}
|
|
41
|
-
set dataCollectionEnabled(val) {
|
|
42
|
-
this._delegate.dataCollectionEnabled = val;
|
|
43
|
-
}
|
|
44
|
-
trace(traceName) {
|
|
45
|
-
return performance.trace(this._delegate, traceName);
|
|
46
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* @license
|
|
13
|
+
* Copyright 2020 Google LLC
|
|
14
|
+
*
|
|
15
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License.
|
|
17
|
+
* You may obtain a copy of the License at
|
|
18
|
+
*
|
|
19
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
*
|
|
21
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
22
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
+
* See the License for the specific language governing permissions and
|
|
25
|
+
* limitations under the License.
|
|
26
|
+
*/
|
|
27
|
+
class PerformanceCompatImpl {
|
|
28
|
+
constructor(app, _delegate) {
|
|
29
|
+
this.app = app;
|
|
30
|
+
this._delegate = _delegate;
|
|
31
|
+
}
|
|
32
|
+
get instrumentationEnabled() {
|
|
33
|
+
return this._delegate.instrumentationEnabled;
|
|
34
|
+
}
|
|
35
|
+
set instrumentationEnabled(val) {
|
|
36
|
+
this._delegate.instrumentationEnabled = val;
|
|
37
|
+
}
|
|
38
|
+
get dataCollectionEnabled() {
|
|
39
|
+
return this._delegate.dataCollectionEnabled;
|
|
40
|
+
}
|
|
41
|
+
set dataCollectionEnabled(val) {
|
|
42
|
+
this._delegate.dataCollectionEnabled = val;
|
|
43
|
+
}
|
|
44
|
+
trace(traceName) {
|
|
45
|
+
return performance.trace(this._delegate, traceName);
|
|
46
|
+
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
const name = "@firebase/performance-compat";
|
|
50
|
-
const version = "0.2.
|
|
50
|
+
const version = "0.2.11";
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* @license
|
|
54
|
-
* Copyright 2020 Google LLC
|
|
55
|
-
*
|
|
56
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
57
|
-
* you may not use this file except in compliance with the License.
|
|
58
|
-
* You may obtain a copy of the License at
|
|
59
|
-
*
|
|
60
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
61
|
-
*
|
|
62
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
63
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
64
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
65
|
-
* See the License for the specific language governing permissions and
|
|
66
|
-
* limitations under the License.
|
|
67
|
-
*/
|
|
68
|
-
function registerPerformanceCompat(firebaseInstance) {
|
|
69
|
-
firebaseInstance.INTERNAL.registerComponent(new component.Component('performance-compat', performanceFactory, "PUBLIC" /* ComponentType.PUBLIC */));
|
|
70
|
-
firebaseInstance.registerVersion(name, version);
|
|
71
|
-
}
|
|
72
|
-
function performanceFactory(container) {
|
|
73
|
-
const app = container.getProvider('app-compat').getImmediate();
|
|
74
|
-
// The following call will always succeed.
|
|
75
|
-
const performance = container.getProvider('performance').getImmediate();
|
|
76
|
-
return new PerformanceCompatImpl(app, performance);
|
|
77
|
-
}
|
|
52
|
+
/**
|
|
53
|
+
* @license
|
|
54
|
+
* Copyright 2020 Google LLC
|
|
55
|
+
*
|
|
56
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
57
|
+
* you may not use this file except in compliance with the License.
|
|
58
|
+
* You may obtain a copy of the License at
|
|
59
|
+
*
|
|
60
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
61
|
+
*
|
|
62
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
63
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
64
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
65
|
+
* See the License for the specific language governing permissions and
|
|
66
|
+
* limitations under the License.
|
|
67
|
+
*/
|
|
68
|
+
function registerPerformanceCompat(firebaseInstance) {
|
|
69
|
+
firebaseInstance.INTERNAL.registerComponent(new component.Component('performance-compat', performanceFactory, "PUBLIC" /* ComponentType.PUBLIC */));
|
|
70
|
+
firebaseInstance.registerVersion(name, version);
|
|
71
|
+
}
|
|
72
|
+
function performanceFactory(container) {
|
|
73
|
+
const app = container.getProvider('app-compat').getImmediate();
|
|
74
|
+
// The following call will always succeed.
|
|
75
|
+
const performance = container.getProvider('performance').getImmediate();
|
|
76
|
+
return new PerformanceCompatImpl(app, performance);
|
|
77
|
+
}
|
|
78
78
|
registerPerformanceCompat(firebase__default["default"]);
|
|
79
79
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
18
|
-
declare module '@firebase/app-compat' {
|
|
19
|
-
interface FirebaseNamespace {
|
|
20
|
-
performance: {
|
|
21
|
-
(app?: FirebaseApp): FirebasePerformanceCompat;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
interface FirebaseApp {
|
|
25
|
-
performance(): FirebasePerformanceCompat;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
18
|
+
declare module '@firebase/app-compat' {
|
|
19
|
+
interface FirebaseNamespace {
|
|
20
|
+
performance: {
|
|
21
|
+
(app?: FirebaseApp): FirebasePerformanceCompat;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
interface FirebaseApp {
|
|
25
|
+
performance(): FirebasePerformanceCompat;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
28
|
|
|
29
29
|
import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
|
|
30
30
|
import { type FirebasePerformance, type PerformanceSettings, type PerformanceTrace } from "@firebase/performance";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
18
|
-
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
19
|
-
import { FirebaseApp, _FirebaseService } from '@firebase/app-compat';
|
|
20
|
-
export declare class PerformanceCompatImpl implements FirebasePerformanceCompat, _FirebaseService {
|
|
21
|
-
app: FirebaseApp;
|
|
22
|
-
readonly _delegate: FirebasePerformance;
|
|
23
|
-
constructor(app: FirebaseApp, _delegate: FirebasePerformance);
|
|
24
|
-
get instrumentationEnabled(): boolean;
|
|
25
|
-
set instrumentationEnabled(val: boolean);
|
|
26
|
-
get dataCollectionEnabled(): boolean;
|
|
27
|
-
set dataCollectionEnabled(val: boolean);
|
|
28
|
-
trace(traceName: string): PerformanceTrace;
|
|
29
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
18
|
+
import { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';
|
|
19
|
+
import { FirebaseApp, _FirebaseService } from '@firebase/app-compat';
|
|
20
|
+
export declare class PerformanceCompatImpl implements FirebasePerformanceCompat, _FirebaseService {
|
|
21
|
+
app: FirebaseApp;
|
|
22
|
+
readonly _delegate: FirebasePerformance;
|
|
23
|
+
constructor(app: FirebaseApp, _delegate: FirebasePerformance);
|
|
24
|
+
get instrumentationEnabled(): boolean;
|
|
25
|
+
set instrumentationEnabled(val: boolean);
|
|
26
|
+
get dataCollectionEnabled(): boolean;
|
|
27
|
+
set dataCollectionEnabled(val: boolean);
|
|
28
|
+
trace(traceName: string): PerformanceTrace;
|
|
29
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../test/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../test/setup';
|
package/dist/test/setup.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
package/dist/test/util.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebaseApp } from '@firebase/app-compat';
|
|
18
|
-
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
19
|
-
export declare function getFakeApp(): FirebaseApp;
|
|
20
|
-
export declare function getFakeModularPerformance(): FirebasePerformance;
|
|
21
|
-
export declare function getFakeModularPerformanceTrace(): PerformanceTrace;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseApp } from '@firebase/app-compat';
|
|
18
|
+
import { FirebasePerformance, PerformanceTrace } from '@firebase/performance';
|
|
19
|
+
export declare function getFakeApp(): FirebaseApp;
|
|
20
|
+
export declare function getFakeModularPerformance(): FirebasePerformance;
|
|
21
|
+
export declare function getFakeModularPerformanceTrace(): PerformanceTrace;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/performance-compat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "The compatibility package of Firebase Performance",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"@firebase/app-compat": "0.x"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@firebase/performance": "0.6.
|
|
42
|
-
"@firebase/performance-types": "0.2.
|
|
43
|
-
"@firebase/util": "1.10.
|
|
44
|
-
"@firebase/logger": "0.4.
|
|
45
|
-
"@firebase/component": "0.6.
|
|
41
|
+
"@firebase/performance": "0.6.11",
|
|
42
|
+
"@firebase/performance-types": "0.2.3",
|
|
43
|
+
"@firebase/util": "1.10.2",
|
|
44
|
+
"@firebase/logger": "0.4.4",
|
|
45
|
+
"@firebase/component": "0.6.11",
|
|
46
46
|
"tslib": "^2.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@rollup/plugin-json": "4.1.0",
|
|
51
51
|
"rollup-plugin-replace": "2.2.0",
|
|
52
52
|
"rollup-plugin-typescript2": "0.31.2",
|
|
53
|
-
"typescript": "
|
|
54
|
-
"@firebase/app-compat": "0.2.
|
|
53
|
+
"typescript": "5.5.4",
|
|
54
|
+
"@firebase/app-compat": "0.2.46"
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"directory": "packages/performance-compat",
|