@firebase/util 1.9.7-canary.fd8bd4b02 → 1.9.7-dataconnect-preview.d986d4bf2
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 +64 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm2017.js +64 -6
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +66 -5
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +66 -4
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +1 -0
- package/dist/node-esm/index.d.ts +1 -0
- package/dist/node-esm/index.node.d.ts +1 -0
- package/dist/node-esm/index.node.esm.js +64 -6
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/deferred.d.ts +1 -1
- package/dist/node-esm/src/environment.d.ts +3 -0
- package/dist/node-esm/src/errors.d.ts +1 -1
- package/dist/node-esm/src/fetch_provider.d.ts +25 -0
- package/dist/node-esm/src/json.d.ts +1 -1
- package/dist/src/deferred.d.ts +1 -1
- package/dist/src/environment.d.ts +3 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/fetch_provider.d.ts +25 -0
- package/dist/src/json.d.ts +1 -1
- package/dist/util-public.d.ts +32 -3
- package/dist/util.d.ts +32 -3
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ export declare class Deferred<R> {
|
|
|
20
20
|
resolve: (value?: unknown) => void;
|
|
21
21
|
constructor();
|
|
22
22
|
/**
|
|
23
|
-
* Our API internals are not
|
|
23
|
+
* Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
|
|
24
24
|
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
|
25
25
|
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
|
26
26
|
*/
|
|
@@ -35,6 +35,9 @@ export declare function isMobileCordova(): boolean;
|
|
|
35
35
|
export declare function isNode(): boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Detect Browser Environment
|
|
38
|
+
* Note: This will return true for certain test frameworks that are incompletely
|
|
39
|
+
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
40
|
+
* available.
|
|
38
41
|
*/
|
|
39
42
|
export declare function isBrowser(): boolean;
|
|
40
43
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
export declare function jsonEval(str: string): unknown;
|
|
24
24
|
/**
|
|
25
25
|
* Returns JSON representing a javascript object.
|
|
26
|
-
* @param {*} data
|
|
26
|
+
* @param {*} data JavaScript object to be stringified.
|
|
27
27
|
* @return {string} The JSON contents of the object.
|
|
28
28
|
*/
|
|
29
29
|
export declare function stringify(data: unknown): string;
|
package/dist/src/deferred.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class Deferred<R> {
|
|
|
20
20
|
resolve: (value?: unknown) => void;
|
|
21
21
|
constructor();
|
|
22
22
|
/**
|
|
23
|
-
* Our API internals are not
|
|
23
|
+
* Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
|
|
24
24
|
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
|
25
25
|
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
|
26
26
|
*/
|
|
@@ -35,6 +35,9 @@ export declare function isMobileCordova(): boolean;
|
|
|
35
35
|
export declare function isNode(): boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Detect Browser Environment
|
|
38
|
+
* Note: This will return true for certain test frameworks that are incompletely
|
|
39
|
+
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
40
|
+
* available.
|
|
38
41
|
*/
|
|
39
42
|
export declare function isBrowser(): boolean;
|
|
40
43
|
/**
|
package/dist/src/errors.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
}
|
package/dist/src/json.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
export declare function jsonEval(str: string): unknown;
|
|
24
24
|
/**
|
|
25
25
|
* Returns JSON representing a javascript object.
|
|
26
|
-
* @param {*} data
|
|
26
|
+
* @param {*} data JavaScript object to be stringified.
|
|
27
27
|
* @return {string} The JSON contents of the object.
|
|
28
28
|
*/
|
|
29
29
|
export declare function stringify(data: unknown): string;
|
package/dist/util-public.d.ts
CHANGED
|
@@ -274,7 +274,7 @@ export declare class Deferred<R> {
|
|
|
274
274
|
resolve: (value?: unknown) => void;
|
|
275
275
|
constructor();
|
|
276
276
|
/**
|
|
277
|
-
* Our API internals are not
|
|
277
|
+
* Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
|
|
278
278
|
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
|
279
279
|
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
|
280
280
|
*/
|
|
@@ -324,7 +324,7 @@ export declare type ErrorFn = (error: Error) => void;
|
|
|
324
324
|
*
|
|
325
325
|
* Usage:
|
|
326
326
|
*
|
|
327
|
-
* //
|
|
327
|
+
* // TypeScript string literals for type-safe codes
|
|
328
328
|
* type Err =
|
|
329
329
|
* 'unknown' |
|
|
330
330
|
* 'object-not-found'
|
|
@@ -401,6 +401,32 @@ 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
|
+
|
|
404
430
|
/**
|
|
405
431
|
* An object that can be injected into the environment as __FIREBASE_DEFAULTS__,
|
|
406
432
|
* either as a property of globalThis, a shell environment variable, or a
|
|
@@ -576,6 +602,9 @@ export declare const isAdmin: (token: string) => boolean;
|
|
|
576
602
|
|
|
577
603
|
/**
|
|
578
604
|
* Detect Browser Environment
|
|
605
|
+
* Note: This will return true for certain test frameworks that are incompletely
|
|
606
|
+
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
607
|
+
* available.
|
|
579
608
|
*/
|
|
580
609
|
export declare function isBrowser(): boolean;
|
|
581
610
|
|
|
@@ -886,7 +915,7 @@ export declare class Sha1 {
|
|
|
886
915
|
|
|
887
916
|
/**
|
|
888
917
|
* Returns JSON representing a javascript object.
|
|
889
|
-
* @param {*} data
|
|
918
|
+
* @param {*} data JavaScript object to be stringified.
|
|
890
919
|
* @return {string} The JSON contents of the object.
|
|
891
920
|
*/
|
|
892
921
|
export declare function stringify(data: unknown): string;
|
package/dist/util.d.ts
CHANGED
|
@@ -274,7 +274,7 @@ export declare class Deferred<R> {
|
|
|
274
274
|
resolve: (value?: unknown) => void;
|
|
275
275
|
constructor();
|
|
276
276
|
/**
|
|
277
|
-
* Our API internals are not
|
|
277
|
+
* Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
|
|
278
278
|
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
|
279
279
|
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
|
280
280
|
*/
|
|
@@ -324,7 +324,7 @@ export declare type ErrorFn = (error: Error) => void;
|
|
|
324
324
|
*
|
|
325
325
|
* Usage:
|
|
326
326
|
*
|
|
327
|
-
* //
|
|
327
|
+
* // TypeScript string literals for type-safe codes
|
|
328
328
|
* type Err =
|
|
329
329
|
* 'unknown' |
|
|
330
330
|
* 'object-not-found'
|
|
@@ -401,6 +401,32 @@ 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
|
+
|
|
404
430
|
/**
|
|
405
431
|
* An object that can be injected into the environment as __FIREBASE_DEFAULTS__,
|
|
406
432
|
* either as a property of globalThis, a shell environment variable, or a
|
|
@@ -576,6 +602,9 @@ export declare const isAdmin: (token: string) => boolean;
|
|
|
576
602
|
|
|
577
603
|
/**
|
|
578
604
|
* Detect Browser Environment
|
|
605
|
+
* Note: This will return true for certain test frameworks that are incompletely
|
|
606
|
+
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
607
|
+
* available.
|
|
579
608
|
*/
|
|
580
609
|
export declare function isBrowser(): boolean;
|
|
581
610
|
|
|
@@ -906,7 +935,7 @@ export declare class Sha1 {
|
|
|
906
935
|
|
|
907
936
|
/**
|
|
908
937
|
* Returns JSON representing a javascript object.
|
|
909
|
-
* @param {*} data
|
|
938
|
+
* @param {*} data JavaScript object to be stringified.
|
|
910
939
|
* @return {string} The JSON contents of the object.
|
|
911
940
|
*/
|
|
912
941
|
export declare function stringify(data: unknown): string;
|
package/package.json
CHANGED