@firebase/util 1.6.1 → 1.6.2-canary.13550089f
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 +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm2017.js +57 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +57 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +58 -0
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +2 -0
- package/dist/node-esm/index.d.ts +2 -0
- package/dist/node-esm/index.node.d.ts +2 -0
- package/dist/node-esm/index.node.esm.js +57 -2
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/errors.d.ts +1 -1
- package/dist/node-esm/src/promise.d.ts +21 -0
- package/dist/node-esm/src/uuid.d.ts +22 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/promise.d.ts +21 -0
- package/dist/src/uuid.d.ts +22 -0
- package/dist/util-public.d.ts +10 -1
- package/dist/util.d.ts +30 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
/**
|
|
18
|
+
* Copied from https://stackoverflow.com/a/2117523
|
|
19
|
+
* Generates a new uuid.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const uuidv4: () => string;
|
package/dist/src/errors.d.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
*
|
|
50
50
|
* catch (e) {
|
|
51
51
|
* assert(e.message === "Could not find file: foo.txt.");
|
|
52
|
-
* if (e
|
|
52
|
+
* if ((e as FirebaseError)?.code === 'service/file-not-found') {
|
|
53
53
|
* console.log("Could not read file: " + e['file']);
|
|
54
54
|
* }
|
|
55
55
|
* }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
/**
|
|
18
|
+
* Rejects if the given promise doesn't resolve in timeInMS milliseconds.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function promiseWithTimeout<T>(promise: Promise<T>, timeInMS?: number): Promise<T>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
/**
|
|
18
|
+
* Copied from https://stackoverflow.com/a/2117523
|
|
19
|
+
* Generates a new uuid.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const uuidv4: () => string;
|
package/dist/util-public.d.ts
CHANGED
|
@@ -347,7 +347,7 @@ export declare type ErrorFn = (error: Error) => void;
|
|
|
347
347
|
*
|
|
348
348
|
* catch (e) {
|
|
349
349
|
* assert(e.message === "Could not find file: foo.txt.");
|
|
350
|
-
* if (e
|
|
350
|
+
* if ((e as FirebaseError)?.code === 'service/file-not-found') {
|
|
351
351
|
* console.log("Could not read file: " + e['file']);
|
|
352
352
|
* }
|
|
353
353
|
* }
|
|
@@ -642,6 +642,8 @@ export declare function ordinal(i: number): string;
|
|
|
642
642
|
|
|
643
643
|
export declare type PartialObserver<T> = Partial<Observer<T>>;
|
|
644
644
|
|
|
645
|
+
/* Excluded from this release type: promiseWithTimeout */
|
|
646
|
+
|
|
645
647
|
/**
|
|
646
648
|
* @license
|
|
647
649
|
* Copyright 2017 Google LLC
|
|
@@ -805,6 +807,13 @@ export declare interface Subscribe<T> {
|
|
|
805
807
|
|
|
806
808
|
export declare type Unsubscribe = () => void;
|
|
807
809
|
|
|
810
|
+
/**
|
|
811
|
+
* Copied from https://stackoverflow.com/a/2117523
|
|
812
|
+
* Generates a new uuid.
|
|
813
|
+
* @public
|
|
814
|
+
*/
|
|
815
|
+
export declare const uuidv4: () => string;
|
|
816
|
+
|
|
808
817
|
/**
|
|
809
818
|
* Check to make sure the appropriate number of arguments are provided for a public function.
|
|
810
819
|
* Throws an error if it fails.
|
package/dist/util.d.ts
CHANGED
|
@@ -347,7 +347,7 @@ export declare type ErrorFn = (error: Error) => void;
|
|
|
347
347
|
*
|
|
348
348
|
* catch (e) {
|
|
349
349
|
* assert(e.message === "Could not find file: foo.txt.");
|
|
350
|
-
* if (e
|
|
350
|
+
* if ((e as FirebaseError)?.code === 'service/file-not-found') {
|
|
351
351
|
* console.log("Could not read file: " + e['file']);
|
|
352
352
|
* }
|
|
353
353
|
* }
|
|
@@ -642,6 +642,28 @@ export declare function ordinal(i: number): string;
|
|
|
642
642
|
|
|
643
643
|
export declare type PartialObserver<T> = Partial<Observer<T>>;
|
|
644
644
|
|
|
645
|
+
/**
|
|
646
|
+
* @license
|
|
647
|
+
* Copyright 2022 Google LLC
|
|
648
|
+
*
|
|
649
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
650
|
+
* you may not use this file except in compliance with the License.
|
|
651
|
+
* You may obtain a copy of the License at
|
|
652
|
+
*
|
|
653
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
654
|
+
*
|
|
655
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
656
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
657
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
658
|
+
* See the License for the specific language governing permissions and
|
|
659
|
+
* limitations under the License.
|
|
660
|
+
*/
|
|
661
|
+
/**
|
|
662
|
+
* Rejects if the given promise doesn't resolve in timeInMS milliseconds.
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
665
|
+
export declare function promiseWithTimeout<T>(promise: Promise<T>, timeInMS?: number): Promise<T>;
|
|
666
|
+
|
|
645
667
|
/**
|
|
646
668
|
* @license
|
|
647
669
|
* Copyright 2017 Google LLC
|
|
@@ -805,6 +827,13 @@ export declare interface Subscribe<T> {
|
|
|
805
827
|
|
|
806
828
|
export declare type Unsubscribe = () => void;
|
|
807
829
|
|
|
830
|
+
/**
|
|
831
|
+
* Copied from https://stackoverflow.com/a/2117523
|
|
832
|
+
* Generates a new uuid.
|
|
833
|
+
* @public
|
|
834
|
+
*/
|
|
835
|
+
export declare const uuidv4: () => string;
|
|
836
|
+
|
|
808
837
|
/**
|
|
809
838
|
* Check to make sure the appropriate number of arguments are provided for a public function.
|
|
810
839
|
* Throws an error if it fails.
|