@firebase/util 1.9.7-dataconnect-preview.d986d4bf2 → 1.10.0-20240916151535
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/index.cjs.js +10 -58
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm2017.js +10 -58
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +10 -61
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +10 -61
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +0 -1
- package/dist/node-esm/index.d.ts +0 -1
- package/dist/node-esm/index.node.d.ts +0 -1
- package/dist/node-esm/index.node.esm.js +10 -58
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/environment.d.ts +6 -2
- package/dist/src/environment.d.ts +6 -2
- package/dist/util-public.d.ts +7 -28
- package/dist/util.d.ts +7 -28
- package/package.json +2 -2
- package/dist/node-esm/src/fetch_provider.d.ts +0 -25
- package/dist/src/fetch_provider.d.ts +0 -25
|
@@ -34,16 +34,20 @@ export declare function isMobileCordova(): boolean;
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function isNode(): boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Detect Browser Environment
|
|
37
|
+
* Detect Browser Environment.
|
|
38
38
|
* Note: This will return true for certain test frameworks that are incompletely
|
|
39
39
|
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
40
40
|
* available.
|
|
41
41
|
*/
|
|
42
42
|
export declare function isBrowser(): boolean;
|
|
43
43
|
/**
|
|
44
|
-
* Detect Web Worker context
|
|
44
|
+
* Detect Web Worker context.
|
|
45
45
|
*/
|
|
46
46
|
export declare function isWebWorker(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Detect Cloudflare Worker context.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isCloudflareWorker(): boolean;
|
|
47
51
|
export declare function isBrowserExtension(): boolean;
|
|
48
52
|
/**
|
|
49
53
|
* Detect React Native.
|
|
@@ -34,16 +34,20 @@ export declare function isMobileCordova(): boolean;
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function isNode(): boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Detect Browser Environment
|
|
37
|
+
* Detect Browser Environment.
|
|
38
38
|
* Note: This will return true for certain test frameworks that are incompletely
|
|
39
39
|
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
40
40
|
* available.
|
|
41
41
|
*/
|
|
42
42
|
export declare function isBrowser(): boolean;
|
|
43
43
|
/**
|
|
44
|
-
* Detect Web Worker context
|
|
44
|
+
* Detect Web Worker context.
|
|
45
45
|
*/
|
|
46
46
|
export declare function isWebWorker(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Detect Cloudflare Worker context.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isCloudflareWorker(): boolean;
|
|
47
51
|
export declare function isBrowserExtension(): boolean;
|
|
48
52
|
/**
|
|
49
53
|
* Detect React Native.
|
package/dist/util-public.d.ts
CHANGED
|
@@ -401,32 +401,6 @@ export declare type ExperimentalKey = 'authTokenSyncURL' | 'authIdTokenMaxAge';
|
|
|
401
401
|
*/
|
|
402
402
|
export declare function extractQuerystring(url: string): string;
|
|
403
403
|
|
|
404
|
-
/**
|
|
405
|
-
* @license
|
|
406
|
-
* Copyright 2023 Google LLC
|
|
407
|
-
*
|
|
408
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
409
|
-
* you may not use this file except in compliance with the License.
|
|
410
|
-
* You may obtain a copy of the License at
|
|
411
|
-
*
|
|
412
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
413
|
-
*
|
|
414
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
415
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
416
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
417
|
-
* See the License for the specific language governing permissions and
|
|
418
|
-
* limitations under the License.
|
|
419
|
-
*/
|
|
420
|
-
export declare class FetchProvider {
|
|
421
|
-
private static fetchImpl;
|
|
422
|
-
private static headersImpl;
|
|
423
|
-
private static responseImpl;
|
|
424
|
-
static initialize(fetchImpl: typeof fetch, headersImpl?: typeof Headers, responseImpl?: typeof Response): void;
|
|
425
|
-
static fetch(): typeof fetch;
|
|
426
|
-
static headers(): typeof Headers;
|
|
427
|
-
static response(): typeof Response;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
404
|
/**
|
|
431
405
|
* An object that can be injected into the environment as __FIREBASE_DEFAULTS__,
|
|
432
406
|
* either as a property of globalThis, a shell environment variable, or a
|
|
@@ -601,7 +575,7 @@ export declare function getUA(): string;
|
|
|
601
575
|
export declare const isAdmin: (token: string) => boolean;
|
|
602
576
|
|
|
603
577
|
/**
|
|
604
|
-
* Detect Browser Environment
|
|
578
|
+
* Detect Browser Environment.
|
|
605
579
|
* Note: This will return true for certain test frameworks that are incompletely
|
|
606
580
|
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
607
581
|
* available.
|
|
@@ -610,6 +584,11 @@ export declare function isBrowser(): boolean;
|
|
|
610
584
|
|
|
611
585
|
export declare function isBrowserExtension(): boolean;
|
|
612
586
|
|
|
587
|
+
/**
|
|
588
|
+
* Detect Cloudflare Worker context.
|
|
589
|
+
*/
|
|
590
|
+
export declare function isCloudflareWorker(): boolean;
|
|
591
|
+
|
|
613
592
|
/** Detects Electron apps. */
|
|
614
593
|
export declare function isElectron(): boolean;
|
|
615
594
|
|
|
@@ -689,7 +668,7 @@ export declare const isValidFormat: (token: string) => boolean;
|
|
|
689
668
|
export declare const isValidTimestamp: (token: string) => boolean;
|
|
690
669
|
|
|
691
670
|
/**
|
|
692
|
-
* Detect Web Worker context
|
|
671
|
+
* Detect Web Worker context.
|
|
693
672
|
*/
|
|
694
673
|
export declare function isWebWorker(): boolean;
|
|
695
674
|
|
package/dist/util.d.ts
CHANGED
|
@@ -401,32 +401,6 @@ export declare type ExperimentalKey = 'authTokenSyncURL' | 'authIdTokenMaxAge';
|
|
|
401
401
|
*/
|
|
402
402
|
export declare function extractQuerystring(url: string): string;
|
|
403
403
|
|
|
404
|
-
/**
|
|
405
|
-
* @license
|
|
406
|
-
* Copyright 2023 Google LLC
|
|
407
|
-
*
|
|
408
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
409
|
-
* you may not use this file except in compliance with the License.
|
|
410
|
-
* You may obtain a copy of the License at
|
|
411
|
-
*
|
|
412
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
413
|
-
*
|
|
414
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
415
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
416
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
417
|
-
* See the License for the specific language governing permissions and
|
|
418
|
-
* limitations under the License.
|
|
419
|
-
*/
|
|
420
|
-
export declare class FetchProvider {
|
|
421
|
-
private static fetchImpl;
|
|
422
|
-
private static headersImpl;
|
|
423
|
-
private static responseImpl;
|
|
424
|
-
static initialize(fetchImpl: typeof fetch, headersImpl?: typeof Headers, responseImpl?: typeof Response): void;
|
|
425
|
-
static fetch(): typeof fetch;
|
|
426
|
-
static headers(): typeof Headers;
|
|
427
|
-
static response(): typeof Response;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
404
|
/**
|
|
431
405
|
* An object that can be injected into the environment as __FIREBASE_DEFAULTS__,
|
|
432
406
|
* either as a property of globalThis, a shell environment variable, or a
|
|
@@ -601,7 +575,7 @@ export declare function getUA(): string;
|
|
|
601
575
|
export declare const isAdmin: (token: string) => boolean;
|
|
602
576
|
|
|
603
577
|
/**
|
|
604
|
-
* Detect Browser Environment
|
|
578
|
+
* Detect Browser Environment.
|
|
605
579
|
* Note: This will return true for certain test frameworks that are incompletely
|
|
606
580
|
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
607
581
|
* available.
|
|
@@ -610,6 +584,11 @@ export declare function isBrowser(): boolean;
|
|
|
610
584
|
|
|
611
585
|
export declare function isBrowserExtension(): boolean;
|
|
612
586
|
|
|
587
|
+
/**
|
|
588
|
+
* Detect Cloudflare Worker context.
|
|
589
|
+
*/
|
|
590
|
+
export declare function isCloudflareWorker(): boolean;
|
|
591
|
+
|
|
613
592
|
/** Detects Electron apps. */
|
|
614
593
|
export declare function isElectron(): boolean;
|
|
615
594
|
|
|
@@ -689,7 +668,7 @@ export declare const isValidFormat: (token: string) => boolean;
|
|
|
689
668
|
export declare const isValidTimestamp: (token: string) => boolean;
|
|
690
669
|
|
|
691
670
|
/**
|
|
692
|
-
* Detect Web Worker context
|
|
671
|
+
* Detect Web Worker context.
|
|
693
672
|
*/
|
|
694
673
|
export declare function isWebWorker(): boolean;
|
|
695
674
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/util",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0-20240916151535",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test": "run-p --npm-path npm lint test:all",
|
|
37
37
|
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
|
|
38
38
|
"test:all": "run-p --npm-path npm test:browser test:node",
|
|
39
|
-
"test:browser": "karma start
|
|
39
|
+
"test:browser": "karma start",
|
|
40
40
|
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --config ../../config/mocharc.node.js",
|
|
41
41
|
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
|
|
42
42
|
"api-report": "api-extractor run --local --verbose",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 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 declare class FetchProvider {
|
|
18
|
-
private static fetchImpl;
|
|
19
|
-
private static headersImpl;
|
|
20
|
-
private static responseImpl;
|
|
21
|
-
static initialize(fetchImpl: typeof fetch, headersImpl?: typeof Headers, responseImpl?: typeof Response): void;
|
|
22
|
-
static fetch(): typeof fetch;
|
|
23
|
-
static headers(): typeof Headers;
|
|
24
|
-
static response(): typeof Response;
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 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 declare class FetchProvider {
|
|
18
|
-
private static fetchImpl;
|
|
19
|
-
private static headersImpl;
|
|
20
|
-
private static responseImpl;
|
|
21
|
-
static initialize(fetchImpl: typeof fetch, headersImpl?: typeof Headers, responseImpl?: typeof Response): void;
|
|
22
|
-
static fetch(): typeof fetch;
|
|
23
|
-
static headers(): typeof Headers;
|
|
24
|
-
static response(): typeof Response;
|
|
25
|
-
}
|