@firebase/performance-compat 0.1.2 → 0.1.3-2021102231614
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/CHANGELOG.md +13 -0
- package/dist/{index.esm2017.js → esm/index.esm2017.js} +1 -1
- package/dist/esm/index.esm2017.js.map +1 -0
- package/dist/{index.esm5.js → esm/index.esm5.js} +1 -1
- package/dist/esm/index.esm5.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/src/index.d.ts +27 -0
- package/dist/esm/src/performance.d.ts +29 -0
- package/dist/esm/src/performance.test.d.ts +17 -0
- package/dist/esm/test/setup.d.ts +17 -0
- package/dist/esm/test/util.d.ts +21 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +18 -11
- package/dist/index.esm2017.js.map +0 -1
- package/dist/index.esm5.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @firebase/performance-compat
|
|
2
2
|
|
|
3
|
+
## 0.1.3-2021102231614
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2322b6023`](https://github.com/firebase/firebase-js-sdk/commit/2322b6023c628cd9f4f4172767c17d215dd91684) [#5693](https://github.com/firebase/firebase-js-sdk/pull/5693) - Add exports field to all packages
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2322b6023`](https://github.com/firebase/firebase-js-sdk/commit/2322b6023c628cd9f4f4172767c17d215dd91684)]:
|
|
10
|
+
- @firebase/app-compat@0.1.7-2021102231614
|
|
11
|
+
- @firebase/component@0.5.8-2021102231614
|
|
12
|
+
- @firebase/logger@0.3.1-2021102231614
|
|
13
|
+
- @firebase/performance@0.5.3-2021102231614
|
|
14
|
+
- @firebase/util@1.4.1-2021102231614
|
|
15
|
+
|
|
3
16
|
## 0.1.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm2017.js","sources":["../../src/performance.ts","../../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n trace,\n FirebasePerformance,\n // The PerformanceTrace type has not changed between modular and non-modular packages.\n PerformanceTrace\n} from '@firebase/performance';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\n\nexport class PerformanceCompatImpl\n implements FirebasePerformanceCompat, _FirebaseService\n{\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FirebasePerformance\n ) {}\n\n get instrumentationEnabled(): boolean {\n return this._delegate.instrumentationEnabled;\n }\n\n set instrumentationEnabled(val: boolean) {\n this._delegate.instrumentationEnabled = val;\n }\n\n get dataCollectionEnabled(): boolean {\n return this._delegate.dataCollectionEnabled;\n }\n\n set dataCollectionEnabled(val: boolean) {\n this._delegate.dataCollectionEnabled = val;\n }\n\n trace(traceName: string): PerformanceTrace {\n return trace(this._delegate, traceName);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, { _FirebaseNamespace } from '@firebase/app-compat';\nimport {\n Component,\n ComponentContainer,\n ComponentType\n} from '@firebase/component';\nimport { PerformanceCompatImpl } from './performance';\nimport { name as packageName, version } from '../package.json';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\n\nfunction registerPerformanceCompat(firebaseInstance: _FirebaseNamespace): void {\n firebaseInstance.INTERNAL.registerComponent(\n new Component(\n 'performance-compat',\n performanceFactory,\n ComponentType.PUBLIC\n )\n );\n\n firebaseInstance.registerVersion(packageName, version);\n}\n\nfunction performanceFactory(\n container: ComponentContainer\n): PerformanceCompatImpl {\n const app = container.getProvider('app-compat').getImmediate();\n // The following call will always succeed.\n const performance = container.getProvider('performance').getImmediate();\n\n return new PerformanceCompatImpl(app, performance);\n}\n\nregisterPerformanceCompat(firebase as _FirebaseNamespace);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n performance: {\n (app?: FirebaseApp): FirebasePerformanceCompat;\n };\n }\n interface FirebaseApp {\n performance(): FirebasePerformanceCompat;\n }\n}\n"],"names":["packageName"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;MA0Ba,qBAAqB;IAGhC,YACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,IAAI,sBAAsB;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;KAC9C;IAED,IAAI,sBAAsB,CAAC,GAAY;QACrC,IAAI,CAAC,SAAS,CAAC,sBAAsB,GAAG,GAAG,CAAC;KAC7C;IAED,IAAI,qBAAqB;QACvB,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC7C;IAED,IAAI,qBAAqB,CAAC,GAAY;QACpC,IAAI,CAAC,SAAS,CAAC,qBAAqB,GAAG,GAAG,CAAC;KAC5C;IAED,KAAK,CAAC,SAAiB;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KACzC;;;;;;ACpDH;;;;;;;;;;;;;;;;AA2BA,SAAS,yBAAyB,CAAC,gBAAoC;IACrE,gBAAgB,CAAC,QAAQ,CAAC,iBAAiB,CACzC,IAAI,SAAS,CACX,oBAAoB,EACpB,kBAAkB,wBAEnB,CACF,CAAC;IAEF,gBAAgB,CAAC,eAAe,CAACA,IAAW,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,kBAAkB,CACzB,SAA6B;IAE7B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;;IAE/D,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,YAAY,EAAE,CAAC;IAExE,OAAO,IAAI,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,yBAAyB,CAAC,QAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm5.js","sources":["../../src/performance.ts","../../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n trace,\n FirebasePerformance,\n // The PerformanceTrace type has not changed between modular and non-modular packages.\n PerformanceTrace\n} from '@firebase/performance';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\n\nexport class PerformanceCompatImpl\n implements FirebasePerformanceCompat, _FirebaseService\n{\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FirebasePerformance\n ) {}\n\n get instrumentationEnabled(): boolean {\n return this._delegate.instrumentationEnabled;\n }\n\n set instrumentationEnabled(val: boolean) {\n this._delegate.instrumentationEnabled = val;\n }\n\n get dataCollectionEnabled(): boolean {\n return this._delegate.dataCollectionEnabled;\n }\n\n set dataCollectionEnabled(val: boolean) {\n this._delegate.dataCollectionEnabled = val;\n }\n\n trace(traceName: string): PerformanceTrace {\n return trace(this._delegate, traceName);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, { _FirebaseNamespace } from '@firebase/app-compat';\nimport {\n Component,\n ComponentContainer,\n ComponentType\n} from '@firebase/component';\nimport { PerformanceCompatImpl } from './performance';\nimport { name as packageName, version } from '../package.json';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\n\nfunction registerPerformanceCompat(firebaseInstance: _FirebaseNamespace): void {\n firebaseInstance.INTERNAL.registerComponent(\n new Component(\n 'performance-compat',\n performanceFactory,\n ComponentType.PUBLIC\n )\n );\n\n firebaseInstance.registerVersion(packageName, version);\n}\n\nfunction performanceFactory(\n container: ComponentContainer\n): PerformanceCompatImpl {\n const app = container.getProvider('app-compat').getImmediate();\n // The following call will always succeed.\n const performance = container.getProvider('performance').getImmediate();\n\n return new PerformanceCompatImpl(app, performance);\n}\n\nregisterPerformanceCompat(firebase as _FirebaseNamespace);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n performance: {\n (app?: FirebaseApp): FirebasePerformanceCompat;\n };\n }\n interface FirebaseApp {\n performance(): FirebasePerformanceCompat;\n }\n}\n"],"names":["packageName"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;AA0BA;IAGE,+BACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,sBAAI,yDAAsB;aAA1B;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;SAC9C;aAED,UAA2B,GAAY;YACrC,IAAI,CAAC,SAAS,CAAC,sBAAsB,GAAG,GAAG,CAAC;SAC7C;;;OAJA;IAMD,sBAAI,wDAAqB;aAAzB;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC;SAC7C;aAED,UAA0B,GAAY;YACpC,IAAI,CAAC,SAAS,CAAC,qBAAqB,GAAG,GAAG,CAAC;SAC5C;;;OAJA;IAMD,qCAAK,GAAL,UAAM,SAAiB;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KACzC;IACH,4BAAC;AAAD,CAAC;;;;;ACrDD;;;;;;;;;;;;;;;;AA2BA,SAAS,yBAAyB,CAAC,gBAAoC;IACrE,gBAAgB,CAAC,QAAQ,CAAC,iBAAiB,CACzC,IAAI,SAAS,CACX,oBAAoB,EACpB,kBAAkB,wBAEnB,CACF,CAAC;IAEF,gBAAgB,CAAC,eAAe,CAACA,IAAW,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,kBAAkB,CACzB,SAA6B;IAE7B,IAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;;IAE/D,IAAM,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,YAAY,EAAE,CAAC;IAExE,OAAO,IAAI,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,yBAAyB,CAAC,QAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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';
|
|
@@ -0,0 +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 {};
|
|
@@ -0,0 +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;
|
package/dist/index.cjs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/performance-compat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3-2021102231614",
|
|
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",
|
|
7
|
-
"browser": "dist/index.esm2017.js",
|
|
8
|
-
"module": "dist/index.esm2017.js",
|
|
7
|
+
"browser": "dist/esm/index.esm2017.js",
|
|
8
|
+
"module": "dist/esm/index.esm2017.js",
|
|
9
|
+
"esm5": "dist/esm/index.esm5.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"require": "./dist/index.cjs.js",
|
|
13
|
+
"default": "./dist/esm/index.esm2017.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
9
17
|
"files": [
|
|
10
18
|
"dist"
|
|
11
19
|
],
|
|
@@ -26,14 +34,14 @@
|
|
|
26
34
|
},
|
|
27
35
|
"license": "Apache-2.0",
|
|
28
36
|
"peerDependencies": {
|
|
29
|
-
"@firebase/app-compat": "0.
|
|
37
|
+
"@firebase/app-compat": "0.1.7-2021102231614"
|
|
30
38
|
},
|
|
31
39
|
"dependencies": {
|
|
32
|
-
"@firebase/performance": "0.5.
|
|
40
|
+
"@firebase/performance": "0.5.3-2021102231614",
|
|
33
41
|
"@firebase/performance-types": "0.1.0",
|
|
34
|
-
"@firebase/util": "1.4.
|
|
35
|
-
"@firebase/logger": "0.3.
|
|
36
|
-
"@firebase/component": "0.5.
|
|
42
|
+
"@firebase/util": "1.4.1-2021102231614",
|
|
43
|
+
"@firebase/logger": "0.3.1-2021102231614",
|
|
44
|
+
"@firebase/component": "0.5.8-2021102231614",
|
|
37
45
|
"tslib": "^2.1.0"
|
|
38
46
|
},
|
|
39
47
|
"devDependencies": {
|
|
@@ -42,7 +50,7 @@
|
|
|
42
50
|
"rollup-plugin-replace": "2.2.0",
|
|
43
51
|
"rollup-plugin-typescript2": "0.30.0",
|
|
44
52
|
"typescript": "4.2.2",
|
|
45
|
-
"@firebase/app-compat": "0.1.
|
|
53
|
+
"@firebase/app-compat": "0.1.7-2021102231614"
|
|
46
54
|
},
|
|
47
55
|
"repository": {
|
|
48
56
|
"directory": "packages/performance-compat",
|
|
@@ -58,6 +66,5 @@
|
|
|
58
66
|
".ts"
|
|
59
67
|
],
|
|
60
68
|
"reportDir": "./coverage/node"
|
|
61
|
-
}
|
|
62
|
-
"esm5": "dist/index.esm5.js"
|
|
69
|
+
}
|
|
63
70
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm2017.js","sources":["../src/performance.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n trace,\n FirebasePerformance,\n // The PerformanceTrace type has not changed between modular and non-modular packages.\n PerformanceTrace\n} from '@firebase/performance';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\n\nexport class PerformanceCompatImpl\n implements FirebasePerformanceCompat, _FirebaseService\n{\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FirebasePerformance\n ) {}\n\n get instrumentationEnabled(): boolean {\n return this._delegate.instrumentationEnabled;\n }\n\n set instrumentationEnabled(val: boolean) {\n this._delegate.instrumentationEnabled = val;\n }\n\n get dataCollectionEnabled(): boolean {\n return this._delegate.dataCollectionEnabled;\n }\n\n set dataCollectionEnabled(val: boolean) {\n this._delegate.dataCollectionEnabled = val;\n }\n\n trace(traceName: string): PerformanceTrace {\n return trace(this._delegate, traceName);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, { _FirebaseNamespace } from '@firebase/app-compat';\nimport {\n Component,\n ComponentContainer,\n ComponentType\n} from '@firebase/component';\nimport { PerformanceCompatImpl } from './performance';\nimport { name as packageName, version } from '../package.json';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\n\nfunction registerPerformanceCompat(firebaseInstance: _FirebaseNamespace): void {\n firebaseInstance.INTERNAL.registerComponent(\n new Component(\n 'performance-compat',\n performanceFactory,\n ComponentType.PUBLIC\n )\n );\n\n firebaseInstance.registerVersion(packageName, version);\n}\n\nfunction performanceFactory(\n container: ComponentContainer\n): PerformanceCompatImpl {\n const app = container.getProvider('app-compat').getImmediate();\n // The following call will always succeed.\n const performance = container.getProvider('performance').getImmediate();\n\n return new PerformanceCompatImpl(app, performance);\n}\n\nregisterPerformanceCompat(firebase as _FirebaseNamespace);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n performance: {\n (app?: FirebaseApp): FirebasePerformanceCompat;\n };\n }\n interface FirebaseApp {\n performance(): FirebasePerformanceCompat;\n }\n}\n"],"names":["packageName"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;MA0Ba,qBAAqB;IAGhC,YACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,IAAI,sBAAsB;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;KAC9C;IAED,IAAI,sBAAsB,CAAC,GAAY;QACrC,IAAI,CAAC,SAAS,CAAC,sBAAsB,GAAG,GAAG,CAAC;KAC7C;IAED,IAAI,qBAAqB;QACvB,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC7C;IAED,IAAI,qBAAqB,CAAC,GAAY;QACpC,IAAI,CAAC,SAAS,CAAC,qBAAqB,GAAG,GAAG,CAAC;KAC5C;IAED,KAAK,CAAC,SAAiB;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KACzC;;;;;;ACpDH;;;;;;;;;;;;;;;;AA2BA,SAAS,yBAAyB,CAAC,gBAAoC;IACrE,gBAAgB,CAAC,QAAQ,CAAC,iBAAiB,CACzC,IAAI,SAAS,CACX,oBAAoB,EACpB,kBAAkB,wBAEnB,CACF,CAAC;IAEF,gBAAgB,CAAC,eAAe,CAACA,IAAW,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,kBAAkB,CACzB,SAA6B;IAE7B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;;IAE/D,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,YAAY,EAAE,CAAC;IAExE,OAAO,IAAI,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,yBAAyB,CAAC,QAA8B,CAAC"}
|
package/dist/index.esm5.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm5.js","sources":["../src/performance.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n trace,\n FirebasePerformance,\n // The PerformanceTrace type has not changed between modular and non-modular packages.\n PerformanceTrace\n} from '@firebase/performance';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\nimport { FirebaseApp, _FirebaseService } from '@firebase/app-compat';\n\nexport class PerformanceCompatImpl\n implements FirebasePerformanceCompat, _FirebaseService\n{\n constructor(\n public app: FirebaseApp,\n readonly _delegate: FirebasePerformance\n ) {}\n\n get instrumentationEnabled(): boolean {\n return this._delegate.instrumentationEnabled;\n }\n\n set instrumentationEnabled(val: boolean) {\n this._delegate.instrumentationEnabled = val;\n }\n\n get dataCollectionEnabled(): boolean {\n return this._delegate.dataCollectionEnabled;\n }\n\n set dataCollectionEnabled(val: boolean) {\n this._delegate.dataCollectionEnabled = val;\n }\n\n trace(traceName: string): PerformanceTrace {\n return trace(this._delegate, traceName);\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, { _FirebaseNamespace } from '@firebase/app-compat';\nimport {\n Component,\n ComponentContainer,\n ComponentType\n} from '@firebase/component';\nimport { PerformanceCompatImpl } from './performance';\nimport { name as packageName, version } from '../package.json';\nimport { FirebasePerformance as FirebasePerformanceCompat } from '@firebase/performance-types';\n\nfunction registerPerformanceCompat(firebaseInstance: _FirebaseNamespace): void {\n firebaseInstance.INTERNAL.registerComponent(\n new Component(\n 'performance-compat',\n performanceFactory,\n ComponentType.PUBLIC\n )\n );\n\n firebaseInstance.registerVersion(packageName, version);\n}\n\nfunction performanceFactory(\n container: ComponentContainer\n): PerformanceCompatImpl {\n const app = container.getProvider('app-compat').getImmediate();\n // The following call will always succeed.\n const performance = container.getProvider('performance').getImmediate();\n\n return new PerformanceCompatImpl(app, performance);\n}\n\nregisterPerformanceCompat(firebase as _FirebaseNamespace);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n performance: {\n (app?: FirebaseApp): FirebasePerformanceCompat;\n };\n }\n interface FirebaseApp {\n performance(): FirebasePerformanceCompat;\n }\n}\n"],"names":["packageName"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;AA0BA;IAGE,+BACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,sBAAI,yDAAsB;aAA1B;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;SAC9C;aAED,UAA2B,GAAY;YACrC,IAAI,CAAC,SAAS,CAAC,sBAAsB,GAAG,GAAG,CAAC;SAC7C;;;OAJA;IAMD,sBAAI,wDAAqB;aAAzB;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC;SAC7C;aAED,UAA0B,GAAY;YACpC,IAAI,CAAC,SAAS,CAAC,qBAAqB,GAAG,GAAG,CAAC;SAC5C;;;OAJA;IAMD,qCAAK,GAAL,UAAM,SAAiB;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KACzC;IACH,4BAAC;AAAD,CAAC;;;;;ACrDD;;;;;;;;;;;;;;;;AA2BA,SAAS,yBAAyB,CAAC,gBAAoC;IACrE,gBAAgB,CAAC,QAAQ,CAAC,iBAAiB,CACzC,IAAI,SAAS,CACX,oBAAoB,EACpB,kBAAkB,wBAEnB,CACF,CAAC;IAEF,gBAAgB,CAAC,eAAe,CAACA,IAAW,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,kBAAkB,CACzB,SAA6B;IAE7B,IAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;;IAE/D,IAAM,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,YAAY,EAAE,CAAC;IAExE,OAAO,IAAI,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,yBAAyB,CAAC,QAA8B,CAAC"}
|